From 7720359f4cf22266bb4b9bb09b1d956322197819 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 1 Oct 2016 12:08:07 +0200 Subject: [PATCH] - fixed: AActor::Masacre must restore the flag if it cannot kill the monster. --- src/p_mobj.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index 400b41798..90a800fa7 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -1323,6 +1323,9 @@ bool AActor::Massacre () if (health > 0) { + auto f = flags; + auto f2 = flags2; + flags |= MF_SHOOTABLE; flags2 &= ~(MF2_DORMANT|MF2_INVULNERABLE); do @@ -1331,6 +1334,12 @@ bool AActor::Massacre () P_DamageMobj (this, NULL, NULL, TELEFRAG_DAMAGE, NAME_Massacre); } while (health != prevhealth && health > 0); //abort if the actor wasn't hurt. + if (health > 0) + { + // restore flags if this did not kill the monster. + flags = f; + flags2 = f2; + } return health <= 0; } return false;