From ce88519c13331b36b2cc2107d794ab1250600761 Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Wed, 11 Jul 2018 10:59:40 +0300 Subject: [PATCH] Pump components with a physics body updates it hull when active (-> possible to make portable pump items). Closes #463 --- .../BarotraumaShared/Source/Items/Components/Machines/Pump.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Barotrauma/BarotraumaShared/Source/Items/Components/Machines/Pump.cs b/Barotrauma/BarotraumaShared/Source/Items/Components/Machines/Pump.cs index b99f8ef31..b161ddff9 100644 --- a/Barotrauma/BarotraumaShared/Source/Items/Components/Machines/Pump.cs +++ b/Barotrauma/BarotraumaShared/Source/Items/Components/Machines/Pump.cs @@ -99,7 +99,9 @@ namespace Barotrauma.Items.Components ApplyStatusEffects(ActionType.OnActive, deltaTime, null); - if (hull1 == null) return; + //check the hull if the item is movable + if (item.body != null) GetHull(); + if (hull1 == null) return; float powerFactor = currPowerConsumption <= 0.0f ? 1.0f : voltage;