allow optionally skipping initial wipe in in-game intermissions

This commit is contained in:
Ricardo Luís Vaz Silva 2025-01-25 19:50:54 -03:00
commit 33bae944f7
9 changed files with 26 additions and 24 deletions

View file

@ -1066,13 +1066,13 @@ void DIntermissionController::OnDestroy ()
//
//==========================================================================
DIntermissionController* F_StartIntermission(FIntermissionDescriptor *desc, bool deleteme, bool ending)
DIntermissionController* F_StartIntermission(FIntermissionDescriptor *desc, int state, bool deleteme, bool ending)
{
ScaleOverrider s(twod);
S_StopAllChannels ();
gameaction = ga_nothing;
gamestate = GS_FINALE;
//if (state == FSTATE_InLevel) wipegamestate = GS_FINALE; // don't wipe when within a level.
if (state == FSTATE_InLevelNoWipe) wipegamestate = GS_FINALE; // don't wipe when within a level.
auto CurrentIntermission = Create<DIntermissionController>(desc, deleteme, ending);
// If the intermission finishes straight away then cancel the wipe.
@ -1093,7 +1093,7 @@ DIntermissionController* F_StartIntermission(FIntermissionDescriptor *desc, bool
//
//==========================================================================
DIntermissionController* F_StartIntermission(FName seq)
DIntermissionController* F_StartIntermission(FName seq, int state)
{
FIntermissionDescriptor **pdesc = IntermissionDescriptors.CheckKey(seq);
if (pdesc == nullptr || (*pdesc)->mActions.Size() == 0)
@ -1110,7 +1110,7 @@ DIntermissionController* F_StartIntermission(FName seq)
return nullptr;
}
return F_StartIntermission(desc, false);
return F_StartIntermission(desc, state, false);
}
}