Skip to content

Commit 5113925

Browse files
committed
fix: (rotation) sprint-jump boost follows the sent yaw whenever movement is corrected
The sprint-jump horizontal boost (motionX -= sin(yaw)*0.2) only switched from the camera yaw to the sent silent yaw for the legacy Strafe path. Under the default Modern Silent correction (and Strict), getStrafe() is false, so the boost fired along the camera yaw while the corrected walking velocity and GrimAC's reconstruction both used the sent yaw -> a ~0.2*2*sin(dYaw/2) horizontal desync on every jump -> Simulation spam (jump-to-place, jump-while-aiming). Use the sent yaw for the boost whenever movement correction is active (legacy Strafe OR modern Silent/Strict) so the jump stays consistent with the walking frame the server predicts.
1 parent 61d9648 commit 5113925

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

src/main/java/net/ccbluex/liquidbounce/injection/forge/mixins/entity/MixinEntityLivingBase.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,15 @@ protected void jump() {
9494
final RotationUtils rotationUtils = RotationUtils.INSTANCE;
9595
final Rotation currentRotation = rotationUtils.getCurrentRotation();
9696
final RotationSettings rotationData = rotationUtils.getActiveSettings();
97-
if (currentRotation != null && rotationData != null && rotationData.getStrafe()) {
97+
// The sprint-jump boost must ride the same yaw the movement correction uses, otherwise the
98+
// boost goes out along the camera yaw while GrimAC reconstructs it from the sent (silent)
99+
// yaw -> a ~0.2*2*sin(dYaw/2) horizontal offset -> Simulation on every jump. Correction is
100+
// active for legacy Strafe AND for the modern Silent/Strict modes (the default), so cover both.
101+
final boolean movementCorrected = rotationData != null && (rotationData.getStrafe()
102+
|| (rotationData.getUseModernRotations()
103+
&& ("Silent".equals(rotationData.getModernMovementCorrection())
104+
|| "Strict".equals(rotationData.getModernMovementCorrection()))));
105+
if (currentRotation != null && movementCorrected) {
98106
fixedYaw = currentRotation.getYaw();
99107
}
100108

0 commit comments

Comments
 (0)