diff --git a/OpenRA.Game/Traits/TraitsInterfaces.cs b/OpenRA.Game/Traits/TraitsInterfaces.cs index c94378a8fe..94d3c0298a 100755 --- a/OpenRA.Game/Traits/TraitsInterfaces.cs +++ b/OpenRA.Game/Traits/TraitsInterfaces.cs @@ -61,6 +61,7 @@ namespace OpenRA.Traits public interface INotifyBuildComplete { void BuildingComplete(Actor self); } public interface INotifyProduction { void UnitProduced(Actor self, Actor other, int2 exit); } public interface INotifyCapture { void OnCapture(Actor self, Actor captor, Player oldOwner, Player newOwner); } + public interface INotifyOtherCaptured { void OnActorCaptured(Actor self, Actor captured, Actor captor, Player oldOwner, Player newOwner); } public interface IAcceptSpy { void OnInfiltrate(Actor self, Actor spy); } public interface IStoreOre { int Capacity { get; }} diff --git a/OpenRA.Mods.RA/Activities/CaptureBuilding.cs b/OpenRA.Mods.RA/Activities/CaptureBuilding.cs index fc8a880682..27a6b0a7e0 100644 --- a/OpenRA.Mods.RA/Activities/CaptureBuilding.cs +++ b/OpenRA.Mods.RA/Activities/CaptureBuilding.cs @@ -41,6 +41,9 @@ namespace OpenRA.Mods.RA.Activities foreach (var t in target.TraitsImplementing()) t.OnCapture(target, self, oldOwner, self.Owner); + foreach (var t in self.World.Queries.WithTrait()) + t.Trait.OnActorCaptured(t.Actor, target, self, oldOwner, self.Owner); + self.Destroy(); }); return this;