]> git.mxchange.org Git - flightgear.git/blobdiff - src/Airports/simple.cxx
Several Bugfixes:
[flightgear.git] / src / Airports / simple.cxx
index f4f3d1adbfd87538eded3dcdf35fba315934378a..92b79005ad756d5a8b3945a8dd2316f5bb534a76 100644 (file)
@@ -76,6 +76,7 @@ FGAirport::FGAirport(const string &id, const SGGeod& location, const SGGeod& tow
 
 FGAirport::~FGAirport()
 {
+    cerr << "Deleting Airport" << endl;
     delete _dynamics;
 }
 
@@ -96,20 +97,18 @@ bool FGAirport::isHeliport() const
 
 FGAirportDynamics * FGAirport::getDynamics()
 {
-    if (_dynamics != 0) {
+    if (_dynamics) {
         return _dynamics;
-    } else {
-        //cerr << "Trying to load dynamics for " << _id << endl;
-        _dynamics = new FGAirportDynamics(this);
-        XMLLoader::load(_dynamics);
-
-        FGRunwayPreference rwyPrefs(this);
-        XMLLoader::load(&rwyPrefs);
-        _dynamics->setRwyUse(rwyPrefs);
+    }
+    
+    _dynamics = new FGAirportDynamics(this);
+    XMLLoader::load(_dynamics);
 
-        //FGSidStar SIDs(this);
-        XMLLoader::load(_dynamics->getSIDs());
-   }
+    FGRunwayPreference rwyPrefs(this);
+    XMLLoader::load(&rwyPrefs);
+    _dynamics->setRwyUse(rwyPrefs);
+    XMLLoader::load(_dynamics->getSIDs());
+    
     return _dynamics;
 }
 
@@ -444,7 +443,7 @@ void FGAirport::processThreshold(SGPropertyNode* aThreshold)
   // first, let's identify the current runway
   string id(aThreshold->getStringValue("rwy"));
   if (!hasRunwayWithIdent(id)) {
-    SG_LOG(SG_GENERAL, SG_WARN, "FGAirport::processThreshold: "
+    SG_LOG(SG_GENERAL, SG_DEBUG, "FGAirport::processThreshold: "
       "found runway not defined in the global data:" << ident() << "/" << id);
     return;
   }