From 967ff44d0a0b637d203ff2858f6597f1799e18aa Mon Sep 17 00:00:00 2001 From: Chiss Date: Thu, 5 Jun 2014 10:15:22 +1000 Subject: [PATCH] gamecreation fix --- .../game/arcade/managers/GameCreationManager.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameCreationManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameCreationManager.java index 9c7a94c18..371d363d9 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameCreationManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameCreationManager.java @@ -104,6 +104,8 @@ public class GameCreationManager implements Listener } else { + + boolean removedPlayers = false; if (UtilTime.elapsed(game.GetStateTime(), 10000)) { TimeUtil.start("GameCreationManager - Kick Players - " + game.GetName()); @@ -112,15 +114,21 @@ public class GameCreationManager implements Listener { System.out.println("Kicking [" + player.getName() + "] with Validity [" + player.isValid() + "] with Online [" + player.isOnline() + "]"); + player.remove(); player.kickPlayer("Dead World"); } + removedPlayers = true; + TimeUtil.stop(); } //Clean - if (game.WorldData.World.getPlayers().isEmpty()) + if (removedPlayers || game.WorldData.World.getPlayers().isEmpty()) { + if (game.WorldData.World.getPlayers().isEmpty()) + System.out.println("World Player Count [" + game.WorldData.World.getPlayers().size() + "]"); + TimeUtil.start("GameCreationManager - Uninit World - " + game.GetName()); game.WorldData.Uninitialize();