// Fixme: A non-existent model path results in an
// abort, due to an unhandled exeption, in fg main loop.
- AIManagerRef = aimgr->createAircraft( &entity, this);
+ FGAIBase *aircraft = (FGAIBase*)aimgr->createAircraft( &entity, this);
+ AIManagerRef = aircraft->getID();
//cerr << "Class: " << m_class << ". acType: " << acType << ". Airline: " << airline << ". Speed = " << speed << ". From " << dep->getId() << " to " << arr->getId() << ". Time Fraction = " << (remainingTimeEnroute/(double) totalTimeEnroute) << endl;
//cerr << "Latitude : " << lat << ". Longitude : " << lon << endl;
//cerr << "Dep : " << dep->getLatitude()<< ", "<< dep->getLongitude() << endl;
return true;
}
}
+ //cerr << "Traffic schedule got to beyond last clause" << endl;
+ // EMH: prevent a warning, should this be 'true' instead?
+ // DT: YES. Originally, this code couldn't be reached, but
+ // when the "if(!(AIManagerManager))" clause is false we
+ // fall through right to the end. This is a valid flow.
+ // the actual value is pretty innocent, only it triggers
+ // warning in TrafficManager::update().
+ // (which was added as a sanity check for myself in the first place. :-)
+ return true;
}
FGAirport *dep;
+#if defined( __CYGWIN__) || defined( __MINGW32__)
+ #define HUGE HUGE_VAL
+#endif
distanceToUser = HUGE;
FGScheduledFlightVecIterator i = flights.begin();
while (i != flights.end())