Skip to content

Commit c83511f

Browse files
committed
Removed Matrix speed bypass
1 parent 6110e4a commit c83511f

File tree

1 file changed

+6
-37
lines changed
  • common/src/main/kotlin/com/lambda/module/modules/movement

1 file changed

+6
-37
lines changed

common/src/main/kotlin/com/lambda/module/modules/movement/Speed.kt

Lines changed: 6 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,13 @@ import com.lambda.util.player.MovementUtils.moveYaw
1717
import com.lambda.util.player.MovementUtils.setSpeed
1818
import kotlin.math.max
1919

20+
// ToDo: Revisit and implement grim strafing
2021
object Speed : Module(
2122
name = "Speed",
2223
description = "Fastest module",
2324
defaultTags = setOf(ModuleTag.MOVEMENT)
2425
) {
25-
private val mode by setting("Mode", Mode.MATRIX_STRAFE_1)
26+
private val mode by setting("Mode", Mode.NCP_STRAFE)
2627

2728
// NCP
2829
private val ncpBaseSpeed by setting("Base Speed", 0.2873, 0.1..0.3, 0.0001, visibility = { mode == Mode.NCP_STRAFE })
@@ -40,13 +41,9 @@ object Speed : Module(
4041
private var ncpSpeed = ncpBaseSpeed
4142
private var lastDistance = 0.0
4243

43-
// Matrix
44-
private var matrixSprint = false
45-
4644
private enum class Mode {
4745
NCP_STRAFE,
48-
MATRIX_STRAFE_1,
49-
MATRIX_STRAFE_2,
46+
GRIM_STRAFE,
5047
}
5148

5249
private enum class NCPPhase {
@@ -107,21 +104,8 @@ object Speed : Module(
107104

108105
setSpeed(moveSpeed)
109106
}
110-
111-
Mode.MATRIX_STRAFE_1, Mode.MATRIX_STRAFE_2 -> {
112-
if (!isInputting) return@listener
113-
114-
var speed = player.motionDelta
115-
116-
if (speed > 0.21) {
117-
if (mode == Mode.MATRIX_STRAFE_2) return@listener
118-
speed *= 0.9999 // Memetrix
119-
}
120-
121-
if (!player.horizontalCollision)
122-
speed = max(speed, 0.1)
123-
124-
setSpeed(speed)
107+
Mode.GRIM_STRAFE -> {
108+
// ToDo: Implement
125109
}
126110
}
127111
}
@@ -141,25 +125,10 @@ object Speed : Module(
141125

142126
when (mode) {
143127
Mode.NCP_STRAFE -> it.cancel()
144-
Mode.MATRIX_STRAFE_1, Mode.MATRIX_STRAFE_2 -> {
145-
if (!isInputting) return@listener
146-
147-
if (player.isSprinting) {
148-
addSpeed(-0.2, player.moveYaw.toRadian().toDouble())
149-
}
150-
151-
addSpeed(0.2)
152-
}
128+
Mode.GRIM_STRAFE -> {}
153129
}
154130
}
155131

156-
listener<PlayerPacketEvent.Pre> {
157-
if (!shouldWork()) return@listener
158-
if (mode != Mode.MATRIX_STRAFE_1 || !isInputting) return@listener
159-
it.isSprinting = matrixSprint
160-
matrixSprint = !matrixSprint
161-
}
162-
163132
onEnable {
164133
ncpPhase = NCPPhase.SLOWDOWN
165134
ncpSpeed = ncpBaseSpeed

0 commit comments

Comments
 (0)