Changed Kerr location search logic.
This commit is contained in:
parent
11060931c9
commit
50b82a8621
@ -85,11 +85,11 @@ public class Kerr extends AbstractNpcAI
|
||||
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;
|
||||
|
@ -85,11 +85,11 @@ public class Kerr extends AbstractNpcAI
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user