mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-28 15:11:55 +00:00
Use old modded behavior when loading old files, instead of ignoring
Let's not pretend script-kiddie edited old files are now perfectly A-OK :p
This commit is contained in:
parent
1b43cdddd5
commit
bcfe0da8fc
1 changed files with 12 additions and 3 deletions
15
src/g_game.c
15
src/g_game.c
|
@ -4322,11 +4322,20 @@ void G_LoadGameData(void)
|
|||
totalplaytime = READUINT32(save_p);
|
||||
|
||||
#ifdef COMPAT_GAMEDATA_ID
|
||||
// Ignore for backwards compat, it'll get fixed when saving.
|
||||
if (versionID == COMPAT_GAMEDATA_ID)
|
||||
{
|
||||
// Old files use a UINT8 here.
|
||||
READUINT8(save_p);
|
||||
// We'll temporarily use the old condition when loading an older file.
|
||||
// The proper mod-specific hash will get saved in afterwards.
|
||||
boolean modded = READUINT8(save_p);
|
||||
|
||||
if (modded && !savemoddata)
|
||||
{
|
||||
goto datacorrupt;
|
||||
}
|
||||
else if (modded != true && modded != false)
|
||||
{
|
||||
goto datacorrupt;
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue