# HG changeset patch # User Charles Pigott # Date 2020-12-28 10:26:57 # Node ID ef270017c37090c48e7f82f62fb0e87b89636c2b # Parent a18d9247f25898a5f909781250a640ced18c9ea4 Fix #8437: Crash when using certain heliports with rotated airports diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp --- a/src/aircraft_cmd.cpp +++ b/src/aircraft_cmd.cpp @@ -949,7 +949,14 @@ static bool AircraftController(Aircraft return false; } - /* Vehicle is now at the airport. */ + /* Vehicle is now at the airport. + * Helicopter has arrived at the target landing pad, so the current position is also where it should land. + * Except for Oilrigs which are special due to being a 1x1 station, and helicopters land outside it. */ + if (st->airport.type != AT_OILRIG) { + x = v->x_pos; + y = v->y_pos; + tile = TileVirtXY(x, y); + } v->tile = tile; /* Find altitude of landing position. */