diff --git a/source/sw/src/2d.cpp b/source/sw/src/2d.cpp index fa38f63b1..eaca1af40 100644 --- a/source/sw/src/2d.cpp +++ b/source/sw/src/2d.cpp @@ -406,7 +406,7 @@ private: int line = 0; FString ds; - ds.Format("%s %2d : %02d", GStrings("TXT_YOURTIME"), minutes, seconds); + ds.Format("%s %2d:%02d", GStrings("TXT_YOURTIME"), minutes, seconds); MNU_DrawString(60, BONUS_LINE(line++), ds, 1, 16); if (currentLevel->designerTime > 0) @@ -430,7 +430,7 @@ private: MNU_DrawString(160, 185, GStrings("PRESSKEY"), 1, 19, 0); - int ret = (State == State->NextState)? 0 : skiprequest ? -1 : 1; + int ret = skiprequest ? -1 : 1; if (ret != 1) StopSound(); return ret; } @@ -582,12 +582,6 @@ void StatScreen(int FinishAnim, CompletionFunc completion) if (FinishAnim) { StopSound(); - - if (FinishAnim == ANIM_SUMO) // next level hasn't been set for this. - NextLevel = FindMapByLevelNum(currentLevel->levelNumber + 1); - else - NextLevel = nullptr; - jobs[job++] = { GetFinishAnim(FinishAnim) }; jobs[job++] = { Create() }; if (FinishAnim == ANIM_ZILLA) diff --git a/source/sw/src/game.cpp b/source/sw/src/game.cpp index 2486820a1..f03620ff0 100644 --- a/source/sw/src/game.cpp +++ b/source/sw/src/game.cpp @@ -170,8 +170,6 @@ int ThemeTrack[6]; /// L O C A L P R O T O T Y P E S ///////////////////////////////////////////////////////// void SybexScreen(void); -void StatScreen(PLAYERp mpp); -void RunLevel(void); ///////////////////////////////////////////////////////////////////////////////////////////// //--------------------------------------------------------------------------- @@ -717,11 +715,16 @@ void EndOfLevel() Player[myconnectindex].Reverb = 0; StopSound(); soundEngine->UpdateSounds((int)totalclock); + // NextLevel must be null while the intermission is running, but we still need the value for later + auto localNextLevel = NextLevel; + NextLevel = nullptr; + if (FinishAnim == ANIM_SUMO && localNextLevel == nullptr) // next level hasn't been set for this. + localNextLevel = FindMapByLevelNum(currentLevel->levelNumber + 1); - StatScreen(FinishAnim, [](bool) + StatScreen(FinishAnim, [=](bool) { + NextLevel = localNextLevel; TerminateLevel(); - if (NextLevel == nullptr) { STAT_Update(true);