equal
deleted
inserted
replaced
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 } |