Skip to content

Commit

Permalink
cleanup code
Browse files Browse the repository at this point in the history
  • Loading branch information
1zun4 committed Feb 22, 2023
1 parent 3be31e0 commit 9f173b5
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,17 +138,15 @@ object ModuleAutoBow : Module("AutoBow", Category.COMBAT) {

arrow.tick()

players.forEach { pair ->
val player = pair.second

players.forEach { (entity, player) ->
player.tick()

val playerHitBox = Box(-0.3, 0.0, -0.3, 0.3, 1.8, 0.3).expand(0.3).offset(player.pos)

val raycastResult = playerHitBox.raycast(lastPos, arrow.pos)

raycastResult.orElse(null)?.let {
return pair.first
return entity
}
}
}
Expand Down

0 comments on commit 9f173b5

Please sign in to comment.