(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 e89312ef30
commit fb9562c83a
3 changed files with 10 additions and 10 deletions

View File

@@ -206,7 +206,7 @@ static CargoID GetNewCargoTypeForReplace(Vehicle *v, EngineID engine_type, bool
* now we will figure out what cargo the train is carrying and refit to fit this */
for (v = v->First(); v != NULL; v = v->Next()) {
if (v->cargo_cap == 0) continue;
if (!v->GetEngine()->CanCarryCargo()) continue;
/* Now we found a cargo type being carried on the train and we will see if it is possible to carry to this one */
if (HasBit(available_cargo_types, v->cargo_type)) return v->cargo_type;
}