Make unit design/radar depend on the existence of an HQ, not the base setting.

master
cybersphinx 2012-03-21 20:03:19 +01:00
parent 466880e1cd
commit d0fc1e580d
1 changed files with 14 additions and 9 deletions

View File

@ -92,15 +92,6 @@ function eventGameInit()
"R-Wpn-Rocket-Damage01", "R-Wpn-Rocket-Damage01",
"R-Defense-WallTower01"); "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++) for (var playnum = 0; playnum < maxPlayers; playnum++)
{ {
enableResearch("R-Sys-Sensor-Turret01", 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(); hackNetOn();
setTimer("checkEndConditions", 100); setTimer("checkEndConditions", 100);
} }