(svn r22589) -Fix [FS#4641]: PBS order forecasting modified the current order index in case of a goto-nearest-depot order and no depot could be found.

This commit is contained in:
frosch
2011-06-14 19:19:13 +00:00
parent 52a3842fe3
commit f71a96d584
3 changed files with 13 additions and 5 deletions

View File

@@ -2340,8 +2340,7 @@ public:
case OT_GOTO_STATION:
case OT_GOTO_WAYPOINT:
this->v->current_order = *order;
UpdateOrderDest(this->v, order);
return true;
return UpdateOrderDest(this->v, order, 0, true);
case OT_CONDITIONAL: {
if (conditional_depth > this->v->GetNumOrders()) return false;
VehicleOrderID next = ProcessConditionalOrder(order, this->v);