Fix: next 67 savegame versions are used in PatchPacks; skip them (#8411)
Various of PatchPacks (Spring 2013, Joker, ChillPP) used versions
slightly higher than ours. Of course, as time went by, this
caught up with us, and we are now almost pushing a new version
that would conflict with them. To avoid users creating unneeded
issues about "why can I not load my savegame", lets be ahead of
the curve and flat-out refuse to load them.
Version-wise, this is totally fine. We have ~32k versions to go
before we run out (0x8000 is masked by JGRPP; we should avoid
using that). At the rate we bump savegames, this is not going to
happen in any sane reality.
(cherry picked from commit d8c8f4e72d
)
This commit is contained in:

committed by
Jonathan G Rennison

parent
483ed2f468
commit
488187a423
@@ -2036,6 +2036,8 @@ inline void SlRIFFSpringPPCheck(size_t len)
|
||||
SlXvSpringPPSpecialSavegameVersions();
|
||||
} else if (_sl_version > SAVEGAME_VERSION) {
|
||||
SlError(STR_GAME_SAVELOAD_ERROR_TOO_NEW_SAVEGAME);
|
||||
} else if (_sl_version >= SLV_START_PATCHPACKS && _sl_version <= SLV_END_PATCHPACKS) {
|
||||
SlError(STR_GAME_SAVELOAD_ERROR_PATCHPACK);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3243,6 +3245,7 @@ static SaveOrLoadResult DoLoad(LoadFilter *reader, bool load_check)
|
||||
|
||||
/* Is the version higher than the current? */
|
||||
if (_sl_version > SAVEGAME_VERSION && !special_version) SlError(STR_GAME_SAVELOAD_ERROR_TOO_NEW_SAVEGAME);
|
||||
if (_sl_version >= SLV_START_PATCHPACKS && _sl_version <= SLV_END_PATCHPACKS && !special_version) SlError(STR_GAME_SAVELOAD_ERROR_PATCHPACK);
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user