Item.SetContainedItemPositions recursively sets the positions of the items contained inside the contained items (and so on)
This commit is contained in:
@@ -600,7 +600,7 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
contained.body.FarseerBody.SetTransformIgnoreContacts(ref simPos, 0.0f);
|
contained.body.FarseerBody.SetTransformIgnoreContacts(ref simPos, 0.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
contained.Rect =
|
contained.Rect =
|
||||||
new Rectangle(
|
new Rectangle(
|
||||||
(int)(displayPos.X - contained.Rect.Width / 2.0f),
|
(int)(displayPos.X - contained.Rect.Width / 2.0f),
|
||||||
@@ -609,6 +609,8 @@ namespace Barotrauma
|
|||||||
|
|
||||||
contained.Submarine = Submarine;
|
contained.Submarine = Submarine;
|
||||||
contained.CurrentHull = CurrentHull;
|
contained.CurrentHull = CurrentHull;
|
||||||
|
|
||||||
|
contained.SetContainedItemPositions();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user