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