mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-20 06:58:20 +00:00
Merge #3082
3082: Set correct value on layer saving (which was recently uninitialized) r=def- a=Patiga Didn't check out the teeworlds source while setting the value the last time. teeworlds sets those values to 0. Co-authored-by: Patiga <dev@patiga.eu>
This commit is contained in:
commit
05fdd021c7
|
@ -387,7 +387,7 @@ int CEditorMap::Save(class IStorage *pStorage, const char *pFileName)
|
||||||
CMapItemLayerTilemap Item;
|
CMapItemLayerTilemap Item;
|
||||||
Item.m_Version = 3;
|
Item.m_Version = 3;
|
||||||
|
|
||||||
Item.m_Layer.m_Version = 1; // was previously uninitialized, do not rely on it being 1
|
Item.m_Layer.m_Version = 0; // was previously uninitialized, do not rely on it being 0
|
||||||
Item.m_Layer.m_Flags = pLayer->m_Flags;
|
Item.m_Layer.m_Flags = pLayer->m_Flags;
|
||||||
Item.m_Layer.m_Type = pLayer->m_Type;
|
Item.m_Layer.m_Type = pLayer->m_Type;
|
||||||
|
|
||||||
|
@ -475,7 +475,7 @@ int CEditorMap::Save(class IStorage *pStorage, const char *pFileName)
|
||||||
{
|
{
|
||||||
CMapItemLayerQuads Item;
|
CMapItemLayerQuads Item;
|
||||||
Item.m_Version = 2;
|
Item.m_Version = 2;
|
||||||
Item.m_Layer.m_Version = 1; // was previously uninitialized, do not rely on it being 1
|
Item.m_Layer.m_Version = 0; // was previously uninitialized, do not rely on it being 0
|
||||||
Item.m_Layer.m_Flags = pLayer->m_Flags;
|
Item.m_Layer.m_Flags = pLayer->m_Flags;
|
||||||
Item.m_Layer.m_Type = pLayer->m_Type;
|
Item.m_Layer.m_Type = pLayer->m_Type;
|
||||||
Item.m_Image = pLayer->m_Image;
|
Item.m_Image = pLayer->m_Image;
|
||||||
|
@ -504,7 +504,7 @@ int CEditorMap::Save(class IStorage *pStorage, const char *pFileName)
|
||||||
{
|
{
|
||||||
CMapItemLayerSounds Item;
|
CMapItemLayerSounds Item;
|
||||||
Item.m_Version = CMapItemLayerSounds::CURRENT_VERSION;
|
Item.m_Version = CMapItemLayerSounds::CURRENT_VERSION;
|
||||||
Item.m_Layer.m_Version = 1; // was previously uninitialized, do not rely on it being 1
|
Item.m_Layer.m_Version = 0; // was previously uninitialized, do not rely on it being 0
|
||||||
Item.m_Layer.m_Flags = pLayer->m_Flags;
|
Item.m_Layer.m_Flags = pLayer->m_Flags;
|
||||||
Item.m_Layer.m_Type = pLayer->m_Type;
|
Item.m_Layer.m_Type = pLayer->m_Type;
|
||||||
Item.m_Sound = pLayer->m_Sound;
|
Item.m_Sound = pLayer->m_Sound;
|
||||||
|
|
Loading…
Reference in a new issue