From 05572cbb3e4fabffb829814714e7cdb36d663269 Mon Sep 17 00:00:00 2001
From: James Turner <zakalawe@mac.com>
Date: Sun, 30 Jun 2013 16:48:14 +0100
Subject: [PATCH] Speculative fix for bug 1149, AI traffic on helipads.

Avoid helipads when doing runway choice fallback.
http://code.google.com/p/flightgear-bugs/issues/detail?id=1149
---
 src/Airports/airport.cxx | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/Airports/airport.cxx b/src/Airports/airport.cxx
index 201fc28d4..6d463fd54 100644
--- a/src/Airports/airport.cxx
+++ b/src/Airports/airport.cxx
@@ -251,6 +251,12 @@ FGRunwayRef FGAirport::findBestRunwayForHeading(double aHeading) const
     
   BOOST_FOREACH(PositionedID id, mRunways) {
     FGRunway* rwy = loadById<FGRunway>(id);
+    // bug http://code.google.com/p/flightgear-bugs/issues/detail?id=1149
+    // (and probably some other issues besides). 
+    if (rwy->type() == FGPositioned::HELIPAD) {
+      continue;
+    }
+      
     double good = rwy->score(lengthWeight, widthWeight, surfaceWeight);
     double dev = aHeading - rwy->headingDeg();
     SG_NORMALIZE_RANGE(dev, -180.0, 180.0);