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:
@@ -43,10 +43,13 @@ namespace OpenRA.Mods.Common.Activities
|
||||
return NextActivity;
|
||||
}
|
||||
|
||||
public override void Cancel(Actor self)
|
||||
public override bool Cancel(Actor self)
|
||||
{
|
||||
if (!base.Cancel(self))
|
||||
return false;
|
||||
|
||||
Dispose();
|
||||
base.Cancel(self);
|
||||
return true;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
|
||||
Reference in New Issue
Block a user