This commit is contained in:
2023-10-27 22:42:17 -05:00
parent f002de704b
commit d57e5df356
3 changed files with 5 additions and 15 deletions
-6
View File
@@ -1536,12 +1536,6 @@ public class Building extends AbstractWorldObject {
}
public void updateNavMesh(){
int xPoint = (int)(this.loc.x - this.getBounds().getHalfExtents().x);
int zPoint = (int) (this.loc.z - this.getBounds().getHalfExtents().y);
int extentsX = (int) (this.getBounds().getHalfExtents().x * 2);
int extentsZ = (int) (this.getBounds().getHalfExtents().y * 2);
this.parentZone.navMesh.subtract( new Area(new Rectangle(xPoint, zPoint, extentsX, extentsZ)));//remove entire footprint of building from navMesh
for(Regions region : this.getBounds().getRegions())
this.parentZone.navMesh.add(region.getArea());
}