GTR_DEATHPENALTY

This commit is contained in:
Jaime Passos 2019-12-18 12:13:24 -03:00
parent 83732f38a9
commit da4e759a73
3 changed files with 3 additions and 2 deletions

View file

@ -433,6 +433,7 @@ enum GameTypeRules
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
};
// String names for gametypes

View file

@ -3069,7 +3069,7 @@ INT16 gametypedefaultrules[NUMGAMETYPES] =
GTR_PLATFORM|GTR_RACE|GTR_CHASECAM,
// Match
GTR_RINGSLINGER|GTR_SPECTATORS|GTR_TIMELIMIT|GTR_EMERALDS|GTR_PITYSHIELD,
GTR_RINGSLINGER|GTR_SPECTATORS|GTR_TIMELIMIT|GTR_EMERALDS|GTR_PITYSHIELD|GTR_DEATHPENALTY,
// Team Match
GTR_RINGSLINGER|GTR_TEAMS|GTR_SPECTATORS|GTR_TIMELIMIT|GTR_PITYSHIELD,

View file

@ -2389,7 +2389,7 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget
{
if (metalrecording) // Ack! Metal Sonic shouldn't die! Cut the tape, end recording!
G_StopMetalRecording(true);
if (gametype == GT_MATCH // note, no team match suicide penalty
if ((gametyperules & GTR_DEATHPENALTY) // note, no team match suicide penalty
&& ((target == source) || (source == NULL && inflictor == NULL) || (source && !source->player)))
{ // Suicide penalty
if (target->player->score >= 50)