Merge branch 'visit-unlockables-fix' into 'next'

Update & save unlockables when visiting a new map

Closes #1122

See merge request STJr/SRB2!2279
This commit is contained in:
sphere 2024-01-29 13:55:43 +00:00
commit 770bc934b1

View file

@ -7975,6 +7975,18 @@ boolean P_LoadLevel(boolean fromnetsave, boolean reloadinggamestate)
{
clientGamedata->mapvisited[gamemap-1] |= MV_VISITED;
serverGamedata->mapvisited[gamemap-1] |= MV_VISITED;
M_SilentUpdateUnlockablesAndEmblems(serverGamedata);
if (M_UpdateUnlockablesAndExtraEmblems(clientGamedata))
{
S_StartSound(NULL, sfx_s3k68);
G_SaveGameData(clientGamedata);
}
else if (!reloadinggamestate)
{
G_SaveGameData(clientGamedata);
}
}
levelloading = false;