wind_from_down_node = fgGetNode("/environment/wind-from-down-fps", true);
scenario_filename = root->getNode("scenario", true)->getStringValue();
-
if (scenario_filename != "") processScenario( scenario_filename );
+
initDone = true;
}
ai_ballistic->setDragArea(entity->eda);
ai_ballistic->setLife(entity->life);
ai_ballistic->setBuoyancy(entity->buoyancy);
- ai_ballistic->setWind_from_east(entity->wind_from_east);
- ai_ballistic->setWind_from_north(entity->wind_from_north);
- ai_ballistic->setWind(entity->wind);
- ai_ballistic->setRoll(entity->roll);
+ ai_ballistic->setWind_from_east(entity->wind_from_east);
+ ai_ballistic->setWind_from_north(entity->wind_from_north);
+ ai_ballistic->setWind(entity->wind);
+ ai_ballistic->setRoll(entity->roll);
+ ai_ballistic->setCd(entity->cd);
+ ai_ballistic->setWeight(entity->weight);
ai_ballistic->init();
ai_ballistic->bind();
return ai_ballistic;
void FGAIManager::processScenario( string filename ) {
FGAIScenario* s = new FGAIScenario( filename );
-
for (int i=0;i<s->nEntries();i++) {
FGAIModelEntity* en = s->getNextEntry();
if (en) {
- en->fp = NULL;
- if (en->flightplan != ""){
- en->fp = new FGAIFlightPlan( en->flightplan );
- }
- if (en->m_class == "aircraft") {
+ if (en->m_type == "aircraft") {
createAircraft( en );
- } else if (en->m_class == "ship") {
+ } else if (en->m_type == "ship") {
createShip( en );
- } else if (en->m_class == "storm") {
+ } else if (en->m_type == "storm") {
createStorm( en );
- } else if (en->m_class == "thermal") {
+ } else if (en->m_type == "thermal") {
createThermal( en );
- } else if (en->m_class == "ballistic") {
+ } else if (en->m_type == "ballistic") {
createBallistic( en );
}
}
delete s;
}
+//end AIManager.cxx