utilize min and max Y values for meshes
This commit is contained in:
@@ -881,7 +881,7 @@ public class dbBuildingHandler extends dbHandlerBase {
|
|||||||
public void LOAD_MESH_DATA() {
|
public void LOAD_MESH_DATA() {
|
||||||
|
|
||||||
try (Connection connection = DbManager.getConnection();
|
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();
|
ResultSet rs = preparedStatement.executeQuery();
|
||||||
BuildingManager.mesh_triangle_points = new HashMap<>();
|
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);
|
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){
|
if(BuildingManager.mesh_heights.containsKey(rs.getInt("meshID")) == false){
|
||||||
Vector2f heights = new Vector2f(rs.getFloat("maxY"),rs.getFloat("minY"));
|
Vector2f heights = new Vector2f(rs.getFloat("maxY"),rs.getFloat("minY"));
|
||||||
BuildingManager.mesh_heights.put(rs.getInt("meshID"),heights);
|
BuildingManager.mesh_heights.put(rs.getInt("meshID"),heights);
|
||||||
|
|||||||
Reference in New Issue
Block a user