From ad54d28b0d42d035bf7cc6310af0c9048aaa3382 Mon Sep 17 00:00:00 2001 From: Sarah Date: Fri, 27 Nov 2015 22:29:29 +0100 Subject: [PATCH] fixing teleportation issues. --- .../game/arcade/gametutorial/GameTutorial.java | 13 +++++++++++-- .../game/arcade/gametutorial/TutorialPhase.java | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gametutorial/GameTutorial.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gametutorial/GameTutorial.java index dc157fa3e..770898720 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gametutorial/GameTutorial.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gametutorial/GameTutorial.java @@ -72,8 +72,8 @@ public abstract class GameTutorial if(_currentPhase == null) { onEnd(); - endTutorial(); _hasEnded = true; + endTutorial(); Manager.getPluginManager().callEvent(new GameTutorialEndEvent(this)); } else @@ -97,7 +97,16 @@ public abstract class GameTutorial player.setAllowFlight(false); player.setFlying(false); if(TeleportOnEnd) - _team.SpawnTeleport(); + { + Manager.runSyncLater(new Runnable() + { + @Override + public void run() + { + _team.SpawnTeleport(); + } + }, 5); + } } Manager.GetChat().Silence(StartAfterTutorial, false); Manager.GetGame().PrepareTime = (System.currentTimeMillis() - Manager.GetGame().GetStateTime()) + StartAfterTutorial; diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gametutorial/TutorialPhase.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gametutorial/TutorialPhase.java index 76445fe42..18b1b513b 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gametutorial/TutorialPhase.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gametutorial/TutorialPhase.java @@ -64,7 +64,7 @@ public abstract class TutorialPhase @Override public void run() { - while(!_hasEnded) + while(!_hasEnded && !getTutorial().hasEnded()) { _tutorial.Manager.runSync(new Runnable() {