From 31ea74f98cda3d7a62cd203baa6ce062e6d53299 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Fri, 5 Jan 2024 22:38:39 -0600 Subject: [PATCH] reverse Z axis --- src/engine/db/handlers/dbBuildingHandler.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/engine/db/handlers/dbBuildingHandler.java b/src/engine/db/handlers/dbBuildingHandler.java index 630a8222..ce547033 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 `static_mesh_triangles`")) { + PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM `new_static_mesh_triangles`")) { ResultSet rs = preparedStatement.executeQuery(); BuildingManager.mesh_triangle_points = new HashMap<>(); @@ -895,7 +895,7 @@ public class dbBuildingHandler extends dbHandlerBase { } ArrayList triPoints = new ArrayList<>(); for(int i = 0; i < floatPoints.size(); i += 3){ - triPoints.add(new Vector3f(floatPoints.get(i),floatPoints.get(i+1),floatPoints.get(i+2))); + triPoints.add(new Vector3f(floatPoints.get(i),floatPoints.get(i+1),floatPoints.get(i+2) * -1)); } if(BuildingManager.mesh_triangle_points.containsKey(rs.getInt("meshID")) == false){ @@ -907,9 +907,9 @@ 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")); - } + //if(BuildingManager.mesh_heights.containsKey(rs.getInt("meshID")) == false){ + // BuildingManager.mesh_heights.put(rs.getInt("meshID"),rs.getFloat("maxY")); + //} } } catch (SQLException e) {