only add Neutral player if it doesnt exist in the map definition.

This commit is contained in:
Chris Forbes
2011-02-28 22:46:24 +13:00
parent 8aaaf1e44c
commit 772b3a2f9d
2 changed files with 6 additions and 2 deletions

View File

@@ -377,8 +377,9 @@ namespace OpenRA.Editor
using (var eld = new ErrorListDialog(errors))
eld.ShowDialog();
map.Players.Add("Neutral", new PlayerReference("Neutral",
Rules.Info["world"].Traits.WithInterface<CountryInfo>().First().Race, true, true));
if (!map.Players.ContainsKey("Neutral"))
map.Players.Add("Neutral", new PlayerReference("Neutral",
Rules.Info["world"].Traits.WithInterface<CountryInfo>().First().Race, true, true));
map.Players.Add("Creeps", new PlayerReference("Creeps",
Rules.Info["world"].Traits.WithInterface<CountryInfo>().First().Race, true, true));