|
|
|
@ -889,13 +889,7 @@ public class MobAI {
@@ -889,13 +889,7 @@ public class MobAI {
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
|
|
float rangeSquared = mob.getRange() * mob.getRange(); |
|
|
|
|
float distanceSquared = mob.getLoc().distanceSquared2D(mob.getCombatTarget().getLoc()); |
|
|
|
|
|
|
|
|
|
if (mob.isMoving() == true && distanceSquared < rangeSquared - 50) { |
|
|
|
|
mob.destination = mob.getLoc(); |
|
|
|
|
MovementUtilities.moveToLocation(mob, mob.destination, 0); |
|
|
|
|
} else if (CombatUtilities.inRange2D(mob, mob.getCombatTarget(), mob.getRange()) == false) { |
|
|
|
|
if (CombatUtilities.inRange2D(mob, mob.getCombatTarget(), mob.getRange()) == false) { |
|
|
|
|
if (mob.getRange() > 15) { |
|
|
|
|
mob.destination = mob.getCombatTarget().getLoc(); |
|
|
|
|
MovementUtilities.moveToLocation(mob, mob.destination, 0); |
|
|
|
|