#include <Navaids/routePath.hxx>
#include <Aircraft/FlightHistory.hxx>
#include <AIModel/AIAircraft.hxx>
+#include <AIModel/AIManager.hxx>
#include <AIModel/AIFlightPlan.hxx>
const char* RULER_LEGEND_KEY = "ruler-legend";
// try to access the flight-plan of the aircraft. There are several layers
// of potential NULL-ness here, so we have to be defensive at each stage.
std::string originICAO, destinationICAO;
- FGAIManager* aiManager = static_cast<FGAIManager*>(globals->get_subsystem("ai-model"));
+ FGAIManager* aiManager = globals->get_subsystem<FGAIManager>();
FGAIBasePtr aircraft = aiManager ? aiManager->getObjectFromProperty(model) : NULL;
if (aircraft) {
FGAIAircraft* p = static_cast<FGAIAircraft*>(aircraft.get());