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

@@ -369,11 +369,10 @@ public abstract class SharedMagicSystem : EntitySystem
if (HasComp(ev.Target, data.Component.GetType()))
continue;
var component = (Component) _compFact.GetComponent(name);
component.Owner = ev.Target;
var temp = (object) component;
var component = (Component)_compFact.GetComponent(name);
var temp = (object)component;
_seriMan.CopyTo(data.Component, ref temp);
EntityManager.AddComponent(ev.Target, (Component) temp!);
EntityManager.AddComponent(ev.Target, (Component)temp!);
}
}
// End Change Component Spells