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:
parent
6d01e235fd
commit
6b2f601c7a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user