diff --git a/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs b/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs index 763e89e4f8..636470e2e5 100644 --- a/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs +++ b/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs @@ -77,6 +77,8 @@ public sealed partial class ShuttleSystem /// public const float FTLDestinationMass = 500f; + private HashSet _lookupEnts = new(); + private EntityQuery _bodyQuery; private EntityQuery _buckleQuery; private EntityQuery _ghostQuery; @@ -716,8 +718,10 @@ public sealed partial class ShuttleSystem // Handle clearing biome stuff as relevant. tileSet.Clear(); _biomes.ReserveTiles(xform.MapUid.Value, aabb, tileSet); + _lookupEnts.Clear(); + _lookup.GetEntitiesIntersecting(xform.MapUid.Value, aabb, _lookupEnts, LookupFlags.Uncontained); - foreach (var ent in _lookup.GetEntitiesIntersecting(xform.MapUid.Value, aabb, LookupFlags.Uncontained)) + foreach (var ent in _lookupEnts) { if (ent == uid || immune.Contains(ent)) {