diff options
author | rubidium <rubidium@openttd.org> | 2008-04-06 07:48:51 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-04-06 07:48:51 +0000 |
commit | d6623cf6541af8cb27359b59b97cb9e47f61bd0e (patch) | |
tree | bf63686bb4da660cbcdc1074a869b5b86df60166 /src/station_cmd.cpp | |
parent | 8cd1795fe32fc2afaa75f48b8b62ff992bf8f618 (diff) | |
download | openttd-d6623cf6541af8cb27359b59b97cb9e47f61bd0e.tar.xz |
(svn r12588) -Codechange: do not access the destination of an order directly.
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r-- | src/station_cmd.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index b8490960f..fad63166c 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -1898,7 +1898,7 @@ bool HasStationInUse(StationID station, PlayerID player) 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; } } @@ -2437,7 +2437,7 @@ static VehicleEnterTileStatus VehicleEnter_Station(Vehicle *v, TileIndex tile, i /* 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); } |