Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions src/main/kotlin/com/lambda/module/modules/movement/Pitch40.kt
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ object Pitch40 : Module(
}

listen<TickEvent.Pre> {
if (!player.isGliding) {
reset(player)
return@listen
}

when (state) {
Pitch40State.GainSpeed -> {
lookAt(Rotation(player.yaw, PITCH_DOWN_DEFAULT)).requestBy(this@Pitch40)
Expand Down Expand Up @@ -87,12 +92,16 @@ object Pitch40 : Module(
}

onEnable {
state = Pitch40State.GainSpeed
lastPos = player.pos
lastAngle = PITCH_UP_DEFAULT
reset(player)
}
}

fun reset(player: ClientPlayerEntity) {
state = Pitch40State.GainSpeed
lastPos = player.pos
lastAngle = PITCH_UP_DEFAULT
}

/**
* Get the player's current speed in meters per second.
*/
Expand Down
Loading