Item.SetContainedItemPositions recursively sets the positions of the items contained inside the contained items (and so on)

This commit is contained in:
Regalis
2016-11-22 18:06:52 +02:00
parent 219f9258e2
commit 4ad60e77a9

View File

@@ -600,7 +600,7 @@ namespace Barotrauma
{
contained.body.FarseerBody.SetTransformIgnoreContacts(ref simPos, 0.0f);
}
contained.Rect =
new Rectangle(
(int)(displayPos.X - contained.Rect.Width / 2.0f),
@@ -609,6 +609,8 @@ namespace Barotrauma
contained.Submarine = Submarine;
contained.CurrentHull = CurrentHull;
contained.SetContainedItemPositions();
}
}