Use actor/target generations to invalidate targets on ownership change

This commit is contained in:
Chris Forbes
2013-06-13 09:44:50 +12:00
parent 5bc47f4834
commit ae809ce39f
2 changed files with 2 additions and 3 deletions

View File

@@ -273,6 +273,7 @@ namespace OpenRA
// momentarily remove from world so the ownership queries don't get confused
w.Remove(this);
Owner = newOwner;
Generation++;
w.Add(this);
foreach (var t in this.TraitsImplementing<INotifyOwnerChanged>())