(svn r23111) -Fix: Keep subtype when automatically choosing the cargo for auto-refitting.

This commit is contained in:
michi_cc
2011-11-04 15:04:24 +00:00
parent 9782b7bb0a
commit ad2fdd8d6f
3 changed files with 9 additions and 4 deletions

View File

@@ -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];