mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-20 19:02:34 +00:00
GTR_NOSPECTATORSPAWN
This commit is contained in:
parent
1e2331d672
commit
0577cec01b
3 changed files with 27 additions and 22 deletions
|
@ -3636,7 +3636,11 @@ static void Command_ShowGametype_f(void)
|
|||
static void Command_SetGametype_f(void)
|
||||
{
|
||||
if (COM_Argc() > 1)
|
||||
{
|
||||
INT16 oldgametype = gametype;
|
||||
G_SetGametype(atoi(COM_Argv(1)));
|
||||
D_GameTypeChanged(oldgametype);
|
||||
}
|
||||
}
|
||||
|
||||
/** Plays the intro.
|
||||
|
@ -3978,6 +3982,7 @@ void D_GameTypeChanged(INT32 lastgametype)
|
|||
|
||||
// When swapping to a gametype that supports spectators,
|
||||
// make everyone a spectator initially.
|
||||
// Averted with GTR_NOSPECTATORSPAWN.
|
||||
if (!splitscreen && (G_GametypeHasSpectators()))
|
||||
{
|
||||
INT32 i;
|
||||
|
@ -3985,7 +3990,7 @@ void D_GameTypeChanged(INT32 lastgametype)
|
|||
if (playeringame[i])
|
||||
{
|
||||
players[i].ctfteam = 0;
|
||||
players[i].spectator = true;
|
||||
players[i].spectator = (gametyperules & GTR_NOSPECTATORSPAWN) ? false : true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -8804,6 +8804,7 @@ static const char *const GAMETYPERULE_LIST[] = {
|
|||
"TEAMFLAGS",
|
||||
"PITYSHIELD",
|
||||
"DEATHPENALTY",
|
||||
"NOSPECTATORSPAWN",
|
||||
NULL
|
||||
};
|
||||
|
||||
|
|
|
@ -389,29 +389,28 @@ enum GameType
|
|||
// Game type rules
|
||||
enum GameTypeRules
|
||||
{
|
||||
GTR_PLATFORM = 1, // Co-op, Competition, and Race
|
||||
GTR_TAG = 1<<1, // Tag and Hide and Seek
|
||||
GTR_RINGSLINGER = 1<<2, // Not Co-op, not Competition, and not Race (overriden by cv_ringslinger)
|
||||
GTR_SPECTATORS = 1<<3, // Not Co-op, not Competition, and not Race
|
||||
GTR_TEAMS = 1<<4, // Team Match, CTF
|
||||
GTR_LIVES = 1<<5, // A lot of special cases in G_GametypeUsesLives actually, but just Co-op and Competition
|
||||
GTR_RACE = 1<<6, // Race and Competition
|
||||
GTR_PLATFORM = 1, // Co-op, Competition, and Race
|
||||
GTR_TAG = 1<<1, // Tag and Hide and Seek
|
||||
GTR_RINGSLINGER = 1<<2, // Not Co-op, not Competition, and not Race (overriden by cv_ringslinger)
|
||||
GTR_SPECTATORS = 1<<3, // Not Co-op, not Competition, and not Race
|
||||
GTR_TEAMS = 1<<4, // Team Match, CTF
|
||||
GTR_LIVES = 1<<5, // A lot of special cases in G_GametypeUsesLives actually, but just Co-op and Competition
|
||||
GTR_RACE = 1<<6, // Race and Competition
|
||||
|
||||
// Lactozilla
|
||||
// Awesome! Those are new game type rules
|
||||
// provided by yours truly to allow for more
|
||||
// flexibility! Those will replace some
|
||||
// straight-up gametype checks scattered
|
||||
// around the source code!
|
||||
GTR_CHASECAM = 1<<7, // Prefer chasecam at map load (All platform gametypes)
|
||||
GTR_TIMELIMIT = 1<<8, // Ringslinger time limit (Tag and Hide and Seek)
|
||||
GTR_HIDETIME = 1<<9, // Tag and Hide and Seek
|
||||
GTR_HIDETIMEFROZEN = 1<<10, // Hide and Seek, but not Tag
|
||||
GTR_BLINDFOLDED = 1<<11, // Blindfolded view (Tag and Hide and Seek)
|
||||
GTR_EMERALDS = 1<<12, // Ringslinger emeralds (Match and CTF)
|
||||
GTR_TEAMFLAGS = 1<<13, // Gametype has team flags (CTF)
|
||||
GTR_PITYSHIELD = 1<<14, // Award pity shield
|
||||
GTR_DEATHPENALTY = 1<<15, // Death score penalty
|
||||
// Awesome! Those are new game type rules provided by yours truly to allow for more
|
||||
// flexibility! Those will replace some straight-up gametype checks scattered around the source code!
|
||||
|
||||
GTR_CHASECAM = 1<<7, // Prefer chasecam at map load (All platform gametypes)
|
||||
GTR_TIMELIMIT = 1<<8, // Ringslinger time limit (Tag and Hide and Seek)
|
||||
GTR_HIDETIME = 1<<9, // Tag and Hide and Seek
|
||||
GTR_HIDETIMEFROZEN = 1<<10, // Hide and Seek, but not Tag
|
||||
GTR_BLINDFOLDED = 1<<11, // Blindfolded view (Tag and Hide and Seek)
|
||||
GTR_EMERALDS = 1<<12, // Ringslinger emeralds (Match and CTF)
|
||||
GTR_TEAMFLAGS = 1<<13, // Gametype has team flags (CTF)
|
||||
GTR_PITYSHIELD = 1<<14, // Award pity shield
|
||||
GTR_DEATHPENALTY = 1<<15, // Death score penalty
|
||||
GTR_NOSPECTATORSPAWN = 1<<16, // For use with GTR_SPECTATORS - spawn in the map instead of with the spectators
|
||||
};
|
||||
|
||||
// String names for gametypes
|
||||
|
|
Loading…
Reference in a new issue