Tidy up Activity.Cancel(), make Tick abstract

This commit is contained in:
Paul Chote
2011-04-16 13:18:22 +12:00
parent 0a67c68c45
commit 4f83e994d0
14 changed files with 47 additions and 54 deletions

View File

@@ -30,7 +30,6 @@ namespace OpenRA.Mods.RA.Activities
bool started = false;
public override Activity Tick( Actor self )
{
if (IsCanceled) return NextActivity;
if (!started)
{
var rb = self.Trait<RenderBuilding>();
@@ -51,7 +50,7 @@ namespace OpenRA.Mods.RA.Activities
return complete ? NextActivity : this;
}
// Not actually cancellable
protected override bool OnCancel( Actor self ) { return false; }
// Cannot be cancelled
public override void Cancel( Actor self ) { }
}
}