summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-04-05 21:18:32 +0000
committerrubidium <rubidium@openttd.org>2010-04-05 21:18:32 +0000
commit20f9379529c45deb961008458d352d720ba33d74 (patch)
tree239a5443433bff12710b2bd7b20fbd7b6de331d8 /src
parentbc925c0016e98f09d2fcef582d68ab8e59060d73 (diff)
downloadopenttd-20f9379529c45deb961008458d352d720ba33d74.tar.xz
(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.
Diffstat (limited to 'src')
-rw-r--r--src/newgrf_industries.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/newgrf_industries.cpp b/src/newgrf_industries.cpp
index f5d5301fa..ee7eaf4ef 100644
--- a/src/newgrf_industries.cpp
+++ b/src/newgrf_industries.cpp
@@ -218,7 +218,7 @@ uint32 IndustryGetVariable(const ResolverObject *object, byte variable, byte par
/* 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 ResolverObject *object, byte variable, byte par
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);