708 const Station *st = GetStation(v->current_order.GetDestination()); |
708 const Station *st = GetStation(v->current_order.GetDestination()); |
709 /* only goto depot if the target airport has terminals (eg. it is airport) */ |
709 /* only goto depot if the target airport has terminals (eg. it is airport) */ |
710 if (st->IsValid() && st->airport_tile != 0 && st->Airport()->terminals != NULL) { |
710 if (st->IsValid() && st->airport_tile != 0 && st->Airport()->terminals != NULL) { |
711 // printf("targetairport = %d, st->index = %d\n", v->u.air.targetairport, st->index); |
711 // printf("targetairport = %d, st->index = %d\n", v->u.air.targetairport, st->index); |
712 // v->u.air.targetairport = st->index; |
712 // v->u.air.targetairport = st->index; |
713 v->current_order.MakeGoToDepot(INVALID_STATION, false); |
713 v->current_order.MakeGoToDepot(0, false); |
714 InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH); |
714 InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH); |
715 } else if (v->current_order.IsType(OT_GOTO_DEPOT)) { |
715 } else if (v->current_order.IsType(OT_GOTO_DEPOT)) { |
716 v->current_order.MakeDummy(); |
716 v->current_order.MakeDummy(); |
717 InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH); |
717 InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH); |
718 } |
718 } |