mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
Fix misc container and lookup bugs (#3418)
This commit is contained in:
@@ -64,7 +64,7 @@ namespace Robust.Shared.Containers
|
||||
/// <inheritdoc />
|
||||
protected override void InternalShutdown(IEntityManager entMan, bool isClient)
|
||||
{
|
||||
foreach (var entity in _containerList)
|
||||
foreach (var entity in _containerList.ToArray())
|
||||
{
|
||||
if (!isClient)
|
||||
entMan.DeleteEntity(entity);
|
||||
|
||||
@@ -367,7 +367,7 @@ public sealed partial class EntityLookupSystem
|
||||
{
|
||||
AddEntitiesIntersecting(grid.GridEntityId, intersecting, worldAABB, flags, lookupQuery, xformQuery);
|
||||
|
||||
if ((flags & LookupFlags.Anchored) != 0x0)
|
||||
if ((flags & (LookupFlags.Anchored | LookupFlags.Static)) != 0x0)
|
||||
{
|
||||
foreach (var uid in grid.GetAnchoredEntities(worldAABB))
|
||||
{
|
||||
@@ -480,7 +480,7 @@ public sealed partial class EntityLookupSystem
|
||||
|
||||
if (mapPos.MapId == MapId.Nullspace) return new HashSet<EntityUid>();
|
||||
|
||||
var intersecting = GetEntitiesInRange(mapPos, range, flags).ToHashSet();
|
||||
var intersecting = GetEntitiesInRange(mapPos, range, flags);
|
||||
intersecting.Remove(uid);
|
||||
return intersecting;
|
||||
}
|
||||
@@ -495,7 +495,7 @@ public sealed partial class EntityLookupSystem
|
||||
var (worldPos, worldRot) = xform.GetWorldPositionRotation();
|
||||
var bounds = GetAABBNoContainer(uid, worldPos, worldRot);
|
||||
|
||||
var intersecting = GetEntitiesIntersecting(mapId, bounds, flags).ToHashSet();
|
||||
var intersecting = GetEntitiesIntersecting(mapId, bounds, flags);
|
||||
intersecting.Remove(uid);
|
||||
return intersecting;
|
||||
}
|
||||
|
||||
@@ -331,7 +331,7 @@ namespace Robust.UnitTesting.Server.GameObjects.Components
|
||||
/// <inheritdoc />
|
||||
protected override void InternalShutdown(IEntityManager entMan, bool isClient)
|
||||
{
|
||||
foreach (var entity in _containerList)
|
||||
foreach (var entity in _containerList.ToArray())
|
||||
{
|
||||
if (!isClient)
|
||||
entMan.DeleteEntity(entity);
|
||||
|
||||
Reference in New Issue
Block a user