Add a few more checks for flying skills (no more flying mud ponies)

This commit is contained in:
Matthew Messinger 2016-07-08 02:27:45 -04:00
parent fded14ad6d
commit 289f00bd6f

View file

@ -177,6 +177,11 @@ public abstract class MixinRenderPlayer extends RenderLivingBase<AbstractClientP
shift = Shift.AFTER)) shift = Shift.AFTER))
private void onRotateCorpse(AbstractClientPlayer player, float yaw, float pitch, float ticks, CallbackInfo ci) { private void onRotateCorpse(AbstractClientPlayer player, float yaw, float pitch, float ticks, CallbackInfo ci) {
if (this.mainModel instanceof ModelPlayerPony) { if (this.mainModel instanceof ModelPlayerPony) {
// require arms to be stretched out (sorry mud ponies, no flight skills for you)
if (!((ModelPlayerPony) this.mainModel).rainboom) {
this.playerModel.getModel().motionPitch = 0;
return;
}
double motionX = player.posX - player.prevPosX; double motionX = player.posX - player.prevPosX;
double motionY = player.posY - player.prevPosY; double motionY = player.posY - player.prevPosY;
double motionZ = player.posZ - player.prevPosZ; double motionZ = player.posZ - player.prevPosZ;
@ -192,9 +197,6 @@ public abstract class MixinRenderPlayer extends RenderLivingBase<AbstractClientP
angle /= 2; angle /= 2;
} }
} }
if (player.moveForward < 0) {
angle *= -1;
}
if (angle > Math.PI / 3) if (angle > Math.PI / 3)
angle = Math.PI / 3; angle = Math.PI / 3;