Fixed controller.userPos being recalculated incorrectly when flipping the sub (due to userPos being relative to the center of the item since commit 49d4108e)

This commit is contained in:
Regalis
2017-02-21 20:24:02 +02:00
parent c04f78a05c
commit d50eba55a6

View File

@@ -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++)
{