File tree Expand file tree Collapse file tree 1 file changed +4
-24
lines changed
src/main/kotlin/com/lambda/client/module/modules/movement Expand file tree Collapse file tree 1 file changed +4
-24
lines changed Original file line number Diff line number Diff line change @@ -261,19 +261,16 @@ object Speed : Module(
261
261
}
262
262
263
263
private fun SafeClientEvent.handleStrafe (event : PlayerMoveEvent ) {
264
-
265
- if (
266
- ! shouldStrafe()
267
- ) {
264
+ if (! shouldStrafe()) {
268
265
resetTimer()
269
266
event.x = .0
270
267
event.z = .0
271
268
currentSpeed = .2873
272
269
return
273
270
}
274
271
275
- if (! ( ! strafeOnlyOverhead || world.collidesWithAnyBlock(player.entityBoundingBox.offset(.0 ,.42 ,.0 ) ))
276
- || ! ( ! strafeOnHoldingSprint || mc.gameSettings.keyBindSprint.isKeyDown) )
272
+ if (strafeOnlyOverhead && ! world.collidesWithAnyBlock(player.entityBoundingBox.offset(.0 ,.42 ,.0 ))
273
+ || strafeOnHoldingSprint && ! mc.gameSettings.keyBindSprint.isKeyDown)
277
274
return
278
275
279
276
modifyTimer(TIMER_SPEED )
@@ -284,44 +281,27 @@ object Speed : Module(
284
281
strafePhase = StrafePhase .ACCELERATING
285
282
286
283
when (strafePhase) {
287
-
288
284
StrafePhase .ACCELERATING -> {
289
-
290
285
if (player.onGround)
291
286
event.y = .42
292
- else
293
- strafePhase = StrafePhase .FALLING
294
-
295
287
currentSpeed = base
296
- currentSpeed * = if (strafeAirSpeedBoost == StrafeMode .Strict ) (1.87 ) else (1.93 )
297
-
288
+ currentSpeed * = if (strafeAirSpeedBoost == StrafeMode .Strict ) 1.87 else 1.93
298
289
strafePhase = StrafePhase .SLOWDOWN
299
-
300
290
}
301
291
302
292
StrafePhase .SLOWDOWN -> {
303
-
304
293
currentSpeed - = .66 * base
305
-
306
294
strafePhase = StrafePhase .FALLING
307
-
308
295
}
309
296
310
297
StrafePhase .FALLING -> {
311
-
312
298
currentSpeed = lastDistance - lastDistance / 159
313
-
314
299
}
315
-
316
300
}
317
301
318
302
val yaw = calcMoveYaw()
319
-
320
303
currentSpeed = currentSpeed.coerceAtLeast(.2873 )
321
-
322
304
event.x = - sin(yaw) * currentSpeed
323
305
event.z = cos(yaw) * currentSpeed
324
-
325
306
}
326
-
327
307
}
You can’t perform that action at this time.
0 commit comments