diff --git a/src/engine/devcmd/cmds/RegionCmd.java b/src/engine/devcmd/cmds/RegionCmd.java index 81a561c6..3875cfdb 100644 --- a/src/engine/devcmd/cmds/RegionCmd.java +++ b/src/engine/devcmd/cmds/RegionCmd.java @@ -18,10 +18,15 @@ import engine.math.Vector3fImmutable; import engine.objects.*; import java.awt.*; +import java.awt.geom.AffineTransform; import java.awt.geom.Area; import java.awt.geom.Path2D; +import java.awt.geom.Rectangle2D; import java.lang.reflect.Field; +import static java.awt.geom.Path2D.WIND_EVEN_ODD; +import static java.awt.geom.Path2D.WIND_NON_ZERO; + public class RegionCmd extends AbstractDevCmd { public RegionCmd() { @@ -67,7 +72,7 @@ public class RegionCmd extends AbstractDevCmd { boolean pointBlocked = false; for(Path2D.Float area : building.meshes){ Vector3fImmutable pos = ((AbstractCharacter)target).loc; - if(area.contains(pos.x, pos.z)){ + if(area.contains(new Point((int) pos.x, (int) pos.z))){ pointBlocked = true; } } diff --git a/src/engine/gameManager/BuildingManager.java b/src/engine/gameManager/BuildingManager.java index b9ea7f9f..c467e305 100644 --- a/src/engine/gameManager/BuildingManager.java +++ b/src/engine/gameManager/BuildingManager.java @@ -984,6 +984,10 @@ public enum BuildingManager { return; } + if(building.meshUUID == 24000){ + int i = 0; + } + for (ArrayList meshEntry : convexHullList) { Path2D.Float meshBound = new Path2D.Float(); Vector3fImmutable start = Vector3fImmutable.rotateAroundPoint(new Vector3fImmutable(meshEntry.get(0).x,building.loc.y,meshEntry.get(0).y),building.loc,building.getRot().getRotation());