summaryrefslogtreecommitdiff
path: root/src/aircraft_cmd.cpp
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2010-08-13 00:36:12 +0000
committeryexo <yexo@openttd.org>2010-08-13 00:36:12 +0000
commitbc96bdb203a74a661a0365d998069cc939a4c06e (patch)
tree205664ab6b4caf90f3cd3d977ccd1e1e00dcb9a5 /src/aircraft_cmd.cpp
parente4117dbfb7c940180eb8aab7f9d0a726364078ab (diff)
downloadopenttd-bc96bdb203a74a661a0365d998069cc939a4c06e.tar.xz
(svn r20478) -Codechange: remove support for 'helipad groups' because there are no airports with more than 1 helipad group
Diffstat (limited to 'src/aircraft_cmd.cpp')
-rw-r--r--src/aircraft_cmd.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp
index 6dc0e05ee..c3ea73416 100644
--- a/src/aircraft_cmd.cpp
+++ b/src/aircraft_cmd.cpp
@@ -1431,7 +1431,7 @@ static void AircraftEventHandler_AtTerminal(Aircraft *v, const AirportFTAClass *
/* on an airport with helipads, a helicopter will always land there
* and get serviced at the same time - setting */
if (_settings_game.order.serviceathelipad) {
- if (v->subtype == AIR_HELICOPTER && apc->helipads != NULL) {
+ if (v->subtype == AIR_HELICOPTER && apc->num_helipads > 0) {
/* an exerpt of ServiceAircraft, without the invisibility stuff */
v->date_of_last_service = _date;
v->breakdowns_since_last_service = 0;
@@ -1869,12 +1869,11 @@ static bool AirportFindFreeTerminal(Aircraft *v, const AirportFTAClass *apc)
static bool AirportFindFreeHelipad(Aircraft *v, const AirportFTAClass *apc)
{
/* if an airport doesn't have helipads, use terminals */
- if (apc->helipads == NULL) return AirportFindFreeTerminal(v, apc);
+ if (apc->num_helipads == 0) return AirportFindFreeTerminal(v, apc);
- assert(apc->helipads[0] == 1);
/* only 1 helicoptergroup, check all helipads
* The blocks for helipads start after the last terminal (MAX_TERMINALS) */
- return FreeTerminal(v, MAX_TERMINALS, apc->helipads[1] + MAX_TERMINALS);
+ return FreeTerminal(v, MAX_TERMINALS, apc->num_helipads + MAX_TERMINALS);
}
static bool AircraftEventHandler(Aircraft *v, int loop)