Browse Source

shape

hull4
FatBoy-DOTC 1 year ago
parent
commit
7a3f824816
  1. 6
      src/engine/gameManager/BuildingManager.java

6
src/engine/gameManager/BuildingManager.java

@ -28,6 +28,8 @@ import engine.objects.*;
import engine.server.MBServerStatics; import engine.server.MBServerStatics;
import org.pmw.tinylog.Logger; import org.pmw.tinylog.Logger;
import java.awt.*;
import java.awt.geom.AffineTransform;
import java.awt.geom.Area; import java.awt.geom.Area;
import java.awt.geom.Path2D; import java.awt.geom.Path2D;
import java.time.LocalDateTime; import java.time.LocalDateTime;
@ -1011,7 +1013,9 @@ public enum BuildingManager {
// subtract stencil from zone navmesh // subtract stencil from zone navmesh
Area stencilArea = new Area(stencilPath); 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 //add in all the regions to the navMesh

Loading…
Cancel
Save