diff --git a/OpenRA.Mods.RA/SpawnMPUnits.cs b/OpenRA.Mods.RA/SpawnMPUnits.cs index a8939549a6..d7a02e47af 100644 --- a/OpenRA.Mods.RA/SpawnMPUnits.cs +++ b/OpenRA.Mods.RA/SpawnMPUnits.cs @@ -16,6 +16,7 @@ namespace OpenRA.Mods.RA class SpawnMPUnitsInfo : ITraitInfo, Requires { public readonly string InitialUnit = "mcv"; + public readonly string Faction = null; public object Create (ActorInitializer init) { return new SpawnMPUnits(this); } } @@ -37,6 +38,10 @@ namespace OpenRA.Mods.RA if (!p.PlayerReference.DefaultStartingUnits) return; /* they don't want an mcv, the map provides something else for them */ + /* support different starting units for each faction */ + if (info.Faction != null && p.Country.Race != info.Faction) + return; + p.World.CreateActor(info.InitialUnit, new TypeDictionary { new LocationInit( sp ),