summaryrefslogtreecommitdiff
path: root/src/economy.cpp
diff options
context:
space:
mode:
authorfonsinchen <fonsinchen@openttd.org>2014-02-09 21:10:25 +0000
committerfonsinchen <fonsinchen@openttd.org>2014-02-09 21:10:25 +0000
commit88787412b6ba8eceac27faf96425a44d230551c9 (patch)
treed62c095a38824e10902acdfce91da35bacf9602d /src/economy.cpp
parenta4941e759c95f218c10c5e13854901a6fede46ed (diff)
downloadopenttd-88787412b6ba8eceac27faf96425a44d230551c9.tar.xz
(svn r26327) -Fix [FS#5901]: Take care of next_station when reassigning from MTA_DELIVER to MTA_TRANSFER.
Diffstat (limited to 'src/economy.cpp')
-rw-r--r--src/economy.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/economy.cpp b/src/economy.cpp
index dcf228111..5db7061bf 100644
--- a/src/economy.cpp
+++ b/src/economy.cpp
@@ -1509,8 +1509,8 @@ static void LoadUnloadVehicle(Vehicle *front)
/* The station does not accept our goods anymore. */
if (front->current_order.GetUnloadType() & (OUFB_TRANSFER | OUFB_UNLOAD)) {
/* Transfer instead of delivering. */
- v->cargo.Reassign(v->cargo.ActionCount(VehicleCargoList::MTA_DELIVER),
- VehicleCargoList::MTA_DELIVER, VehicleCargoList::MTA_TRANSFER);
+ v->cargo.Reassign<VehicleCargoList::MTA_DELIVER, VehicleCargoList::MTA_TRANSFER>(
+ v->cargo.ActionCount(VehicleCargoList::MTA_DELIVER), INVALID_STATION);
} else {
uint new_remaining = v->cargo.RemainingCount() + v->cargo.ActionCount(VehicleCargoList::MTA_DELIVER);
if (v->cargo_cap < new_remaining) {
@@ -1519,8 +1519,8 @@ static void LoadUnloadVehicle(Vehicle *front)
}
/* Keep instead of delivering. This may lead to no cargo being unloaded, so ...*/
- v->cargo.Reassign(v->cargo.ActionCount(VehicleCargoList::MTA_DELIVER),
- VehicleCargoList::MTA_DELIVER, VehicleCargoList::MTA_KEEP);
+ v->cargo.Reassign<VehicleCargoList::MTA_DELIVER, VehicleCargoList::MTA_KEEP>(
+ v->cargo.ActionCount(VehicleCargoList::MTA_DELIVER));
/* ... say we unloaded something, otherwise we'll think we didn't unload
* something and we didn't load something, so we must be finished