forked from mirror/OpenTTD
(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
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user