- ensure that 'kill' always kills the player, regardless of damage factor.

SVN r3659 (trunk)
This commit is contained in:
Christoph Oelckers 2012-05-17 07:50:13 +00:00
parent f4ff63e7c3
commit 625ee246d7
1 changed files with 4 additions and 0 deletions

View File

@ -1047,7 +1047,11 @@ void cht_Suicide (player_t *plyr)
{
plyr->mo->flags |= MF_SHOOTABLE;
plyr->mo->flags2 &= ~MF2_INVULNERABLE;
//Store the players current damage factor, to restore it later.
fixed_t plyrdmgfact = plyr->mo->DamageFactor;
plyr->mo->DamageFactor = 65536;
P_DamageMobj (plyr->mo, plyr->mo, plyr->mo, TELEFRAG_DAMAGE, NAME_Suicide);
plyr->mo->DamageFactor = plyrdmgfact;
if (plyr->mo->health <= 0) plyr->mo->flags &= ~MF_SHOOTABLE;
}
}