From 9cb60f793e027884cdfc9ac78b9dcb64ad9452e6 Mon Sep 17 00:00:00 2001 From: DEATHB4DEFEAT Date: Wed, 13 Nov 2024 21:52:16 -0800 Subject: [PATCH] fix trait component removal (cherry picked from commit b2547d282f9f48d65bec364b8014195b2c57d941) --- Content.Server/Traits/TraitSystem.Functions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content.Server/Traits/TraitSystem.Functions.cs b/Content.Server/Traits/TraitSystem.Functions.cs index 528cb4f9183..07794903d3e 100644 --- a/Content.Server/Traits/TraitSystem.Functions.cs +++ b/Content.Server/Traits/TraitSystem.Functions.cs @@ -74,7 +74,7 @@ public override void OnPlayerSpawn(EntityUid uid, ISerializationManager serializationManager) { foreach (var (name, _) in Components) - entityManager.RemoveComponent(uid, (Component) factory.GetComponent(name)); + entityManager.RemoveComponentDeferred(uid, factory.GetComponent(name).GetType()); } }