GTR_EMERALDHUNT and GTR_SPAWNENEMIES

This commit is contained in:
Jaime Passos 2019-12-18 14:57:42 -03:00
parent 0577cec01b
commit d3d91726f5
5 changed files with 11 additions and 8 deletions

View File

@ -8805,6 +8805,8 @@ static const char *const GAMETYPERULE_LIST[] = {
"PITYSHIELD", "PITYSHIELD",
"DEATHPENALTY", "DEATHPENALTY",
"NOSPECTATORSPAWN", "NOSPECTATORSPAWN",
"EMERALDHUNT",
"SPAWNENEMIES",
NULL NULL
}; };

View File

@ -411,6 +411,8 @@ enum GameTypeRules
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 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 // String names for gametypes

View File

@ -3075,14 +3075,14 @@ const char *Gametype_ConstantNames[NUMGAMETYPES] =
}; };
// Game type rules // Game type rules
INT16 gametypedefaultrules[NUMGAMETYPES] = UINT32 gametypedefaultrules[NUMGAMETYPES] =
{ {
// Co-op // Co-op
GTR_PLATFORM|GTR_LIVES|GTR_CHASECAM, GTR_PLATFORM|GTR_LIVES|GTR_CHASECAM|GTR_EMERALDHUNT|GTR_SPAWNENEMIES,
// Competition // Competition
GTR_PLATFORM|GTR_LIVES|GTR_RACE|GTR_CHASECAM, GTR_PLATFORM|GTR_LIVES|GTR_RACE|GTR_CHASECAM|GTR_SPAWNENEMIES,
// Race // Race
GTR_PLATFORM|GTR_RACE|GTR_CHASECAM, GTR_PLATFORM|GTR_RACE|GTR_CHASECAM|GTR_SPAWNENEMIES,
// Match // Match
GTR_RINGSLINGER|GTR_SPECTATORS|GTR_TIMELIMIT|GTR_EMERALDS|GTR_PITYSHIELD|GTR_DEATHPENALTY, 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) INT16 G_AddGametype(UINT32 rules)
{ {
INT32 i;
INT16 newgtype = gametypecount; INT16 newgtype = gametypecount;
gametypecount++; gametypecount++;

View File

@ -201,7 +201,7 @@ ATTRNORETURN void FUNCNORETURN G_StopMetalRecording(boolean kill);
void G_StopDemo(void); void G_StopDemo(void);
boolean G_CheckDemoStatus(void); boolean G_CheckDemoStatus(void);
extern INT16 gametypedefaultrules[NUMGAMETYPES]; extern UINT32 gametypedefaultrules[NUMGAMETYPES];
extern UINT32 gametypetol[NUMGAMETYPES]; extern UINT32 gametypetol[NUMGAMETYPES];
void G_SetGametype(INT16 gametype); void G_SetGametype(INT16 gametype);

View File

@ -11682,7 +11682,7 @@ You should think about modifying the deathmatch starts to take full advantage of
if (i == MT_EMERHUNT) if (i == MT_EMERHUNT)
{ {
// Emerald Hunt is Coop only. // Emerald Hunt is Coop only.
if (gametype != GT_COOP) if (!(gametyperules & GTR_EMERALDHUNT))
return; return;
ss = R_PointInSubsector(mthing->x << FRACBITS, mthing->y << FRACBITS); 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; 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)) if ((mobjinfo[i].flags & MF_ENEMY) || (mobjinfo[i].flags & MF_BOSS))
return; return;