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/roadveh_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/roadveh_cmd.cpp')
-rw-r--r-- | src/roadveh_cmd.cpp | 8 |
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; |