(svn r23965) -Fix [FS#5070]: Refittability should never depend on the current capacity of a vehicle.

This commit is contained in:
frosch
2012-02-19 18:34:24 +00:00
parent 3d6f8cd7d4
commit 5167f2be29
3 changed files with 10 additions and 10 deletions

View File

@@ -498,7 +498,7 @@ static uint32 VehicleGetVariable(Vehicle *v, const ResolverObject *object, byte
if (v->type == VEH_TRAIN) user_def_data |= Train::From(u)->tcache.user_def_data;
/* Skip empty engines */
if (u->cargo_cap == 0) continue;
if (!u->GetEngine()->CanCarryCargo()) continue;
cargo_classes |= CargoSpec::Get(u->cargo_type)->classes;
common_cargoes[u->cargo_type]++;
@@ -516,7 +516,7 @@ static uint32 VehicleGetVariable(Vehicle *v, const ResolverObject *object, byte
/* Count subcargo types of common_cargo_type */
for (u = v; u != NULL; u = u->Next()) {
/* Skip empty engines and engines not carrying common_cargo_type */
if (u->cargo_cap == 0 || u->cargo_type != common_cargo_type) continue;
if (u->cargo_type != common_cargo_type || !u->GetEngine()->CanCarryCargo()) continue;
common_subtypes[u->cargo_subtype]++;
}