mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-08 23:19:40 +00:00
(svn r15298) -Fix [FS#2588]: don't start another AI company in MP when there are too many companies
This commit is contained in:
parent
a0df8d1338
commit
416c7d5dda
@ -472,11 +472,14 @@ void StartupCompanies()
|
|||||||
|
|
||||||
static void MaybeStartNewCompany()
|
static void MaybeStartNewCompany()
|
||||||
{
|
{
|
||||||
uint n;
|
#ifdef ENABLE_NETWORK
|
||||||
|
if (_networking && ActiveCompanyCount() >= _settings_client.network.max_companies) return;
|
||||||
|
#endif /* ENABLE_NETWORK */
|
||||||
|
|
||||||
Company *c;
|
Company *c;
|
||||||
|
|
||||||
/* count number of competitors */
|
/* count number of competitors */
|
||||||
n = 0;
|
uint n = 0;
|
||||||
FOR_ALL_COMPANIES(c) {
|
FOR_ALL_COMPANIES(c) {
|
||||||
if (c->is_ai) n++;
|
if (c->is_ai) n++;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user