Fixed invisible diving suits in respawn shuttles (and possible some other bugs): item constructor instantiates the physics body of the item before finding the hull the item is inside, because otherwise the submarine-field of the body won't be updated until the item moves, causing the item to be rendered at a complete wrong position.

This commit is contained in:
Joonas Rikkonen
2017-07-28 17:29:44 +03:00
parent 602b99c9fb
commit 719f19418c

View File

@@ -352,9 +352,7 @@ namespace Barotrauma
tags = new HashSet<string>();
rect = newRect;
if (submarine==null || !submarine.Loading) FindHull();
condition = prefab.Health;
lastSentCondition = prefab.Health;
@@ -421,6 +419,8 @@ namespace Barotrauma
}
}
if (submarine == null || !submarine.Loading) FindHull();
//cache connections into a dictionary for faster lookups
var connectionPanel = GetComponent<ConnectionPanel>();
if (connectionPanel != null)