src/ship_cmd.cpp
changeset 8047 bcc7782ef238
parent 7998 f1a308b61b8f
child 8138 7dc73953c47e
equal deleted inserted replaced
8046:41a55e6389c3 8047:bcc7782ef238
  1002 		if (!!(p2 & DEPOT_SERVICE) == HASBIT(v->current_order.flags, OFB_HALT_IN_DEPOT)) {
  1002 		if (!!(p2 & DEPOT_SERVICE) == HASBIT(v->current_order.flags, OFB_HALT_IN_DEPOT)) {
  1003 			/* We called with a different DEPOT_SERVICE setting.
  1003 			/* We called with a different DEPOT_SERVICE setting.
  1004 			 * Now we change the setting to apply the new one and let the vehicle head for the same depot.
  1004 			 * Now we change the setting to apply the new one and let the vehicle head for the same depot.
  1005 			 * Note: the if is (true for requesting service == true for ordered to stop in depot)          */
  1005 			 * Note: the if is (true for requesting service == true for ordered to stop in depot)          */
  1006 			if (flags & DC_EXEC) {
  1006 			if (flags & DC_EXEC) {
       
  1007 				CLRBIT(v->current_order.flags, OFB_PART_OF_ORDERS);
  1007 				TOGGLEBIT(v->current_order.flags, OFB_HALT_IN_DEPOT);
  1008 				TOGGLEBIT(v->current_order.flags, OFB_HALT_IN_DEPOT);
  1008 				InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR);
  1009 				InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR);
  1009 			}
  1010 			}
  1010 			return CommandCost();
  1011 			return CommandCost();
  1011 		}
  1012 		}