mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-13 19:54:17 +02:00
Fix save compatiblity with 1.4
This commit is contained in:
@@ -264,7 +264,12 @@ public:
|
|||||||
h & width;
|
h & width;
|
||||||
h & height;
|
h & height;
|
||||||
h & twoLevel;
|
h & twoLevel;
|
||||||
h & difficulty;
|
// FIXME: we should serialize enum's according to their underlying type
|
||||||
|
// should be fixed when we are making breaking change to save compatiblity
|
||||||
|
static_assert(Handler::Version::MINIMAL < Handler::Version::RELEASE_143);
|
||||||
|
uint8_t difficultyInteger = static_cast<uint8_t>(difficulty);
|
||||||
|
h & difficultyInteger;
|
||||||
|
difficulty = static_cast<EMapDifficulty>(difficultyInteger);
|
||||||
h & levelLimit;
|
h & levelLimit;
|
||||||
h & areAnyPlayers;
|
h & areAnyPlayers;
|
||||||
h & players;
|
h & players;
|
||||||
|
Reference in New Issue
Block a user