From cbe7200ff6aba5fd6d0e14eeeef346d15dc8e5b4 Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Sun, 9 Jul 2017 19:19:28 +0300 Subject: [PATCH] Deselecting the currently selected item has a higher priority than interacting with the focused item (i.e. can't interact with another item until the selected item is deselected) --- .../BarotraumaShared/Source/Characters/Character.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Barotrauma/BarotraumaShared/Source/Characters/Character.cs b/Barotrauma/BarotraumaShared/Source/Characters/Character.cs index 09c337cfb..cb5aae9e0 100644 --- a/Barotrauma/BarotraumaShared/Source/Characters/Character.cs +++ b/Barotrauma/BarotraumaShared/Source/Characters/Character.cs @@ -1257,15 +1257,15 @@ namespace Barotrauma { SelectCharacter(focusedCharacter); } + else if (IsKeyHit(InputType.Select) && selectedConstruction != null) + { + selectedConstruction = null; + } else if (focusedItem != null) { focusedItem.IsHighlighted = true; focusedItem.TryInteract(this); } - else if (IsKeyHit(InputType.Select) && selectedConstruction != null) - { - selectedConstruction = null; - } } public static void UpdateAnimAll(float deltaTime)