diff options
author | frosch <frosch@openttd.org> | 2009-02-01 17:14:39 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2009-02-01 17:14:39 +0000 |
commit | de9a6fc90b4360313d8846c7701848b7a0295ba3 (patch) | |
tree | c6c194df7208fda252250f6a43df63be15b1bd2d /src/engine.cpp | |
parent | 317220c2e4f9d0866553635872cae952616169dc (diff) | |
download | openttd-de9a6fc90b4360313d8846c7701848b7a0295ba3.tar.xz |
(svn r15308) -Codechange: Deduplicate km-ish/h -> mph conversions.
Diffstat (limited to 'src/engine.cpp')
-rw-r--r-- | src/engine.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/engine.cpp b/src/engine.cpp index 20be6ebd8..3ca62c400 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -156,22 +156,22 @@ Money Engine::GetCost() const /** * Returns max speed for display purposes - * @return max speed in mph + * @return max speed in km-ish/h */ uint Engine::GetDisplayMaxSpeed() const { switch (this->type) { case VEH_TRAIN: - return GetEngineProperty(this->index, 0x09, this->u.rail.max_speed) * 10 / 16; + return GetEngineProperty(this->index, 0x09, this->u.rail.max_speed); case VEH_ROAD: - return this->u.road.max_speed * 10 / 32; + return this->u.road.max_speed / 2; case VEH_SHIP: - return GetEngineProperty(this->index, 0x0B, this->u.ship.max_speed) * 10 / 32; + return GetEngineProperty(this->index, 0x0B, this->u.ship.max_speed) / 2; case VEH_AIRCRAFT: - return this->u.air.max_speed * 10 / 16; + return this->u.air.max_speed; default: NOT_REACHED(); } |