improve performance of :droid when sides are idle

This commit is contained in:
Chris Beck 2014-02-21 17:54:25 -05:00
parent c8c2f453ea
commit c0984d616e

View file

@ -2665,7 +2665,7 @@ void console_handler::do_droid() {
symbols["side"] = lexical_cast<std::string>(side);
command_failed(vgettext("Can't droid networked side: '$side'.", symbols));
return;
} else if (menu_handler_.teams_[side - 1].is_human() && action != " off") {
} else if ((menu_handler_.teams_[side - 1].is_human() || menu_handler_.teams_[side - 1].is_idle()) && action != " off") {
//this is our side, so give it to AI
menu_handler_.teams_[side - 1].make_human_ai();
menu_handler_.change_controller(lexical_cast<std::string>(side),"human_ai");