(svn r9833) -Fix: also 'leave' the station when leaving for automatic servicing.
--- a/src/aircraft_cmd.cpp Sun May 13 22:10:04 2007 +0000
+++ b/src/aircraft_cmd.cpp Mon May 14 08:07:20 2007 +0000
@@ -719,6 +719,7 @@
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);
--- a/src/roadveh_cmd.cpp Sun May 13 22:10:04 2007 +0000
+++ b/src/roadveh_cmd.cpp Mon May 14 08:07:20 2007 +0000
@@ -1686,6 +1686,9 @@
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;
--- a/src/ship_cmd.cpp Sun May 13 22:10:04 2007 +0000
+++ b/src/ship_cmd.cpp Mon May 14 08:07:20 2007 +0000
@@ -165,6 +165,7 @@
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;