mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 01:01:33 +00:00
Merge branch 'unlock-trigger-fix' into 'next'
Update unlockables before level load executors See merge request STJr/SRB2!2289
This commit is contained in:
commit
233949789e
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