Mercurial > hg > openttd
diff src/economy.cpp @ 7474:7b35fd1cc99d draft
(svn r10981) -Fix [FS#1156] (r10970): stations gave ratings for accepted cargo too.
author | rubidium <rubidium@openttd.org> |
---|---|
date | Sun, 26 Aug 2007 13:55:36 +0000 |
parents | 7e4d907043ef |
children | 09743324277c |
line wrap: on
line diff
--- a/src/economy.cpp +++ b/src/economy.cpp @@ -1429,7 +1429,7 @@ 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 @@ 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 @@ 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; }