From 6b2f601c7a8c6a955f2f86a2ce71aa3d7ba4d60f Mon Sep 17 00:00:00 2001 From: cnr Date: Wed, 13 Apr 2016 18:20:39 -0500 Subject: [PATCH] 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). --- .../nautilus/game/arcade/managers/GameSpectatorManager.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameSpectatorManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameSpectatorManager.java index 4515bcf47..b067a806d 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameSpectatorManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameSpectatorManager.java @@ -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;