mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 05:51:20 +00:00
- properly deal with 'gototitle'.
This commit is contained in:
parent
1aa71cc5a3
commit
7b59293995
3 changed files with 20 additions and 10 deletions
|
@ -942,6 +942,13 @@ DIntermissionController* FLevelLocals::CreateIntermission()
|
|||
|
||||
void RunIntermission(DIntermissionController* intermissionScreen, DObject* statusScreen, std::function<void(bool)> completionf)
|
||||
{
|
||||
D_StartTitle();
|
||||
|
||||
if (!intermissionScreen && !statusScreen)
|
||||
{
|
||||
completionf(false);
|
||||
return;
|
||||
}
|
||||
runner = CreateRunner(false);
|
||||
GC::WriteBarrier(runner);
|
||||
completion = std::move(completionf);
|
||||
|
@ -1010,9 +1017,9 @@ void G_DoCompleted (void)
|
|||
bool endgame = intermissionScreen && intermissionScreen->mEndGame;
|
||||
intermissionScreen = primaryLevel->CreateIntermission();
|
||||
RunIntermission(intermissionScreen, statusScreen, [=](bool)
|
||||
{
|
||||
{
|
||||
if (!endgame) primaryLevel->WorldDone();
|
||||
|
||||
else if (!intermissionScreen) D_StartTitle();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -872,9 +872,7 @@ again:
|
|||
}
|
||||
else if (action->mClass == TITLE_ID)
|
||||
{
|
||||
Destroy();
|
||||
D_StartTitle ();
|
||||
return false;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1011,13 +1009,21 @@ DIntermissionController* F_StartIntermission(FIntermissionDescriptor *desc, bool
|
|||
DIntermissionController* F_StartIntermission(FName seq)
|
||||
{
|
||||
FIntermissionDescriptor **pdesc = IntermissionDescriptors.CheckKey(seq);
|
||||
if (pdesc == nullptr)
|
||||
if (pdesc == nullptr || (*pdesc)->mActions.Size() == 0)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
return F_StartIntermission(*pdesc, false);
|
||||
auto desc = *pdesc;
|
||||
auto action = desc->mActions[0];
|
||||
if (action->mClass == TITLE_ID)
|
||||
{
|
||||
// is handled elsewhere.
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return F_StartIntermission(desc, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -412,9 +412,6 @@ Intermission Inter_Underwater
|
|||
{
|
||||
Background = "E2END", 0
|
||||
}
|
||||
GotoTitle
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
Intermission Inter_Demonscroll
|
||||
|
|
Loading…
Reference in a new issue