summaryrefslogtreecommitdiff
path: root/src/newgrf.cpp
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2008-03-28 02:10:25 +0000
committerglx <glx@openttd.org>2008-03-28 02:10:25 +0000
commitd4f7f5e5fe0c8288e84806183cf808c3c43251d8 (patch)
tree1db78d8debdd858913850b1dd9ad6c9113060dd2 /src/newgrf.cpp
parentb8ac06b46213c25f71dbd85ccc0c283c0528591e (diff)
downloadopenttd-d4f7f5e5fe0c8288e84806183cf808c3c43251d8.tar.xz
(svn r12454) -Fix (r12452): incorrect calculation for 'first vehicle in this chain of vehicles with the same ID' (thx DaleStan)
-Fix (r12452): wrong loading of random action 2 type 84 for non vehicle (though it shouldn't happen, but who knows ;))
Diffstat (limited to 'src/newgrf.cpp')
-rw-r--r--src/newgrf.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index 23cf67c14..b267d3198 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -2592,8 +2592,8 @@ static void NewSpriteGroup(byte *buf, int len)
group->type = SGT_RANDOMIZED;
group->g.random.var_scope = HasBit(type, 1) ? VSG_SCOPE_PARENT : VSG_SCOPE_SELF;
- if (HasBit(type, 2) && feature <= GSF_AIRCRAFT) {
- group->g.random.var_scope = VSG_SCOPE_RELATIVE;
+ if (HasBit(type, 2)) {
+ if (feature <= GSF_AIRCRAFT) group->g.random.var_scope = VSG_SCOPE_RELATIVE;
group->g.random.count = grf_load_byte(&buf);
}