@@ -377,26 +377,26 @@ int32 CmdSendRoadVehToDepot(TileIndex ti
v = GetVehicle(p1);
if (v->type != VEH_Road || !CheckOwnership(v->owner)) return CMD_ERROR;
if (v->vehstatus & VS_CRASHED) return CMD_ERROR;
if (IsRoadVehInDepot(v)) return CMD_ERROR;
/* If the current orders are already goto-depot */
if (v->current_order.type == OT_GOTO_DEPOT) {
if (!!(p2 & DEPOT_SERVICE) == HASBIT(v->current_order.flags, OFB_HALT_IN_DEPOT)) {
/* We called with a different DEPOT_SERVICE setting.
* Now we change the setting to apply the new one and let the vehicle head for the same depot.
* Note: the if is (true for requesting service == true for ordered to stop in depot) */
if (flags & DC_EXEC) {
TOGGLEBIT(v->current_order.flags, OFB_HALT_IN_DEPOT);
InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR);
}
return 0;
if (p2 & DEPOT_DONT_CANCEL) return CMD_ERROR; // Requested no cancelation of depot orders
/* If the orders to 'goto depot' are in the orders list (forced servicing),
* then skip to the next order; effectively cancelling this forced service */
if (HASBIT(v->current_order.flags, OFB_PART_OF_ORDERS))