This commit is contained in:
2023-11-14 21:18:18 -06:00
parent 9615f85f0d
commit 9e531b0b8f
+5 -1
View File
@@ -440,11 +440,15 @@ public enum ZoneManager {
for(Zone zone : getAllZones()){ for(Zone zone : getAllZones()){
for(PathingUtilities.Node node : zone.navNodes){ for(PathingUtilities.Node node : zone.navNodes){
for(PathingUtilities.Node potentialNeighbor : zone.navNodes){ for(PathingUtilities.Node potentialNeighbor : zone.navNodes){
try {
for (Path2D.Float obstacle : zone.navObstacles) { for (Path2D.Float obstacle : zone.navObstacles) {
if (!node.equals(potentialNeighbor) && !obstacle.intersects(node.location.x, node.location.y, potentialNeighbor.location.x, potentialNeighbor.location.y)){ if (!node.equals(potentialNeighbor) && !obstacle.intersects(node.location.x, node.location.y, potentialNeighbor.location.x, potentialNeighbor.location.y)) {
node.neighbors.add(potentialNeighbor); node.neighbors.add(potentialNeighbor);
} }
} }
} catch(Exception e){
Logger.error("Failed To Check Neighbors Of Node In Zone: " + zone.getObjectUUID());
}
} }
} }
} }