Reverted 719f194 because it broke spawning items at world-space positions. Now the submarine-field of the body is simply set to match the item to make sure it gets rendered at the correct position.

This commit is contained in:
Joonas Rikkonen
2017-08-01 18:04:30 +03:00
parent 1bc2523269
commit 7553d63a99

View File

@@ -361,6 +361,8 @@ namespace Barotrauma
properties = ObjectProperty.InitProperties(this, element);
if (submarine == null || !submarine.Loading) FindHull();
foreach (XElement subElement in element.Elements())
{
switch (subElement.Name.ToString().ToLowerInvariant())
@@ -419,7 +421,10 @@ namespace Barotrauma
}
}
if (submarine == null || !submarine.Loading) FindHull();
if (body != null)
{
body.Submarine = submarine;
}
//cache connections into a dictionary for faster lookups
var connectionPanel = GetComponent<ConnectionPanel>();