Fix calling OnOwnerChange with wrong player in ProximityCapturable

The actor's owner only gets changed in an end frame task queued by `Actor.ChangeOwner`. So during this frame end task, `self.Owner` still points to the old owner, whereas we want the new one, represented by `captor.Owner`.

This bug lead to the capture notification being played when *losing* a building, but not when actually capturing it.
This commit is contained in:
Oliver Brakmann
2016-05-29 20:33:34 +02:00
parent 3225ab7c99
commit e6dcf3dee6

View File

@@ -183,7 +183,7 @@ namespace OpenRA.Mods.Common.Traits
w.Add(new FlashTarget(self));
foreach (var t in self.TraitsImplementing<INotifyCapture>())
t.OnCapture(self, captor, previousOwner, self.Owner);
t.OnCapture(self, captor, previousOwner, captor.Owner);
});
}