From 2be3b776d88c79dfc3fecd32e9f9c96dd0d83db1 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 13 Sep 2014 10:15:09 +0200 Subject: [PATCH] - fixed: A_CustomMissile should not jump to the See state for dead monsters when using CMF_CHECKTARGETDEAD. --- src/thingdef/thingdef_codeptr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index 048d4d47ff..b1c9e90658 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -1028,7 +1028,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomMissile) else if (flags & CMF_CHECKTARGETDEAD) { // Target is dead and the attack shall be aborted. - if (self->SeeState != NULL) self->SetState(self->SeeState); + if (self->SeeState != NULL && (self->health > 0 || !(self->flags3 & MF3_ISMONSTER))) self->SetState(self->SeeState); } }