hull 7
This commit is contained in:
@@ -574,7 +574,7 @@ public class dbBuildingHandler extends dbHandlerBase {
|
||||
|
||||
Path2D.Float prop_path = BuildingManager.hullToPath2d(HullStrings);
|
||||
|
||||
ArrayList<ArrayList<Path2D>> meshList;
|
||||
ArrayList<Path2D.Float> meshList;
|
||||
|
||||
if (BuildingManager._hull_data.get(propID) == null) {
|
||||
meshList = new ArrayList<>();
|
||||
|
||||
@@ -41,7 +41,7 @@ public enum BuildingManager {
|
||||
|
||||
BUILDINGMANAGER;
|
||||
|
||||
public static HashMap<Integer, ArrayList<ArrayList<Path2D>>> _hull_data = new HashMap<>();
|
||||
public static HashMap<Integer, ArrayList<Path2D.Float>> _hull_data = new HashMap<>();
|
||||
public static HashMap<Integer, ArrayList<BuildingLocation>> _stuckLocations = new HashMap<>();
|
||||
public static HashMap<Integer, ArrayList<BuildingLocation>> _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<ArrayList<Vector2f>> convexHullList;
|
||||
ArrayList<Path2D.Float> convexHullList;
|
||||
convexHullList = _hull_data.get(building.meshUUID);
|
||||
|
||||
if (convexHullList == null) {
|
||||
@@ -982,23 +982,9 @@ public enum BuildingManager {
|
||||
return;
|
||||
}
|
||||
|
||||
for (ArrayList<Vector2f> 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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user