From cfc937e8ebecf5ed7acb96f465e1a776afa8d5ad Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Wed, 25 Aug 2010 18:28:36 +1200 Subject: [PATCH] add PlayerReference.DefaultStartingUnits flag (set for autogenerated playerrefs; don't set this if you have custom stuff. --- OpenRA.FileFormats/Map/PlayerReference.cs | 3 ++- OpenRA.Game/Map.cs | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/OpenRA.FileFormats/Map/PlayerReference.cs b/OpenRA.FileFormats/Map/PlayerReference.cs index bf8c04a552..fe92ce41e9 100644 --- a/OpenRA.FileFormats/Map/PlayerReference.cs +++ b/OpenRA.FileFormats/Map/PlayerReference.cs @@ -19,7 +19,8 @@ namespace OpenRA.FileFormats public string Race; public bool OwnsWorld = false; public bool NonCombatant = false; - public bool Playable = false; + public bool Playable = false; + public bool DefaultStartingUnits = false; public Color Color = Color.FromArgb(238,238,238); public Color Color2 = Color.FromArgb(44,28,24); diff --git a/OpenRA.Game/Map.cs b/OpenRA.Game/Map.cs index e509ac15ee..556bc856fb 100755 --- a/OpenRA.Game/Map.cs +++ b/OpenRA.Game/Map.cs @@ -176,7 +176,13 @@ namespace OpenRA { for (int index = 0; index < Waypoints.Count; index++) { - var p = new PlayerReference("Multi{0}".F(index), "Random", false, false) { Playable = true }; + var p = new PlayerReference + { + Name = "Multi{0}".F(index), + Race = "Random", + Playable = true, + DefaultStartingUnits = true + }; Players.Add(p.Name, p); } }