]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix cursed mask bug (#33014)
authorFN <37689533+FireNameFN@users.noreply.github.com>
Fri, 8 Nov 2024 02:59:05 +0000 (09:59 +0700)
committerGitHub <noreply@github.com>
Fri, 8 Nov 2024 02:59:05 +0000 (20:59 -0600)
* One line fix

* Removed redundant using

* Allocation improvement

Content.Server/Clothing/Systems/CursedMaskSystem.cs

index 825e85e2c600ccdab403e7fec10d2c30371fb3f5..86d4e801a8b000369f5f4e13e009e69c155cab24 100644 (file)
@@ -51,7 +51,8 @@ public sealed class CursedMaskSystem : SharedCursedMaskSystem
         }
 
         var npcFaction = EnsureComp<NpcFactionMemberComponent>(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);