- Fixed a discrepancy with A_FaceMovementDirection involving pitch adjustments going the wrong way both in motion, and standing still.

This commit is contained in:
MajorCooke 2016-06-11 14:07:27 -05:00
parent fb286d1737
commit 4c8028d64b

View file

@ -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)
{