INNER CODE UNIT · C
ai
acoto87/war1 · src/war_ai.c:22
WarAI* ai = (WarAI*)wm_alloc(sizeof(WarAI));
ai->staticCommandId = 0;
ai->customData = NULL;
WarAICommandListInit(&ai->currentCommands, wm_globalAllocator());
WarAICommandQueueInit(&ai->nextCommands, wm_globalAllocator());
return ai;
}
WarAICommand* wai_createAICommand(WarContext* context, WarPlayerInfo* aiPlayer, WarAICommandType type)
{
NOT_USED(context);
WarAI* ai = aiPlayer->ai;
assert(ai);
WarAICommand* command = (WarAICommand*)wm_alloc(sizeof(WarAICommand));