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/vehicle.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/vehicle.cpp')
-rw-r--r-- | src/vehicle.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp index bf3618517..8325897a2 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -2033,7 +2033,7 @@ uint GenerateVehicleSortList(const Vehicle ***sort_list, uint16 *length_of_array const Order *order; FOR_VEHICLE_ORDERS(v, order) { - if (order->IsType(OT_GOTO_STATION) && order->dest == index) { + if (order->IsType(OT_GOTO_STATION) && order->GetDestination() == index) { if (n == *length_of_array) ExtendVehicleListSize(sort_list, length_of_array, 50); (*sort_list)[n++] = v; break; @@ -2077,7 +2077,7 @@ uint GenerateVehicleSortList(const Vehicle ***sort_list, uint16 *length_of_array const Order *order; FOR_VEHICLE_ORDERS(v, order) { - if (order->IsType(OT_GOTO_DEPOT) && order->dest == index) { + if (order->IsType(OT_GOTO_DEPOT) && order->GetDestination() == index) { if (n == *length_of_array) ExtendVehicleListSize(sort_list, length_of_array, 25); (*sort_list)[n++] = v; break; @@ -3131,7 +3131,7 @@ void Vehicle::BeginLoading() assert(IsTileType(tile, MP_STATION) || type == VEH_SHIP); if (this->current_order.IsType(OT_GOTO_STATION) && - this->current_order.dest == this->last_station_visited) { + this->current_order.GetDestination() == this->last_station_visited) { /* Arriving at the ordered station. * Keep the load/unload flags, as we (obviously) still need them. */ this->current_order.flags &= OFB_FULL_LOAD | OFB_UNLOAD | OFB_TRANSFER; |