|
|
@ -1280,6 +1280,13 @@ public enum CombatManager { |
|
|
|
|
|
|
|
|
|
|
|
range += (calcHitBox(ac) + calcHitBox(target)); |
|
|
|
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); |
|
|
|
float magnitudeSquared = tl.distanceSquared(sl); |
|
|
|
|
|
|
|
|
|
|
|
return magnitudeSquared > range * range; |
|
|
|
return magnitudeSquared > range * range; |
|
|
|