check for invalid owners

This commit is contained in:
Matthias Mailänder
2015-05-31 09:12:01 +02:00
parent bb30a3c75a
commit 44691831ad

View File

@@ -51,6 +51,14 @@ namespace OpenRA.Mods.Common.Lint
if (map.SpawnPoints.Value.Distinct().Count() != spawnCount)
emitError("Duplicate spawn point locations detected.");
}
foreach (var kv in map.ActorDefinitions)
{
var actorReference = new ActorReference(kv.Value.Value, kv.Value.ToDictionary());
var ownerName = actorReference.InitDict.Get<OwnerInit>().PlayerName;
if (!playerNames.Contains(ownerName))
emitError("Actor {0} is owned by unknown player {1}.".F(actorReference.Type, ownerName));
}
}
}
}