From 2e36c01537c6012fc86a5175329dd51b5fd250fc Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Fri, 27 Oct 2023 23:56:40 -0500 Subject: [PATCH] region work --- .../mobileAI/utilities/MovementUtilities.java | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/engine/mobileAI/utilities/MovementUtilities.java b/src/engine/mobileAI/utilities/MovementUtilities.java index ce57c254..e97f7957 100644 --- a/src/engine/mobileAI/utilities/MovementUtilities.java +++ b/src/engine/mobileAI/utilities/MovementUtilities.java @@ -400,13 +400,11 @@ private static final int cellGap = 1; if (path.contains(point)) continue; - Regions region = Regions.getRegionAtLocation(point); + Regions region = Regions.getRegionAtLocation(goal); if(region != null) { - path.add(new Vector3fImmutable(region.center.x,region.center.y,region.center.z)); //only use center points when travelling through regions - continue; - + path.add(new Vector3fImmutable(region.center)); //only use center points when travelling through regions + continue; } - if (pointIsBlocked(point)) { obstructed = true; continue; @@ -442,10 +440,10 @@ private static final int cellGap = 1; if(building == null) return false;//no building at this location means nothing obstructing the walking path - Regions region = Regions.getRegionAtLocation(point); - if(region != null) - if(region.lerpY(point) <= point.y) - return false; + //Regions region = Regions.getRegionAtLocation(point); + //if(region != null) + // if(region.lerpY(point) <= point.y) + // return false; Zone currentZone = ZoneManager.findSmallestZone(point); if(currentZone == null)