Make AI build cobra hover trucks when it is able to, instead of the ordinary starting trucks. This

allows the AI to access areas of certain maps that are blocked by water. On these maps, this makes
a great deal of difference. This breaks skirmish saves, so do not backport.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9499 4a71c877-e1ca-e34f-864e-861f7616d084
master
Per Inge Mathisen 2010-01-25 12:35:13 +00:00 committed by Git SVN Gateway
parent eed1904333
commit 1aae810a22
2 changed files with 11 additions and 4 deletions

View File

@ -111,7 +111,7 @@ public int numTemplates[TECHS];
public TEMPLATE tmpl[TECHS][70];
private TEMPLATE tmplChoice[5];
public TEMPLATE cybTempl[10],superCyb[4],cybMechanic,cybEngineer;
public TEMPLATE cybTempl[10],superCyb[4],cybMechanic,cybEngineer,hovertruck;
public TEMPLATE vtols[18];
public int numVtolTemplates;
@ -1557,11 +1557,17 @@ event conDroids(conDroidsTr)
initEnumStruct(FALSE,factory,me,me);
_factory = enumStruct();
while((_factory != NULLOBJECT) and (_numBuilding < _maxTruckFactories)
and (_totalTrucks < _maxTrucks))
while ((_factory != NULLOBJECT) and (_numBuilding < _maxTruckFactories) and (_totalTrucks < _maxTrucks))
{
//Try to build a truck
_bStartedBuilding = buildUnit(constructor, _factory, factory, FALSE); //build truck even if not idle
if (skCanBuildTemplate(me, _factory, hovertruck))
{
_bStartedBuilding = buildUnit(hovertruck, _factory, factory, FALSE); //build truck even if not idle
}
else
{
_bStartedBuilding = buildUnit(constructor, _factory, factory, FALSE); //build truck even if not idle
}
//Update statistics if started building a truck
if(_bStartedBuilding)

View File

@ -325,6 +325,7 @@ run
// SENSORS / REPAIR TEMPLATES
constructor TEMPLATE "ConstructorDroid"
hovertruck TEMPLATE "CobraHoverTruck"
repairUnit TEMPLATE "ViperRepairHalftrack"
numSenseTemplates int 10