Enhanced sanity checks.
This commit is contained in:
@@ -966,8 +966,10 @@ public enum BuildingManager {
|
||||
|
||||
public static void bakeNavMesh(Building building) {
|
||||
|
||||
if (building.parentZone == null)
|
||||
if (building.parentZone == null) {
|
||||
Logger.error("Attempt to bake navmesh with no parent: " + building.getObjectUUID());
|
||||
return;
|
||||
}
|
||||
|
||||
// Build up navmesh by stencil of the
|
||||
// convex hull meshes that comprise the prop.
|
||||
@@ -975,6 +977,11 @@ public enum BuildingManager {
|
||||
ArrayList<ArrayList<Vector2f>> convexHullList;
|
||||
convexHullList = _hull_data.get(building.meshUUID);
|
||||
|
||||
if (convexHullList == null) {
|
||||
Logger.error("Attempt to bake navmesh with no meshes: " + building.getObjectUUID());
|
||||
return;
|
||||
}
|
||||
|
||||
for (ArrayList<Vector2f> meshEntry : convexHullList) {
|
||||
|
||||
Path2D.Float stencilPath = new Path2D.Float();
|
||||
|
||||
Reference in New Issue
Block a user