From: ThorstenB Date: Wed, 2 May 2012 21:50:07 +0000 (+0200) Subject: #607: change path in warning message X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=645b0ae588a90271db3104f1eaf2dc7dbb8ffa8c;p=flightgear.git #607: change path in warning message Code checks both, "Aircraft" and "AI/Aircraft" directory - but users obviously prefer to see the AI/Aircraft directory in the reported warnings... ;-) --- diff --git a/src/Traffic/Schedule.cxx b/src/Traffic/Schedule.cxx index 017e2b0d5..32be291b8 100644 --- a/src/Traffic/Schedule.cxx +++ b/src/Traffic/Schedule.cxx @@ -57,7 +57,7 @@ /****************************************************************************** * the FGAISchedule class contains data members and code to maintain a - * schedule of Flights for an articically controlled aircraft. + * schedule of Flights for an artificially controlled aircraft. *****************************************************************************/ FGAISchedule::FGAISchedule() { @@ -229,7 +229,7 @@ bool FGAISchedule::update(time_t now, const SGVec3d& userCart) firstRun = false; } - FGScheduledFlight* flight = flights.front(); + FGScheduledFlight* flight = flights.front(); if (!deptime) { deptime = flight->getDepartureTime(); //cerr << "Settiing departure time " << deptime << endl; @@ -252,10 +252,10 @@ bool FGAISchedule::update(time_t now, const SGVec3d& userCart) // Don't just update: check whether we need to load a new leg. etc. // This update occurs for distant aircraft, so we can update the current leg // and detach it from the current list of aircraft. - flight->update(); + flight->update(); flights.erase(flights.begin()); // pop_front(), effectively - return true; - } + return true; + } FGAirport* dep = flight->getDepartureAirport(); FGAirport* arr = flight->getArrivalAirport(); @@ -330,7 +330,7 @@ bool FGAISchedule::createAIAircraft(FGScheduledFlight* flight, double speedKnots mp_ai.append(modelPath); if (!mp.exists() && !mp_ai.exists()) { - SG_LOG(SG_GENERAL, SG_WARN, "TrafficManager: Could not load model " << mp.str()); + SG_LOG(SG_GENERAL, SG_WARN, "TrafficManager: Could not load model " << mp_ai.str()); return true; } @@ -347,7 +347,7 @@ bool FGAISchedule::createAIAircraft(FGScheduledFlight* flight, double speedKnots aircraft->setBank(0); courseToDest = SGGeodesy::courseDeg(position, arr->geod()); - FGAIFlightPlan *fp = new FGAIFlightPlan(aircraft, flightPlanName, courseToDest, deptime, + FGAIFlightPlan *fp = new FGAIFlightPlan(aircraft, flightPlanName, courseToDest, deptime, dep, arr, true, radius, flight->getCruiseAlt()*100, position.getLatitudeDeg(),