diff --git a/Content.Server/Movement/Components/ActiveLagCompensationComponent.cs b/Content.Server/Movement/Components/ActiveLagCompensationComponent.cs deleted file mode 100644 index 25e65c56b9..0000000000 --- a/Content.Server/Movement/Components/ActiveLagCompensationComponent.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace Content.Server.Movement.Components; - -/// -/// Track lag compensation components that may need to have their data culled for memory reasons. -/// -[RegisterComponent] -public sealed partial class ActiveLagCompensationComponent : Component -{ - -} diff --git a/Content.Server/Movement/Systems/LagCompensationSystem.cs b/Content.Server/Movement/Systems/LagCompensationSystem.cs index 0fbec2d492..2c72bcf7b1 100644 --- a/Content.Server/Movement/Systems/LagCompensationSystem.cs +++ b/Content.Server/Movement/Systems/LagCompensationSystem.cs @@ -36,7 +36,9 @@ public sealed class LagCompensationSystem : EntitySystem // Cull any old ones from active updates // Probably fine to include ignored. - foreach (var (_, comp) in EntityQuery(true)) + var query = EntityQueryEnumerator(); + + while (query.MoveNext(out var comp)) { while (comp.Positions.TryPeek(out var pos)) { @@ -48,11 +50,6 @@ public sealed class LagCompensationSystem : EntitySystem break; } - - if (comp.Positions.Count == 0) - { - RemComp(comp.Owner); - } } } @@ -61,7 +58,6 @@ public sealed class LagCompensationSystem : EntitySystem if (!args.NewPosition.EntityId.IsValid()) return; // probably being sent to nullspace for deletion. - EnsureComp(uid); component.Positions.Enqueue((_timing.CurTime, args.NewPosition, args.NewRotation)); }