fix up some of the capturing duplication

This commit is contained in:
Chris Forbes
2010-12-23 14:25:39 +13:00
parent e8a85db309
commit 3149f3efa2
5 changed files with 27 additions and 26 deletions

View File

@@ -189,5 +189,17 @@ namespace OpenRA
Destroyed = true;
} );
}
// todo: move elsewhere.
public void ChangeOwner(Player newOwner)
{
World.AddFrameEndTask(w =>
{
// momentarily remove from world so the ownership queries don't get confused
w.Remove(this);
Owner = newOwner;
w.Add(this);
});
}
}
}