Add native support for uninterruptible activities
This pattern occurs a few times throughout the code, so it makes sense to bake it into the Activity class itself.
This commit is contained in:
@@ -32,6 +32,7 @@ namespace OpenRA.Mods.Common.Activities
|
||||
this.start = start;
|
||||
this.end = end;
|
||||
this.length = length;
|
||||
IsInterruptible = false;
|
||||
}
|
||||
|
||||
public override Activity Tick(Actor self)
|
||||
@@ -62,8 +63,5 @@ namespace OpenRA.Mods.Common.Activities
|
||||
{
|
||||
yield return Target.FromPos(end);
|
||||
}
|
||||
|
||||
// Cannot be cancelled
|
||||
public override void Cancel(Actor self) { }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user