Browse Source

load mesh data and structure meshes

server-collision
FatBoy-DOTC 10 months ago
parent
commit
90b516bbb9
  1. 4
      src/engine/db/handlers/dbBuildingHandler.java
  2. 5
      src/engine/gameManager/BuildingManager.java

4
src/engine/db/handlers/dbBuildingHandler.java

@ -868,7 +868,9 @@ public class dbBuildingHandler extends dbHandlerBase { @@ -868,7 +868,9 @@ public class dbBuildingHandler extends dbHandlerBase {
}
else
{
BuildingManager.prop_meshes.get(rs.getInt("propID")).add(rs.getInt("meshID"));
ArrayList<Integer> meshes = BuildingManager.prop_meshes.get(rs.getInt("propID"));
meshes.add(rs.getInt("meshID"));
//BuildingManager.prop_meshes.get(rs.getInt("propID")).add(rs.getInt("meshID"));
}
}

5
src/engine/gameManager/BuildingManager.java

@ -989,7 +989,10 @@ public enum BuildingManager { @@ -989,7 +989,10 @@ public enum BuildingManager {
if(prop_meshes.containsKey(building.meshUUID) == false)
return;//no meshes to load for this prop
ArrayList<Integer> meshes = prop_meshes.get(building.meshUUID);
//ArrayList<Integer> meshes = prop_meshes.get(building.meshUUID);
int buildingMeshUUID = building.meshUUID;
int blueprintMeshUUID = building.getBlueprint().getMeshForRank(building.rank);
ArrayList<Integer> meshes = prop_meshes.get(building.getBlueprint().getMeshForRank(building.rank));
for (int mesh : meshes) {
if (!mesh_heights.containsKey(mesh) || !mesh_triangle_points.containsKey(mesh))

Loading…
Cancel
Save