I'm not quite sure if this is the case but it seems to me that the destructor of any instance of aai is not called when quitting the game if i hosted as a spectator
however it works normally when hosting as a player. does anyone know why?
AI desctructor not called when hosting as spectator
Moderators: hoijui, Moderators
I just experimented a bit with rts/ExternalAI/GlobalAI.cpp, and it appears that (at least on Linux) IsCInterface must explicitly be set to false (if _IsCInterface == 0) for ReleaseAI(), and thus by extension your AI's destructor, to be called in CGlobalAI::~CGlobalAI(). I'll submit a patch so that this is done.
edit: submitted
edit: submitted