From d29e43f80d2d0eb278ec4f8335ccf1bffd0865a7 Mon Sep 17 00:00:00 2001 From: toaster Date: Mon, 26 Dec 2022 22:29:31 +0000 Subject: [PATCH] Remove GTR_CAMPAIGN Controlled three things: Vintage SRB2 cutscenes, a certain type of reset on map commands, and whether to go to ceremony/evaluation/credits. All three should be controlled by grandprixinfo.gp instead, since that persists cross-gametype. --- src/d_netcmd.c | 5 ++--- src/doomstat.h | 3 --- src/g_game.c | 8 ++++---- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 2e0e30dac..f5576696d 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -2521,7 +2521,7 @@ void D_MapChange(INT32 mapnum, INT32 newgametype, boolean pencoremode, boolean r CONS_Debug(DBG_GAMELOGIC, "Map change: mapnum=%d gametype=%d pencoremode=%d resetplayers=%d delay=%d skipprecutscene=%d\n", mapnum, newgametype, pencoremode, resetplayers, delay, skipprecutscene); - if ((netgame || multiplayer) && !((gametype == newgametype) && (gametypes[newgametype]->rules & GTR_CAMPAIGN))) + if ((netgame || multiplayer) && (grandprixinfo.gp != false)) FLS = false; // Too lazy to change the input value for every instance of this function....... @@ -2884,8 +2884,7 @@ static void Command_Map_f(void) { fromlevelselect = ( netgame || multiplayer ) && - newgametype == gametype && - gametypes[newgametype]->rules & GTR_CAMPAIGN; + grandprixinfo.gp != false; } } diff --git a/src/doomstat.h b/src/doomstat.h index 8c01cd474..588a548c5 100644 --- a/src/doomstat.h +++ b/src/doomstat.h @@ -508,9 +508,6 @@ enum GameTypeRules GTR_NOTEAMS = 1<<15, // Teams are forced off GTR_TEAMSTARTS = 1<<16, // Use team-based start positions - // Grand Prix rules - GTR_CAMPAIGN = 1<<17, // Handles cup-based progression - // To be rearranged later GTR_NOCUPSELECT = 1<<20, // Your maps are not selected via cup. ...mutually exclusive with GTR_CAMPAIGN. GTR_CLOSERPLAYERS = 1<<21, // Buffs spindash and draft power to bring everyone together, nerfs invincibility and grow to prevent excessive combos diff --git a/src/g_game.c b/src/g_game.c index 827cd2966..e7ec8ffa4 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -3004,7 +3004,7 @@ static gametype_t defaultgametypes[] = { "Race", "GT_RACE", - GTR_CAMPAIGN|GTR_CIRCUIT|GTR_BOTS|GTR_ENCORE, + GTR_CIRCUIT|GTR_BOTS|GTR_ENCORE, TOL_RACE, int_race, 0, @@ -4026,7 +4026,7 @@ void G_AfterIntermission(void) G_HandleSaveLevel(); } - if ((gametyperules & GTR_CAMPAIGN) && mapheaderinfo[prevmap]->cutscenenum && !modeattacking && skipstats <= 1 && (gamecomplete || !(marathonmode & MA_NOCUTSCENES))) // Start a custom cutscene. + if ((grandprixinfo.gp == true) && mapheaderinfo[prevmap]->cutscenenum && !modeattacking && skipstats <= 1 && (gamecomplete || !(marathonmode & MA_NOCUTSCENES))) // Start a custom cutscene. F_StartCustomCutscene(mapheaderinfo[prevmap]->cutscenenum-1, false, false); else { @@ -4163,7 +4163,7 @@ void G_EndGame(void) } // Only do evaluation and credits in singleplayer contexts - if (!netgame && (gametyperules & GTR_CAMPAIGN)) + if (!netgame && grandprixinfo.gp == true) { if (nextmap == NEXTMAP_CEREMONY) // end game with ceremony { @@ -4927,7 +4927,7 @@ void G_InitNew(UINT8 pencoremode, INT32 map, boolean resetplayer, boolean skippr automapactive = false; imcontinuing = false; - if ((gametyperules & GTR_CAMPAIGN) && !skipprecutscene && mapheaderinfo[gamemap-1]->precutscenenum && !modeattacking && !(marathonmode & MA_NOCUTSCENES)) // Start a custom cutscene. + if ((grandprixinfo.gp == true) && !skipprecutscene && mapheaderinfo[gamemap-1]->precutscenenum && !modeattacking && !(marathonmode & MA_NOCUTSCENES)) // Start a custom cutscene. F_StartCustomCutscene(mapheaderinfo[gamemap-1]->precutscenenum-1, true, resetplayer); else {