Remove obsolete occurrences of IComponent.Owner being assigned just before AddComponent (#30724)

This commit is contained in:
Mervill
2024-08-07 20:03:41 -07:00
committed by GitHub
parent 23e4a9a004
commit ab28e1a9a9
7 changed files with 14 additions and 22 deletions

View File

@@ -50,8 +50,7 @@ public sealed class RandomHumanoidSystem : EntitySystem
{
foreach (var entry in prototype.Components.Values)
{
var comp = (Component) _serialization.CreateCopy(entry.Component, notNullableOverride: true);
comp.Owner = humanoid; // This .owner must survive for now.
var comp = (Component)_serialization.CreateCopy(entry.Component, notNullableOverride: true);
EntityManager.RemoveComponent(humanoid, comp.GetType());
EntityManager.AddComponent(humanoid, comp);
}