forked from MagicBane/Server
region work
This commit is contained in:
@@ -1537,11 +1537,11 @@ public class Building extends AbstractWorldObject {
|
|||||||
|
|
||||||
public void updateNavMesh(){
|
public void updateNavMesh(){
|
||||||
//remove entire building footprint from the navmesh
|
//remove entire building footprint from the navmesh
|
||||||
int xPoint = (int)(this.loc.x - this.getBounds().getHalfExtents().x);
|
//int xPoint = (int)(this.loc.x - this.getBounds().getHalfExtents().x);
|
||||||
int zPoint = (int) (this.loc.z - this.getBounds().getHalfExtents().y);
|
//int zPoint = (int) (this.loc.z - this.getBounds().getHalfExtents().y);
|
||||||
int extentsX = (int) (this.getBounds().getHalfExtents().x * 2);
|
//int extentsX = (int) (this.getBounds().getHalfExtents().x * 2);
|
||||||
int extentsZ = (int) (this.getBounds().getHalfExtents().y * 2);
|
//int extentsZ = (int) (this.getBounds().getHalfExtents().y * 2);
|
||||||
this.parentZone.navMesh.subtract(new Area(new Rectangle(xPoint, zPoint, extentsX, extentsZ)));
|
//this.parentZone.navMesh.subtract(new Area(new Rectangle(xPoint, zPoint, extentsX, extentsZ)));
|
||||||
|
|
||||||
//add in all the regions to the navMesh
|
//add in all the regions to the navMesh
|
||||||
for(Regions region : this.getBounds().getRegions())
|
for(Regions region : this.getBounds().getRegions())
|
||||||
|
|||||||
Reference in New Issue
Block a user