From 7e26def6a1062fba6a9946f776a0945b0ee3b1a5 Mon Sep 17 00:00:00 2001 From: Chiss Date: Sat, 8 Nov 2014 18:40:23 +1100 Subject: [PATCH] centralised SneakyAssassins module cleanup --- .../games/sneakyassassins/SneakyAssassins.java | 2 ++ .../sneakyassassins/powerups/PowerUpManager.java | 14 -------------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/sneakyassassins/SneakyAssassins.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/sneakyassassins/SneakyAssassins.java index a28e8e9b2..73d1b3702 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/sneakyassassins/SneakyAssassins.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/sneakyassassins/SneakyAssassins.java @@ -341,7 +341,9 @@ public class SneakyAssassins extends SoloGame if (event.GetState() == GameState.End || event.GetState() == GameState.Dead) { HandlerList.unregisterAll(_npcManager); + HandlerList.unregisterAll(_powerUpManager); _npcManager = null; + _powerUpManager = null; } } } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/sneakyassassins/powerups/PowerUpManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/sneakyassassins/powerups/PowerUpManager.java index 5c999228f..7215d8cfd 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/sneakyassassins/powerups/PowerUpManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/sneakyassassins/powerups/PowerUpManager.java @@ -112,10 +112,6 @@ public class PowerUpManager implements Listener case Live: schedulePowerUpSpawn(20); break; - - case Dead: - HandlerList.unregisterAll(this); - break; } } } @@ -135,16 +131,6 @@ public class PowerUpManager implements Listener powerUp.onUpdate(event); } - @EventHandler - public void deregisterSelf(UpdateEvent event) - { - if (event.getType() != UpdateType.TICK) - return; - - if (_game.GetState() == GameState.Dead) - HandlerList.unregisterAll(this); - } - @EventHandler public void onPowerUpProximity(UpdateEvent event) {