src/aircraft_cmd.cpp
changeset 6998 403314de0154
parent 6997 bc9de79c355c
child 7042 d841fb0d8e9a
equal deleted inserted replaced
6997:bc9de79c355c 6998:403314de0154
   569 			if (station == INVALID_STATION) return CMD_ERROR;
   569 			if (station == INVALID_STATION) return CMD_ERROR;
   570 			next_airport_index = station;
   570 			next_airport_index = station;
   571 		}
   571 		}
   572 
   572 
   573 		if (flags & DC_EXEC) {
   573 		if (flags & DC_EXEC) {
       
   574 			if (v->current_order.type == OT_LOADING) v->LeaveStation();
       
   575 
   574 			v->current_order.type = OT_GOTO_DEPOT;
   576 			v->current_order.type = OT_GOTO_DEPOT;
   575 			v->current_order.flags = OF_NON_STOP;
   577 			v->current_order.flags = OF_NON_STOP;
   576 			if (!(p2 & DEPOT_SERVICE)) SETBIT(v->current_order.flags, OFB_HALT_IN_DEPOT);
   578 			if (!(p2 & DEPOT_SERVICE)) SETBIT(v->current_order.flags, OFB_HALT_IN_DEPOT);
   577 			v->current_order.refit_cargo = CT_INVALID;
   579 			v->current_order.refit_cargo = CT_INVALID;
   578 			v->current_order.dest = next_airport_index;
   580 			v->current_order.dest = next_airport_index;