Skip to content

Commit

Permalink
feat(legacy): Smoother KillAura AimPointBox positions. (#5661)
Browse files Browse the repository at this point in the history
  • Loading branch information
mems01 authored Feb 19, 2025
1 parent 8817bf7 commit 732828a
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1231,13 +1231,15 @@ object KillAura : Module("KillAura", Category.COMBAT, Keyboard.KEY_R) {
val renderManager = mc.renderManager

runWithSimulatedPosition(player, player.interpolatedPosition(player.prevPos)) {
val rotationVec = player.eyes + getVectorForRotation(
serverRotation.lerpWith(currentRotation ?: player.rotation, mc.timer.renderPartialTicks)
) * player.getDistanceToEntityBox(target).coerceAtMost(range.toDouble())
runWithSimulatedPosition(target, target.interpolatedPosition(target.prevPos)) {
val rotationVec = player.eyes + getVectorForRotation(
serverRotation.lerpWith(currentRotation ?: player.rotation, mc.timer.renderPartialTicks)
) * player.getDistanceToEntityBox(target).coerceAtMost(range.toDouble())

val offSetBox = box.offset(rotationVec - renderManager.renderPos)
val offSetBox = box.offset(rotationVec - renderManager.renderPos)

RenderUtils.drawAxisAlignedBB(offSetBox, aimPointBoxColor)
RenderUtils.drawAxisAlignedBB(offSetBox, aimPointBoxColor)
}
}
}

Expand Down

0 comments on commit 732828a

Please sign in to comment.