Skip to content

Commit

Permalink
Update TraitSystem.Functions.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
VMSolidus committed Nov 9, 2024
1 parent 6a729a8 commit ebed63b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Content.Server/Traits/TraitSystem.Functions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ public override void OnPlayerSpawn(EntityUid uid,
{
foreach (var (_, data) in Components)
{

var comp = (Component) serializationManager.CreateCopy(data.Component, notNullableOverride: true);
comp.Owner = uid;
entityManager.AddComponent(uid, comp, true);
}
}
Expand All @@ -55,7 +55,8 @@ public override void OnPlayerSpawn(EntityUid uid,
continue;

var comp = (Component) serializationManager.CreateCopy(entry.Component, notNullableOverride: true);
entityManager.AddComponent(uid, comp, false);
comp.Owner = uid;
entityManager.AddComponent(uid, comp);
}
}
}
Expand Down

0 comments on commit ebed63b

Please sign in to comment.