INNER CODE UNIT · C
worker
acoto87/war1 · src/war_ai.c:108
WarUnitType worker = wu_getUnitTypeForRace(WAR_UNIT_PEASANT, aiPlayer->race);
WarAICommandListAdd(commands, wai_createUnitRequest(context, aiPlayer, worker, 2));
WarAICommandListAdd(commands, wai_createWaitForUnit(context, aiPlayer, worker, 2));
WarAICommandListAdd(commands, wai_createUnitRequest(context, aiPlayer, worker, 2));
WarAICommandListAdd(commands, wai_createWaitForUnit(context, aiPlayer, worker, 4));
ai->customData = customData;
}
WarAICommand* wai_getNextAICommand(WarContext* context, WarPlayerInfo* aiPlayer)
{
WarAI* ai = aiPlayer->ai;
assert(ai);
WarAICustomData* customData = (WarAICustomData*)ai->customData;
assert(customData);
if (customData->index < customData->commands.count)