From 59e955a559579836cc293fdba744965891c00fd9 Mon Sep 17 00:00:00 2001 From: psykana <36602558+psykana@users.noreply.github.com> Date: Tue, 17 Dec 2024 22:16:05 +0200 Subject: [PATCH] Fix horrible lag in Zombies mode (#33818) --- Content.Shared/Whitelist/EntityWhitelistSystem.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Content.Shared/Whitelist/EntityWhitelistSystem.cs b/Content.Shared/Whitelist/EntityWhitelistSystem.cs index 7c78b410a1..9a6e87c1b4 100644 --- a/Content.Shared/Whitelist/EntityWhitelistSystem.cs +++ b/Content.Shared/Whitelist/EntityWhitelistSystem.cs @@ -49,10 +49,12 @@ public sealed class EntityWhitelistSystem : EntitySystem { if (list.Components != null) { - var regs = StringsToRegs(list.Components); - - list.Registrations ??= new List(); - list.Registrations.AddRange(regs); + if (list.Registrations == null) + { + var regs = StringsToRegs(list.Components); + list.Registrations = new List(); + list.Registrations.AddRange(regs); + } } if (list.MindRoles != null) -- 2.51.2