aircraft_cmd.c
changeset 156 8fef5e5752d6
parent 99 66c0918845af
child 164 0cbdf3c9bde1
equal deleted inserted replaced
155:81e9878f3678 156:8fef5e5752d6
   527 	Station *st;
   527 	Station *st;
   528 
   528 
   529 	if (_patches.servint_aircraft == 0)
   529 	if (_patches.servint_aircraft == 0)
   530 		return;
   530 		return;
   531 
   531 
   532 	if (v->date_of_last_service + v->service_interval > _date)
   532 	if (SERVICE_INTERVAL)
   533 		return;
   533 		return;
   534 
   534 
   535 	if (v->vehstatus & VS_STOPPED)
   535 	if (v->vehstatus & VS_STOPPED)
   536 		return;
   536 		return;
   537 
   537 
  1059  		if ((v->next_order & (OT_MASK|OF_UNLOAD)) != (OT_GOTO_DEPOT|OF_UNLOAD))
  1059  		if ((v->next_order & (OT_MASK|OF_UNLOAD)) != (OT_GOTO_DEPOT|OF_UNLOAD))
  1060  			return;
  1060  			return;
  1061  	}
  1061  	}
  1062  
  1062  
  1063  	if ((v->next_order & (OT_MASK|OF_UNLOAD|OF_FULL_LOAD)) == (OT_GOTO_DEPOT|OF_UNLOAD|OF_FULL_LOAD) &&
  1063  	if ((v->next_order & (OT_MASK|OF_UNLOAD|OF_FULL_LOAD)) == (OT_GOTO_DEPOT|OF_UNLOAD|OF_FULL_LOAD) &&
  1064  		v->date_of_last_service+v->service_interval > _date) {
  1064  			SERVICE_INTERVAL) {
  1065  		v->cur_order_index++;
  1065  		v->cur_order_index++;
  1066  	}
  1066  	}
  1067 
  1067 
  1068 	if (v->cur_order_index >= v->num_orders)
  1068 	if (v->cur_order_index >= v->num_orders)
  1069 		v->cur_order_index = 0;
  1069 		v->cur_order_index = 0;