From a86a10b177676b99998b0f0fa4cbf5506dc8b100 Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Thu, 3 Aug 2017 19:29:53 +0300 Subject: [PATCH] Fixed the spamchatmessages debug command --- Barotrauma/BarotraumaClient/Source/DebugConsole.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Barotrauma/BarotraumaClient/Source/DebugConsole.cs b/Barotrauma/BarotraumaClient/Source/DebugConsole.cs index 765b59967..e180eeb9f 100644 --- a/Barotrauma/BarotraumaClient/Source/DebugConsole.cs +++ b/Barotrauma/BarotraumaClient/Source/DebugConsole.cs @@ -377,11 +377,11 @@ namespace Barotrauma for (int i = 0; i < msgCount; i++) { - if (GameMain.Client != null) + if (GameMain.Server != null) { GameMain.Server.SendChatMessage(ToolBox.RandomSeed(msgLength), ChatMessageType.Default); } - else + else if (GameMain.Client != null) { GameMain.Client.SendChatMessage(ToolBox.RandomSeed(msgLength)); }