diff options
author | yexo <yexo@openttd.org> | 2010-04-17 17:45:44 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2010-04-17 17:45:44 +0000 |
commit | 9a2e53e8032ccd2247ed2b5602a793e4a9868a92 (patch) | |
tree | b70ad25cc85c3b3cc925c4a90b3917a32e0643fc /src | |
parent | 6cf4afad14a298219505a955d36793d1d88a011c (diff) | |
download | openttd-9a2e53e8032ccd2247ed2b5602a793e4a9868a92.tar.xz |
(svn r19660) -Feature: [NewGRF] support cb36 for aircraft speed also in the build menu
Diffstat (limited to 'src')
-rw-r--r-- | src/engine.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/engine.cpp b/src/engine.cpp index 1381dbb14..e0611eccb 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -290,8 +290,13 @@ uint Engine::GetDisplayMaxSpeed() const case VEH_SHIP: return GetEngineProperty(this->index, PROP_SHIP_SPEED, this->u.ship.max_speed) / 2; - case VEH_AIRCRAFT: + case VEH_AIRCRAFT: { + uint max_speed = GetEngineProperty(this->index, PROP_AIRCRAFT_SPEED, 0); + if (max_speed != 0) { + return (max_speed * 129) / 10; + } return this->u.air.max_speed; + } default: NOT_REACHED(); } |