0x004306D1
| 883 | |
| 884 | // 0x004306D1 |
| 885 | static void produceCompanies() |
| 886 | { |
| 887 | if (getCompetitorStartDelay() == 0 && getMaxCompetingCompanies() != 0) |
| 888 | { |
| 889 | int32_t activeCompanies = 0; |
| 890 | for (const auto& company : companies()) |
| 891 | { |
| 892 | if (!isPlayerCompany(company.id())) |
| 893 | { |
| 894 | activeCompanies++; |
| 895 | } |
| 896 | } |
| 897 | |
| 898 | auto& prng = gPrng1(); |
| 899 | if (prng.randNext(16) == 0) |
| 900 | { |
| 901 | if (prng.randNext(getMaxCompetingCompanies()) + 1 > activeCompanies) |
| 902 | { |
| 903 | createAiCompany(); |
| 904 | } |
| 905 | } |
| 906 | } |
| 907 | } |
| 908 | |
| 909 | Company* getOpponent() |
| 910 | { |
no test coverage detected