#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>
}
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());