From 69cbb7a38267009df403f7a29aa71ed187fe4d9d Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 19 Apr 2016 00:52:08 +0200 Subject: [PATCH] - fixed: The pitch calculation did not check the calling actor's height when retrieving the position to calculate the pitch from. --- src/p_enemy.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/p_enemy.cpp b/src/p_enemy.cpp index 19b916956..047b11e9a 100644 --- a/src/p_enemy.cpp +++ b/src/p_enemy.cpp @@ -2856,6 +2856,10 @@ void A_Face(AActor *self, AActor *other, DAngle max_turn, DAngle max_pitch, DAng { target_z = other->Center(); } + if (source_z >= self->Top()) + { + source_z = self->Center(); + } //Note there is no +32 on purpose. This is for customization sake. //If one doesn't want this behavior, just don't use FAF_BOTTOM.