Skip to content

Commit

Permalink
Normalize angle in AngleToACS
Browse files Browse the repository at this point in the history
Fixes GetActorAngle returning negative or large values with no range limit.
  • Loading branch information
Yukitty authored and coelckers committed Nov 10, 2022
1 parent 31ded6d commit 15e00f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/playsim/p_acs.cpp
Expand Up @@ -620,7 +620,7 @@ inline DAngle ACSToAngle(int acsval)

inline int AngleToACS(DAngle ang)
{
return ang.Q16();
return ang.Normalized360().Q16();
}

inline int PitchToACS(DAngle ang)
Expand Down

0 comments on commit 15e00f2

Please sign in to comment.