From 4c8028d64bbc6a6280130c3a87ea8e2fdb7221d3 Mon Sep 17 00:00:00 2001 From: MajorCooke Date: Sat, 11 Jun 2016 14:07:27 -0500 Subject: [PATCH] - Fixed a discrepancy with A_FaceMovementDirection involving pitch adjustments going the wrong way both in motion, and standing still. --- 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 9c8464417..4d88a56fc 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -6931,10 +6931,10 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FaceMovementDirection) { DAngle current = mobj->Angles.Pitch; const DVector2 velocity = mobj->Vel.XY(); - DAngle pitch = VecToAngle(velocity.Length(), -mobj->Vel.Z); + DAngle pitch = VecToAngle(velocity.Length(), mobj->Vel.Z); if (pitchlimit > 0) { - DAngle pdelta = deltaangle(current, pitch); + DAngle pdelta = deltaangle(-current, pitch); if (fabs(pdelta) > pitchlimit) {