(svn r24127) -Feature [FS#1497]: Allow closing airports for incoming aircraft. (Based on patch by cirdan)

This commit is contained in:
michi_cc
2012-04-17 19:43:18 +00:00
parent af6a33bd1c
commit aa47d6c7f2
16 changed files with 126 additions and 12 deletions

View File

@@ -1461,8 +1461,8 @@ static void AircraftEventHandler_Flying(Aircraft *v, const AirportFTAClass *apc)
{
Station *st = Station::Get(v->targetairport);
/* runway busy or not allowed to use this airstation, circle */
if (CanVehicleUseStation(v, st) && (st->owner == OWNER_NONE || st->owner == v->owner)) {
/* Runway busy, not allowed to use this airstation or closed, circle. */
if (CanVehicleUseStation(v, st) && (st->owner == OWNER_NONE || st->owner == v->owner) && !(st->airport.flags & AIRPORT_CLOSED_block)) {
/* {32,FLYING,NOTHING_block,37}, {32,LANDING,N,33}, {32,HELILANDING,N,41},
* if it is an airplane, look for LANDING, for helicopter HELILANDING
* it is possible to choose from multiple landing runways, so loop until a free one is found */