diff --git a/OpenRA.Mods.Common/Traits/Targetable.cs b/OpenRA.Mods.Common/Traits/Targetable.cs index 3d3f33c1d3..048066081b 100644 --- a/OpenRA.Mods.Common/Traits/Targetable.cs +++ b/OpenRA.Mods.Common/Traits/Targetable.cs @@ -26,13 +26,15 @@ namespace OpenRA.Mods.Common.Traits public override object Create(ActorInitializer init) { return new Targetable(init.Self, this); } } - public class Targetable : UpgradableTrait, ITargetable + public class Targetable : UpgradableTrait, ITargetable, INotifyCreated { protected static readonly string[] None = new string[] { }; protected Cloak cloak; public Targetable(Actor self, TargetableInfo info) - : base(info) + : base(info) { } + + void INotifyCreated.Created(Actor self) { cloak = self.TraitOrDefault(); }