From cfc03f844302d540a1315fafa7d08921e9e2da3d Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Mon, 6 Aug 2018 22:14:37 +0300 Subject: [PATCH] Controllers can't focus the camera on broken items (none of the current focusable items can break but may be useful for modders). Closes #590 --- .../Source/Items/Components/Machines/Controller.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Barotrauma/BarotraumaShared/Source/Items/Components/Machines/Controller.cs b/Barotrauma/BarotraumaShared/Source/Items/Components/Machines/Controller.cs index ede3f0aed..926742400 100644 --- a/Barotrauma/BarotraumaShared/Source/Items/Components/Machines/Controller.cs +++ b/Barotrauma/BarotraumaShared/Source/Items/Components/Machines/Controller.cs @@ -245,6 +245,7 @@ namespace Barotrauma.Items.Components for (int i = item.LastSentSignalRecipients.Count - 1; i >= 0; i--) { + if (item.LastSentSignalRecipients[i].Condition <= 0.0f) continue; if (item.LastSentSignalRecipients[i].Prefab.FocusOnSelected) { return item.LastSentSignalRecipients[i];