- proper handling for running an end-of-game intermission.
This commit is contained in:
parent
ce59b47e93
commit
9b0b44d83b
5 changed files with 16 additions and 20 deletions
|
|
@ -904,7 +904,6 @@ DIntermissionController* FLevelLocals::CreateIntermission()
|
|||
ext->mDefined & FExitText::DEF_LOOKUP,
|
||||
false);
|
||||
}
|
||||
if (controller) controller->mEndGame = false;
|
||||
return controller;
|
||||
}
|
||||
|
||||
|
|
@ -936,14 +935,11 @@ DIntermissionController* FLevelLocals::CreateIntermission()
|
|||
}
|
||||
}
|
||||
}
|
||||
if (controller) controller->mEndGame = endgame;
|
||||
return controller;
|
||||
}
|
||||
|
||||
void RunIntermission(DIntermissionController* intermissionScreen, DObject* statusScreen, std::function<void(bool)> completionf)
|
||||
{
|
||||
D_StartTitle();
|
||||
|
||||
if (!intermissionScreen && !statusScreen)
|
||||
{
|
||||
completionf(false);
|
||||
|
|
@ -1014,12 +1010,12 @@ void G_DoCompleted (void)
|
|||
|
||||
statusScreen = WI_Start (&staticWmInfo);
|
||||
}
|
||||
bool endgame = intermissionScreen && intermissionScreen->mEndGame;
|
||||
bool endgame = strncmp(nextlevel, "enDSeQ", 6) == 0;
|
||||
intermissionScreen = primaryLevel->CreateIntermission();
|
||||
RunIntermission(intermissionScreen, statusScreen, [=](bool)
|
||||
{
|
||||
if (!endgame) primaryLevel->WorldDone();
|
||||
else if (!intermissionScreen) D_StartTitle();
|
||||
else D_StartTitle();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue