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:
@@ -157,12 +157,12 @@ namespace OpenRA.Mods.Common.Activities
|
||||
});
|
||||
}
|
||||
|
||||
public override void Cancel(Actor self)
|
||||
public override bool Cancel(Actor self)
|
||||
{
|
||||
if (innerActivity != null)
|
||||
innerActivity.Cancel(self);
|
||||
if (!IsCanceled && innerActivity != null && !innerActivity.Cancel(self))
|
||||
return false;
|
||||
|
||||
base.Cancel(self);
|
||||
return base.Cancel(self);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user