mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-18 15:32:33 +00:00
GTR_EMERALDHUNT and GTR_SPAWNENEMIES
This commit is contained in:
parent
0577cec01b
commit
d3d91726f5
5 changed files with 11 additions and 8 deletions
|
@ -8805,6 +8805,8 @@ static const char *const GAMETYPERULE_LIST[] = {
|
|||
"PITYSHIELD",
|
||||
"DEATHPENALTY",
|
||||
"NOSPECTATORSPAWN",
|
||||
"EMERALDHUNT",
|
||||
"SPAWNENEMIES",
|
||||
NULL
|
||||
};
|
||||
|
||||
|
|
|
@ -411,6 +411,8 @@ enum GameTypeRules
|
|||
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
|
||||
GTR_EMERALDHUNT = 1<<17, // Emerald Hunt
|
||||
GTR_SPAWNENEMIES = 1<<18, // Spawn enemies
|
||||
};
|
||||
|
||||
// String names for gametypes
|
||||
|
|
|
@ -3075,14 +3075,14 @@ const char *Gametype_ConstantNames[NUMGAMETYPES] =
|
|||
};
|
||||
|
||||
// Game type rules
|
||||
INT16 gametypedefaultrules[NUMGAMETYPES] =
|
||||
UINT32 gametypedefaultrules[NUMGAMETYPES] =
|
||||
{
|
||||
// Co-op
|
||||
GTR_PLATFORM|GTR_LIVES|GTR_CHASECAM,
|
||||
GTR_PLATFORM|GTR_LIVES|GTR_CHASECAM|GTR_EMERALDHUNT|GTR_SPAWNENEMIES,
|
||||
// Competition
|
||||
GTR_PLATFORM|GTR_LIVES|GTR_RACE|GTR_CHASECAM,
|
||||
GTR_PLATFORM|GTR_LIVES|GTR_RACE|GTR_CHASECAM|GTR_SPAWNENEMIES,
|
||||
// Race
|
||||
GTR_PLATFORM|GTR_RACE|GTR_CHASECAM,
|
||||
GTR_PLATFORM|GTR_RACE|GTR_CHASECAM|GTR_SPAWNENEMIES,
|
||||
|
||||
// Match
|
||||
GTR_RINGSLINGER|GTR_SPECTATORS|GTR_TIMELIMIT|GTR_EMERALDS|GTR_PITYSHIELD|GTR_DEATHPENALTY,
|
||||
|
@ -3116,7 +3116,6 @@ void G_SetGametype(INT16 gtype)
|
|||
//
|
||||
INT16 G_AddGametype(UINT32 rules)
|
||||
{
|
||||
INT32 i;
|
||||
INT16 newgtype = gametypecount;
|
||||
gametypecount++;
|
||||
|
||||
|
|
|
@ -201,7 +201,7 @@ ATTRNORETURN void FUNCNORETURN G_StopMetalRecording(boolean kill);
|
|||
void G_StopDemo(void);
|
||||
boolean G_CheckDemoStatus(void);
|
||||
|
||||
extern INT16 gametypedefaultrules[NUMGAMETYPES];
|
||||
extern UINT32 gametypedefaultrules[NUMGAMETYPES];
|
||||
extern UINT32 gametypetol[NUMGAMETYPES];
|
||||
|
||||
void G_SetGametype(INT16 gametype);
|
||||
|
|
|
@ -11682,7 +11682,7 @@ You should think about modifying the deathmatch starts to take full advantage of
|
|||
if (i == MT_EMERHUNT)
|
||||
{
|
||||
// Emerald Hunt is Coop only.
|
||||
if (gametype != GT_COOP)
|
||||
if (!(gametyperules & GTR_EMERALDHUNT))
|
||||
return;
|
||||
|
||||
ss = R_PointInSubsector(mthing->x << FRACBITS, mthing->y << FRACBITS);
|
||||
|
@ -11708,7 +11708,7 @@ You should think about modifying the deathmatch starts to take full advantage of
|
|||
runemeraldmanager = true;
|
||||
}
|
||||
|
||||
if (!G_PlatformGametype()) // No enemies in match or CTF modes
|
||||
if (!(gametyperules & GTR_SPAWNENEMIES)) // No enemies in match or CTF modes
|
||||
if ((mobjinfo[i].flags & MF_ENEMY) || (mobjinfo[i].flags & MF_BOSS))
|
||||
return;
|
||||
|
||||
|
|
Loading…
Reference in a new issue