]> git.mxchange.org Git - flightgear.git/blobdiff - src/Cockpit/groundradar.cxx
Use new SGBucket API in tile-manager
[flightgear.git] / src / Cockpit / groundradar.cxx
index b7d2834136d5f8b370b75ce8d11388aa2457426c..a142f4c22336325ca98f7b2aa4d8963b05e2fa31 100644 (file)
@@ -38,7 +38,7 @@
 #include <Main/globals.hxx>
 #include <Viewer/renderer.hxx>
 #include <Cockpit/panel.hxx>
-#include <Airports/simple.hxx>
+#include <Airports/airport.hxx>
 #include <Airports/runways.hxx>
 #include <Airports/pavement.hxx>
 #include <simgear/math/sg_geodesy.hxx>
@@ -221,7 +221,7 @@ void GroundRadar::updateTexture()
     osg::ref_ptr<osg::Vec3Array> taxi_vertices = new osg::Vec3Array;
     osg::ref_ptr<osg::Vec3Array> pvt_vertices = new osg::Vec3Array;
 
-    const string airport_name = _airport_node->getStringValue();
+    const std::string airport_name = _airport_node->getStringValue();
 
     const FGAirport* airport = fgFindAirportID(airport_name);
     if (airport == 0)
@@ -336,12 +336,10 @@ void GroundRadar::updateTexture()
     }
     pvt_geom->setVertexArray(pvt_vertices.get());
 
-    for (unsigned int i=0; i<apt->numRunways(); ++i)
+    FGRunwayList rwys(apt->getRunwaysWithoutReciprocals());
+    for (unsigned int i=0; i<rwys.size(); ++i)
     {
-      FGRunway* runway(apt->getRunwayByIndex(i));
-      if (runway->isReciprocal()) continue;
-      
-      addRunwayVertices(runway, tower_lat, tower_lon, scale, rwy_vertices.get());
+      addRunwayVertices(rwys[i], tower_lat, tower_lon, scale, rwy_vertices.get());
     }
     osg::Geometry *rwy_geom = dynamic_cast<osg::Geometry *>(_geode->getDrawable(2));
     rwy_geom->setVertexArray(rwy_vertices.get());