Skip to content

Commit 244dbd1

Browse files
committed
check movement by vector rather than if it equals Vec3d.ZERO
1 parent d84f0ea commit 244dbd1

File tree

1 file changed

+1
-1
lines changed
  • src/main/kotlin/com/lambda/module/modules/movement

1 file changed

+1
-1
lines changed

src/main/kotlin/com/lambda/module/modules/movement/ElytraFly.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ object ElytraFly : Module(
138138
if (mc.options.rightKey.isPressed) vec = vec.add(Vec3d.fromPolar(0f, yaw + 90f))
139139
if (mc.options.jumpKey.isPressed) vec = vec.add(Vec3d(0.0, 1.0, 0.0))
140140
if (mc.options.sneakKey.isPressed) vec = vec.add(Vec3d(0.0, -1.0, 0.0))
141-
if (vec === Vec3d.ZERO && player.hasFirework) {
141+
if (vec.lengthSquared() < 1e-4 && player.hasFirework) {
142142
if (flipFlop) {
143143
flipFlop = false
144144
rotationRequest { rotation(0f, 0f) }

0 commit comments

Comments
 (0)