Old revision #pxd5mqdhw | New revision #pd6hcz4nz | ||
---|---|---|---|
3 | do { | 3 | do { |
4 | if (_networking && num_companies + num_to_start >= _settings_client.network.max_companies) break; | 4 | if (_networking && num_companies + num_to_start >= _settings_client.network.max_companies) break; |
5 | if (num_ais + num_to_start >= (uint)_settings_game.difficulty.max_no_competitors) break; | 5 | if (num_ais + num_to_start >= (uint)_settings_game.difficulty.max_no_competitors) break; |
6 | } while ((uint)_settings_game.difficulty.max_no_competitors - ++num_to_start > 0 && AI::GetStartNextTime(num_to_start) == 0); | 6 | num_to_start++; |
7 | } while (AI::GetStartNextTime(num_to_start) == 0); | ||
7 | 8 | ||
8 | uint num_to_start_for; | 9 | uint num_to_start_for = 0; |
9 | for (num_to_start_for = 0; (uint)_settings_game.difficulty.max_no_competitors - num_to_start_for > 0; num_to_start_for++) { | 10 | for (;; num_to_start_for++) { |
11 | if (AI::GetStartNextTime(num_to_start_for) != 0) break; | ||
10 | if (_networking && num_companies + num_to_start_for >= _settings_client.network.max_companies) break; | 12 | if (_networking && num_companies + num_to_start_for >= _settings_client.network.max_companies) break; |
11 | if (num_ais + num_to_start_for >= (uint)_settings_game.difficulty.max_no_competitors) break; | 13 | if (num_ais + num_to_start_for >= (uint)_settings_game.difficulty.max_no_competitors) break; |
12 | |||
13 | } | 14 | } |
14 | assert(num_to_start == num_to_start_for); | 15 | assert(num_to_start == num_to_start_for); |