mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-22 20:02:03 +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)
|
static void Command_SetGametype_f(void)
|
||||||
{
|
{
|
||||||
if (COM_Argc() > 1)
|
if (COM_Argc() > 1)
|
||||||
|
{
|
||||||
|
INT16 oldgametype = gametype;
|
||||||
G_SetGametype(atoi(COM_Argv(1)));
|
G_SetGametype(atoi(COM_Argv(1)));
|
||||||
|
D_GameTypeChanged(oldgametype);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Plays the intro.
|
/** Plays the intro.
|
||||||
|
@ -3978,6 +3982,7 @@ void D_GameTypeChanged(INT32 lastgametype)
|
||||||
|
|
||||||
// When swapping to a gametype that supports spectators,
|
// When swapping to a gametype that supports spectators,
|
||||||
// make everyone a spectator initially.
|
// make everyone a spectator initially.
|
||||||
|
// Averted with GTR_NOSPECTATORSPAWN.
|
||||||
if (!splitscreen && (G_GametypeHasSpectators()))
|
if (!splitscreen && (G_GametypeHasSpectators()))
|
||||||
{
|
{
|
||||||
INT32 i;
|
INT32 i;
|
||||||
|
@ -3985,7 +3990,7 @@ void D_GameTypeChanged(INT32 lastgametype)
|
||||||
if (playeringame[i])
|
if (playeringame[i])
|
||||||
{
|
{
|
||||||
players[i].ctfteam = 0;
|
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",
|
"TEAMFLAGS",
|
||||||
"PITYSHIELD",
|
"PITYSHIELD",
|
||||||
"DEATHPENALTY",
|
"DEATHPENALTY",
|
||||||
|
"NOSPECTATORSPAWN",
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -398,11 +398,9 @@ enum GameTypeRules
|
||||||
GTR_RACE = 1<<6, // Race and Competition
|
GTR_RACE = 1<<6, // Race and Competition
|
||||||
|
|
||||||
// Lactozilla
|
// Lactozilla
|
||||||
// Awesome! Those are new game type rules
|
// Awesome! Those are new game type rules provided by yours truly to allow for more
|
||||||
// provided by yours truly to allow for more
|
// flexibility! Those will replace some straight-up gametype checks scattered around the source code!
|
||||||
// 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_CHASECAM = 1<<7, // Prefer chasecam at map load (All platform gametypes)
|
||||||
GTR_TIMELIMIT = 1<<8, // Ringslinger time limit (Tag and Hide and Seek)
|
GTR_TIMELIMIT = 1<<8, // Ringslinger time limit (Tag and Hide and Seek)
|
||||||
GTR_HIDETIME = 1<<9, // Tag and Hide and Seek
|
GTR_HIDETIME = 1<<9, // Tag and Hide and Seek
|
||||||
|
@ -412,6 +410,7 @@ enum GameTypeRules
|
||||||
GTR_TEAMFLAGS = 1<<13, // Gametype has team flags (CTF)
|
GTR_TEAMFLAGS = 1<<13, // Gametype has team flags (CTF)
|
||||||
GTR_PITYSHIELD = 1<<14, // Award pity shield
|
GTR_PITYSHIELD = 1<<14, // Award pity shield
|
||||||
GTR_DEATHPENALTY = 1<<15, // Death score penalty
|
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
|
// String names for gametypes
|
||||||
|
|
Loading…
Reference in a new issue