Skip to content

Commit bd7ac3e

Browse files
committed
Strafe event fix for silent rotations
1 parent 3c1ca3d commit bd7ac3e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

common/src/main/kotlin/com/lambda/interaction/RotationManager.kt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,12 @@ object RotationManager : Loadable {
226226
// No changes are needed when no inputs are pressed
227227
if (signForward == 0f && signStrafe == 0f) return@runSafe
228228

229-
// Actual yaw used to move the player
230-
val actualYaw = currentRotation.yaw
229+
// Actual yaw used by the physics engine
230+
var actualYaw = currentRotation.yaw
231+
232+
if (currentContext?.config?.rotationMode == RotationMode.SILENT) {
233+
actualYaw = player.yaw.toDouble()
234+
}
231235

232236
val yawRad = (movementYaw - actualYaw).toRadian()
233237

0 commit comments

Comments
 (0)