src/roadveh_cmd.cpp
changeset 7929 6c9b25842b0f
parent 7928 63e18de69e50
child 7931 b0a46cd92225
equal deleted inserted replaced
7928:63e18de69e50 7929:6c9b25842b0f
   479 		if (!!(p2 & DEPOT_SERVICE) == HasBit(v->current_order.flags, OFB_HALT_IN_DEPOT)) {
   479 		if (!!(p2 & DEPOT_SERVICE) == HasBit(v->current_order.flags, OFB_HALT_IN_DEPOT)) {
   480 			/* We called with a different DEPOT_SERVICE setting.
   480 			/* We called with a different DEPOT_SERVICE setting.
   481 			 * Now we change the setting to apply the new one and let the vehicle head for the same depot.
   481 			 * Now we change the setting to apply the new one and let the vehicle head for the same depot.
   482 			 * Note: the if is (true for requesting service == true for ordered to stop in depot) */
   482 			 * Note: the if is (true for requesting service == true for ordered to stop in depot) */
   483 			if (flags & DC_EXEC) {
   483 			if (flags & DC_EXEC) {
   484 				CLRBIT(v->current_order.flags, OFB_PART_OF_ORDERS);
   484 				ClrBit(v->current_order.flags, OFB_PART_OF_ORDERS);
   485 				TOGGLEBIT(v->current_order.flags, OFB_HALT_IN_DEPOT);
   485 				TOGGLEBIT(v->current_order.flags, OFB_HALT_IN_DEPOT);
   486 				InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR);
   486 				InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR);
   487 			}
   487 			}
   488 			return CommandCost();
   488 			return CommandCost();
   489 		}
   489 		}
  1655 
  1655 
  1656 				/* Vehicle is leaving a road stop tile, mark bay as free
  1656 				/* Vehicle is leaving a road stop tile, mark bay as free
  1657 				 * For drive-through stops, only do it if the vehicle stopped here */
  1657 				 * For drive-through stops, only do it if the vehicle stopped here */
  1658 				if (IsStandardRoadStopTile(v->tile) || HasBit(v->u.road.state, RVS_IS_STOPPING)) {
  1658 				if (IsStandardRoadStopTile(v->tile) || HasBit(v->u.road.state, RVS_IS_STOPPING)) {
  1659 					rs->FreeBay(HasBit(v->u.road.state, RVS_USING_SECOND_BAY));
  1659 					rs->FreeBay(HasBit(v->u.road.state, RVS_USING_SECOND_BAY));
  1660 					CLRBIT(v->u.road.state, RVS_IS_STOPPING);
  1660 					ClrBit(v->u.road.state, RVS_IS_STOPPING);
  1661 				}
  1661 				}
  1662 				if (IsStandardRoadStopTile(v->tile)) rs->SetEntranceBusy(false);
  1662 				if (IsStandardRoadStopTile(v->tile)) rs->SetEntranceBusy(false);
  1663 			}
  1663 			}
  1664 		}
  1664 		}
  1665 
  1665