From 731685cf64088360f7bd7212b40b75a88c9059c1 Mon Sep 17 00:00:00 2001 From: frosch Date: Sat, 9 Aug 2008 16:42:55 +0000 Subject: (svn r14031) -Fix (r13850): Determining the refit cargo did not work, when the old vehicle did not carry anything but the new one did. --- 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 1a8ac4393..f4c7c9c81 100644 --- a/src/autoreplace_cmd.cpp +++ b/src/autoreplace_cmd.cpp @@ -123,7 +123,7 @@ static CargoID GetNewCargoTypeForReplace(Vehicle *v, EngineID engine_type) /* Do we have to refit the vehicle, or is it already carrying the right cargo? */ uint16 *default_capacity = GetCapacityOfArticulatedParts(engine_type, v->type); for (CargoID cid = 0; cid < NUM_CARGO; cid++) { - if (cid != cargo_type && default_capacity[cid] > 0) return cargo_type; + if (cid != v->cargo_type && default_capacity[cid] > 0) return v->cargo_type; } return CT_NO_REFIT; -- cgit v1.2.3-54-g00ecf