@ -1280,11 +1280,13 @@ CommandCost CmdModifyOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
case DA_SERVICE :
order - > SetDepotOrderType ( ( OrderDepotTypeFlags ) ( order - > GetDepotOrderType ( ) | ODTFB_SERVICE ) ) ;
order - > SetDepotActionType ( ( OrderDepotActionFlags ) ( order - > GetDepotActionType ( ) & ~ ODATFB_HALT ) ) ;
order - > SetRefit ( CT_NO_REFIT ) ;
break ;
case DA_STOP :
order - > SetDepotOrderType ( ( OrderDepotTypeFlags ) ( order - > GetDepotOrderType ( ) & ~ ODTFB_SERVICE ) ) ;
order - > SetDepotActionType ( ( OrderDepotActionFlags ) ( order - > GetDepotActionType ( ) | ODATFB_HALT ) ) ;
order - > SetRefit ( CT_NO_REFIT ) ;
break ;
default :
@ -1529,6 +1531,12 @@ CommandCost CmdOrderRefit(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
if ( flags & DC_EXEC ) {
order - > SetRefit ( cargo , subtype ) ;
/* Make the depot order an 'always go' order. */
if ( cargo ! = CT_NO_REFIT ) {
order - > SetDepotOrderType ( ( OrderDepotTypeFlags ) ( order - > GetDepotOrderType ( ) & ~ ODTFB_SERVICE ) ) ;
order - > SetDepotActionType ( ( OrderDepotActionFlags ) ( order - > GetDepotActionType ( ) & ~ ODATFB_HALT ) ) ;
}
for ( Vehicle * u = v - > FirstShared ( ) ; u ! = NULL ; u = u - > NextShared ( ) ) {
/* Update any possible open window of the vehicle */
InvalidateVehicleOrder ( u , - 2 ) ;