From d0fc1e580d7fc57a5c10efabc764085835f45e51 Mon Sep 17 00:00:00 2001 From: cybersphinx Date: Wed, 21 Mar 2012 20:03:19 +0100 Subject: [PATCH] Make unit design/radar depend on the existence of an HQ, not the base setting. --- data/mp/multiplay/skirmish/rules.js | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/data/mp/multiplay/skirmish/rules.js b/data/mp/multiplay/skirmish/rules.js index 40d9c8bfa..a80a642aa 100644 --- a/data/mp/multiplay/skirmish/rules.js +++ b/data/mp/multiplay/skirmish/rules.js @@ -92,15 +92,6 @@ function eventGameInit() "R-Wpn-Rocket-Damage01", "R-Defense-WallTower01"); - if (baseType == CAMP_CLEAN) - { - // No HQ, so no design or radar - setMiniMap(false); - setDesign(false); - // This is the only template that should be enabled before design is allowed - enableTemplate("ConstructionDroid"); - } - for (var playnum = 0; playnum < maxPlayers; playnum++) { enableResearch("R-Sys-Sensor-Turret01", playnum); @@ -159,6 +150,20 @@ function eventGameInit() } } } + + // Disabled by default + setMiniMap(false); + setDesign(false); + // This is the only template that should be enabled before design is allowed + enableTemplate("ConstructionDroid"); + + var structlist = enumStruct(me, HQ); + for (var i = 0; i < structlist.length; i++) + { + // Simulate build events to enable minimap/unit design when an HQ exists + eventStructureBuilt(structlist[i]); + } + hackNetOn(); setTimer("checkEndConditions", 100); }