Fix conditional traits that incorrectly override INotifyCreated.

This commit is contained in:
Paul Chote
2019-07-13 13:02:24 +01:00
committed by teinarss
parent 37325dbfc7
commit 6eaf615798
10 changed files with 34 additions and 23 deletions

View File

@@ -80,7 +80,7 @@ namespace OpenRA.Mods.Common.Traits
}
}
public class Explodes : ConditionalTrait<ExplodesInfo>, INotifyKilled, INotifyDamage, INotifyCreated
public class Explodes : ConditionalTrait<ExplodesInfo>, INotifyKilled, INotifyDamage
{
readonly IHealth health;
BuildingInfo buildingInfo;
@@ -91,9 +91,10 @@ namespace OpenRA.Mods.Common.Traits
health = self.Trait<IHealth>();
}
void INotifyCreated.Created(Actor self)
protected override void Created(Actor self)
{
buildingInfo = self.Info.TraitInfoOrDefault<BuildingInfo>();
base.Created(self);
}
void INotifyKilled.Killed(Actor self, AttackInfo e)