From 4f057ee851546cf02a5e51e783808839e9245f43 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Fri, 5 Jan 2024 23:32:32 -0600 Subject: [PATCH] utilize min and max Y values for meshes --- src/engine/db/handlers/dbBuildingHandler.java | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/src/engine/db/handlers/dbBuildingHandler.java b/src/engine/db/handlers/dbBuildingHandler.java index 184e5cae..260761bd 100644 --- a/src/engine/db/handlers/dbBuildingHandler.java +++ b/src/engine/db/handlers/dbBuildingHandler.java @@ -881,7 +881,7 @@ public class dbBuildingHandler extends dbHandlerBase { public void LOAD_MESH_DATA() { try (Connection connection = DbManager.getConnection(); - PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM `new_static_mesh_triangles`")) { + PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM `new-static_mesh_triangles`")) { ResultSet rs = preparedStatement.executeQuery(); BuildingManager.mesh_triangle_points = new HashMap<>(); @@ -907,21 +907,6 @@ public class dbBuildingHandler extends dbHandlerBase { { BuildingManager.mesh_triangle_points.get(rs.getInt("meshID")).add(triPoints); } - //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); - } - 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){ Vector2f heights = new Vector2f(rs.getFloat("maxY"),rs.getFloat("minY")); BuildingManager.mesh_heights.put(rs.getInt("meshID"),heights);