Mercurial > hg > openttd
changeset 15043:2120f331b2be draft
(svn r19660) -Feature: [NewGRF] support cb36 for aircraft speed also in the build menu
author | yexo <yexo@openttd.org> |
---|---|
date | Sat, 17 Apr 2010 17:45:44 +0000 |
parents | 93b87430004c |
children | 7dc598210fb7 |
files | src/engine.cpp |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/engine.cpp +++ b/src/engine.cpp @@ -290,8 +290,13 @@ 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(); }