]> 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 7a2af9b62125ef2e19c5ae3dadd287afc72fae4a..a142f4c22336325ca98f7b2aa4d8963b05e2fa31 100644 (file)
@@ -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());