]> git.mxchange.org Git - flightgear.git/commitdiff
Fix flightplan initialization issue.
authorDurk Talsma <durk@localhost.(none)>
Mon, 25 Jul 2011 19:36:09 +0000 (21:36 +0200)
committerDurk Talsma <durk@localhost.(none)>
Mon, 25 Jul 2011 19:36:09 +0000 (21:36 +0200)
src/AIModel/AIFlightPlanCreate.cxx
src/ATC/atc_mgr.cxx

index 9ba1c4d8b9bf7b18183d7627c58f50d9a4fc250f..ef12ac4890733067583948e731c694daafa9c73a 100644 (file)
@@ -452,8 +452,10 @@ bool FGAIFlightPlan::createTakeOff(FGAIAircraft * ac, bool firstFlight,
         double heading = ac->getTrafficRef()->getCourse();
         apt->getDynamics()->getActiveRunway(rwyClass, 1, activeRunway,
                                             heading);
-        rwy = apt->getRunwayByIdent(activeRunway);
     }
+    rwy = apt->getRunwayByIdent(activeRunway);
+
+
 
     double airportElev = apt->getElevation();
     // Acceleration point, 105 meters into the runway,
index a47aa78fb2cd6d31f88e90dadbf2af04f8c79e52..95ffdd1c6a6bc64763950bbfe6f1753855354c01 100644 (file)
@@ -118,6 +118,7 @@ void FGATCManager::init() {
                 fgSetDouble("/instrumentation/comm[0]/frequencies/selected-mhz", ((double) stationFreq / 100.0));
                 leg = 4;
                 string fltType = "ga";
+                fp->setRunway(runway);
                 fp->createTakeOff(&ai_ac, false, apt, 0, fltType);
             } else {
                 controller = apt->getDynamics()->getStartupController();