From 9b8d0ffc51b5d8ac43e8f59eb853a8e92affb532 Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Thu, 25 Apr 2019 17:45:33 +0300 Subject: [PATCH] (17bb71ed5) Fix repair tool not being used if the repair target is not within interaction area. Fixes repairing items with the welding tool. Partial fix to #63 (dev). --- .../Characters/AI/Objectives/AIObjectiveRepairItem.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Barotrauma/BarotraumaShared/Source/Characters/AI/Objectives/AIObjectiveRepairItem.cs b/Barotrauma/BarotraumaShared/Source/Characters/AI/Objectives/AIObjectiveRepairItem.cs index fd2d1c962..d4a9125a8 100644 --- a/Barotrauma/BarotraumaShared/Source/Characters/AI/Objectives/AIObjectiveRepairItem.cs +++ b/Barotrauma/BarotraumaShared/Source/Characters/AI/Objectives/AIObjectiveRepairItem.cs @@ -83,12 +83,12 @@ namespace Barotrauma return; } } + if (repairTool == null) + { + FindRepairTool(); + } if (character.CanInteractWith(Item)) { - if (repairTool == null) - { - FindRepairTool(); - } if (repairTool != null) { OperateRepairTool(deltaTime);