forked from mirrors/0ad
7b1d4426aa
If the region analysis at the start of the game fails, the bot can't actually play and the managers aren't initialised. And to prevent errors from the update functions, the OnUpdate at the root had an early return if the entity count was 0. However, in some edge cases the region analysis can fail even if the AI has entities. This patch fixes this potential error by storing the result of the region analysis directly and checking that instead.