From da87fdb1da820e4bc538589e4092356850d8d501 Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Thu, 18 Apr 2019 12:03:53 +0300 Subject: [PATCH] (65ebd97e5) Disable multiplayer buttons ("server log", "end round", etc) when using a controller (e.g. when operating a railgun) --- Barotrauma/BarotraumaClient/Source/Networking/GameClient.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Barotrauma/BarotraumaClient/Source/Networking/GameClient.cs b/Barotrauma/BarotraumaClient/Source/Networking/GameClient.cs index 383acd362..bc973ba5e 100644 --- a/Barotrauma/BarotraumaClient/Source/Networking/GameClient.cs +++ b/Barotrauma/BarotraumaClient/Source/Networking/GameClient.cs @@ -2183,6 +2183,11 @@ namespace Barotrauma.Networking if (gameStarted && Screen.Selected == GameMain.GameScreen) { + bool disableButtons = + Character.Controlled != null && + Character.Controlled.SelectedConstruction?.GetComponent() != null; + buttonContainer.Visible = !disableButtons; + if (!GUI.DisableHUD && !GUI.DisableUpperHUD) { inGameHUD.UpdateManually(deltaTime);