aircraft_cmd.c
changeset 4529 2bfac24af02a
parent 4527 b18634a31a4a
child 4544 b2d5ad597e4d
equal deleted inserted replaced
4528:80cc2712b176 4529:2bfac24af02a
   664 	if (v->current_order.type == OT_GOTO_DEPOT &&
   664 	if (v->current_order.type == OT_GOTO_DEPOT &&
   665 			v->current_order.flags & OF_HALT_IN_DEPOT)
   665 			v->current_order.flags & OF_HALT_IN_DEPOT)
   666 		return;
   666 		return;
   667 
   667 
   668 	if (_patches.gotodepot && VehicleHasDepotOrders(v)) return;
   668 	if (_patches.gotodepot && VehicleHasDepotOrders(v)) return;
       
   669 
       
   670 	if (IsAircraftInHangar(v)) {
       
   671 		VehicleServiceInDepot(v);
       
   672 		return;
       
   673 	}
   669 
   674 
   670 	st = GetStation(v->current_order.dest);
   675 	st = GetStation(v->current_order.dest);
   671 	// only goto depot if the target airport has terminals (eg. it is airport)
   676 	// only goto depot if the target airport has terminals (eg. it is airport)
   672 	if (IsValidStation(st) && st->airport_tile != 0 && GetAirport(st->airport_type)->terminals != NULL) {
   677 	if (IsValidStation(st) && st->airport_tile != 0 && GetAirport(st->airport_type)->terminals != NULL) {
   673 //		printf("targetairport = %d, st->index = %d\n", v->u.air.targetairport, st->index);
   678 //		printf("targetairport = %d, st->index = %d\n", v->u.air.targetairport, st->index);