From 70b8afc5ec560b579c4d1c00503df0fa5e90adc0 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 3 Apr 2016 21:26:57 +0200 Subject: [PATCH] - fixed: A_CheckLOF did the trace pitch calculation wrong. --- src/thingdef/thingdef_codeptr.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index 4024b85bcc..3adaf5a99f 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -3705,7 +3705,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CheckLOF) { offsetforward *= self->radius; offsetwidth *= self->radius; - } +} pos = self->PosPlusZ(offsetheight - self->Floorclip); @@ -3762,7 +3762,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CheckLOF) } else { - pitch -= VecToAngle(xydist, target->Center()); + pitch -= VecToAngle(xydist, target->Center() - pos.Z); } } else if (flags & CLOFF_ALLOWNULL)