From 012855475e38d1a05df6263f356e0d0805aa7237 Mon Sep 17 00:00:00 2001 From: FN <37689533+FireNameFN@users.noreply.github.com> Date: Fri, 8 Nov 2024 09:59:05 +0700 Subject: [PATCH] Fix cursed mask bug (#33014) * One line fix * Removed redundant using * Allocation improvement --- Content.Server/Clothing/Systems/CursedMaskSystem.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Content.Server/Clothing/Systems/CursedMaskSystem.cs b/Content.Server/Clothing/Systems/CursedMaskSystem.cs index 825e85e2c6..86d4e801a8 100644 --- a/Content.Server/Clothing/Systems/CursedMaskSystem.cs +++ b/Content.Server/Clothing/Systems/CursedMaskSystem.cs @@ -51,7 +51,8 @@ public sealed class CursedMaskSystem : SharedCursedMaskSystem } var npcFaction = EnsureComp(wearer); - ent.Comp.OldFactions = npcFaction.Factions; + ent.Comp.OldFactions.Clear(); + ent.Comp.OldFactions.UnionWith(npcFaction.Factions); _npcFaction.ClearFactions((wearer, npcFaction), false); _npcFaction.AddFaction((wearer, npcFaction), ent.Comp.CursedMaskFaction); -- 2.51.2