0
0
mirror of https://github.com/Wurst-Imperium/Wurst7.git synced 2024-09-20 01:12:13 +02:00

Fix omnidirectional sprint activating when the player isn't moving at all

This commit is contained in:
Alexander01998 2023-12-29 17:57:11 +01:00
parent 1580f55d43
commit a4930b74cb
2 changed files with 3 additions and 3 deletions

View File

@ -55,8 +55,8 @@ public final class AutoSprintHack extends Hack implements UpdateListener
if(player.isInsideWaterOrBubbleColumn() || player.isSubmergedInWater())
return;
if(player.forwardSpeed > 0 || (allDirections.isChecked()
&& (player.getVelocity().x != 0 || player.getVelocity().z != 0)))
if(player.forwardSpeed > 0 || allDirections.isChecked()
&& (player.getVelocity().x != 0 || player.getVelocity().z != 0))
player.setSprinting(true);
}

View File

@ -79,7 +79,7 @@ public class ClientPlayerEntityMixin extends AbstractClientPlayerEntity
{
if(WurstClient.INSTANCE.getHax().autoSprintHack
.shouldSprintAllDirections())
return true;
return input.getMovementInput().length() > 1e-5F;
return input.hasForwardMovement();
}