Changeset - r14949:c4d08730382c
[Not reviewed]
master
0 1 0
rubidium - 14 years ago 2010-04-05 21:18:32
rubidium@openttd.org
(svn r19566) -Fix (r11216, r11202): don't return a random colour for unowned industries in var 45; TTDPatch doesn't seem to set the colour data in that case either.
1 file changed with 1 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/newgrf_industries.cpp
Show inline comments
 
@@ -218,7 +218,7 @@ uint32 IndustryGetVariable(const Resolve
 

	
 
		/* Company info */
 
		case 0x45: {
 
			byte colours;
 
			byte colours = 0;
 
			bool is_ai = false;
 

	
 
			const Company *c = Company::GetIfValid(industry->founder);
 
@@ -227,8 +227,6 @@ uint32 IndustryGetVariable(const Resolve
 

	
 
				is_ai = c->is_ai;
 
				colours = l->colour1 + l->colour2 * 16;
 
			} else {
 
				colours = GB(Random(), 0, 8);
 
			}
 

	
 
			return industry->founder | (is_ai ? 0x10000 : 0) | (colours << 24);
0 comments (0 inline, 0 general)