]> git.mxchange.org Git - flightgear.git/commitdiff
Change default airport search to exclude seaports and heliports, for the moment.
authorjmt <jmt>
Tue, 13 Oct 2009 06:48:52 +0000 (06:48 +0000)
committerTim Moore <timoore@redhat.com>
Tue, 13 Oct 2009 22:42:36 +0000 (00:42 +0200)
src/Airports/simple.hxx
src/Environment/environment_ctrl.cxx
src/Instrumentation/mk_viii.hxx

index 93c76fbe1d63a6377083abeb7103fad404cb42b2..d226d40f4b8ca1922eea99b5bb6a6d0c785b09f3 100644 (file)
@@ -113,7 +113,7 @@ public:
        }
        
        virtual Type maxType() const {
-         return SEAPORT;
+         return AIRPORT;
        }
        
        virtual bool passAirport(FGAirport* aApt) const {
@@ -128,9 +128,6 @@ public:
        
        virtual bool passAirport(FGAirport* aApt) const;
        
-       virtual Type maxType() const {
-         return AIRPORT;
-       }
      private:
        double mMinLengthFt;
      };
@@ -138,7 +135,7 @@ public:
      /**
       * Syntactic wrapper around FGPositioned::findClosest - find the closest
       * match for filter, and return it cast to FGAirport. The default filter
-      * passes all airports, including seaports and heliports.
+      * passes airports, but not seaports or heliports
       */
      static FGAirport* findClosest(const SGGeod& aPos, double aCuttofNm, Filter* filter = NULL);
      
index 5b9cfcfb99744b5e0a72843dbb252f57ab1518d8..4c7ec797b2d79d11e4381b3f31a558dccf2b6552 100644 (file)
@@ -44,6 +44,10 @@ public:
        virtual bool passAirport(FGAirport* aApt) const {
                return aApt->getMetar();
        }
+  
+  // permit heliports and seaports too
+  virtual FGPositioned::Type maxType() const
+  { return FGPositioned::SEAPORT; }
 };
 
 static AirportWithMetar airportWithMetarFilter;
index 423562cfe2cdf5d4dbcfc6cd1a888272a94f3cc4..6e28b74fce9c2e9554713bb49b801bfc04f7ba31 100755 (executable)
@@ -1594,10 +1594,6 @@ private:
         : mk(device) {}
         
       virtual bool passAirport(FGAirport *a) const;
-      
-      virtual FGPositioned::Type maxType() const {
-        return FGPositioned::AIRPORT;
-      }
     private:
       MK_VIII* mk;
     };