diff options
author | rubidium <rubidium@openttd.org> | 2007-08-26 13:55:36 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-08-26 13:55:36 +0000 |
commit | a0d37ea7b9e26c7f918883262160e76f004e7e8f (patch) | |
tree | a1ad1c541e93eb8285d8b94ff26ffc3a974a4489 /src/economy.cpp | |
parent | 36c5b4e1ef8f15cc6a79447bc95cffef82d2eb32 (diff) | |
download | openttd-a0d37ea7b9e26c7f918883262160e76f004e7e8f.tar.xz |
(svn r10981) -Fix [FS#1156] (r10970): stations gave ratings for accepted cargo too.
Diffstat (limited to 'src/economy.cpp')
-rw-r--r-- | src/economy.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/economy.cpp b/src/economy.cpp index 2c9dc29d5..2a42a13c7 100644 --- a/src/economy.cpp +++ b/src/economy.cpp @@ -1429,7 +1429,7 @@ void VehiclePayment(Vehicle *front_v) CargoPacket *cp = *it; if (!cp->paid_for && cp->source != last_visited && - ge->acceptance && + HASBIT(ge->acceptance_pickup, GoodsEntry::ACCEPTANCE) && (front_v->current_order.flags & OF_TRANSFER) == 0) { /* Deliver goods to the station */ st->time_since_unload = 0; @@ -1545,13 +1545,14 @@ static void LoadUnloadVehicle(Vehicle *v, int *cargo_left) uint amount_unloaded = _patches.gradual_loading ? min(cargo_count, load_amount) : cargo_count; bool remaining; // Are there cargo entities in this vehicle that can still be unloaded here? - if (ge->acceptance && !(u->current_order.flags & OF_TRANSFER)) { + if (HASBIT(ge->acceptance_pickup, GoodsEntry::ACCEPTANCE) && !(u->current_order.flags & OF_TRANSFER)) { /* The cargo has reached it's final destination, the packets may now be destroyed */ remaining = v->cargo.MoveTo(NULL, amount_unloaded, CargoList::MTA_FINAL_DELIVERY, last_visited); result |= 1; } else if (u->current_order.flags & (OF_UNLOAD | OF_TRANSFER)) { remaining = v->cargo.MoveTo(&ge->cargo, amount_unloaded); + SETBIT(ge->acceptance_pickup, GoodsEntry::PICKUP); result |= 2; } else { @@ -1628,10 +1629,12 @@ static void LoadUnloadVehicle(Vehicle *v, int *cargo_left) ge->cargo.MoveTo(&v->cargo, cap, CargoList::MTA_CARGO_LOAD, st->xy); - unloading_time += cap; + SETBIT(ge->acceptance_pickup, GoodsEntry::PICKUP); st->time_since_load = 0; st->last_vehicle_type = v->type; + unloading_time += cap; + result |= 2; } |