From 5364116354303317922427a8f12764b0846c49ca Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 23 Aug 2014 13:24:15 +0200 Subject: [PATCH] - fixed: APROP_Friendly did not manage monster counting correctly. --- src/p_acs.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/p_acs.cpp b/src/p_acs.cpp index e0967d400..235a47933 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -3747,16 +3747,16 @@ void DLevelScript::DoSetActorProperty (AActor *actor, int property, int value) break; case APROP_Friendly: + if (actor->CountsAsKill()) level.total_monsters--; if (value) { - if (actor->CountsAsKill()) level.total_monsters--; actor->flags |= MF_FRIENDLY; } else { actor->flags &= ~MF_FRIENDLY; - if (actor->CountsAsKill()) level.total_monsters++; } + if (actor->CountsAsKill()) level.total_monsters++; break;