From d50eba55a66eb87f977c9ba62f00c5d7720e7fd0 Mon Sep 17 00:00:00 2001 From: Regalis Date: Tue, 21 Feb 2017 20:24:02 +0200 Subject: [PATCH] Fixed controller.userPos being recalculated incorrectly when flipping the sub (due to userPos being relative to the center of the item since commit 49d4108e) --- Subsurface/Source/Items/Components/Machines/Controller.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Subsurface/Source/Items/Components/Machines/Controller.cs b/Subsurface/Source/Items/Components/Machines/Controller.cs index 65a7530b0..f917bc7ef 100644 --- a/Subsurface/Source/Items/Components/Machines/Controller.cs +++ b/Subsurface/Source/Items/Components/Machines/Controller.cs @@ -271,11 +271,7 @@ namespace Barotrauma.Items.Components dir = dir == Direction.Left ? Direction.Right : Direction.Left; } - if (userPos.X != 0.0f) - { - float diff = (item.Rect.X + UserPos.X) - item.Rect.Center.X; - userPos.X = item.Rect.Center.X - diff - item.Rect.X; - } + userPos.X = -UserPos.X; for (int i = 0; i < limbPositions.Count; i++) {