diff --git a/src/g_game.c b/src/g_game.c index f8d08183f..d9d7378a2 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -3972,7 +3972,7 @@ void G_AddMapToBuffer(UINT16 map) // // G_UpdateVisited // -static void G_UpdateVisited(void) +void G_UpdateVisited(void) { UINT8 i; UINT8 earnedEmblems; @@ -5574,7 +5574,7 @@ void G_SaveGameData(void) UINT8 mapvisitedtemp = (mapheaderinfo[i]->records.mapvisited & MV_MAX); - if ((mapheaderinfo[i]->menuflags & LF2_FINISHNEEDED)) + if ((mapheaderinfo[i]->menuflags & (LF2_FINISHNEEDED|LF2_HIDEINMENU))) { mapvisitedtemp |= MV_FINISHNEEDED; } diff --git a/src/g_game.h b/src/g_game.h index 2f498134e..a8ba57e5e 100644 --- a/src/g_game.h +++ b/src/g_game.h @@ -281,6 +281,8 @@ INT16 G_GetFirstMapOfGametype(UINT8 pgametype); UINT16 G_RandMap(UINT32 tolflags, UINT16 pprevmap, boolean ignoreBuffers, boolean callAgainSoon, UINT16 *extBuffer); void G_AddMapToBuffer(UINT16 map); +void G_UpdateVisited(void); + #ifdef __cplusplus } // extern "C" #endif diff --git a/src/k_podium.c b/src/k_podium.c index 480f3358c..7b2a6eb0b 100644 --- a/src/k_podium.c +++ b/src/k_podium.c @@ -291,9 +291,9 @@ void K_FinishCeremony(void) podiumData.ranking = true; - // Play the noise now - M_UpdateUnlockablesAndExtraEmblems(true, true); - G_SaveGameData(); + // Play the noise now (via G_UpdateVisited's concluding gamedata save) + prevmap = gamemap-1; + G_UpdateVisited(); } /*-------------------------------------------------- diff --git a/src/s_sound.c b/src/s_sound.c index 9a2fbe466..966a61623 100644 --- a/src/s_sound.c +++ b/src/s_sound.c @@ -1533,7 +1533,7 @@ static boolean S_SoundTestDefLocked(musicdef_t *def) return false; // Is the level tied to SP progression? - if ((mapheaderinfo[def->sequence.map]->menuflags & LF2_FINISHNEEDED) + if ((mapheaderinfo[def->sequence.map]->menuflags & (LF2_FINISHNEEDED|LF2_HIDEINMENU)) && !(mapheaderinfo[def->sequence.map]->records.mapvisited & MV_BEATEN)) return true;