When hit at -20 rings, die

This commit is contained in:
AJ Martinez 2023-05-30 03:03:34 -07:00
parent ff23501e74
commit 136800ec23
2 changed files with 9 additions and 0 deletions

View file

@ -2398,6 +2398,12 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
}
}
if (player->rings <= -20)
{
damagetype |= DMG_INSTAKILL;
P_KillPlayer(player, inflictor, source, damagetype);
}
switch (type)
{
case DMG_STING:

View file

@ -4368,6 +4368,9 @@ void P_PlayerThink(player_t *player)
{
// Allows some turning
P_MovePlayer(player);
if (player->rings <= -20) // We got here from death, so give the player a fresh start.
player->rings = 5;
}
}
else if (player->mo->reactiontime)