diff --git a/java/squeek/quakemovement/QuakeClientPlayer.java b/java/squeek/quakemovement/QuakeClientPlayer.java index 0c840d4..e13db5f 100644 --- a/java/squeek/quakemovement/QuakeClientPlayer.java +++ b/java/squeek/quakemovement/QuakeClientPlayer.java @@ -102,7 +102,7 @@ public class QuakeClientPlayer extends ClientPlayerBase @Override public void moveFlying(float sidemove, float forwardmove, float wishspeed) { - if ((this.player.capabilities.isFlying && this.player.ridingEntity == null) || this.player.isInWater() || this.player.isInLava()) + if ((this.player.capabilities.isFlying && this.player.ridingEntity == null) || this.player.isInWater() || this.player.isInLava() || this.player.isOnLadder()) { super.moveFlying(sidemove, forwardmove, wishspeed); return; @@ -422,6 +422,12 @@ public class QuakeClientPlayer extends ClientPlayerBase */ public void quake_moveEntityWithHeading(float sidemove, float forwardmove) { + // take care of ladder movement using default code + if (this.player.isOnLadder()) + { + super.moveEntityWithHeading(sidemove, forwardmove); + return; + } // take care of lava movement using default code if ((this.player.isInLava() && !this.player.capabilities.isFlying)) { @@ -490,15 +496,9 @@ public class QuakeClientPlayer extends ClientPlayerBase } } - // make adjustments for ladder interaction - minecraft_ApplyLadderPhysics(); - // apply velocity this.player.moveEntity(this.player.motionX, this.player.motionY, this.player.motionZ); - // climb ladder here for some reason - minecraft_ClimbLadder(); - // HL2 code applies half gravity before acceleration and half after acceleration, but this seems to work fine minecraft_ApplyGravity(); }