When ordering CMD_SELFD, AAI sometimes crashes (though the crash doenst occur in AAI itself but in spring.exe) although i'm sure, that the unit id of the building/unit is valid
is use the unit id as the first param. is there anything wrong with that? most of the time it works fine, it just sometimes causes problems
Selfdestructing units
Moderators: hoijui, Moderators
I wasnt aware the command needed a parameter, usually:
should suffice. Look at the kamikaze routine in NTai
Code: Select all
Command c;
c.id = CMD_SELFD;
int result = cb->giveorder(unit,&c);
When you're not sure how a command works you can always look in the CommandAI directory (rts/Sim/Units/CommandAI)
This is where the commands are converted to actual unit behavior.
http://svn.berlios.de/svnroot/repos/tas ... CommandAI/
This is where the commands are converted to actual unit behavior.
http://svn.berlios.de/svnroot/repos/tas ... CommandAI/
Yep, and its pretty easy to understand compared to the rest of the spring codeZaphod wrote:When you're not sure how a command works you can always look in the CommandAI directory (rts/Sim/Units/CommandAI)
This is where the commands are converted to actual unit behavior.
http://svn.berlios.de/svnroot/repos/tas ... CommandAI/
