mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-14 19:29:36 +01:00
Recursively update joint relays on removing entities from containers (#6244)
* Recursively update joint relays on removing entities from containers * release notes
This commit is contained in:
@@ -47,6 +47,7 @@ END TEMPLATE-->
|
||||
|
||||
* Fixed yaml hot reloading throwing invalid path exceptions.
|
||||
* The `EntityManager.CreateEntityUninitialized` overload that uses MapCoordinates now actually attaches entities to a grid if one is present at those coordinates, as was stated in it's documentation.
|
||||
* Fixed physics joint relays not being properly updated when an entity is removed from a container.
|
||||
|
||||
### Other
|
||||
|
||||
|
||||
@@ -219,6 +219,9 @@ public abstract partial class SharedContainerSystem
|
||||
|
||||
internal void RecursivelyUpdateJoints(Entity<TransformComponent> entity)
|
||||
{
|
||||
if (_timing.ApplyingState)
|
||||
return;
|
||||
|
||||
if (JointQuery.TryGetComponent(entity, out var jointComp))
|
||||
{
|
||||
// TODO: This is going to be going up while joints going down, although these aren't too common
|
||||
|
||||
@@ -95,10 +95,7 @@ public abstract partial class SharedContainerSystem
|
||||
_lookup.FindAndAddToEntityTree(toRemove, xform: xform);
|
||||
}
|
||||
|
||||
if (TryComp<JointComponent>(toRemove, out var jointComp))
|
||||
{
|
||||
_joint.RefreshRelay(toRemove, jointComp);
|
||||
}
|
||||
RecursivelyUpdateJoints((toRemove, xform));
|
||||
|
||||
// Raise container events (after re-parenting and internal remove).
|
||||
RaiseLocalEvent(container.Owner, new EntRemovedFromContainerMessage(toRemove, container), true);
|
||||
|
||||
Reference in New Issue
Block a user