Skip to content

Commit

Permalink
fix(legacy): proper debug code positioning (CCBlueX#3391)
Browse files Browse the repository at this point in the history
  • Loading branch information
mems01 committed Jul 7, 2024
1 parent fb0de56 commit 0726664
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/main/java/net/ccbluex/liquidbounce/utils/RotationUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -717,13 +717,6 @@ object RotationUtils : MinecraftInstance(), Listenable {
if (event.eventState != EventState.POST) {
return
}

val oldYawDiff = getAngleDifference(serverRotation.yaw, lastServerRotation.yaw)
val oldPitchDiff = getAngleDifference(serverRotation.pitch, lastServerRotation.pitch)

if (Rotations.debugRotations && currentRotation != null) {
ClientUtils.displayChatMessage("DIFF | YAW: ${oldYawDiff}, PITCH: ${oldPitchDiff}")
}

rotationData?.let {
// Was the rotation update immediate? Allow updates the next tick.
Expand Down Expand Up @@ -767,8 +760,15 @@ object RotationUtils : MinecraftInstance(), Listenable {
currentRotation?.let {
packet.yaw = it.yaw
packet.pitch = it.pitch
}

val yawDiff = getAngleDifference(it.yaw, serverRotation.yaw)
val pitchDiff = getAngleDifference(it.pitch, serverRotation.pitch)

if (Rotations.debugRotations) {
ClientUtils.displayChatMessage("DIFF | YAW: ${yawDiff}, PITCH: ${pitchDiff}")
}
}

serverRotation = Rotation(packet.yaw, packet.pitch)
}

Expand Down

0 comments on commit 0726664

Please sign in to comment.