(svn r12584) -Codechange: do not access the order type directly.

This commit is contained in:
rubidium
2008-04-05 23:36:54 +00:00
parent 4ff5d2057c
commit 3b0e3d8d30
22 changed files with 259 additions and 218 deletions

View File

@@ -917,7 +917,7 @@ void DrawSmallOrderList(const Vehicle *v, int x, int y)
if (sel == 0) DrawString(x - 6, y, STR_SMALL_RIGHT_ARROW, TC_BLACK);
sel--;
if (order->type == OT_GOTO_STATION) {
if (order->IsType(OT_GOTO_STATION)) {
if (v->type == VEH_SHIP && GetStation(order->dest)->IsBuoy()) continue;
SetDParam(0, order->dest);
@@ -1952,7 +1952,7 @@ static void DrawVehicleViewWindow(Window *w)
str = STR_8861_STOPPED;
}
} else { // vehicle is in a "normal" state, show current order
switch (v->current_order.type) {
switch (v->current_order.GetType()) {
case OT_GOTO_STATION: {
SetDParam(0, v->current_order.dest);
SetDParam(1, v->GetDisplaySpeed());