Browse Source

update lastChase timestamp for mobs

magicbox-1.5.2
FatBoy-DOTC 1 year ago
parent
commit
cb89cc17be
  1. 2
      src/engine/mobileAI/MobAI.java

2
src/engine/mobileAI/MobAI.java

@ -901,6 +901,8 @@ public class MobAI {
else if(System.currentTimeMillis() < mob.getTimestamps().get("lastChase").longValue() + 1000) else if(System.currentTimeMillis() < mob.getTimestamps().get("lastChase").longValue() + 1000)
return; return;
mob.getTimestamps().put("lastChase",System.currentTimeMillis());
if (CombatUtilities.inRange2D(mob, mob.getCombatTarget(), mob.getRange()) == false) { if (CombatUtilities.inRange2D(mob, mob.getCombatTarget(), mob.getRange()) == false) {
if (mob.getRange() > 15) { if (mob.getRange() > 15) {
mob.destination = mob.getCombatTarget().getLoc(); mob.destination = mob.getCombatTarget().getLoc();

Loading…
Cancel
Save