Skip to content

Commit

Permalink
fix(legacy): backtrack freezing when condition isn't met (#5326)
Browse files Browse the repository at this point in the history
  • Loading branch information
EclipsesDev authored Jan 15, 2025
1 parent 5c372ab commit 77fa1f7
Showing 1 changed file with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,8 @@ object Backtrack : Module("Backtrack", Category.COMBAT, hideModule = false) {
val targetMixin = target as? IMixinEntity

if (mode == "Modern") {
if (targetMixin != null) {
if (!Blink.blinkingReceive() && shouldBacktrack() && targetMixin.truePos) {
if (shouldBacktrack() && targetMixin != null) {
if (!Blink.blinkingReceive() && targetMixin.truePos) {
val trueDist = mc.thePlayer.getDistance(targetMixin.trueX, targetMixin.trueY, targetMixin.trueZ)
val dist = mc.thePlayer.getDistance(target.posX, target.posY, target.posZ)

Expand All @@ -265,15 +265,9 @@ object Backtrack : Module("Backtrack", Category.COMBAT, hideModule = false) {
} else {
handlePacketsRange()
}
} else {
clearPackets()
globalTimer.reset()
}
} else clear()
}
} else {
clearPackets()
globalTimer.reset()
}
} else clear()
}

ignoreWholeTick = false
Expand Down Expand Up @@ -679,6 +673,11 @@ object Backtrack : Module("Backtrack", Category.COMBAT, hideModule = false) {
globalTimer.reset()
}

private fun clear() {
clearPackets()
globalTimer.reset()
}

override val tag: String
get() = supposedDelay.toString()
}
Expand Down

0 comments on commit 77fa1f7

Please sign in to comment.