Skip to content

Commit eb93d23

Browse files
committed
Add an option to keep sprinting while stationary
1 parent 963b3f1 commit eb93d23

File tree

1 file changed

+11
-1
lines changed
  • src/main/java/meteordevelopment/meteorclient/systems/modules/movement

1 file changed

+11
-1
lines changed

src/main/java/meteordevelopment/meteorclient/systems/modules/movement/Sprint.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,14 @@ public enum Mode {
5858
.build()
5959
);
6060

61+
private final Setting<Boolean> permaSprint = sgGeneral.add(new BoolSetting.Builder()
62+
.name("sprint-while-stationary")
63+
.description("Sprint even when not moving.")
64+
.defaultValue(false)
65+
.visible(() -> mode.get() == Mode.Rage)
66+
.build()
67+
);
68+
6169
public Sprint() {
6270
super(Categories.Movement, "sprint", "Automatically sprints.");
6371
}
@@ -98,7 +106,9 @@ public boolean shouldSprint() {
98106
? (Math.abs(mc.player.input.movementForward) + Math.abs(mc.player.input.movementSideways))
99107
: mc.player.input.movementForward;
100108

101-
if (movement <= (mc.player.isSubmergedInWater() ? 1.0E-5F : 0.8)) return false;
109+
if (movement <= (mc.player.isSubmergedInWater() ? 1.0E-5F : 0.8)) {
110+
if (mode.get() == Mode.Strict || !permaSprint.get()) return false;
111+
}
102112

103113
boolean strictSprint = !(mc.player.isTouchingWater() && !mc.player.isSubmergedInWater())
104114
&& ((ClientPlayerEntityAccessor) mc.player).invokeCanSprint()

0 commit comments

Comments
 (0)