aircraft_cmd.c
changeset 4519 1437b1e7416c
parent 4510 071bca98c577
child 4526 77ef74d28e76
equal deleted inserted replaced
4518:8c3411b8d4c0 4519:1437b1e7416c
   510 	v = GetVehicle(p1);
   510 	v = GetVehicle(p1);
   511 
   511 
   512 	if (v->type != VEH_Aircraft || !CheckOwnership(v->owner)) return CMD_ERROR;
   512 	if (v->type != VEH_Aircraft || !CheckOwnership(v->owner)) return CMD_ERROR;
   513 
   513 
   514 	if (v->current_order.type == OT_GOTO_DEPOT && !(p2 & DEPOT_LOCATE_HANGAR)) {
   514 	if (v->current_order.type == OT_GOTO_DEPOT && !(p2 & DEPOT_LOCATE_HANGAR)) {
   515 		if ((p2 & DEPOT_SERVICE) == (bool)HASBIT(v->current_order.flags, OFB_HALT_IN_DEPOT)) {
   515 		if (!!(p2 & DEPOT_SERVICE) == HASBIT(v->current_order.flags, OFB_HALT_IN_DEPOT)) {
   516 			/* We called with a different DEPOT_SERVICE setting.
   516 			/* We called with a different DEPOT_SERVICE setting.
   517 			 * Now we change the setting to apply the new one and let the vehicle head for the same hangar.
   517 			 * Now we change the setting to apply the new one and let the vehicle head for the same hangar.
   518 			 * Note: the if is (true for requesting service == true for ordered to stop in hangar)          */
   518 			 * Note: the if is (true for requesting service == true for ordered to stop in hangar)          */
   519 			if (flags & DC_EXEC) {
   519 			if (flags & DC_EXEC) {
   520 				TOGGLEBIT(v->current_order.flags, OFB_HALT_IN_DEPOT);
   520 				TOGGLEBIT(v->current_order.flags, OFB_HALT_IN_DEPOT);