summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-04-08 18:53:25 +0000
committerrubidium <rubidium@openttd.org>2008-04-08 18:53:25 +0000
commit3abf0eea7c3461632c252e91b557bd0f71dc5b2a (patch)
tree88126f7e4e6edb090b0494e1b00c77004bea49b7
parent85e5053b68c4861b51ff4ae377d4fee8ef2ffecf (diff)
downloadopenttd-3abf0eea7c3461632c252e91b557bd0f71dc5b2a.tar.xz
(svn r12631) -Fix [FS#1911]: sometimes aircraft couldn't find their way to their depot.
-rw-r--r--src/aircraft_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp
index 4a94f95b0..83d452b12 100644
--- a/src/aircraft_cmd.cpp
+++ b/src/aircraft_cmd.cpp
@@ -714,7 +714,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;
- 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();