Fixed issue with unit ready when capturing

This commit is contained in:
Andrii Yukhymchak
2018-01-01 11:08:38 +00:00
committed by Paul Chote
parent dec11f4fa0
commit 11db40a2b3
2 changed files with 24 additions and 18 deletions

View File

@@ -67,8 +67,6 @@ namespace OpenRA.Mods.Common.Activities
var oldOwner = target.Actor.Owner;
target.Actor.ChangeOwner(self.Owner);
foreach (var t in target.Actor.TraitsImplementing<INotifyCapture>())
t.OnCapture(target.Actor, self, oldOwner, self.Owner);
@@ -83,6 +81,8 @@ namespace OpenRA.Mods.Common.Activities
if (capturesInfo != null && capturesInfo.ConsumeActor)
self.Dispose();
target.Actor.ChangeOwnerSync(self.Owner);
});
}
}