Replace INotifyBuildComplete in render traits with conditions.
This commit is contained in:
@@ -139,8 +139,11 @@ namespace OpenRA.Mods.Common.Traits.Render
|
||||
dirty = false;
|
||||
}
|
||||
|
||||
protected override void OnBuildComplete(Actor self)
|
||||
protected override void TraitEnabled(Actor self)
|
||||
{
|
||||
base.TraitEnabled(self);
|
||||
dirty = true;
|
||||
|
||||
DefaultAnimation.PlayFetchIndex(NormalizeSequence(self, Info.Sequence), () => adjacent);
|
||||
UpdateNeighbours(self);
|
||||
|
||||
@@ -162,8 +165,6 @@ namespace OpenRA.Mods.Common.Traits.Render
|
||||
{
|
||||
UpdateNeighbours(self);
|
||||
}
|
||||
|
||||
protected override void TraitEnabled(Actor self) { dirty = true; }
|
||||
}
|
||||
|
||||
public class RuntimeNeighbourInit : IActorInit<Dictionary<CPos, string[]>>, ISuppressInitExport
|
||||
|
||||
Reference in New Issue
Block a user