add Y axis of building to mesh height

This commit is contained in:
2024-01-05 22:44:58 -06:00
parent 95f09a255e
commit 253ca2344e
@@ -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() {