summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2008-02-28 21:44:13 +0000
committerpeter1138 <peter1138@openttd.org>2008-02-28 21:44:13 +0000
commit034649e7f5649296c97a5b136063d9c931aa71d3 (patch)
treea24bb1f4bac4c513f7aed8cee83761b4d68e1ba5
parent35fd0dfd4ef6ddf466599404f1e3e81a7cf855ef (diff)
downloadopenttd-034649e7f5649296c97a5b136063d9c931aa71d3.tar.xz
(svn r12314) -Fix (r4896): Include prop 25 data for all train parts, not just those that carry cargo.
-rw-r--r--src/newgrf_engine.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/newgrf_engine.cpp b/src/newgrf_engine.cpp
index 60c8a49b1..0140b6a06 100644
--- a/src/newgrf_engine.cpp
+++ b/src/newgrf_engine.cpp
@@ -512,12 +512,13 @@ static uint32 VehicleGetVariable(const ResolverObject *object, byte variable, by
memset(common_subtypes, 0, sizeof(common_subtypes));
for (u = v; u != NULL; u = u->Next()) {
+ if (v->type == VEH_TRAIN) user_def_data |= u->u.rail.user_def_data;
+
/* Skip empty engines */
if (u->cargo_cap == 0) continue;
cargo_classes |= GetCargo(u->cargo_type)->classes;
common_cargos[u->cargo_type]++;
- if (v->type == VEH_TRAIN) user_def_data |= u->u.rail.user_def_data;
common_subtypes[u->cargo_subtype]++;
}