forked from MagicBane/Server
dev command work
This commit is contained in:
@@ -892,6 +892,7 @@ public class Building extends AbstractWorldObject {
|
||||
|
||||
this.parentZone = ZoneManager.getZoneByUUID(this.parentZoneUUID);
|
||||
this.parentZone.zoneBuildingSet.add(this);
|
||||
this.updateNavMesh(); // update the navmesh of the parent zone
|
||||
|
||||
// Lookup building blueprint
|
||||
|
||||
@@ -1529,4 +1530,13 @@ public class Building extends AbstractWorldObject {
|
||||
public void RemoveFromBarracksList() {
|
||||
|
||||
}
|
||||
|
||||
public void updateNavMesh(){
|
||||
for(Regions region : this.getBounds().getRegions())
|
||||
this.parentZone.navMesh.add(region.getArea());
|
||||
|
||||
MeshBounds meshBounds = Bounds.meshBoundsCache.get(this.getMeshUUID());
|
||||
if(meshBounds != null)
|
||||
this.parentZone.navMesh.subtract(meshBounds.getArea());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user