Revert "OBT1.1.0 Merge branch 'dev_pte' into dev"
This reverts commit177cf89756, reversing changes made to42ba733cd4.
This commit is contained in:
@@ -884,8 +884,7 @@ namespace Barotrauma.Items.Components
|
||||
RelatedItem containableItem = FindContainableItem(containedItem);
|
||||
if (containableItem != null && containableItem.SetActive)
|
||||
{
|
||||
// Use ToArray() snapshot for thread-safe iteration
|
||||
foreach (var ic in containedItem.Components.ToArray())
|
||||
foreach (var ic in containedItem.Components)
|
||||
{
|
||||
ic.IsActive = active;
|
||||
}
|
||||
@@ -1011,11 +1010,7 @@ namespace Barotrauma.Items.Components
|
||||
if (flippedX ^ flippedY) { rotation = -rotation; }
|
||||
rotation += -item.RotationRad;
|
||||
}
|
||||
// Defer physics operation if in parallel context (Farseer is not thread-safe)
|
||||
var capturedBody = contained.Item.body.FarseerBody;
|
||||
var capturedSimPos = simPos;
|
||||
var capturedRotation = rotation;
|
||||
PhysicsBodyQueue.ExecuteOrDefer(() => capturedBody.SetTransformIgnoreContacts(ref capturedSimPos, capturedRotation));
|
||||
contained.Item.body.FarseerBody.SetTransformIgnoreContacts(ref simPos, rotation);
|
||||
contained.Item.body.UpdateDrawPosition(interpolate: false);
|
||||
}
|
||||
catch (Exception e)
|
||||
|
||||
Reference in New Issue
Block a user