Skip to content

Commit

Permalink
fix(Speed): yaw offset movement
Browse files Browse the repository at this point in the history
Due to the Rotation Manager Update, it affected the movement direction as well. This is now fixed.
  • Loading branch information
1zun4 committed Jan 8, 2025
1 parent 3af0095 commit c77a8cb
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ package net.ccbluex.liquidbounce.features.module.modules.movement.speed

import net.ccbluex.liquidbounce.config.types.NamedChoice
import net.ccbluex.liquidbounce.config.types.ToggleableConfigurable
import net.ccbluex.liquidbounce.event.events.GameTickEvent
import net.ccbluex.liquidbounce.event.events.RotationUpdateEvent
import net.ccbluex.liquidbounce.event.handler
import net.ccbluex.liquidbounce.utils.aiming.Rotation
import net.ccbluex.liquidbounce.utils.aiming.RotationManager
Expand All @@ -38,7 +38,7 @@ object SpeedYawOffset : ToggleableConfigurable(ModuleSpeed, "YawOffset", false)
private var yaw = 0f

@Suppress("unused")
private val yawOffsetHandler = handler<GameTickEvent> {
private val yawOffsetHandler = handler<RotationUpdateEvent> {
when (yawOffsetMode) {
YawOffsetMode.GROUND -> groundYawOffset() // makes you strafe more on ground
YawOffsetMode.AIR -> airYawOffset() // 45deg strafe on air
Expand All @@ -48,7 +48,8 @@ object SpeedYawOffset : ToggleableConfigurable(ModuleSpeed, "YawOffset", false)
val rotation = Rotation(player.yaw - yaw, player.pitch)

RotationManager.aimAt(
rotationsConfigurable.toAimPlan(rotation), Priority.NOT_IMPORTANT,
rotationsConfigurable.toAimPlan(rotation),
Priority.NOT_IMPORTANT,
ModuleSpeed
)
}
Expand Down

0 comments on commit c77a8cb

Please sign in to comment.