(svn r22331) -Change: When inserting an (automatic) order A in front of an order B, disable modifications of automatic orders for all vehicles currently heading for B as we do not know whether they will reach A or B first. (except for the vehicle causing the insertion of the automatic order itself)

This commit is contained in:
frosch
2011-04-16 17:06:59 +00:00
parent 181fd5e3ab
commit 8dd2f413bd
2 changed files with 12 additions and 0 deletions

View File

@@ -1870,6 +1870,11 @@ void Vehicle::BeginLoading()
auto_order->MakeAutomatic(this->last_station_visited);
InsertOrder(this, auto_order, this->cur_auto_order_index);
if (this->cur_auto_order_index > 0) --this->cur_auto_order_index;
/* InsertOrder disabled creation of automatic orders for all vehicles with the same automatic order.
* Reenable it for this vehicle */
uint16 &gv_flags = this->GetGroundVehicleFlags();
ClrBit(gv_flags, GVF_SUPPRESS_AUTOMATIC_ORDERS);
}
this->current_order.MakeLoading(false);
}