From 585683b9788d349a7afe1b4aff6dcf9c47d943cb Mon Sep 17 00:00:00 2001 From: toaster Date: Thu, 24 Jul 2025 13:12:23 +0100 Subject: [PATCH] Fix Proceed password "fake crash" Didn't always properly reset text, now it does --- src/k_menu.h | 2 +- src/m_pw.cpp | 2 +- src/menus/main-goner.cpp | 20 ++++++++++++-------- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/k_menu.h b/src/k_menu.h index b612151da..887db519f 100644 --- a/src/k_menu.h +++ b/src/k_menu.h @@ -234,7 +234,7 @@ void M_GonerTutorial(INT32 choice); void M_GonerPlayground(INT32 choice); void M_GonerResetLooking(int type); void M_GonerCheckLooking(void); -void M_GonerResetText(void); +void M_GonerResetText(boolean completely); void M_GonerGDQ(boolean opinion); boolean M_GonerMusicPlayable(void); diff --git a/src/m_pw.cpp b/src/m_pw.cpp index e08d8ff74..eb8b7706a 100644 --- a/src/m_pw.cpp +++ b/src/m_pw.cpp @@ -626,7 +626,7 @@ void f_proceed() #else F_StartIntro(); M_ClearMenus(true); - M_GonerResetText(); + M_GonerResetText(true); #endif } diff --git a/src/menus/main-goner.cpp b/src/menus/main-goner.cpp index 97b4ad60d..9564529ba 100644 --- a/src/menus/main-goner.cpp +++ b/src/menus/main-goner.cpp @@ -887,16 +887,15 @@ void M_GonerTick(void) first = true; // a lie, but only slightly... // Handle rewinding if you clear your gamedata. - M_GonerResetText(); - goner_background = GonerBGData(); - - goner_levelworking = GDGONER_INIT; + M_GonerResetText(true); } M_GonerResetLooking(GDGONER_INIT); if (first) { + goner_background = GonerBGData(); + first = goner_gdq = false; MAIN_Goner[0] = @@ -1467,7 +1466,7 @@ static void M_GonerSurveyResponse(INT32 ch) F_StartIntro(); M_ClearMenus(true); - M_GonerResetText(); + M_GonerResetText(false); return; } @@ -1535,10 +1534,10 @@ void M_GonerPlayground(INT32 choice) restoreMenu = NULL; // Playground Hack // need to do all this here because it will skip returning to goner and there are circumstances (game close) where DoCompleted won't be called - M_GonerResetText(); gamedata->gonerlevel = GDGONER_DONE; gamedata->playgroundroute = true; gamedata->deferredsave = true; + M_GonerResetText(true); } static void M_GonerConclude(INT32 choice) @@ -1552,7 +1551,7 @@ static void M_GonerConclude(INT32 choice) F_StartIntro(); M_ClearMenus(true); - M_GonerResetText(); + M_GonerResetText(true); } void M_GonerGDQ(boolean opinion) @@ -1639,7 +1638,7 @@ static boolean M_GonerInputs(INT32 ch) return false; } -void M_GonerResetText(void) +void M_GonerResetText(boolean completely) { goner_typewriter.ClearText(); LinesToDigest.clear(); @@ -1647,4 +1646,9 @@ void M_GonerResetText(void) goner_scroll = 0; goner_scrollend = -1; + + if (!completely) + return; + + goner_levelworking = GDGONER_INIT; }