attack range sync
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user