From: durk Date: Wed, 29 Mar 2006 18:36:21 +0000 (+0000) Subject: Fix for an AIFlightPlan initialization problem in the traffic manager. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6f7a9a5b1badb82c5a93dd89bbf30060f5fdf42a;p=flightgear.git Fix for an AIFlightPlan initialization problem in the traffic manager. --- diff --git a/src/AIModel/AIFlightPlan.cxx b/src/AIModel/AIFlightPlan.cxx index 27cc98602..493a6c3ef 100644 --- a/src/AIModel/AIFlightPlan.cxx +++ b/src/AIModel/AIFlightPlan.cxx @@ -159,7 +159,7 @@ FGAIFlightPlan::FGAIFlightPlan(const std::string& p, } } catch (const sg_exception &e) { - SG_LOG(SG_GENERAL, SG_ALERT, + SG_LOG(SG_GENERAL, SG_WARN, "Error reading AI flight plan: "); cerr << "Errno = " << errno << endl; if (errno == ENOENT) diff --git a/src/Traffic/Schedule.cxx b/src/Traffic/Schedule.cxx index 9ac106e40..3a20c9668 100644 --- a/src/Traffic/Schedule.cxx +++ b/src/Traffic/Schedule.cxx @@ -376,13 +376,13 @@ bool FGAISchedule::update(time_t now) aircraft->setCompany(airline); //i->getAirline(); aircraft->setAcType(acType); //i->getAcType(); aircraft->setPath(modelPath.c_str()); - aircraft->setFlightPlan(flightPlanName); + //aircraft->setFlightPlan(flightPlanName); aircraft->setLatitude(lat); aircraft->setLongitude(lon); aircraft->setAltitude(i->getCruiseAlt()*100); // convert from FL to feet aircraft->setSpeed(speed); aircraft->setBank(0); - aircraft->SetFlightPlan(new FGAIFlightPlan(modelPath, courseToDest, i->getDepartureTime(), dep, + aircraft->SetFlightPlan(new FGAIFlightPlan(flightPlanName, courseToDest, i->getDepartureTime(), dep, arr,true, radius, i->getCruiseAlt()*100, lat, lon, speed, flightType, acType, airline)); aimgr->attach(aircraft);