Add GTR_FRIENDLY.

This commit is contained in:
Jaime Passos 2019-12-28 19:56:18 -03:00
parent 093a1baf1d
commit 7a00b3a331
3 changed files with 29 additions and 33 deletions

View file

@ -8905,6 +8905,7 @@ static const char *const GAMETYPERULE_LIST[] = {
"FRIENDLYFIRE", "FRIENDLYFIRE",
"LIVES", "LIVES",
"TEAMS", "TEAMS",
"FRIENDLY",
"RACE", "RACE",
"TAG", "TAG",
"POINTLIMIT", "POINTLIMIT",

View file

@ -400,30 +400,31 @@ enum GameTypeRules
GTR_FRIENDLYFIRE = 1<<3, // Always allow friendly fire GTR_FRIENDLYFIRE = 1<<3, // Always allow friendly fire
GTR_LIVES = 1<<4, // Co-op and Competition GTR_LIVES = 1<<4, // Co-op and Competition
GTR_TEAMS = 1<<5, // Team Match, CTF GTR_TEAMS = 1<<5, // Team Match, CTF
GTR_RACE = 1<<6, // Race and Competition GTR_FRIENDLY = 1<<6, // Co-op
GTR_TAG = 1<<7, // Tag and Hide and Seek GTR_RACE = 1<<7, // Race and Competition
GTR_POINTLIMIT = 1<<8, // Ringslinger point limit GTR_TAG = 1<<8, // Tag and Hide and Seek
GTR_TIMELIMIT = 1<<9, // Ringslinger time limit GTR_POINTLIMIT = 1<<9, // Ringslinger point limit
GTR_STARTCOUNTDOWN = 1<<10, // Hide time countdown (Tag and Hide and Seek) GTR_TIMELIMIT = 1<<10, // Ringslinger time limit
GTR_HIDEFROZEN = 1<<11, // Frozen after hide time (Hide and Seek, but not Tag) GTR_STARTCOUNTDOWN = 1<<11, // Hide time countdown (Tag and Hide and Seek)
GTR_BLINDFOLDED = 1<<12, // Blindfolded view (Tag and Hide and Seek) GTR_HIDEFROZEN = 1<<12, // Frozen after hide time (Hide and Seek, but not Tag)
GTR_FIRSTPERSON = 1<<13, // First person camera GTR_BLINDFOLDED = 1<<13, // Blindfolded view (Tag and Hide and Seek)
GTR_POWERSTONES = 1<<14, // Power stones (Match and CTF) GTR_FIRSTPERSON = 1<<14, // First person camera
GTR_TEAMFLAGS = 1<<15, // Gametype has team flags (CTF) GTR_POWERSTONES = 1<<15, // Power stones (Match and CTF)
GTR_PITYSHIELD = 1<<16, // Award pity shield GTR_TEAMFLAGS = 1<<16, // Gametype has team flags (CTF)
GTR_DEATHPENALTY = 1<<17, // Death score penalty GTR_PITYSHIELD = 1<<17, // Award pity shield
GTR_NOSPECTATORSPAWN = 1<<18, // Use with GTR_SPECTATORS, spawn in the map instead of with the spectators GTR_DEATHPENALTY = 1<<18, // Death score penalty
GTR_DEATHMATCHSTARTS = 1<<19, // Use deathmatch starts GTR_NOSPECTATORSPAWN = 1<<19, // Use with GTR_SPECTATORS, spawn in the map instead of with the spectators
GTR_SPECIALSTAGES = 1<<20, // Allow special stages GTR_DEATHMATCHSTARTS = 1<<20, // Use deathmatch starts
GTR_EMERALDTOKENS = 1<<21, // Spawn emerald tokens GTR_SPECIALSTAGES = 1<<21, // Allow special stages
GTR_EMERALDHUNT = 1<<22, // Emerald Hunt GTR_EMERALDTOKENS = 1<<22, // Spawn emerald tokens
GTR_SPAWNENEMIES = 1<<23, // Spawn enemies GTR_EMERALDHUNT = 1<<23, // Emerald Hunt
GTR_ALLOWEXIT = 1<<24, // Allow exit sectors GTR_SPAWNENEMIES = 1<<24, // Spawn enemies
GTR_NOTITLECARD = 1<<25, // Don't show the title card GTR_ALLOWEXIT = 1<<25, // Allow exit sectors
GTR_OVERTIME = 1<<26, // Allow overtime GTR_NOTITLECARD = 1<<26, // Don't show the title card
GTR_HURTMESSAGES = 1<<27, // Hit and death messages GTR_OVERTIME = 1<<27, // Allow overtime
GTR_SPAWNINVUL = 1<<28, // Babysitting deterrent GTR_HURTMESSAGES = 1<<28, // Hit and death messages
GTR_RESPAWNDELAY = 1<<29, // Respawn delay GTR_SPAWNINVUL = 1<<29, // Babysitting deterrent
GTR_RESPAWNDELAY = 1<<30, // Respawn delay
}; };
// String names for gametypes // String names for gametypes

View file

@ -3193,7 +3193,7 @@ const char *Gametype_ConstantNames[NUMGAMETYPES] =
UINT32 gametypedefaultrules[NUMGAMETYPES] = UINT32 gametypedefaultrules[NUMGAMETYPES] =
{ {
// Co-op // Co-op
GTR_CAMPAIGN|GTR_LIVES|GTR_SPAWNENEMIES|GTR_ALLOWEXIT|GTR_EMERALDHUNT|GTR_EMERALDTOKENS|GTR_SPECIALSTAGES, GTR_CAMPAIGN|GTR_LIVES|GTR_FRIENDLY|GTR_SPAWNENEMIES|GTR_ALLOWEXIT|GTR_EMERALDHUNT|GTR_EMERALDTOKENS|GTR_SPECIALSTAGES,
// Competition // Competition
GTR_RACE|GTR_LIVES|GTR_SPAWNENEMIES|GTR_EMERALDTOKENS|GTR_SPAWNINVUL|GTR_ALLOWEXIT, GTR_RACE|GTR_LIVES|GTR_SPAWNENEMIES|GTR_EMERALDTOKENS|GTR_SPAWNINVUL|GTR_ALLOWEXIT,
// Race // Race
@ -3447,10 +3447,7 @@ boolean G_GametypeUsesLives(void)
// //
boolean G_GametypeUsesCoopLives(void) boolean G_GametypeUsesCoopLives(void)
{ {
// Preparing for the inevitable return (gametyperules & (GTR_LIVES|GTR_FRIENDLY)) == (GTR_LIVES|GTR_FRIENDLY);
// gametype rule that will
// handle cooplives...
return (gametype == GT_COOP);
} }
// //
@ -3461,10 +3458,7 @@ boolean G_GametypeUsesCoopLives(void)
// //
boolean G_GametypeUsesCoopStarposts(void) boolean G_GametypeUsesCoopStarposts(void)
{ {
// Preparing for the inevitable return (gametyperules & GTR_FRIENDLY);
// gametype rule that will
// handle coopstarposts...
return (gametype == GT_COOP);
} }
// //