Replace INotifyBuildComplete in render traits with conditions.

This commit is contained in:
Paul Chote
2018-10-05 20:16:36 +00:00
committed by abcdefg30
parent 26b0a06a17
commit 14607f55c5
28 changed files with 152 additions and 407 deletions

View File

@@ -81,8 +81,10 @@ namespace OpenRA.Mods.Common.Traits.Render
return bridgeInfo.RampActors.Contains(neighbour.Info.Name);
}
protected override void OnBuildComplete(Actor self)
protected override void TraitEnabled(Actor self)
{
base.TraitEnabled(self);
self.World.AddFrameEndTask(w =>
{
var aRamp = bridgeInfo.AOffset != CVec.Zero && RampExists(self, bridgeInfo.AOffset);