From: Durk Talsma Date: Mon, 25 Jul 2011 19:36:09 +0000 (+0200) Subject: Fix flightplan initialization issue. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=dbceffeae81fe2e25e6578465969d726ee28ce1c;p=flightgear.git Fix flightplan initialization issue. --- diff --git a/src/AIModel/AIFlightPlanCreate.cxx b/src/AIModel/AIFlightPlanCreate.cxx index 9ba1c4d8b..ef12ac489 100644 --- a/src/AIModel/AIFlightPlanCreate.cxx +++ b/src/AIModel/AIFlightPlanCreate.cxx @@ -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, diff --git a/src/ATC/atc_mgr.cxx b/src/ATC/atc_mgr.cxx index a47aa78fb..95ffdd1c6 100644 --- a/src/ATC/atc_mgr.cxx +++ b/src/ATC/atc_mgr.cxx @@ -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();