summaryrefslogtreecommitdiff
path: root/src/economy.cpp
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2011-11-04 15:04:24 +0000
committermichi_cc <michi_cc@openttd.org>2011-11-04 15:04:24 +0000
commitad2fdd8d6fefe8cde63aa4147ae5cd77ebae49d5 (patch)
treea2d4023cab37416a582f13f59d057126e3dee4cf /src/economy.cpp
parent9782b7bb0af914d749b125c3a0ae56cccc99c8e3 (diff)
downloadopenttd-ad2fdd8d6fefe8cde63aa4147ae5cd77ebae49d5.tar.xz
(svn r23111) -Fix: Keep subtype when automatically choosing the cargo for auto-refitting.
Diffstat (limited to 'src/economy.cpp')
-rw-r--r--src/economy.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/economy.cpp b/src/economy.cpp
index 2480be14f..5ba852bc6 100644
--- a/src/economy.cpp
+++ b/src/economy.cpp
@@ -1300,6 +1300,7 @@ static void LoadUnloadVehicle(Vehicle *front, int *cargo_left)
if (cargo_left[cid] > amount) {
/* Try to find out if auto-refitting would succeed. In case the refit is allowed,
* the returned refit capacity will be greater than zero. */
+ new_subtype = GetBestFittingSubType(v, v, cid);
DoCommand(v->tile, v->index, cid | 1U << 6 | new_subtype << 8 | 1U << 16, DC_QUERY_COST, GetCmdRefitVeh(v)); // Auto-refit and only this vehicle including artic parts.
if (_returned_refit_capacity > 0) {
amount = cargo_left[cid];