- fixed the summary screen.

This commit is contained in:
Christoph Oelckers 2020-08-16 23:00:05 +02:00
parent 85538b467b
commit 736f1461ca
2 changed files with 9 additions and 12 deletions

View file

@ -406,7 +406,7 @@ private:
int line = 0; int line = 0;
FString ds; 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); MNU_DrawString(60, BONUS_LINE(line++), ds, 1, 16);
if (currentLevel->designerTime > 0) if (currentLevel->designerTime > 0)
@ -430,7 +430,7 @@ private:
MNU_DrawString(160, 185, GStrings("PRESSKEY"), 1, 19, 0); 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(); if (ret != 1) StopSound();
return ret; return ret;
} }
@ -582,12 +582,6 @@ void StatScreen(int FinishAnim, CompletionFunc completion)
if (FinishAnim) if (FinishAnim)
{ {
StopSound(); 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++] = { GetFinishAnim(FinishAnim) };
jobs[job++] = { Create<DSWLevelSummaryScreen>() }; jobs[job++] = { Create<DSWLevelSummaryScreen>() };
if (FinishAnim == ANIM_ZILLA) if (FinishAnim == ANIM_ZILLA)

View file

@ -170,8 +170,6 @@ int ThemeTrack[6];
/// L O C A L P R O T O T Y P E S ///////////////////////////////////////////////////////// /// L O C A L P R O T O T Y P E S /////////////////////////////////////////////////////////
void SybexScreen(void); void SybexScreen(void);
void StatScreen(PLAYERp mpp);
void RunLevel(void);
///////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
@ -717,11 +715,16 @@ void EndOfLevel()
Player[myconnectindex].Reverb = 0; Player[myconnectindex].Reverb = 0;
StopSound(); StopSound();
soundEngine->UpdateSounds((int)totalclock); 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(); TerminateLevel();
if (NextLevel == nullptr) if (NextLevel == nullptr)
{ {
STAT_Update(true); STAT_Update(true);