Remove the false warning when using AI Aircraft without a flightplan.
This is (it turns out) a supported use case.
void FGAIAircraft::setFlightPlan(const std::string& flightplan, bool repeat)
{
if (flightplan.empty()) {
- SG_LOG(SG_AI, SG_WARN, "setFlightPlan: empty flight plan");
+ // this is the case for Nasal-scripted aircraft
+ return;
}
FGAIFlightPlan* fp = new FGAIFlightPlan(flightplan);
}
-void FGAIAircraft::SetFlightPlan(FGAIFlightPlan *f) {
+void FGAIAircraft::SetFlightPlan(FGAIFlightPlan *f)
+{
delete fp;
fp = f;
}