This is almost without a doubt caused by the ai, game and map globals set before every call to the AI in AILoader.lua . Is it possible that while executing one call to one AI, another call is invoked by a UnitDead or some other Spring callin, thus switching what ai refers to?
This would all be a non-issue if the global ai object was never used, and instead everything was within modules and behaviours self.ai. But for the BA/BAR config, that would take a lot of refactoring.
see https://github.com/eronoobos/BABAR-The-Shardifant/issues/10
This is almost without a doubt caused by the
ai
,game
andmap
globals set before every call to the AI in AILoader.lua . Is it possible that while executing one call to one AI, another call is invoked by aUnitDead
or some other Spring callin, thus switching whatai
refers to?This would all be a non-issue if the global
ai
object was never used, and instead everything was within modules and behavioursself.ai
. But for the BA/BAR config, that would take a lot of refactoring.