transparently upgrade maps produced by buggy converter
This commit is contained in:
@@ -72,6 +72,12 @@ namespace OpenRA.Editor
|
|||||||
// load the map
|
// load the map
|
||||||
var map = new Map(new Folder(mapname));
|
var map = new Map(new Folder(mapname));
|
||||||
|
|
||||||
|
// upgrade maps that have no player definitions. editor doesnt care,
|
||||||
|
// but this breaks the game pretty badly.
|
||||||
|
if (map.Players.Count == 0)
|
||||||
|
map.Players.Add("Neutral", new PlayerReference("Neutral",
|
||||||
|
Rules.Info["world"].Traits.WithInterface<CountryInfo>().First().Race, true, true));
|
||||||
|
|
||||||
PrepareMapResources(manifest, map);
|
PrepareMapResources(manifest, map);
|
||||||
|
|
||||||
dirty = false;
|
dirty = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user