Skip to content

Commit 9c834cd

Browse files
committed
fix: (rotation) reset the silent rotation atomically on module disable
Disabling a rotation module mid-aim called cancelTargetRotation with immediate=false, which skips resetRotation while currentRotation != null. The next tick then snapped the silent yaw back to camera at up to 180 deg/tick WHILE the Silent movement-correction was still rewriting motion and sprint flipped on - a one-tick yaw+velocity+sprint discontinuity that GrimAC's movement simulation flags (offset 0.05-0.45 >= the 0.1 immediate-setback threshold), producing the freeze/rubber-band loop even without hitting anyone. Reset atomically (immediate = true) so currentRotation and activeSettings clear in the same tick before movement: onStrafe stops rewriting motion, the packet yaw matches the camera, and sprint reads raw input - velocity and the sent yaw never disagree. Matches the reference build, which keeps velocity decoupled from the silent yaw.
1 parent 9647535 commit 9c834cd

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

  • src/main/java/net/ccbluex/liquidbounce/features/module

src/main/java/net/ccbluex/liquidbounce/features/module/Module.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,12 @@ open class Module(
196196
// A broken module-specific cleanup must never leave the module logically
197197
// enabled or retain global scheduler/rotation ownership.
198198
TickScheduler.cancel(this)
199-
RotationUtils.cancelTargetRotation(this)
199+
// Tear down rotation ownership atomically. With MovementCorrection coupling world
200+
// velocity to the silent server yaw, a smoothed reset snaps the yaw and rewrites
201+
// motion (and can flip sprint) across separate ticks while a target is still live,
202+
// which GrimAC's movement simulation flags -> setback loop. immediate = true resets
203+
// in the same tick, before movement, so velocity and the sent yaw never disagree.
204+
RotationUtils.cancelTargetRotation(this, immediate = true)
200205
field = false
201206
}
202207
}

0 commit comments

Comments
 (0)