don't let the ai choose their advancements off-turn

this gives errors when attempting to load  the "ai state" for that side.
In particular when its currently another ai sides turn so that another
"ai state" is already loaded.
This commit is contained in:
gfgtdf 2020-09-29 16:09:27 +02:00 committed by GitHub
parent 444c0a4182
commit dc61150bec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -206,7 +206,7 @@ namespace
{
res = advance_unit_dialog(loc_);
}
else if(t.is_local_ai() || t.is_network_ai() || t.is_empty())
else if(is_current_side && (t.is_local_ai() || t.is_network_ai() || t.is_empty()))
{
res = randomness::generator->get_random_int(0, nb_options_-1);