From 90b516bbb94d4c182f1499dcf11988ee4ea30095 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Mon, 15 Jan 2024 18:57:18 -0600 Subject: [PATCH] load mesh data and structure meshes --- src/engine/db/handlers/dbBuildingHandler.java | 4 +++- src/engine/gameManager/BuildingManager.java | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/engine/db/handlers/dbBuildingHandler.java b/src/engine/db/handlers/dbBuildingHandler.java index d11d2642..acd66548 100644 --- a/src/engine/db/handlers/dbBuildingHandler.java +++ b/src/engine/db/handlers/dbBuildingHandler.java @@ -868,7 +868,9 @@ public class dbBuildingHandler extends dbHandlerBase { } else { - BuildingManager.prop_meshes.get(rs.getInt("propID")).add(rs.getInt("meshID")); + ArrayList meshes = BuildingManager.prop_meshes.get(rs.getInt("propID")); + meshes.add(rs.getInt("meshID")); + //BuildingManager.prop_meshes.get(rs.getInt("propID")).add(rs.getInt("meshID")); } } diff --git a/src/engine/gameManager/BuildingManager.java b/src/engine/gameManager/BuildingManager.java index 595be009..6a923f3e 100644 --- a/src/engine/gameManager/BuildingManager.java +++ b/src/engine/gameManager/BuildingManager.java @@ -989,7 +989,10 @@ public enum BuildingManager { if(prop_meshes.containsKey(building.meshUUID) == false) return;//no meshes to load for this prop - ArrayList meshes = prop_meshes.get(building.meshUUID); + //ArrayList meshes = prop_meshes.get(building.meshUUID); + int buildingMeshUUID = building.meshUUID; + int blueprintMeshUUID = building.getBlueprint().getMeshForRank(building.rank); + ArrayList meshes = prop_meshes.get(building.getBlueprint().getMeshForRank(building.rank)); for (int mesh : meshes) { if (!mesh_heights.containsKey(mesh) || !mesh_triangle_points.containsKey(mesh))