mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-15 06:42:25 +02:00
Remove some unnecessary EntityQuery<T> and warns (#4167)
This commit is contained in:
@@ -115,7 +115,7 @@ namespace Robust.Shared.Containers
|
||||
// Remove the entity and any children from broadphases.
|
||||
// This is done before changing can collide to avoid unecceary updates.
|
||||
// TODO maybe combine with RecursivelyUpdatePhysics to avoid fetching components and iterating parents twice?
|
||||
lookupSys.RemoveFromEntityTree(toinsert, transform, transformQuery);
|
||||
lookupSys.RemoveFromEntityTree(toinsert, transform);
|
||||
DebugTools.Assert(transform.Broadphase == null || !transform.Broadphase.Value.IsValid());
|
||||
|
||||
// Avoid unnecessary broadphase updates while unanchoring, changing physics collision, and re-parenting.
|
||||
@@ -313,7 +313,7 @@ namespace Robust.Shared.Containers
|
||||
if (xform.ParentUid == oldParent // move event should already have handled it
|
||||
&& xform.Broadphase == null) // broadphase explicitly invalid?
|
||||
{
|
||||
entMan.EntitySysManager.GetEntitySystem<EntityLookupSystem>().FindAndAddToEntityTree(toRemove, xform);
|
||||
entMan.EntitySysManager.GetEntitySystem<EntityLookupSystem>().FindAndAddToEntityTree(toRemove, xform: xform);
|
||||
}
|
||||
|
||||
if (entMan.TryGetComponent<JointComponent>(toRemove, out var jointComp))
|
||||
|
||||
@@ -45,7 +45,7 @@ public abstract partial class SharedContainerSystem : EntitySystem
|
||||
// CBF updating all maps. meta-data flags now get saved, eventually we should be able to just initialize
|
||||
// entities in containers without having to "re-insert" them.
|
||||
meta.Flags |= MetaDataFlags.InContainer;
|
||||
_lookup.RemoveFromEntityTree(ent, xform, xformQuery);
|
||||
_lookup.RemoveFromEntityTree(ent, xform);
|
||||
((BaseContainer)cont).RecursivelyUpdatePhysics(ent, xform, physics, _physics, physicsQuery, xformQuery);
|
||||
|
||||
// assert children have correct properties
|
||||
|
||||
Reference in New Issue
Block a user