Browse Source

random delay between mob chase

combat-2
FatBoy-DOTC 1 year ago
parent
commit
d0374a2dea
  1. 2
      src/engine/mobileAI/MobAI.java

2
src/engine/mobileAI/MobAI.java

@ -898,7 +898,7 @@ public class MobAI {
if(mob.getTimestamps().containsKey("lastChase") == false) if(mob.getTimestamps().containsKey("lastChase") == false)
mob.getTimestamps().put("lastChase",System.currentTimeMillis()); mob.getTimestamps().put("lastChase",System.currentTimeMillis());
else if(System.currentTimeMillis() < mob.getTimestamps().get("lastChase").longValue() + 1000) else if(System.currentTimeMillis() < mob.getTimestamps().get("lastChase").longValue() + (750 + ThreadLocalRandom.current().nextInt(0,500)))
return; return;
mob.getTimestamps().put("lastChase",System.currentTimeMillis()); mob.getTimestamps().put("lastChase",System.currentTimeMillis());

Loading…
Cancel
Save