Loading

Paste #pzbubvo7n

  1.     if (_game_mode != GM_MENU && AI::CanStartNew() && --_next_competitor_start == 0) {
  2.         /* Allow multiple AIs to possibly start in the same tick. */
  3.         do {
  4.             Backup<CompanyByte> cur_company(_current_company, FILE_LINE);
  5.             bool failed_to_start = !MaybeStartNewCompany();
  6.             cur_company.Restore();
  7.             if (failed_to_start) break;
  8. #ifdef ENABLE_NETWORK
  9.             /* In networking mode, we can only send a command to start but it
  10.              * didn't execute yet, so we cannot loop. */
  11.             if (_networking) break;
  12. #endif /* ENABLE_NETWORK */
  13.         } while (AI::GetStartNextTime() == 0);
  14.     }

Comments