]> git.mxchange.org Git - flightgear.git/blobdiff - src/AIModel/AIFlightPlan.cxx
Interim windows build fix
[flightgear.git] / src / AIModel / AIFlightPlan.cxx
index 61ba0e56bbccfe345a97ae68518ca903d371c143..b295310c6cdcefe91beb83298c373edb8b22bbb9 100644 (file)
@@ -41,6 +41,8 @@
 #include <Environment/environment_mgr.hxx>
 #include <Environment/environment.hxx>
 
+#include <Traffic/Schedule.hxx>
+
 #include "AIFlightPlan.hxx"
 #include "AIAircraft.hxx"
 
@@ -251,6 +253,11 @@ bool FGAIFlightPlan::parseProperties(const std::string& filename)
     wpt->setFinished   ((wpt->getName() == "END"));
     pushBackWaypoint( wpt );
   }
+  if( getLastWaypoint()->getName().compare("END") != 0  ) {
+       SG_LOG(SG_AI, SG_ALERT, "FGAIFlightPlan::Flightplan missing END node" );
+       return false;
+  }
+
   
   wpt_iterator = waypoints.begin();
   return true;
@@ -483,3 +490,13 @@ FGParking* FGAIFlightPlan::getParkingGate()
 {
   return gate.parking();
 }
+
+FGAirportRef FGAIFlightPlan::departureAirport() const
+{
+    return departure;
+}
+
+FGAirportRef FGAIFlightPlan::arrivalAirport() const
+{
+    return arrival;
+}