fix for Spout faction labels not updating for players who have /f map on

This commit is contained in:
Brettflan 2011-12-15 23:50:37 -06:00
parent f1114848ff
commit a8ed55c215

View File

@ -183,23 +183,22 @@ public class FactionsPlayerListener extends PlayerListener
// Yes we did change coord (: // Yes we did change coord (:
me.setLastStoodAt(to); me.setLastStoodAt(to);
// Did we change "host"(faction)?
boolean changedFaction = (Board.getFactionAt(from) != Board.getFactionAt(to));
if (changedFaction && SpoutFeatures.updateTerritoryDisplay(me))
changedFaction = false;
if (me.isMapAutoUpdating()) if (me.isMapAutoUpdating())
{ {
me.sendMessage(Board.getMap(me.getFaction(), to, player.getLocation().getYaw())); me.sendMessage(Board.getMap(me.getFaction(), to, player.getLocation().getYaw()));
} }
else else if (changedFaction)
{ {
// Did we change "host"(faction)? me.sendFactionHereMessage();
Faction factionFrom = Board.getFactionAt(from);
Faction factionTo = Board.getFactionAt(to);
if (factionFrom != factionTo)
{
me.sendFactionHereMessage();
}
} }
if (me.getAutoClaimFor() != null) if (me.getAutoClaimFor() != null)
{ {
me.attemptClaim(me.getAutoClaimFor(), player.getLocation(), true); me.attemptClaim(me.getAutoClaimFor(), player.getLocation(), true);