mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-27 14:22:13 +00:00
- ensure that 'kill' always kills the player, regardless of damage factor.
SVN r3659 (trunk)
This commit is contained in:
parent
f4ff63e7c3
commit
625ee246d7
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue