From 25b389cbfa01e337d193ddf438e91e853ede1811 Mon Sep 17 00:00:00 2001 From: ThereDrD <88589686+ThereDrD0@users.noreply.github.com> Date: Tue, 20 Aug 2024 07:29:10 +0300 Subject: [PATCH] revert robust singulo due performance issues (#648) --- .../Singularity/EntitySystems/GravityWellSystem.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Content.Server/Singularity/EntitySystems/GravityWellSystem.cs b/Content.Server/Singularity/EntitySystems/GravityWellSystem.cs index 1507c880f1..a3e67ee3e1 100644 --- a/Content.Server/Singularity/EntitySystems/GravityWellSystem.cs +++ b/Content.Server/Singularity/EntitySystems/GravityWellSystem.cs @@ -190,7 +190,10 @@ public sealed class GravityWellSystem : SharedGravityWellSystem var epicenter = mapPos.Position; var minRange2 = MathF.Max(minRange * minRange, MinGravPulseRange); // Cache square value for speed. Also apply a sane minimum value to the minimum value so that div/0s don't happen. - foreach(var entity in _lookup.GetEntitiesInRange(mapPos.MapId, epicenter, maxRange, flags: LookupFlags.Dynamic | LookupFlags.Static | LookupFlags.Sundries)) + var bodyQuery = GetEntityQuery(); + var xformQuery = GetEntityQuery(); + + foreach(var entity in _lookup.GetEntitiesInRange(mapPos.MapId, epicenter, maxRange, flags: LookupFlags.Dynamic | LookupFlags.Sundries)) { if (!entity.Valid) continue;