Skip to content

Commit

Permalink
Fix horrible lag in Zombies mode (space-wizards#33818)
Browse files Browse the repository at this point in the history
  • Loading branch information
psykana authored Dec 17, 2024
1 parent fb6e85e commit 59e955a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Content.Shared/Whitelist/EntityWhitelistSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,12 @@ public bool IsValid(EntityWhitelist list, EntityUid uid)
{
if (list.Components != null)
{
var regs = StringsToRegs(list.Components);

list.Registrations ??= new List<ComponentRegistration>();
list.Registrations.AddRange(regs);
if (list.Registrations == null)
{
var regs = StringsToRegs(list.Components);
list.Registrations = new List<ComponentRegistration>();
list.Registrations.AddRange(regs);
}
}

if (list.MindRoles != null)
Expand Down

0 comments on commit 59e955a

Please sign in to comment.