if (_game_mode != GM_MENU && AI::CanStartNew() && --_next_competitor_start == 0) { /* Allow multiple AIs to possibly start in the same tick. */ do { Backup cur_company(_current_company, FILE_LINE); bool failed_to_start = !MaybeStartNewCompany(); cur_company.Restore(); if (failed_to_start) break; #ifdef ENABLE_NETWORK /* In networking mode, we can only send a command to start but it * didn't execute yet, so we cannot loop. */ if (_networking) break; #endif /* ENABLE_NETWORK */ } while (AI::GetStartNextTime() == 0); }