|
|
|
@ -881,7 +881,7 @@ public class dbBuildingHandler extends dbHandlerBase {
@@ -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 {
@@ -895,7 +895,7 @@ public class dbBuildingHandler extends dbHandlerBase {
|
|
|
|
|
} |
|
|
|
|
ArrayList<Vector3f> 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 {
@@ -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) { |
|
|
|
|