Rewrite ActorInit queries.

This commit is contained in:
Paul Chote
2020-05-24 22:28:16 +01:00
committed by teinarss
parent 626b40f31b
commit 7c6ec577dc
66 changed files with 332 additions and 265 deletions

View File

@@ -122,8 +122,9 @@ namespace OpenRA
World = world;
ActorID = world.NextAID();
if (initDict.Contains<OwnerInit>())
Owner = init.Get<OwnerInit, Player>();
var ownerInit = init.GetOrDefault<OwnerInit>(null);
if (ownerInit != null)
Owner = ownerInit.Value(world);
if (name != null)
{