From 625ee246d71dcd89019574126d4a64beb5095732 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 17 May 2012 07:50:13 +0000 Subject: [PATCH] - ensure that 'kill' always kills the player, regardless of damage factor. SVN r3659 (trunk) --- src/m_cheat.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/m_cheat.cpp b/src/m_cheat.cpp index caac3b1af..2d836327d 100644 --- a/src/m_cheat.cpp +++ b/src/m_cheat.cpp @@ -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; } }