From d57e5df356e7a9570e8a05942928573cf7f2714e Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Fri, 27 Oct 2023 22:42:17 -0500 Subject: [PATCH] cleanup --- src/engine/devcmd/cmds/RegionCmd.java | 5 +++++ src/engine/mobileAI/utilities/MovementUtilities.java | 9 --------- src/engine/objects/Building.java | 6 ------ 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/src/engine/devcmd/cmds/RegionCmd.java b/src/engine/devcmd/cmds/RegionCmd.java index 3cd7db9c..71687ac6 100644 --- a/src/engine/devcmd/cmds/RegionCmd.java +++ b/src/engine/devcmd/cmds/RegionCmd.java @@ -13,6 +13,7 @@ import engine.Enum; import engine.devcmd.AbstractDevCmd; import engine.gameManager.BuildingManager; import engine.gameManager.ZoneManager; +import engine.math.Vector3f; import engine.objects.*; import java.lang.reflect.Field; @@ -36,6 +37,8 @@ public class RegionCmd extends AbstractDevCmd { this.throwbackInfo(pc, "No Building At This Location.") ; } Regions region = ((AbstractCharacter)target).region; + output += "In Floor: " + ((AbstractCharacter) target).getInFloorID() + newline; + output += "In Building: " + ((AbstractCharacter) target).getInBuilding() + newline; if (region == null) { output += "No Region Found." + newline; }else{ @@ -44,6 +47,8 @@ public class RegionCmd extends AbstractDevCmd { output += "Region Height: " + region.lerpY((AbstractCharacter)target) + newline; output += "is Stairs: " + region.isStairs() + newline; output += "is Outside: " + region.isOutside() + newline; + for(Vector3f point : region.regionPoints) + output += point + newline; output += "NavMesh Data" + newline; this.throwbackInfo(pc, output); } diff --git a/src/engine/mobileAI/utilities/MovementUtilities.java b/src/engine/mobileAI/utilities/MovementUtilities.java index c3359f62..e95e6098 100644 --- a/src/engine/mobileAI/utilities/MovementUtilities.java +++ b/src/engine/mobileAI/utilities/MovementUtilities.java @@ -408,10 +408,6 @@ private static final int cellGap = 1; Regions region = Regions.getRegionAtLocation(point); if(region != null) { - //if (!region.stairs) - // point.setY(region.center.y); - //else - // point.setY(region.lerpY(point)); path.add(new Vector3fImmutable(region.center.x,region.center.y,region.center.z)); //only use center points when travelling through regions continue; @@ -463,9 +459,4 @@ private static final int cellGap = 1; //return false; } - private static boolean collidesWithBuilding(Building building, Vector3fImmutable end){ - MeshBounds mb = Bounds.meshBoundsCache.get(building.meshUUID); - return (end.x > mb.minX && end.x < mb.maxX && end.z > mb.minZ && end.z < mb.maxZ); - } - } diff --git a/src/engine/objects/Building.java b/src/engine/objects/Building.java index 1425c5fa..d65ccb22 100644 --- a/src/engine/objects/Building.java +++ b/src/engine/objects/Building.java @@ -1536,12 +1536,6 @@ public class Building extends AbstractWorldObject { } public void updateNavMesh(){ - int xPoint = (int)(this.loc.x - this.getBounds().getHalfExtents().x); - int zPoint = (int) (this.loc.z - this.getBounds().getHalfExtents().y); - int extentsX = (int) (this.getBounds().getHalfExtents().x * 2); - int extentsZ = (int) (this.getBounds().getHalfExtents().y * 2); - this.parentZone.navMesh.subtract( new Area(new Rectangle(xPoint, zPoint, extentsX, extentsZ)));//remove entire footprint of building from navMesh - for(Regions region : this.getBounds().getRegions()) this.parentZone.navMesh.add(region.getArea()); }