mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-01 22:21:05 +00:00
Update unlockables before level load executors
Another issue that seems related to #1122
This commit is contained in:
parent
3bd53b6ca3
commit
c6a68f69ce
1 changed files with 18 additions and 18 deletions
|
@ -7913,6 +7913,24 @@ boolean P_LoadLevel(boolean fromnetsave, boolean reloadinggamestate)
|
|||
if (!P_LoadMapFromFile())
|
||||
return false;
|
||||
|
||||
if (!demoplayback)
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
// init anything that P_SpawnSlopes/P_LoadThings needs to know
|
||||
P_InitSpecials();
|
||||
|
||||
|
@ -7971,24 +7989,6 @@ boolean P_LoadLevel(boolean fromnetsave, boolean reloadinggamestate)
|
|||
nextmapoverride = 0;
|
||||
skipstats = 0;
|
||||
|
||||
if (!demoplayback)
|
||||
{
|
||||
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;
|
||||
|
||||
P_RunCachedActions();
|
||||
|
|
Loading…
Reference in a new issue