Changed Kerr location search logic.

This commit is contained in:
MobiusDevelopment
2021-09-03 20:11:12 +00:00
parent 11060931c9
commit 50b82a8621
2 changed files with 6 additions and 6 deletions

View File

@@ -85,11 +85,11 @@ public class Kerr extends AbstractNpcAI
continue; continue;
} }
for (WorldObject wo : region.getVisibleObjects()) SEARCH: for (WorldObject wo : region.getVisibleObjects())
{ {
if ((wo.getId() != KERR) || (wo.calculateDistance2D(randomLocation) < MIN_SPAWN_DISTANCE)) if ((wo.getId() == KERR) && (wo.calculateDistance2D(randomLocation) < MIN_SPAWN_DISTANCE))
{ {
continue; continue SEARCH;
} }
location = randomLocation; location = randomLocation;

View File

@@ -85,11 +85,11 @@ public class Kerr extends AbstractNpcAI
continue; continue;
} }
for (WorldObject wo : region.getVisibleObjects()) SEARCH: for (WorldObject wo : region.getVisibleObjects())
{ {
if ((wo.getId() != KERR) || (wo.calculateDistance2D(randomLocation) < MIN_SPAWN_DISTANCE)) if ((wo.getId() == KERR) && (wo.calculateDistance2D(randomLocation) < MIN_SPAWN_DISTANCE))
{ {
continue; continue SEARCH;
} }
location = randomLocation; location = randomLocation;