From d68e7072a2028969cbc0ab646f1c63882a4429d0 Mon Sep 17 00:00:00 2001 From: James R Date: Sun, 17 Mar 2024 04:51:07 -0700 Subject: [PATCH] Lock user out of menu when replay goes to intermission - Access to the replay menu in intermission leads to various problems - Broken options - HOM effect - You can press A on the intermission screen to end it --- src/k_menufunc.c | 9 +++++++++ src/y_inter.cpp | 7 +++++++ 2 files changed, 16 insertions(+) diff --git a/src/k_menufunc.c b/src/k_menufunc.c index 44abd8615..4713d74ab 100644 --- a/src/k_menufunc.c +++ b/src/k_menufunc.c @@ -668,6 +668,15 @@ menu_t *M_SpecificMenuRestore(menu_t *torestore) // void M_StartControlPanel(void) { + if (demo.playback && gamestate == GS_INTERMISSION) + { + // At this point the replay has ended. + // The only menu option that works is "Stop Playback". + // And intermission can be finished by pressing the + // A button, so having a menu at all is useless. + return; + } + INT32 i; G_ResetAllDeviceGameKeyDown(); diff --git a/src/y_inter.cpp b/src/y_inter.cpp index 97926dc07..fc244698c 100644 --- a/src/y_inter.cpp +++ b/src/y_inter.cpp @@ -2271,6 +2271,13 @@ void Y_StartIntermission(void) G_SetGamestate(GS_INTERMISSION); + if (demo.playback) + { + // Replay menu is inacessible here. + // Press A to continue! + M_ClearMenus(true); + } + if (musiccountdown == 0) { Y_PlayIntermissionMusic();