diff --git a/src/client/GameSave.cpp b/src/client/GameSave.cpp index 2baead119..75050f46c 100644 --- a/src/client/GameSave.cpp +++ b/src/client/GameSave.cpp @@ -59,9 +59,12 @@ void GameSave::MapPalette() auto &elements = sd.elements; if(palette.size()) { - for(int i = 0; i < PT_NUM; i++) + if (version >= Version(98, 0)) { - partMap[i] = 0; + for(int i = 0; i < PT_NUM; i++) + { + partMap[i] = 0; + } } for(auto &pi : palette) { diff --git a/src/common/Version.h b/src/common/Version.h index ae215e3f0..c8febaad7 100644 --- a/src/common/Version.h +++ b/src/common/Version.h @@ -27,6 +27,21 @@ struct Version return *this < other || *this == other; } + constexpr bool operator >=(const Version &other) const + { + return !(*this < other); + } + + constexpr bool operator >(const Version &other) const + { + return !(*this <= other); + } + + constexpr bool operator !=(const Version &other) const + { + return !(*this == other); + } + constexpr size_t operator [](size_t index) const { return components[index];