forked from MagicBane/Server
shape
This commit is contained in:
@@ -440,10 +440,14 @@ public enum ZoneManager {
|
||||
for(Zone zone : getAllZones()){
|
||||
for(PathingUtilities.Node node : zone.navNodes){
|
||||
for(PathingUtilities.Node potentialNeighbor : zone.navNodes){
|
||||
for (Path2D.Float obstacle : zone.navObstacles) {
|
||||
if (!node.equals(potentialNeighbor) && !obstacle.intersects(node.location.x, node.location.y, potentialNeighbor.location.x, potentialNeighbor.location.y)){
|
||||
node.neighbors.add(potentialNeighbor);
|
||||
try {
|
||||
for (Path2D.Float obstacle : zone.navObstacles) {
|
||||
if (!node.equals(potentialNeighbor) && !obstacle.intersects(node.location.x, node.location.y, potentialNeighbor.location.x, potentialNeighbor.location.y)) {
|
||||
node.neighbors.add(potentialNeighbor);
|
||||
}
|
||||
}
|
||||
} catch(Exception e){
|
||||
Logger.error("Failed To Check Neighbors Of Node In Zone: " + zone.getObjectUUID());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user