(svn r12935) -Fix [FS#1975]: vehicles forget their manual depot order when stopping at a station. Now we just pass through the station without stopping when a vehicle has been given a depot order.

replace/41b28d7194a279bdc17475d4fbe2ea6ec885a466
rubidium 17 years ago
parent b49b4f627f
commit d1ddff90d9

@ -1781,6 +1781,7 @@ bool Order::ShouldStopAtStation(const Vehicle *v, StationID station) const
{
bool is_dest_station = this->IsType(OT_GOTO_STATION) && this->dest == station;
return
(!this->IsType(OT_GOTO_DEPOT) || (this->GetDepotOrderType() & ODTFB_PART_OF_ORDERS) != 0) &&
v->last_station_visited != station && // Do stop only when we've not just been there
/* Finally do stop when there is no non-stop flag set for this type of station. */
!(this->GetNonStopType() & (is_dest_station ? ONSF_NO_STOP_AT_DESTINATION_STATION : ONSF_NO_STOP_AT_INTERMEDIATE_STATIONS));

Loading…
Cancel
Save