mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-23 11:21:01 +00:00
Add GTR_FRIENDLY.
This commit is contained in:
parent
093a1baf1d
commit
7a00b3a331
3 changed files with 29 additions and 33 deletions
|
@ -8905,6 +8905,7 @@ static const char *const GAMETYPERULE_LIST[] = {
|
|||
"FRIENDLYFIRE",
|
||||
"LIVES",
|
||||
"TEAMS",
|
||||
"FRIENDLY",
|
||||
"RACE",
|
||||
"TAG",
|
||||
"POINTLIMIT",
|
||||
|
|
|
@ -400,30 +400,31 @@ enum GameTypeRules
|
|||
GTR_FRIENDLYFIRE = 1<<3, // Always allow friendly fire
|
||||
GTR_LIVES = 1<<4, // Co-op and Competition
|
||||
GTR_TEAMS = 1<<5, // Team Match, CTF
|
||||
GTR_RACE = 1<<6, // Race and Competition
|
||||
GTR_TAG = 1<<7, // Tag and Hide and Seek
|
||||
GTR_POINTLIMIT = 1<<8, // Ringslinger point limit
|
||||
GTR_TIMELIMIT = 1<<9, // Ringslinger time limit
|
||||
GTR_STARTCOUNTDOWN = 1<<10, // Hide time countdown (Tag and Hide and Seek)
|
||||
GTR_HIDEFROZEN = 1<<11, // Frozen after hide time (Hide and Seek, but not Tag)
|
||||
GTR_BLINDFOLDED = 1<<12, // Blindfolded view (Tag and Hide and Seek)
|
||||
GTR_FIRSTPERSON = 1<<13, // First person camera
|
||||
GTR_POWERSTONES = 1<<14, // Power stones (Match and CTF)
|
||||
GTR_TEAMFLAGS = 1<<15, // Gametype has team flags (CTF)
|
||||
GTR_PITYSHIELD = 1<<16, // Award pity shield
|
||||
GTR_DEATHPENALTY = 1<<17, // Death score penalty
|
||||
GTR_NOSPECTATORSPAWN = 1<<18, // Use with GTR_SPECTATORS, spawn in the map instead of with the spectators
|
||||
GTR_DEATHMATCHSTARTS = 1<<19, // Use deathmatch starts
|
||||
GTR_SPECIALSTAGES = 1<<20, // Allow special stages
|
||||
GTR_EMERALDTOKENS = 1<<21, // Spawn emerald tokens
|
||||
GTR_EMERALDHUNT = 1<<22, // Emerald Hunt
|
||||
GTR_SPAWNENEMIES = 1<<23, // Spawn enemies
|
||||
GTR_ALLOWEXIT = 1<<24, // Allow exit sectors
|
||||
GTR_NOTITLECARD = 1<<25, // Don't show the title card
|
||||
GTR_OVERTIME = 1<<26, // Allow overtime
|
||||
GTR_HURTMESSAGES = 1<<27, // Hit and death messages
|
||||
GTR_SPAWNINVUL = 1<<28, // Babysitting deterrent
|
||||
GTR_RESPAWNDELAY = 1<<29, // Respawn delay
|
||||
GTR_FRIENDLY = 1<<6, // Co-op
|
||||
GTR_RACE = 1<<7, // Race and Competition
|
||||
GTR_TAG = 1<<8, // Tag and Hide and Seek
|
||||
GTR_POINTLIMIT = 1<<9, // Ringslinger point limit
|
||||
GTR_TIMELIMIT = 1<<10, // Ringslinger time limit
|
||||
GTR_STARTCOUNTDOWN = 1<<11, // Hide time countdown (Tag and Hide and Seek)
|
||||
GTR_HIDEFROZEN = 1<<12, // Frozen after hide time (Hide and Seek, but not Tag)
|
||||
GTR_BLINDFOLDED = 1<<13, // Blindfolded view (Tag and Hide and Seek)
|
||||
GTR_FIRSTPERSON = 1<<14, // First person camera
|
||||
GTR_POWERSTONES = 1<<15, // Power stones (Match and CTF)
|
||||
GTR_TEAMFLAGS = 1<<16, // Gametype has team flags (CTF)
|
||||
GTR_PITYSHIELD = 1<<17, // Award pity shield
|
||||
GTR_DEATHPENALTY = 1<<18, // Death score penalty
|
||||
GTR_NOSPECTATORSPAWN = 1<<19, // Use with GTR_SPECTATORS, spawn in the map instead of with the spectators
|
||||
GTR_DEATHMATCHSTARTS = 1<<20, // Use deathmatch starts
|
||||
GTR_SPECIALSTAGES = 1<<21, // Allow special stages
|
||||
GTR_EMERALDTOKENS = 1<<22, // Spawn emerald tokens
|
||||
GTR_EMERALDHUNT = 1<<23, // Emerald Hunt
|
||||
GTR_SPAWNENEMIES = 1<<24, // Spawn enemies
|
||||
GTR_ALLOWEXIT = 1<<25, // Allow exit sectors
|
||||
GTR_NOTITLECARD = 1<<26, // Don't show the title card
|
||||
GTR_OVERTIME = 1<<27, // Allow overtime
|
||||
GTR_HURTMESSAGES = 1<<28, // Hit and death messages
|
||||
GTR_SPAWNINVUL = 1<<29, // Babysitting deterrent
|
||||
GTR_RESPAWNDELAY = 1<<30, // Respawn delay
|
||||
};
|
||||
|
||||
// String names for gametypes
|
||||
|
|
12
src/g_game.c
12
src/g_game.c
|
@ -3193,7 +3193,7 @@ const char *Gametype_ConstantNames[NUMGAMETYPES] =
|
|||
UINT32 gametypedefaultrules[NUMGAMETYPES] =
|
||||
{
|
||||
// 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
|
||||
GTR_RACE|GTR_LIVES|GTR_SPAWNENEMIES|GTR_EMERALDTOKENS|GTR_SPAWNINVUL|GTR_ALLOWEXIT,
|
||||
// Race
|
||||
|
@ -3447,10 +3447,7 @@ boolean G_GametypeUsesLives(void)
|
|||
//
|
||||
boolean G_GametypeUsesCoopLives(void)
|
||||
{
|
||||
// Preparing for the inevitable
|
||||
// gametype rule that will
|
||||
// handle cooplives...
|
||||
return (gametype == GT_COOP);
|
||||
return (gametyperules & (GTR_LIVES|GTR_FRIENDLY)) == (GTR_LIVES|GTR_FRIENDLY);
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -3461,10 +3458,7 @@ boolean G_GametypeUsesCoopLives(void)
|
|||
//
|
||||
boolean G_GametypeUsesCoopStarposts(void)
|
||||
{
|
||||
// Preparing for the inevitable
|
||||
// gametype rule that will
|
||||
// handle coopstarposts...
|
||||
return (gametype == GT_COOP);
|
||||
return (gametyperules & GTR_FRIENDLY);
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue