Page 1 of 1
AI desctructor not called when hosting as spectator
Posted: 04 Jan 2007, 09:56
by submarine
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?
Posted: 04 Jan 2007, 14:18
by Kloot
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
Posted: 04 Jan 2007, 19:27
by submarine
that's good, thx very much :)
Posted: 04 Jan 2007, 20:34
by Tobi
patch committed.