diff options
author | tron <tron@openttd.org> | 2007-02-15 07:43:06 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2007-02-15 07:43:06 +0000 |
commit | f6b917f609d63230531d2086761242884c4f60e5 (patch) | |
tree | d09c3b4c1b06a7f956808046aadcd50adb3aa51e /src/aircraft_cmd.cpp | |
parent | ac95825b9263c55cb73256939a725b7d7f1ea9e5 (diff) | |
download | openttd-f6b917f609d63230531d2086761242884c4f60e5.tar.xz |
(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
Diffstat (limited to 'src/aircraft_cmd.cpp')
-rw-r--r-- | src/aircraft_cmd.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
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; |