(svn r12631) -Fix [FS#1911]: sometimes aircraft couldn't find their way to their depot.
authorrubidium
Tue, 08 Apr 2008 18:53:25 +0000
changeset 8864 76e142d103e9
parent 8863 8d3d2e9a89be
child 8865 723529b427d3
(svn r12631) -Fix [FS#1911]: sometimes aircraft couldn't find their way to their depot.
src/aircraft_cmd.cpp
--- a/src/aircraft_cmd.cpp	Tue Apr 08 16:15:31 2008 +0000
+++ b/src/aircraft_cmd.cpp	Tue Apr 08 18:53:25 2008 +0000
@@ -714,7 +714,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;
-		v->current_order.MakeGoToDepot(0, ODTFB_SERVICE);
+		v->current_order.MakeGoToDepot(st->index, ODTFB_SERVICE);
 		InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH);
 	} else if (v->current_order.IsType(OT_GOTO_DEPOT)) {
 		v->current_order.MakeDummy();