Fix classic SP maps failing to import into the editor

This commit is contained in:
Scott_NZ
2012-12-06 02:46:37 +13:00
parent 38db7d1e50
commit bb5212d2bb
3 changed files with 67 additions and 15 deletions

View File

@@ -385,18 +385,17 @@ namespace OpenRA
public void MakeDefaultPlayers()
{
Players.Clear();
var firstRace = OpenRA.Rules.Info["world"].Traits
.WithInterface<CountryInfo>().First(c => c.Selectable).Race;
Players.Add("Neutral", new PlayerReference
{
Name = "Neutral",
Race = firstRace,
OwnsWorld = true,
NonCombatant = true
});
if (!Players.ContainsKey("Neutral"))
Players.Add("Neutral", new PlayerReference
{
Name = "Neutral",
Race = firstRace,
OwnsWorld = true,
NonCombatant = true
});
var numSpawns = GetSpawnPoints().Length;
for (var index = 0; index < numSpawns; index++)