Enhanced sanity checks.

This commit is contained in:
2023-11-06 12:06:45 -05:00
parent 2166a0a440
commit 25b508a101
+8 -1
View File
@@ -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();