1
0
Fork 0

(svn r21119) -Fix: Helicopter flight altitude was determined inconsistently in different places.

release/1.1
frosch 2010-11-08 21:26:32 +00:00
parent c0ea0ac301
commit b1765482d2
1 changed files with 3 additions and 1 deletions

View File

@ -626,6 +626,8 @@ static int UpdateAircraftSpeed(Aircraft *v, uint speed_limit = SPEED_LIMIT_NONE,
*/
byte GetAircraftFlyingAltitude(const Aircraft *v)
{
if (v->subtype == AIR_HELICOPTER) return HELI_FLIGHT_ALTITUDE;
/* Make sure Aircraft fly no lower so that they don't conduct
* CFITs (controlled flight into terrain)
*/
@ -768,7 +770,7 @@ static bool AircraftController(Aircraft *v)
count = UpdateAircraftSpeed(v);
if (count > 0) {
v->tile = 0;
byte z_dest = HELI_FLIGHT_ALTITUDE;
byte z_dest = GetAircraftFlyingAltitude(v);
/* Reached altitude? */
if (v->z_pos >= z_dest) {