mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r15282) -Fix: it was possible to start more than MAX_COMPANIES companies
This commit is contained in:
parent
9cf1a19762
commit
7d45e8b376
|
@ -424,7 +424,7 @@ void ResetCompanyLivery(Company *c)
|
|||
*/
|
||||
Company *DoStartupNewCompany(bool is_ai)
|
||||
{
|
||||
if (!Company::CanAllocateItem()) return NULL;
|
||||
if (ActiveCompanyCount() == MAX_COMPANIES || !Company::CanAllocateItem()) return NULL;
|
||||
|
||||
/* we have to generate colour before this company is valid */
|
||||
Colours colour = GenerateCompanyColour();
|
||||
|
|
Loading…
Reference in New Issue