(svn r15282) -Fix: it was possible to start more than MAX_COMPANIES companies

pull/155/head
glx 16 years ago
parent 049e535065
commit a92f792433

@ -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…
Cancel
Save