mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-09 15:41:15 +00:00
(svn r9833) -Fix: also 'leave' the station when leaving for automatic servicing.
This commit is contained in:
parent
e72ab0fdf5
commit
42f920964b
@ -719,6 +719,7 @@ static void CheckIfAircraftNeedsService(Vehicle *v)
|
||||
if (st->IsValid() && st->airport_tile != 0 && st->Airport()->terminals != NULL) {
|
||||
// printf("targetairport = %d, st->index = %d\n", v->u.air.targetairport, st->index);
|
||||
// v->u.air.targetairport = st->index;
|
||||
if (v->current_order.type == OT_LOADING) v->LeaveStation();
|
||||
v->current_order.type = OT_GOTO_DEPOT;
|
||||
v->current_order.flags = OF_NON_STOP;
|
||||
InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR);
|
||||
|
@ -1686,6 +1686,9 @@ static void CheckIfRoadVehNeedsService(Vehicle *v)
|
||||
return;
|
||||
}
|
||||
|
||||
if (v->current_order.type == OT_LOADING) v->LeaveStation();
|
||||
ClearSlot(v);
|
||||
|
||||
v->current_order.type = OT_GOTO_DEPOT;
|
||||
v->current_order.flags = OF_NON_STOP;
|
||||
v->current_order.dest = depot->index;
|
||||
|
@ -165,6 +165,7 @@ static void CheckIfShipNeedsService(Vehicle *v)
|
||||
return;
|
||||
}
|
||||
|
||||
if (v->current_order.type == OT_LOADING) v->LeaveStation();
|
||||
v->current_order.type = OT_GOTO_DEPOT;
|
||||
v->current_order.flags = OF_NON_STOP;
|
||||
v->current_order.dest = depot->index;
|
||||
|
Loading…
Reference in New Issue
Block a user