Mercurial > hg > openttd
diff src/vehicle_gui.cpp @ 8840:c3d2f0eb69a1 draft
(svn r12588) -Codechange: do not access the destination of an order directly.
author | rubidium <rubidium@openttd.org> |
---|---|
date | Sun, 06 Apr 2008 07:48:51 +0000 |
parents | 890a77315801 |
children | 1f412a20da48 |
line wrap: on
line diff
--- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -918,9 +918,9 @@ sel--; if (order->IsType(OT_GOTO_STATION)) { - if (v->type == VEH_SHIP && GetStation(order->dest)->IsBuoy()) continue; + if (v->type == VEH_SHIP && GetStation(order->GetDestination())->IsBuoy()) continue; - SetDParam(0, order->dest); + SetDParam(0, order->GetDestination()); DrawString(x, y, STR_A036, TC_FROMSTRING); y += 6; @@ -1954,7 +1954,7 @@ } else { // vehicle is in a "normal" state, show current order switch (v->current_order.GetType()) { case OT_GOTO_STATION: { - SetDParam(0, v->current_order.dest); + SetDParam(0, v->current_order.GetDestination()); SetDParam(1, v->GetDisplaySpeed()); str = STR_HEADING_FOR_STATION + _patches.vehicle_speed; } break; @@ -1962,10 +1962,10 @@ case OT_GOTO_DEPOT: { if (v->type == VEH_AIRCRAFT) { /* Aircrafts always go to a station, even if you say depot */ - SetDParam(0, v->current_order.dest); + SetDParam(0, v->current_order.GetDestination()); SetDParam(1, v->GetDisplaySpeed()); } else { - Depot *depot = GetDepot(v->current_order.dest); + Depot *depot = GetDepot(v->current_order.GetDestination()); SetDParam(0, depot->town_index); SetDParam(1, v->GetDisplaySpeed()); } @@ -1982,7 +1982,7 @@ case OT_GOTO_WAYPOINT: { assert(v->type == VEH_TRAIN); - SetDParam(0, v->current_order.dest); + SetDParam(0, v->current_order.GetDestination()); str = STR_HEADING_FOR_WAYPOINT + _patches.vehicle_speed; SetDParam(1, v->GetDisplaySpeed()); break;