From 06e90505b1fdf5516effd85e1f38d15f16ac2a54 Mon Sep 17 00:00:00 2001 From: Patiga Date: Tue, 13 Oct 2020 09:50:03 +0200 Subject: [PATCH 1/2] Use the same value as vanilla --- src/game/editor/io.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/game/editor/io.cpp b/src/game/editor/io.cpp index 9bde07c33..12385cfa5 100644 --- a/src/game/editor/io.cpp +++ b/src/game/editor/io.cpp @@ -387,7 +387,7 @@ int CEditorMap::Save(class IStorage *pStorage, const char *pFileName) CMapItemLayerTilemap Item; 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 1 Item.m_Layer.m_Flags = pLayer->m_Flags; Item.m_Layer.m_Type = pLayer->m_Type; @@ -475,7 +475,7 @@ int CEditorMap::Save(class IStorage *pStorage, const char *pFileName) { CMapItemLayerQuads Item; 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 1 Item.m_Layer.m_Flags = pLayer->m_Flags; Item.m_Layer.m_Type = pLayer->m_Type; Item.m_Image = pLayer->m_Image; @@ -504,7 +504,7 @@ int CEditorMap::Save(class IStorage *pStorage, const char *pFileName) { CMapItemLayerSounds Item; 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 1 Item.m_Layer.m_Flags = pLayer->m_Flags; Item.m_Layer.m_Type = pLayer->m_Type; Item.m_Sound = pLayer->m_Sound; From a252097e9a678e2ea52f0cc1300ed4703f37a312 Mon Sep 17 00:00:00 2001 From: Patiga Date: Tue, 13 Oct 2020 09:53:33 +0200 Subject: [PATCH 2/2] Fix comments --- src/game/editor/io.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/game/editor/io.cpp b/src/game/editor/io.cpp index 12385cfa5..12acd8d83 100644 --- a/src/game/editor/io.cpp +++ b/src/game/editor/io.cpp @@ -387,7 +387,7 @@ int CEditorMap::Save(class IStorage *pStorage, const char *pFileName) CMapItemLayerTilemap Item; Item.m_Version = 3; - Item.m_Layer.m_Version = 0; // 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_Type = pLayer->m_Type; @@ -475,7 +475,7 @@ int CEditorMap::Save(class IStorage *pStorage, const char *pFileName) { CMapItemLayerQuads Item; Item.m_Version = 2; - Item.m_Layer.m_Version = 0; // 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_Type = pLayer->m_Type; Item.m_Image = pLayer->m_Image; @@ -504,7 +504,7 @@ int CEditorMap::Save(class IStorage *pStorage, const char *pFileName) { CMapItemLayerSounds Item; Item.m_Version = CMapItemLayerSounds::CURRENT_VERSION; - Item.m_Layer.m_Version = 0; // 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_Type = pLayer->m_Type; Item.m_Sound = pLayer->m_Sound;