Mercurial > hg > openttd
changeset 17560:dc669fc9641d draft
(svn r22324) -Fix: Vehicles skipped orders when inserting automatic orders failed.
author | frosch <frosch@openttd.org> |
---|---|
date | Fri, 15 Apr 2011 19:03:55 +0000 |
parents | e72dca6bc08a |
children | 48293ebe0dac |
files | src/vehicle.cpp |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -1919,6 +1919,13 @@ this->LeaveStation(); + /* Only advance to next order if we just loaded at the current one */ + const Order *order = this->GetOrder(this->cur_auto_order_index); + if (order == NULL || + (!order->IsType(OT_AUTOMATIC) && !order->IsType(OT_GOTO_STATION)) || + order->GetDestination() != this->last_station_visited) { + return; + } break; }