Skip to content

Commit

Permalink
fix(legacy): Rotations screwing up on Scaffold and on SilentRotation …
Browse files Browse the repository at this point in the history
…option toggle. (CCBlueX#3034)
  • Loading branch information
mems01 authored May 16, 2024
1 parent 3b2cf67 commit a88a408
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -541,14 +541,26 @@ object Scaffold : Module("Scaffold", ModuleCategory.WORLD, Keyboard.KEY_I, hideM
update()

if (rotationMode != "Off" && rotation != null) {
val placeRotation = this.placeRotation?.rotation ?: rotation

val pitch = if (scaffoldMode == "GodBridge" && useStaticRotation) {
if (placeRotation == this.placeRotation?.rotation) {
if (isLookingDiagonally) 75.6f else 73.5f
} else placeRotation.pitch
} else {
placeRotation.pitch
}

val targetRotation = Rotation(placeRotation.yaw, pitch).fixedSensitivity()

val ticks = if (keepRotation) {
if (scaffoldMode == "Telly") 1 else keepTicks
} else {
RotationUtils.resetTicks
}

if (RotationUtils.resetTicks != 0 || keepRotation) {
setRotation(rotation, ticks)
setRotation(targetRotation, ticks)
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/net/ccbluex/liquidbounce/utils/RotationUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,10 @@ object RotationUtils : MinecraftInstance(), Listenable {
return
}

if (applyClientSide) {
currentRotation = null
}

targetRotation = rotation

rotationData = RotationData(
Expand Down

0 comments on commit a88a408

Please sign in to comment.