From e62036f5e9d2256ec59fc25a6ef14baeddbd82ea Mon Sep 17 00:00:00 2001 From: tron Date: Thu, 15 Feb 2007 07:43:06 +0000 Subject: (svn r8743) -Fix -Codechange: Add a Z adjustment attribute for helicopter pads to AirportFTAClass to get rid of some special cases for oilrigs and heliports --- src/aircraft_cmd.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/aircraft_cmd.cpp') diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp index a41ac1326..b84a2c276 100644 --- a/src/aircraft_cmd.cpp +++ b/src/aircraft_cmd.cpp @@ -969,7 +969,8 @@ static bool AircraftController(Vehicle *v) } // get airport moving data - const AirportMovingData *amd = GetAirport(st->airport_type)->MovingData(v->u.air.pos); + const AirportFTAClass *afc = GetAirport(st->airport_type); + const AirportMovingData *amd = afc->MovingData(v->u.air.pos); // Helicopter raise if (amd->flag & AMED_HELI_RAISE) { @@ -1011,9 +1012,7 @@ static bool AircraftController(Vehicle *v) v->tile = st->airport_tile; // Find altitude of landing position. - z = GetSlopeZ(x, y) + 1; - if (st->airport_type == AT_OILRIG) z += 54; - if (st->airport_type == AT_HELIPORT) z += 60; + z = GetSlopeZ(x, y) + 1 + afc->delta_z; if (z == v->z_pos) { u = v->next->next; -- cgit v1.2.3-54-g00ecf