1 second delay for mobs chasing target

This commit is contained in:
2023-10-16 14:33:09 -05:00
parent 1a0fc309f9
commit d506807a8f
+5
View File
@@ -896,6 +896,11 @@ public class MobAI {
try {
if(mob.getTimestamps().containsKey("lastChase") == false)
mob.getTimestamps().put("lastChase",System.currentTimeMillis());
else if(System.currentTimeMillis() < mob.getTimestamps().get("lastChase").longValue() + 1000)
return;
if (CombatUtilities.inRange2D(mob, mob.getCombatTarget(), mob.getRange()) == false) {
if (mob.getRange() > 15) {
mob.destination = mob.getCombatTarget().getLoc();