M_EndModeAttackRun: Fix recursivity issue that resulted in natural ends to replays losing track of restoreMenu

This commit is contained in:
toaster 2024-03-04 17:34:54 +00:00 committed by James R
parent 7f0df71558
commit 9b9c2cbcb6

View file

@ -53,16 +53,23 @@ menu_t PAUSE_PlaybackMenuDef = {
};
void M_EndModeAttackRun(void)
{
if (demo.playback)
{
G_CheckDemoStatus(); // Cancel recording
return;
}
Command_ExitGame_f(); // Clear a bunch of state
if (!modeattacking)
return;
modeattacking = ATTACKING_NONE; // Kept until now because of Command_ExitGame_f
if (demo.attract == DEMO_ATTRACT_TITLE)
{
D_StartTitle();
D_SetDeferredStartTitle(true);
}
else if (demo.attract == DEMO_ATTRACT_CREDITS)
{