content changes for "refactors copy api to use ref" (#10180)

This commit is contained in:
Paul Ritter
2022-08-05 00:17:16 +02:00
committed by GitHub
parent 2f928cc8ab
commit 34fe04483f
4 changed files with 10 additions and 7 deletions

View File

@@ -26,9 +26,9 @@ namespace Content.Server.Jobs
var component = (Component) factory.GetComponent(name);
component.Owner = mob;
var copied = (Component?) serializationManager.Copy(data.Component, component, null);
if (copied != null)
entityManager.AddComponent(mob, copied);
var temp = (object) component;
serializationManager.Copy(data.Component, ref temp);
entityManager.AddComponent(mob, (Component)temp!);
}
}
}