GTR_CAMPAIGN and GTR_NOGAMEEND

This commit is contained in:
Jaime Passos 2019-12-18 22:50:49 -03:00
parent 5daedc70e7
commit ef7e53488d
2 changed files with 12 additions and 10 deletions

View file

@ -416,11 +416,13 @@ enum GameTypeRules
GTR_EMERALDHUNT = 1<<19, // Emerald Hunt
GTR_SPAWNENEMIES = 1<<20, // Spawn enemies
GTR_ALLOWEXIT = 1<<21, // Allow exit sectors
GTR_ROUNDENDMESSAGE = 1<<22, // Prints "The round has ended." into the console
GTR_NOTITLECARD = 1<<23, // Don't show the title card
GTR_POINTLIMIT = 1<<24, // Ringslinger point limit
GTR_TIMELIMIT = 1<<25, // Ringslinger time limit
GTR_OVERTIME = 1<<26, // Allow overtime
GTR_CAMPAIGN = 1<<22, // Linear Co-op map progression. Don't allow random maps.
GTR_NOGAMEEND = 1<<23, // Don't end the game. That is, wrap around the maps instead of starting the ending.
GTR_ROUNDENDMESSAGE = 1<<24, // Prints "The round has ended." into the console
GTR_NOTITLECARD = 1<<25, // Don't show the title card
GTR_POINTLIMIT = 1<<26, // Ringslinger point limit
GTR_TIMELIMIT = 1<<27, // Ringslinger time limit
GTR_OVERTIME = 1<<28, // Allow overtime
};
// String names for gametypes

View file

@ -3088,11 +3088,11 @@ const char *Gametype_ConstantNames[NUMGAMETYPES] =
UINT32 gametypedefaultrules[NUMGAMETYPES] =
{
// Co-op
GTR_PLATFORM|GTR_LIVES|GTR_CHASECAM|GTR_EMERALDHUNT|GTR_SPAWNENEMIES|GTR_ALLOWEXIT|GTR_EMERALDTOKENS|GTR_SPECIALSTAGES,
GTR_PLATFORM|GTR_CAMPAIGN|GTR_LIVES|GTR_CHASECAM|GTR_EMERALDHUNT|GTR_SPAWNENEMIES|GTR_ALLOWEXIT|GTR_EMERALDTOKENS|GTR_SPECIALSTAGES,
// Competition
GTR_PLATFORM|GTR_LIVES|GTR_RACE|GTR_CHASECAM|GTR_SPAWNENEMIES|GTR_ALLOWEXIT|GTR_ROUNDENDMESSAGE|GTR_EMERALDTOKENS,
GTR_PLATFORM|GTR_NOGAMEEND|GTR_LIVES|GTR_RACE|GTR_CHASECAM|GTR_SPAWNENEMIES|GTR_ALLOWEXIT|GTR_ROUNDENDMESSAGE|GTR_EMERALDTOKENS,
// Race
GTR_PLATFORM|GTR_RACE|GTR_CHASECAM|GTR_SPAWNENEMIES|GTR_ALLOWEXIT|GTR_ROUNDENDMESSAGE,
GTR_PLATFORM|GTR_NOGAMEEND|GTR_RACE|GTR_CHASECAM|GTR_SPAWNENEMIES|GTR_ALLOWEXIT|GTR_ROUNDENDMESSAGE,
// Match
GTR_RINGSLINGER|GTR_SPECTATORS|GTR_POINTLIMIT|GTR_TIMELIMIT|GTR_EMERALDS|GTR_PITYSHIELD|GTR_DEATHPENALTY|GTR_ROUNDENDMESSAGE,
@ -3527,7 +3527,7 @@ static void G_DoCompleted(void)
I_Error("Followed map %d to invalid map %d\n", prevmap + 1, nextmap + 1);
// wrap around in race
if (nextmap >= 1100-1 && nextmap <= 1102-1 && (gametyperules & GTR_RACE))
if (nextmap >= 1100-1 && nextmap <= 1102-1 && (gametyperules & GTR_NOGAMEEND))
nextmap = (INT16)(spstage_start-1);
if ((gottoken = ((gametyperules & GTR_SPECIALSTAGES) && token)))
@ -3550,7 +3550,7 @@ static void G_DoCompleted(void)
automapactive = false;
if (gametype != GT_COOP)
if (!(gametyperules & GTR_CAMPAIGN))
{
if (cv_advancemap.value == 0) // Stay on same map.
nextmap = prevmap;