]> git.mxchange.org Git - flightgear.git/blobdiff - src/AIModel/AIFlightPlan.cxx
Durk Talsma:
[flightgear.git] / src / AIModel / AIFlightPlan.cxx
index 19321f2bfd7c24746601ffb1624bc2b4bb929d53..025f03e2141429211b372fa530605e300cb44a08 100644 (file)
@@ -50,6 +50,7 @@ FGAIFlightPlan::FGAIFlightPlan(string filename)
   SGPath path( globals->get_fg_root() );
   path.append( ("/Data/AI/FlightPlans/" + filename).c_str() );
   SGPropertyNode root;
+  repeat = false;
 
   try {
       readProperties(path.str(), &root);
@@ -472,3 +473,9 @@ void FGAIFlightPlan::resetWaypoints()
       waypoints.push_back(wpt);
     }
 }
+
+// Start flightplan over from the beginning
+void FGAIFlightPlan::restart()
+{
+  wpt_iterator = waypoints.begin();
+}