mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +00:00
- Fixed a discrepancy with A_FaceMovementDirection involving pitch adjustments going the wrong way both in motion, and standing still.
This commit is contained in:
parent
fb286d1737
commit
4c8028d64b
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue