Reduce shuttle smimsh allocations (#22952)
(cherry picked from commit 3a166e14230650f7d0dc40c370898d02b3206a83)
This commit is contained in:
parent
371fafddbd
commit
dfb8cb1740
|
|
@ -77,6 +77,8 @@ public sealed partial class ShuttleSystem
|
|||
/// </summary>
|
||||
public const float FTLDestinationMass = 500f;
|
||||
|
||||
private HashSet<EntityUid> _lookupEnts = new();
|
||||
|
||||
private EntityQuery<BodyComponent> _bodyQuery;
|
||||
private EntityQuery<BuckleComponent> _buckleQuery;
|
||||
private EntityQuery<GhostComponent> _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))
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue