@@ -627,20 +627,20 @@ static int UpdateAircraftSpeed(Aircraft
* Gets the cruise altitude of an aircraft.
* The cruise altitude is determined by the velocity of the vehicle
* and the direction it is moving
* @param v The vehicle. Should be an aircraft
* @returns Altitude in pixel units
*/
byte GetAircraftFlyingAltitude(const Aircraft *v)
int 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)
byte base_altitude = PLANE_HOLDING_ALTITUDE;
int base_altitude = PLANE_HOLDING_ALTITUDE;
/* Make sure eastbound and westbound planes do not "crash" into each
* other by providing them with vertical seperation
switch (v->direction) {
case DIR_N:
@@ -773,13 +773,13 @@ static bool AircraftController(Aircraft
}
} else {
u->cur_speed = 32;
count = UpdateAircraftSpeed(v);
if (count > 0) {
v->tile = 0;
byte z_dest = GetAircraftFlyingAltitude(v);
int z_dest = GetAircraftFlyingAltitude(v);
/* Reached altitude? */
if (v->z_pos >= z_dest) {
v->cur_speed = 0;
return true;