mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-31 18:39:10 +00:00
(svn r12314) -Fix (r4896): Include prop 25 data for all train parts, not just those that carry cargo.
This commit is contained in:
@@ -512,12 +512,13 @@ static uint32 VehicleGetVariable(const ResolverObject *object, byte variable, by
|
|||||||
memset(common_subtypes, 0, sizeof(common_subtypes));
|
memset(common_subtypes, 0, sizeof(common_subtypes));
|
||||||
|
|
||||||
for (u = v; u != NULL; u = u->Next()) {
|
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 */
|
/* Skip empty engines */
|
||||||
if (u->cargo_cap == 0) continue;
|
if (u->cargo_cap == 0) continue;
|
||||||
|
|
||||||
cargo_classes |= GetCargo(u->cargo_type)->classes;
|
cargo_classes |= GetCargo(u->cargo_type)->classes;
|
||||||
common_cargos[u->cargo_type]++;
|
common_cargos[u->cargo_type]++;
|
||||||
if (v->type == VEH_TRAIN) user_def_data |= u->u.rail.user_def_data;
|
|
||||||
common_subtypes[u->cargo_subtype]++;
|
common_subtypes[u->cargo_subtype]++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user