From 0d0d5eea641f75dcf3ef9b5349a2a1799f86882e Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Sun, 24 May 2015 20:10:16 +1200 Subject: [PATCH] Game: Change GameFlagManager to use Game.isInsideMap(), change isInsideMap to treat MaxX,Y,Z with a +1 --- .../src/nautilus/game/arcade/game/Game.java | 6 +++--- .../src/nautilus/game/arcade/managers/GameFlagManager.java | 7 +------ 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/Game.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/Game.java index 1d247b2c7..4f3a4a4fd 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/Game.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/Game.java @@ -1281,10 +1281,10 @@ public abstract class Game implements Listener return !( loc.getX() >= WorldData.MaxX || loc.getX() <= WorldData.MinX || - loc.getZ() >= WorldData.MaxZ || - loc.getZ() <= WorldData.MinZ || + loc.getZ() >= WorldData.MaxZ + 1 || + loc.getZ() <= WorldData.MinZ + 1 || loc.getY() >= WorldData.MaxY || - loc.getY() <= WorldData.MinY); + loc.getY() <= WorldData.MinY + 1); } public void setItemMerge(boolean itemMerge) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameFlagManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameFlagManager.java index 483462e20..ff5c02a6b 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameFlagManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameFlagManager.java @@ -840,12 +840,7 @@ public class GameFlagManager implements Listener for (Player player : UtilServer.getPlayers()) { - if (player.getLocation().getX() > game.WorldData.MaxX || - player.getLocation().getX() < game.WorldData.MinX || - player.getLocation().getZ() > game.WorldData.MaxZ || - player.getLocation().getZ() < game.WorldData.MinZ || - ((player.getLocation().getY() > game.WorldData.MaxY || - player.getLocation().getY() < game.WorldData.MinY) && game.IsAlive(player))) + if (!game.isInsideMap(player.getLocation()) && game.IsAlive(player)) { if (!Manager.IsAlive(player) || ((CraftPlayer)player).getHandle().spectating) {