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<>();