diff --git a/src/engine/mobileAI/utilities/MovementUtilities.java b/src/engine/mobileAI/utilities/MovementUtilities.java index e998961a..d2bcfdd1 100644 --- a/src/engine/mobileAI/utilities/MovementUtilities.java +++ b/src/engine/mobileAI/utilities/MovementUtilities.java @@ -393,22 +393,17 @@ private static final int cellGap = 4; //TODO figure out best way to decide if a walking point intersects a mesh collider from a building Building building = BuildingManager.getBuildingAtLocation(point); - if(building == null) { - printToPlayers(point, "No Building Found At: " + point); + if(building == null) return false;//no building at this location means nothing obstructing the walking path - } - if(!collidesWithBuilding(building,point)) { - printToPlayers(point, "No Building Collision At: " + point); + if(!collidesWithBuilding(building,point)) return false; - } - if(Regions.getRegionAtLocation(point) != null) { - printToPlayers(point, "Region Found At: " + point); + if(Regions.getRegionAtLocation(point) != null) return false; - } - printToPlayers(point, "Path Blocked At: " + point); - return true; + + + return false; } private static boolean collidesWithBuilding(Building building, Vector3fImmutable end){