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:
@@ -353,8 +353,6 @@ namespace Barotrauma
|
|||||||
|
|
||||||
rect = newRect;
|
rect = newRect;
|
||||||
|
|
||||||
if (submarine==null || !submarine.Loading) FindHull();
|
|
||||||
|
|
||||||
condition = prefab.Health;
|
condition = prefab.Health;
|
||||||
lastSentCondition = 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
|
//cache connections into a dictionary for faster lookups
|
||||||
var connectionPanel = GetComponent<ConnectionPanel>();
|
var connectionPanel = GetComponent<ConnectionPanel>();
|
||||||
if (connectionPanel != null)
|
if (connectionPanel != null)
|
||||||
|
|||||||
Reference in New Issue
Block a user