]> git.mxchange.org Git - flightgear.git/blobdiff - src/Instrumentation/mk_viii.hxx
Fix Carriers without catapults and wires.
[flightgear.git] / src / Instrumentation / mk_viii.hxx
index bf6a2c44476a532ef93771b300704049d37eff08..afacd10fd4bc0cbd89fcf786db085bf6efcd3c8d 100755 (executable)
@@ -36,9 +36,9 @@ using std::vector;
 using std::deque;
 using std::map;
 
-#include "Airports/runways.hxx"
-#include "Airports/simple.hxx"
-#include "Main/globals.hxx"
+#include <Airports/runways.hxx>
+#include <Airports/simple.hxx>
+#include <Main/globals.hxx>
 
 ///////////////////////////////////////////////////////////////////////////////
 // MK_VIII ////////////////////////////////////////////////////////////////////
@@ -1504,6 +1504,22 @@ private:
     bool is_high_bank_angle ();
     unsigned int get_bank_angle_alerts ();
     void update_bank_angle ();
+    
+    class AirportFilter : public FGAirport::AirportFilter
+    {
+    public: 
+      AirportFilter(Mode6Handler *s)
+        : self(s) {}
+        
+      virtual bool passAirport(FGAirport *a) const;
+      
+      virtual FGPositioned::Type maxType() const {
+        return FGPositioned::AIRPORT;
+      }
+      
+    private:
+      Mode6Handler* self;
+    };
   };
 
   /////////////////////////////////////////////////////////////////////////////
@@ -1551,8 +1567,7 @@ private:
                                   double to_heading);
     double get_azimuth_difference (const FGRunway *_runway);
 
-    void select_runway (const FGAirport *airport, FGRunway *_runway);
-    bool test_airport (const FGAirport *airport);
+    FGRunway* select_runway (const FGAirport *airport);
     void update_runway ();
 
     void get_bias_area_edges (Position *edge,
@@ -1567,6 +1582,20 @@ private:
     bool is_tcf ();
     bool is_rfcf ();
 
+    class AirportFilter : public FGAirport::AirportFilter
+    {
+    public: 
+      AirportFilter(MK_VIII *device)
+        : mk(device) {}
+        
+      virtual bool passAirport(FGAirport *a) const;
+      
+      virtual FGPositioned::Type maxType() const {
+        return FGPositioned::AIRPORT;
+      }
+    private:
+      MK_VIII* mk;
+    };
   public:
     struct
     {