1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-29 17:15:34 +00:00

Prevent older binaries from incorrectly loading newer saves

This commit is contained in:
Evil Eye 2024-07-25 22:37:44 +02:00
parent 68be9a9544
commit 5c4deb3f88
2 changed files with 3 additions and 4 deletions

View file

@ -508,10 +508,8 @@ namespace MWWorld
}
break;
case ESM::REC_PLAY:
if (!mIdsRebuilt)
if (reader.getFormatVersion() <= ESM::MaxPlayerBeforeCellDataFormatVersion && !mIdsRebuilt)
{
// FIME this can be removed when MinSupportedSaveGameFormatVersion > 32
// Older saves have the player before the WorldModel.
mStore.rebuildIdsIndex();
mIdsRebuilt = true;
}

View file

@ -27,7 +27,8 @@ namespace ESM
inline constexpr FormatVersion MaxActiveSpellSlotIndexFormatVersion = 27;
inline constexpr FormatVersion MaxOldCountFormatVersion = 30;
inline constexpr FormatVersion MaxActiveSpellTypeVersion = 31;
inline constexpr FormatVersion CurrentSaveGameFormatVersion = 32;
inline constexpr FormatVersion MaxPlayerBeforeCellDataFormatVersion = 32;
inline constexpr FormatVersion CurrentSaveGameFormatVersion = 33;
inline constexpr FormatVersion MinSupportedSaveGameFormatVersion = 5;
inline constexpr FormatVersion OpenMW0_48SaveGameFormatVersion = 21;