From 5167f2be29957bd96d06b0103f448b25a20691be Mon Sep 17 00:00:00 2001 From: frosch Date: Sun, 19 Feb 2012 18:34:24 +0000 Subject: (svn r23965) -Fix [FS#5070]: Refittability should never depend on the current capacity of a vehicle. --- src/autoreplace_cmd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/autoreplace_cmd.cpp') diff --git a/src/autoreplace_cmd.cpp b/src/autoreplace_cmd.cpp index 87ff69449..31bf75dee 100644 --- a/src/autoreplace_cmd.cpp +++ b/src/autoreplace_cmd.cpp @@ -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; } -- cgit v1.2.3-54-g00ecf