fixing invisibility.

This commit is contained in:
Sarah 2015-12-07 23:44:02 +01:00
parent 072856be7d
commit 0619fb857f

View File

@ -111,12 +111,19 @@ public abstract class GameTutorial
{
for(final Player player : _players.keySet())
{
VisibilityManager.Instance.setVisibility(player, true, UtilServer.getPlayers());
//VisibilityManager.Instance.setVisibility(player, true, UtilServer.getPlayers());
Manager.runSyncLater(new Runnable()
{
@Override
public void run()
{
for(Player player : Manager.GetGame().GetPlayers(true))
{
for(Player other : Manager.GetGame().GetPlayers(true))
{
player.showPlayer(other);
}
}
player.setAllowFlight(false);
player.setFlying(false);
}
@ -163,7 +170,7 @@ public abstract class GameTutorial
_players.put(player, Manager.GetGame().GetTeam(player).GetSpawns().get(i));
player.setAllowFlight(true);
player.setFlying(true);
VisibilityManager.Instance.setVisibility(player, false, UtilServer.getPlayers());
// VisibilityManager.Instance.setVisibility(player, false, UtilServer.getPlayers());
i++;
}
}
@ -209,6 +216,16 @@ public abstract class GameTutorial
public int tick()
{
if(!_hasEnded && hasStarted())
{
for(Player player : UtilServer.getPlayers())
{
for(Player other : _players.keySet())
{
player.hidePlayer(other);
}
}
}
_tick++;
return _tick;
}