Browse Source

shape

hull4
FatBoy-DOTC 1 year ago
parent
commit
9e531b0b8f
  1. 10
      src/engine/gameManager/ZoneManager.java

10
src/engine/gameManager/ZoneManager.java

@ -440,10 +440,14 @@ 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){
for (Path2D.Float obstacle : zone.navObstacles) { try {
if (!node.equals(potentialNeighbor) && !obstacle.intersects(node.location.x, node.location.y, potentialNeighbor.location.x, potentialNeighbor.location.y)){ for (Path2D.Float obstacle : zone.navObstacles) {
node.neighbors.add(potentialNeighbor); 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());
} }
} }
} }

Loading…
Cancel
Save