Changeset - r10942:52ba61ff5851
[Not reviewed]
master
0 1 0
smatz - 16 years ago 2009-01-27 01:15:29
smatz@openttd.org
(svn r15281) -Fix: company could never have auto-assigned colour 0 (dark blue)
1 file changed with 6 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/company_cmd.cpp
Show inline comments
 
@@ -330,7 +330,7 @@ static const Colours _similar_colour[COL
 
	{ COLOUR_GREY,       INVALID_COLOUR    }, // COLOUR_WHITE
 
};
 

	
 
static byte GenerateCompanyColour()
 
static Colours GenerateCompanyColour()
 
{
 
	Colours colours[COLOUR_END];
 

	
 
@@ -426,10 +426,13 @@ Company *DoStartupNewCompany(bool is_ai)
 
{
 
	if (!Company::CanAllocateItem()) return NULL;
 

	
 
	/* we have to generate colour before this company is valid */
 
	Colours colour = GenerateCompanyColour();
 

	
 
	Company *c = new Company(STR_SV_UNNAMED, is_ai);
 

	
 
	/* Make a color */
 
	c->colour = GenerateCompanyColour();
 
	c->colour = colour;
 

	
 
	ResetCompanyLivery(c);
 
	_company_colours[c->index] = c->colour;
 

	
0 comments (0 inline, 0 general)