From a5b32d8d7238ae769a9dc3bcc71aaaba213058b9 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 26 Aug 2007 20:43:22 +0000 Subject: (svn r10984) -Codechange: unify the way one can get the current speed in the same forwat so we can display it. --- src/ship_gui.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/ship_gui.cpp') diff --git a/src/ship_gui.cpp b/src/ship_gui.cpp index fcdcfc24a..44497a08f 100644 --- a/src/ship_gui.cpp +++ b/src/ship_gui.cpp @@ -219,14 +219,14 @@ static void ShipViewWndProc(Window *w, WindowEvent *e) switch (v->current_order.type) { case OT_GOTO_STATION: { SetDParam(0, v->current_order.dest); - SetDParam(1, v->cur_speed * 10 / 32); + SetDParam(1, v->GetDisplaySpeed()); str = STR_HEADING_FOR_STATION + _patches.vehicle_speed; } break; case OT_GOTO_DEPOT: { Depot *depot = GetDepot(v->current_order.dest); SetDParam(0, depot->town_index); - SetDParam(1, v->cur_speed * 10 / 32); + SetDParam(1, v->GetDisplaySpeed()); if (HASBIT(v->current_order.flags, OFB_HALT_IN_DEPOT) && !HASBIT(v->current_order.flags, OFB_PART_OF_ORDERS)) { str = STR_HEADING_FOR_SHIP_DEPOT + _patches.vehicle_speed; } else { @@ -242,7 +242,7 @@ static void ShipViewWndProc(Window *w, WindowEvent *e) default: if (v->num_orders == 0) { str = STR_NO_ORDERS + _patches.vehicle_speed; - SetDParam(0, v->cur_speed * 10 / 32); + SetDParam(0, v->GetDisplaySpeed()); } else { str = STR_EMPTY; } -- cgit v1.2.3-54-g00ecf