Closed joaomarcoscsilva closed 6 years ago
That was a bug I created when I added the observer patch (which allows observers in slot 5-10 on a 4 player map).
I'm reviewing this now.
Since @mathusummut primarily handles the source code now, I'll want to give him the opportunity to review before merging.
Thanks @JoaoMarcosCSilva !
This fixes the problem when choosing the faction of an AI in the custom game screen (Issue #184) The problem was happening because the menu_state_custom_game automatically changed the faction selection from Observed to index 0 (Brisith/ Magic), since AI can't be an Observer. To fix that, I created a new class GraphicListBoxFactions that works exactly the same as the normal GraphicListBox, but every time the user press one of the buttons it checks if it currently represents an AI Observer, and then changes the selection accordingly.