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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user