From 7a3f8248162c5251baaabfd564dcc7b9a202e228 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Tue, 7 Nov 2023 18:53:29 -0600 Subject: [PATCH] shape --- src/engine/gameManager/BuildingManager.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/engine/gameManager/BuildingManager.java b/src/engine/gameManager/BuildingManager.java index 9efaba7b..ef477355 100644 --- a/src/engine/gameManager/BuildingManager.java +++ b/src/engine/gameManager/BuildingManager.java @@ -28,6 +28,8 @@ import engine.objects.*; import engine.server.MBServerStatics; import org.pmw.tinylog.Logger; +import java.awt.*; +import java.awt.geom.AffineTransform; import java.awt.geom.Area; import java.awt.geom.Path2D; import java.time.LocalDateTime; @@ -1011,7 +1013,9 @@ public enum BuildingManager { // subtract stencil from zone navmesh Area stencilArea = new Area(stencilPath); - building.parentZone.navMesh.subtract(stencilArea); + AffineTransform at = new AffineTransform(); + at.createTransformedShape(new Polygon()); + building.parentZone.navMesh.subtract(stencilArea.createTransformedArea(at)); } //add in all the regions to the navMesh