From 2dde3cb0a86da85fd6109b69d2794f78d971ada6 Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Thu, 11 Jan 2018 11:59:37 +0200 Subject: [PATCH] All creatures all cleared from the tutorial level to prevent any unintended monster attacks. Fixes #206 --- .../GameSession/GameModes/Tutorials/BasicTutorial.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Barotrauma/BarotraumaClient/Source/GameSession/GameModes/Tutorials/BasicTutorial.cs b/Barotrauma/BarotraumaClient/Source/GameSession/GameModes/Tutorials/BasicTutorial.cs index 0e0199dde..56304b84f 100644 --- a/Barotrauma/BarotraumaClient/Source/GameSession/GameModes/Tutorials/BasicTutorial.cs +++ b/Barotrauma/BarotraumaClient/Source/GameSession/GameModes/Tutorials/BasicTutorial.cs @@ -10,7 +10,7 @@ namespace Barotrauma.Tutorials class BasicTutorial : TutorialType { public BasicTutorial(string name) - :base (name) + : base(name) { } @@ -29,6 +29,13 @@ namespace Barotrauma.Tutorials } } + //remove all characters except the controlled one to prevent any unintended monster attacks + var existingCharacters = Character.CharacterList.FindAll(c => c != Controlled); + foreach (Character c in existingCharacters) + { + c.Remove(); + } + yield return new WaitForSeconds(4.0f); infoBox = CreateInfoFrame("Use WASD to move and the mouse to look around");