forked from MagicBane/Server
randomized patrol delays
This commit is contained in:
@@ -180,7 +180,7 @@ public class MobileFSM {
|
||||
mob.stopPatrolTime = System.currentTimeMillis();
|
||||
return;
|
||||
}
|
||||
int patrolDelay = ThreadLocalRandom.current().nextInt((int)(MBServerStatics.AI_PATROL_DIVISOR * 0.5f)) + (int)(MBServerStatics.AI_PATROL_DIVISOR * 0.5f);
|
||||
int patrolDelay = ThreadLocalRandom.current().nextInt(MBServerStatics.AI_PATROL_DIVISOR) + (int)(MBServerStatics.AI_PATROL_DIVISOR * 0.5f);
|
||||
if (mob.stopPatrolTime + (patrolDelay * 1000) > System.currentTimeMillis())
|
||||
//early exit while waiting to patrol again
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user