diff options
author | frosch <frosch@openttd.org> | 2011-11-08 17:29:21 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2011-11-08 17:29:21 +0000 |
commit | 8a2342a5e6884c8079d879feecf3647fb06650a1 (patch) | |
tree | 86cff1b6122fed76ba5f7f25150567e59eac7870 | |
parent | dd3e6d3e44f7fd23cb9b5c86889e36fa49d4ddfc (diff) | |
download | openttd-8a2342a5e6884c8079d879feecf3647fb06650a1.tar.xz |
(svn r23156) -Change: [NewGRF] Clamp height in aircraft variable 44.
-rw-r--r-- | src/newgrf_engine.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/newgrf_engine.cpp b/src/newgrf_engine.cpp index 40d931d70..f13543f08 100644 --- a/src/newgrf_engine.cpp +++ b/src/newgrf_engine.cpp @@ -561,7 +561,7 @@ static uint32 VehicleGetVariable(Vehicle *v, const ResolverObject *object, byte airporttype = st->airport.GetSpec()->ttd_airport_type; } - return (altitude << 8) | airporttype; + return (Clamp(altitude, 0, 0xFF) << 8) | airporttype; } case 0x45: { // Curvature info |