diff --git a/src/engine/db/handlers/dbBuildingHandler.java b/src/engine/db/handlers/dbBuildingHandler.java index ce547033..e0162ab9 100644 --- a/src/engine/db/handlers/dbBuildingHandler.java +++ b/src/engine/db/handlers/dbBuildingHandler.java @@ -915,7 +915,21 @@ public class dbBuildingHandler extends dbHandlerBase { } catch (SQLException e) { Logger.error(e); } + try (Connection connection = DbManager.getConnection(); + PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM `static_mesh_triangles`")) { + + ResultSet rs = preparedStatement.executeQuery(); + BuildingManager.mesh_heights = new HashMap<>(); + while (rs.next()) { + if(BuildingManager.mesh_heights.containsKey(rs.getInt("meshID")) == false){ + BuildingManager.mesh_heights.put(rs.getInt("meshID"),rs.getFloat("maxY")); + } + } + + } catch (SQLException e) { + Logger.error(e); + } } public void LOAD_MESH_BOUNDING_BOXES() {