Fix strafing getting stuck at invalid angles

This commit is contained in:
Sollace 2018-06-08 21:21:08 +02:00
parent 3800bc2424
commit 46199208ce

View file

@ -58,6 +58,7 @@ public class RenderPonyPlayer extends RenderPonyBase {
double roll = (Math.toDegrees(Math.atan2(motionX, motionZ)) - yaw) % 360;
if (roll < -180) roll += 360;
if (roll > 180) roll -= 360;
roll *= horMotion * 2;
roll = MathHelper.clamp(roll, -54, 54);