diff --git a/src/engine/gameManager/CombatManager.java b/src/engine/gameManager/CombatManager.java index 7f9fd45f..1f47a54d 100644 --- a/src/engine/gameManager/CombatManager.java +++ b/src/engine/gameManager/CombatManager.java @@ -1280,6 +1280,13 @@ public enum CombatManager { range += (calcHitBox(ac) + calcHitBox(target)); + if(ac.getObjectType().equals(GameObjectType.PlayerCharacter)){ + range += ((PlayerCharacter)ac).getCharacterHeight() * 0.5f; + if(ac.isMoving()){ + range += ac.getSpeed(); + } + } + float magnitudeSquared = tl.distanceSquared(sl); return magnitudeSquared > range * range;