]> git.mxchange.org Git - flightgear.git/blobdiff - src/AIModel/AIFlightPlan.cxx
#358: Missing option to disable AI scenarios
[flightgear.git] / src / AIModel / AIFlightPlan.cxx
index 13285885051d2d5ac6cef5515629e8673ed7f68e..914f5442c7e6c0990abed8fc341e24044186c2d9 100644 (file)
@@ -49,6 +49,7 @@ using std::cerr;
 FGAIFlightPlan::FGAIFlightPlan() 
 {
    sid = 0;
+   wpt_iterator = waypoints.begin();
 }
 
 FGAIFlightPlan::FGAIFlightPlan(const string& filename)
@@ -176,6 +177,7 @@ FGAIFlightPlan::FGAIFlightPlan(FGAIAircraft *ac,
            else wpt->finished = false;
            waypoints.push_back(wpt);
          } // of node loop
+          wpt_iterator = waypoints.begin();
        } catch (const sg_exception &e) {
       SG_LOG(SG_GENERAL, SG_WARN, "Error reading AI flight plan: " << 
         e.getMessage() << " from " << e.getOrigin());