GTR_ALLOWEXIT

This commit is contained in:
Jaime Passos 2019-12-18 16:52:05 -03:00
parent 79f7bf2276
commit 9c5a3b637c
4 changed files with 6 additions and 4 deletions

View file

@ -8811,6 +8811,7 @@ static const char *const GAMETYPERULE_LIST[] = {
"NOSPECTATORSPAWN", "NOSPECTATORSPAWN",
"EMERALDHUNT", "EMERALDHUNT",
"SPAWNENEMIES", "SPAWNENEMIES",
"ALLOWEXIT",
NULL NULL
}; };

View file

@ -413,6 +413,7 @@ enum GameTypeRules
GTR_NOSPECTATORSPAWN = 1<<16, // For use with GTR_SPECTATORS - spawn in the map instead of with the spectators GTR_NOSPECTATORSPAWN = 1<<16, // For use with GTR_SPECTATORS - spawn in the map instead of with the spectators
GTR_EMERALDHUNT = 1<<17, // Emerald Hunt GTR_EMERALDHUNT = 1<<17, // Emerald Hunt
GTR_SPAWNENEMIES = 1<<18, // Spawn enemies GTR_SPAWNENEMIES = 1<<18, // Spawn enemies
GTR_ALLOWEXIT = 1<<19, // Allow exit sectors
}; };
// String names for gametypes // String names for gametypes

View file

@ -3078,11 +3078,11 @@ const char *Gametype_ConstantNames[NUMGAMETYPES] =
UINT32 gametypedefaultrules[NUMGAMETYPES] = UINT32 gametypedefaultrules[NUMGAMETYPES] =
{ {
// Co-op // Co-op
GTR_PLATFORM|GTR_LIVES|GTR_CHASECAM|GTR_EMERALDHUNT|GTR_SPAWNENEMIES, GTR_PLATFORM|GTR_LIVES|GTR_CHASECAM|GTR_EMERALDHUNT|GTR_SPAWNENEMIES|GTR_ALLOWEXIT,
// Competition // Competition
GTR_PLATFORM|GTR_LIVES|GTR_RACE|GTR_CHASECAM|GTR_SPAWNENEMIES, GTR_PLATFORM|GTR_LIVES|GTR_RACE|GTR_CHASECAM|GTR_SPAWNENEMIES|GTR_ALLOWEXIT,
// Race // Race
GTR_PLATFORM|GTR_RACE|GTR_CHASECAM|GTR_SPAWNENEMIES, GTR_PLATFORM|GTR_RACE|GTR_CHASECAM|GTR_SPAWNENEMIES|GTR_ALLOWEXIT,
// Match // Match
GTR_RINGSLINGER|GTR_SPECTATORS|GTR_TIMELIMIT|GTR_EMERALDS|GTR_PITYSHIELD|GTR_DEATHPENALTY, GTR_RINGSLINGER|GTR_SPECTATORS|GTR_TIMELIMIT|GTR_EMERALDS|GTR_PITYSHIELD|GTR_DEATHPENALTY,

View file

@ -4678,7 +4678,7 @@ DoneSection2:
} }
case 2: // Special stage GOAL sector / Exit Sector / CTF Flag Return case 2: // Special stage GOAL sector / Exit Sector / CTF Flag Return
if (player->bot || !G_PlatformGametype()) if (player->bot || !(gametyperules & GTR_ALLOWEXIT))
break; break;
if (!(maptol & TOL_NIGHTS) && G_IsSpecialStage(gamemap) && player->nightstime > 6) if (!(maptol & TOL_NIGHTS) && G_IsSpecialStage(gamemap) && player->nightstime > 6)
{ {