summaryrefslogtreecommitdiff
path: root/src/newgrf_engine.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2014-09-21 06:35:34 +0000
committerrubidium <rubidium@openttd.org>2014-09-21 06:35:34 +0000
commitc0771b16570ad583ae530418f7149f2f79b21eb0 (patch)
tree25562edcedec3305c0e83f3dc222129724826158 /src/newgrf_engine.cpp
parentc88a4aaa5c853ccaf75006816c7d061fac79342b (diff)
downloadopenttd-c0771b16570ad583ae530418f7149f2f79b21eb0.tar.xz
(svn r26866) -Change: make aircraft ascend/descend when they are too close to the ground or too far away (based on patch by ic111)
Diffstat (limited to 'src/newgrf_engine.cpp')
-rw-r--r--src/newgrf_engine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/newgrf_engine.cpp b/src/newgrf_engine.cpp
index cdd62b7ae..0b23aad90 100644
--- a/src/newgrf_engine.cpp
+++ b/src/newgrf_engine.cpp
@@ -567,7 +567,7 @@ static uint32 VehicleGetVariable(Vehicle *v, const VehicleScopeResolver *object,
{
const Vehicle *w = v->Next();
- uint16 altitude = v->z_pos - w->z_pos; // Aircraft height - shadow height
+ uint16 altitude = ClampToU16(v->z_pos - w->z_pos); // Aircraft height - shadow height
byte airporttype = ATP_TTDP_LARGE;
const Station *st = GetTargetAirportIfValid(Aircraft::From(v));