Cake thief can now come back to spawn.

New can't-re-enter-spawn bump was preventing them from scoring. Oops!
This commit is contained in:
taoneill 2012-06-21 19:59:30 -04:00
parent 53aa9cda52
commit 14d4efea9d

View File

@ -455,11 +455,12 @@ public class WarPlayerListener implements Listener {
event.setTo(playerTeam.getTeamSpawn());
return;
}
} else if (loadoutSelectionState != null && !loadoutSelectionState.isStillInSpawn()
} else if (loadoutSelectionState != null && !loadoutSelectionState.isStillInSpawn()
&& !playerWarzone.isCakeThief(player.getName())
&& (flagReturn.equals(FlagReturn.BOTH) || flagReturn.equals(FlagReturn.SPAWN))
&& !playerWarzone.isFlagThief(player.getName())) {
// player is in spawn, but has left already: he should NOT be let back in - kick him out gently
// (also, be sure you aren't preventing the flag from being captured)
// (also, be sure you aren't preventing the flag or cake from being captured)
int diffZ = playerLoc.getBlockZ() - playerTeam.getTeamSpawn().getBlockZ();
int diffX = playerLoc.getBlockX() - playerTeam.getTeamSpawn().getBlockX();