Game: Change GameFlagManager to use Game.isInsideMap(), change isInsideMap to treat MaxX,Y,Z with a +1
This commit is contained in:
parent
f899194e3b
commit
0d0d5eea64
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue