1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-12 09:09:09 +00:00

(svn r26866) -Change: make aircraft ascend/descend when they are too close to the ground or too far away (based on patch by ic111)

This commit is contained in:
rubidium
2014-09-21 06:35:34 +00:00
parent c88a4aaa5c
commit c0771b1657
5 changed files with 126 additions and 33 deletions

View File

@@ -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));