]> git.mxchange.org Git - flightgear.git/commitdiff
Speculative fix for bug 1149, AI traffic on helipads.
authorJames Turner <zakalawe@mac.com>
Sun, 30 Jun 2013 15:48:14 +0000 (16:48 +0100)
committerJames Turner <zakalawe@mac.com>
Sun, 30 Jun 2013 15:48:14 +0000 (16:48 +0100)
Avoid helipads when doing runway choice fallback.
http://code.google.com/p/flightgear-bugs/issues/detail?id=1149

src/Airports/airport.cxx

index 201fc28d4aa0c1389f2428f665689b60d170e8f5..6d463fd540ce75796003f9067b5c3a63574711e6 100644 (file)
@@ -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);