So yeah, I've been in the programming mood again lately and I have been taking a second look at this code.
So broke down the giant if statements into switch/case statements. I also fixed a bug or two.
And I have been struggling to find a way to use purely actions instead of orders as some of you requested. But the build actions are tightly woven into build orders. I have not found a reliable way to just use actions. Best I found was this:
Code: Select all
psDroid->psTarStats = (BASE_STATS*) &asStructureStats[i];
psDroid->order = DORDER_BUILD;
psDroid->orderX = (UWORD)psFeature->pos.x;
psDroid->orderY = (UWORD)psFeature->pos.y;
actionDroidLoc(psDroid, DACTION_BUILD,
psFeature->pos.x, psFeature->pos.y);
anyway, let me know your thoughts.