diff --git a/src/Airports/simple.hxx b/src/Airports/simple.hxx index 93c76fbe1..d226d40f4 100644 --- a/src/Airports/simple.hxx +++ b/src/Airports/simple.hxx @@ -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); diff --git a/src/Environment/environment_ctrl.cxx b/src/Environment/environment_ctrl.cxx index 5b9cfcfb9..4c7ec797b 100644 --- a/src/Environment/environment_ctrl.cxx +++ b/src/Environment/environment_ctrl.cxx @@ -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; diff --git a/src/Instrumentation/mk_viii.hxx b/src/Instrumentation/mk_viii.hxx index 423562cfe..6e28b74fc 100755 --- a/src/Instrumentation/mk_viii.hxx +++ b/src/Instrumentation/mk_viii.hxx @@ -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; };