From 32709797a37559dc9fe496b5e30575154d005f18 Mon Sep 17 00:00:00 2001 From: NepDisk Date: Sat, 22 Mar 2025 11:28:47 -0400 Subject: [PATCH] Remove advancedemo https://git.do.srb2.org/KartKrew/RingRacers/-/commit/0230b57aa8971c8e5448d3065348ac5cd24267b5 --- src/d_clisrv.c | 8 -------- src/d_main.cpp | 11 ----------- src/d_main.h | 5 ----- src/g_demo.c | 11 ++++++++--- 4 files changed, 8 insertions(+), 27 deletions(-) diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 9b3eedf7c..e9a0abf9d 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -5601,14 +5601,6 @@ boolean TryRunTics(tic_t realtics) if (ticking) { - if (advancedemo) - { - if (timedemo_quit) - COM_ImmedExecute("quit"); - else - D_StartTitle(); - } - else { boolean tickInterp = true; diff --git a/src/d_main.cpp b/src/d_main.cpp index 686d18bd1..00b179585 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -130,7 +130,6 @@ INT32 postimgparam[MAXSPLITSCREENPLAYERS]; boolean sound_disabled = false; boolean digital_disabled = false; -boolean advancedemo; #ifdef DEBUGFILE INT32 debugload = 0; #endif @@ -972,15 +971,6 @@ void D_SRB2Loop(void) } } -// -// D_AdvanceDemo -// Called after each demo or intro demosequence finishes -// -void D_AdvanceDemo(void) -{ - advancedemo = true; -} - // ========================================================================= // D_SRB2Main // ========================================================================= @@ -1053,7 +1043,6 @@ void D_StartTitle(void) //demosequence = -1; G_SetGametype(GT_RACE); // SRB2kart paused = false; - advancedemo = false; F_InitMenuPresValues(); // clear cmd building stuff diff --git a/src/d_main.h b/src/d_main.h index 9e24c4cad..f317ab08f 100644 --- a/src/d_main.h +++ b/src/d_main.h @@ -20,9 +20,6 @@ #ifdef __cplusplus extern "C" { #endif - -extern boolean advancedemo; - // make sure not to write back the config until it's been correctly loaded extern tic_t rendergametic; @@ -39,7 +36,6 @@ void D_SRB2Loop(void) FUNCNORETURN; // D_SRB2Main() // Not a globally visible function, just included for source reference, // calls all startup code, parses command line options. -// If not overrided by user input, calls D_AdvanceDemo. // void D_SRB2Main(void); @@ -56,7 +52,6 @@ const char *D_Home(void); // // BASE LEVEL // -void D_AdvanceDemo(void); void D_StartTitle(void); #ifdef __cplusplus diff --git a/src/g_demo.c b/src/g_demo.c index e0301e14d..bd15f3d88 100644 --- a/src/g_demo.c +++ b/src/g_demo.c @@ -3963,7 +3963,10 @@ static void G_StopTimingDemo(void) if (restorecv_vidwait != cv_vidwait.value) CV_SetValue(&cv_vidwait, restorecv_vidwait); - D_AdvanceDemo(); + if (timedemo_quit) + COM_ImmedExecute("quit"); + else + D_StartTitle(); } // reset engine variable set for the demos @@ -4021,10 +4024,12 @@ boolean G_CheckDemoStatus(void) { G_StopDemo(); - if (modeattacking) + if (timedemo_quit) + COM_ImmedExecute("quit"); + else if (modeattacking) M_EndModeAttackRun(); else - D_AdvanceDemo(); + D_StartTitle(); } return true;