diff --git a/Content.Shared/Polymorph/Systems/SharedChameleonProjectorSystem.cs b/Content.Shared/Polymorph/Systems/SharedChameleonProjectorSystem.cs index d8f0fc022f..69b9bf8f8d 100644 --- a/Content.Shared/Polymorph/Systems/SharedChameleonProjectorSystem.cs +++ b/Content.Shared/Polymorph/Systems/SharedChameleonProjectorSystem.cs @@ -294,19 +294,18 @@ public abstract class SharedChameleonProjectorSystem : EntitySystem /// /// Try to get a single component from the source entity/prototype. /// - private bool GetSrcComp(ChameleonDisguiseComponent comp, [NotNullWhen(true)] out T? src) where T: Component + private bool GetSrcComp(ChameleonDisguiseComponent comp, [NotNullWhen(true)] out T? src) where T : Component, new() { - src = null; if (TryComp(comp.SourceEntity, out src)) return true; - if (comp.SourceProto is not {} protoId) + if (comp.SourceProto is not { } protoId) return false; if (!_proto.TryIndex(protoId, out var proto)) return false; - return proto.TryGetComponent(out src); + return proto.TryGetComponent(out src, EntityManager.ComponentFactory); } }