@@ -1895,13 +1895,13 @@ bool HasStationInUse(StationID station,
{
const Vehicle *v;
FOR_ALL_VEHICLES(v) {
if (player == INVALID_PLAYER || v->owner == player) {
const Order *order;
FOR_VEHICLE_ORDERS(v, order) {
if (order->IsType(OT_GOTO_STATION) && order->dest == station) {
if (order->IsType(OT_GOTO_STATION) && order->GetDestination() == station) {
return true;
}
return false;
@@ -2434,13 +2434,13 @@ static VehicleEnterTileStatus VehicleEnt
byte side = ((DirToDiagDir(v->direction) == ReverseDiagDir(GetRoadStopDir(tile))) == (v->u.road.overtaking == 0)) ? 0 : 1;
if (!rs->IsFreeBay(side)) return VETSB_CANNOT_ENTER;
/* Check if the vehicle is stopping at this road stop */
if (GetRoadStopType(tile) == (IsCargoInClass(v->cargo_type, CC_PASSENGERS) ? ROADSTOP_BUS : ROADSTOP_TRUCK) &&
v->current_order.dest == GetStationIndex(tile)) {
v->current_order.GetDestination() == GetStationIndex(tile)) {
SetBit(v->u.road.state, RVS_IS_STOPPING);
rs->AllocateDriveThroughBay(side);
/* Indicate if vehicle is using second bay. */
if (side == 1) SetBit(v->u.road.state, RVS_USING_SECOND_BAY);