From ae52735131288f052f5ba3d928af104f3b0daf14 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Wed, 3 Jan 2024 20:08:52 -0600 Subject: [PATCH] data load fixes --- src/engine/gameManager/BuildingManager.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/engine/gameManager/BuildingManager.java b/src/engine/gameManager/BuildingManager.java index 98ae060c..fecc70b1 100644 --- a/src/engine/gameManager/BuildingManager.java +++ b/src/engine/gameManager/BuildingManager.java @@ -985,9 +985,9 @@ public enum BuildingManager { building.buildingMeshes = new ArrayList<>(); float rotation = building.getRot().getRotation(); Vector3f buildingLoc = new Vector3f(building.loc.x, building.loc.y, building.loc.z); - if (!prop_meshes.containsKey(building.getBlueprint().getMeshForRank(building.getRank()))) + if (!prop_meshes.containsKey(building.meshUUID)) return; //no data for this prop ID - ArrayList meshes = prop_meshes.get(building.getBlueprint().getMeshForRank(building.getRank())); + ArrayList meshes = prop_meshes.get(building.meshUUID); for (int mesh : meshes) { if (!mesh_heights.containsKey(mesh) || !mesh_triangle_points.containsKey(mesh)) @@ -1014,7 +1014,7 @@ public enum BuildingManager { generatedMesh.BoundingLines.add(new Line2D.Float(p3, p4)); generatedMesh.BoundingLines.add(new Line2D.Float(p4, p1)); } - + generatedMesh.triangles = new ArrayList<>(); for (ArrayList pointList : triPoints) { ArrayList rotatedPoints = new ArrayList<>();