add INotifyOtherCaptured, for reacting to other units changing ownership

This commit is contained in:
Chris Forbes
2011-01-30 17:43:25 +13:00
parent a0926a49ec
commit c8a68659a0
2 changed files with 4 additions and 0 deletions

View File

@@ -41,6 +41,9 @@ namespace OpenRA.Mods.RA.Activities
foreach (var t in target.TraitsImplementing<INotifyCapture>())
t.OnCapture(target, self, oldOwner, self.Owner);
foreach (var t in self.World.Queries.WithTrait<INotifyOtherCaptured>())
t.Trait.OnActorCaptured(t.Actor, target, self, oldOwner, self.Owner);
self.Destroy();
});
return this;