diff --git a/src/engine/db/handlers/dbBuildingHandler.java b/src/engine/db/handlers/dbBuildingHandler.java index 6f6763dc..c2724fc6 100644 --- a/src/engine/db/handlers/dbBuildingHandler.java +++ b/src/engine/db/handlers/dbBuildingHandler.java @@ -574,7 +574,7 @@ public class dbBuildingHandler extends dbHandlerBase { Path2D.Float prop_path = BuildingManager.hullToPath2d(HullStrings); - ArrayList> meshList; + ArrayList meshList; if (BuildingManager._hull_data.get(propID) == null) { meshList = new ArrayList<>(); diff --git a/src/engine/gameManager/BuildingManager.java b/src/engine/gameManager/BuildingManager.java index 143a14a4..4e42d534 100644 --- a/src/engine/gameManager/BuildingManager.java +++ b/src/engine/gameManager/BuildingManager.java @@ -41,7 +41,7 @@ public enum BuildingManager { BUILDINGMANAGER; - public static HashMap>> _hull_data = new HashMap<>(); + public static HashMap> _hull_data = new HashMap<>(); public static HashMap> _stuckLocations = new HashMap<>(); public static HashMap> _slotLocations = new HashMap<>(); @@ -974,7 +974,7 @@ public enum BuildingManager { // Build up navmesh by stencil of the // convex hull meshes that comprise the prop. - ArrayList> convexHullList; + ArrayList convexHullList; convexHullList = _hull_data.get(building.meshUUID); if (convexHullList == null) { @@ -982,23 +982,9 @@ public enum BuildingManager { return; } - for (ArrayList meshEntry : convexHullList) { - Path2D.Float meshBound = new Path2D.Float(); - Vector3fImmutable offsetVect = new Vector3fImmutable(meshEntry.get(0).x + building.loc.x, building.loc.y,meshEntry.get(0).y + building.loc.z); - Vector3fImmutable rotatedStart = Vector3fImmutable.rotateAroundPoint(building.loc,offsetVect,building.getRot().y); - meshBound.moveTo(rotatedStart.x,rotatedStart.z); - for (Vector2f vect : meshEntry) { - if(meshEntry.indexOf(vect) == 0){ - continue; - } - Vector3fImmutable pos = new Vector3fImmutable(vect.x + building.loc.x, building.loc.y,vect.y + building.loc.z); - Vector3fImmutable rotatedPos = Vector3fImmutable.rotateAroundPoint(building.loc,pos,building.getRot().getRotation()); - meshBound.lineTo(rotatedPos.x,rotatedPos.z); - } - meshBound.lineTo(rotatedStart.x,rotatedStart.z); - meshBound.closePath(); - building.meshes.add(meshBound); - building.parentZone.navObstacles.add(meshBound); + for (Path2D.Float meshEntry : convexHullList) { + building.meshes.add(meshEntry); + building.parentZone.navObstacles.add(meshEntry); } //add navNodes to parent zone list float X = building.getBounds().getHalfExtents().x; diff --git a/src/engine/server/world/WorldServer.java b/src/engine/server/world/WorldServer.java index acc86e1c..a4be3820 100644 --- a/src/engine/server/world/WorldServer.java +++ b/src/engine/server/world/WorldServer.java @@ -403,9 +403,6 @@ public class WorldServer { Logger.info("Loading building slot/stuck location data."); BuildingLocation.loadBuildingLocations(); - Logger.info("Populating structure to render lookup."); - DbManager.BuildingQueries.POPULATE_RENDER_LOOKUP(); - Logger.info("Loading mesh hulls."); DbManager.BuildingQueries.LOAD_MESH_HULLS();