Skip to content

Commit 1db08db

Browse files
committed
fix: (rotation) clear input/rotation history on immediate teardown to stop toggle-time Grim Simulation
The atomic disable teardown (immediate cancel) reset the rotation but kept the stale modifiedInput and server-rotation history. On the tick right after a module toggles off, GrimAC still reconstructed movement from the scaffold/silent-modified input against the now-real sent yaw, producing a Simulation offset (the 'sometimes flags on enable/disable' report). Pass resetHistory=immediate so an immediate teardown also reseeds lastRotations/actualServerRotation from the real rotation and clears modifiedInput, matching the reference build which has no such coupling.
1 parent c843d4c commit 1db08db

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/main/java/net/ccbluex/liquidbounce/utils/rotation/RotationUtils.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,10 @@ object RotationUtils : MinecraftInstance, Listenable {
695695
resetTicks = 0
696696

697697
if (immediate || currentRotation == null) {
698-
resetRotation()
698+
// On an immediate teardown (module disable) also clear the input/rotation history so the
699+
// next tick's movement prediction carries no stale scaffold/silent modifiedInput or
700+
// server-rotation, which otherwise desyncs GrimAC's Simulation on the toggle tick.
701+
resetRotation(resetHistory = immediate)
699702
}
700703

701704
return true

0 commit comments

Comments
 (0)