]> git.mxchange.org Git - flightgear.git/blobdiff - src/Airports/simple.cxx
NasalCanvas: Clean up and expose Element node ghost
[flightgear.git] / src / Airports / simple.cxx
index 613be049faabac2fd55f945d369c6ea9b417794b..84ed7ffabb39c561e49f0ab0782ca0ebe9a12d0f 100644 (file)
@@ -38,6 +38,7 @@
 #include <simgear/props/props_io.hxx>
 #include <simgear/debug/logstream.hxx>
 #include <simgear/sg_inlines.h>
+#include <simgear/structure/exception.hxx>
 
 #include <Environment/environment_mgr.hxx>
 #include <Environment/environment.hxx>
@@ -69,7 +70,7 @@ FGAirport::FGAirport(PositionedID aGuid, const string &id, const SGGeod& locatio
     _dynamics(0),
     mTowerDataLoaded(false),
     mRunwaysLoaded(false),
-    mTaxiwaysLoaded(true)
+    mTaxiwaysLoaded(false)
 {
 }
 
@@ -111,11 +112,11 @@ FGAirportDynamics * FGAirport::getDynamics()
     
     _dynamics = new FGAirportDynamics(this);
     XMLLoader::load(_dynamics);
-
+    _dynamics->init();
+  
     FGRunwayPreference rwyPrefs(this);
     XMLLoader::load(&rwyPrefs);
     _dynamics->setRwyUse(rwyPrefs);
-    XMLLoader::load(_dynamics->getSIDs());
     
     return _dynamics;
 }
@@ -234,6 +235,7 @@ unsigned int FGAirport::numTaxiways() const
 FGTaxiway* FGAirport::getTaxiwayByIndex(unsigned int aIndex) const
 {
   loadTaxiways();
+  
   assert(aIndex >= 0 && aIndex < mTaxiways.size());
   return (FGTaxiway*) flightgear::NavDataCache::instance()->loadById(mTaxiways[aIndex]);
 }