Prevent a spectator race condition in arcade games

Previously, a player would erratically become a spectator if s/he
spammed the "spectate next player" action between rounds (i.e.
left-click while spectating a player).
This commit is contained in:
cnr 2016-04-13 18:20:39 -05:00
parent 6d01e235fd
commit 6b2f601c7a

View File

@ -224,6 +224,9 @@ public class GameSpectatorManager implements Listener
@Override
public void run()
{
if (Manager.GetGame().IsAlive(player))
return;
Player ptarget = null;
if (target instanceof Player)
ptarget = (Player) target;