Browse Source

add Y axis of building to mesh height

server-collision
FatBoy-DOTC 12 months ago
parent
commit
253ca2344e
  1. 14
      src/engine/db/handlers/dbBuildingHandler.java

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

@ -915,7 +915,21 @@ public class dbBuildingHandler extends dbHandlerBase {
} catch (SQLException e) { } catch (SQLException e) {
Logger.error(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() { public void LOAD_MESH_BOUNDING_BOXES() {

Loading…
Cancel
Save