summaryrefslogtreecommitdiff
path: root/src/roadveh_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-04-06 07:48:51 +0000
committerrubidium <rubidium@openttd.org>2008-04-06 07:48:51 +0000
commit935b5620744b96c6b44e20e0ea89dc7bdca127c3 (patch)
treebf63686bb4da660cbcdc1074a869b5b86df60166 /src/roadveh_cmd.cpp
parenta3224512ccbc50a2bfaf6b3375db78dc5a807dca (diff)
downloadopenttd-935b5620744b96c6b44e20e0ea89dc7bdca127c3.tar.xz
(svn r12588) -Codechange: do not access the destination of an order directly.
Diffstat (limited to 'src/roadveh_cmd.cpp')
-rw-r--r--src/roadveh_cmd.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp
index a53ed5270..b5a751e93 100644
--- a/src/roadveh_cmd.cpp
+++ b/src/roadveh_cmd.cpp
@@ -1743,7 +1743,7 @@ again:
if (IsRoadVehFront(v) && ((IsInsideMM(v->u.road.state, RVSB_IN_ROAD_STOP, RVSB_IN_ROAD_STOP_END) &&
_road_veh_data_1[v->u.road.state - RVSB_IN_ROAD_STOP + (_opt.road_side << RVS_DRIVE_SIDE)] == v->u.road.frame) ||
(IsInsideMM(v->u.road.state, RVSB_IN_DT_ROAD_STOP, RVSB_IN_DT_ROAD_STOP_END) &&
- v->current_order.dest == GetStationIndex(v->tile) &&
+ v->current_order.GetDestination() == GetStationIndex(v->tile) &&
GetRoadStopType(v->tile) == (IsCargoInClass(v->cargo_type, CC_PASSENGERS) ? ROADSTOP_BUS : ROADSTOP_TRUCK) &&
v->u.road.frame == RVC_DRIVE_THROUGH_STOP_FRAME))) {
@@ -1820,9 +1820,9 @@ again:
if (!v->current_order.IsType(OT_GOTO_STATION)) {
DEBUG(ms, 2, " current order type (%d) is not OT_GOTO_STATION", v->current_order.GetType());
} else {
- if (v->current_order.dest != st->index)
+ if (v->current_order.GetDestination() != st->index)
DEBUG(ms, 2, " current station %d is not target station in current_order.station (%d)",
- st->index, v->current_order.dest);
+ st->index, v->current_order.GetDestination());
}
DEBUG(ms, 2, " force a slot clearing");
@@ -1963,7 +1963,7 @@ void RoadVehicle::OnNewDay()
/* update destination */
if (!(this->vehstatus & VS_STOPPED) && this->current_order.IsType(OT_GOTO_STATION) && this->u.road.slot == NULL && !(this->vehstatus & VS_CRASHED)) {
- Station *st = GetStation(this->current_order.dest);
+ Station *st = GetStation(this->current_order.GetDestination());
RoadStop *rs = st->GetPrimaryRoadStop(this);
RoadStop *best = NULL;