From dbceffeae81fe2e25e6578465969d726ee28ce1c Mon Sep 17 00:00:00 2001 From: Durk Talsma Date: Mon, 25 Jul 2011 21:36:09 +0200 Subject: [PATCH] Fix flightplan initialization issue. --- src/AIModel/AIFlightPlanCreate.cxx | 4 +++- src/ATC/atc_mgr.cxx | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) 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(); -- 2.39.5