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.
This commit is contained in:
toaster 2022-12-26 22:29:31 +00:00
parent a8a60460fb
commit d29e43f80d
3 changed files with 6 additions and 10 deletions

View file

@ -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;
}
}

View file

@ -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

View file

@ -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
{