Revert "OBT1.1.0 Merge branch 'dev_pte' into dev"

This reverts commit 177cf89756, reversing
changes made to 42ba733cd4.
This commit is contained in:
Eero
2025-12-29 11:18:11 +08:00
parent 177cf89756
commit 046483b9da
86 changed files with 800 additions and 2496 deletions
@@ -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)