|
|
@ -400,13 +400,11 @@ private static final int cellGap = 1; |
|
|
|
if (path.contains(point)) |
|
|
|
if (path.contains(point)) |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
|
|
|
|
|
|
|
|
Regions region = Regions.getRegionAtLocation(point); |
|
|
|
Regions region = Regions.getRegionAtLocation(goal); |
|
|
|
if(region != null) { |
|
|
|
if(region != null) { |
|
|
|
path.add(new Vector3fImmutable(region.center.x,region.center.y,region.center.z)); //only use center points when travelling through regions
|
|
|
|
path.add(new Vector3fImmutable(region.center)); //only use center points when travelling through regions
|
|
|
|
continue; |
|
|
|
continue; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (pointIsBlocked(point)) { |
|
|
|
if (pointIsBlocked(point)) { |
|
|
|
obstructed = true; |
|
|
|
obstructed = true; |
|
|
|
continue; |
|
|
|
continue; |
|
|
@ -442,10 +440,10 @@ private static final int cellGap = 1; |
|
|
|
if(building == null) |
|
|
|
if(building == null) |
|
|
|
return false;//no building at this location means nothing obstructing the walking path
|
|
|
|
return false;//no building at this location means nothing obstructing the walking path
|
|
|
|
|
|
|
|
|
|
|
|
Regions region = Regions.getRegionAtLocation(point); |
|
|
|
//Regions region = Regions.getRegionAtLocation(point);
|
|
|
|
if(region != null) |
|
|
|
//if(region != null)
|
|
|
|
if(region.lerpY(point) <= point.y) |
|
|
|
// if(region.lerpY(point) <= point.y)
|
|
|
|
return false; |
|
|
|
// return false;
|
|
|
|
|
|
|
|
|
|
|
|
Zone currentZone = ZoneManager.findSmallestZone(point); |
|
|
|
Zone currentZone = ZoneManager.findSmallestZone(point); |
|
|
|
if(currentZone == null) |
|
|
|
if(currentZone == null) |
|
|
|