ai_plane->setLongitude(entry->getDoubleValue("longitude"));
ai_plane->setLatitude(entry->getDoubleValue("latitude"));
ai_plane->init();
+ ai_plane->bind();
} else if (!strcmp(entry->getStringValue("type", ""), "ship")) {
FGAIShip* ai_ship = new FGAIShip;
ai_ship->setLongitude(entry->getDoubleValue("longitude"));
ai_ship->setLatitude(entry->getDoubleValue("latitude"));
ai_ship->init();
+ ai_ship->bind();
} else if (!strcmp(entry->getStringValue("type", ""), "ballistic")) {
FGAIBallistic* ai_ballistic = new FGAIBallistic;
ai_ballistic->setLongitude(entry->getDoubleValue("longitude"));
ai_ballistic->setLatitude(entry->getDoubleValue("latitude"));
ai_ballistic->init();
+ ai_ballistic->bind();
}
}
}
void FGAIManager::unbind() {
+ ai_list_itr = ai_list.begin();
+ while(ai_list_itr != ai_list.end()) {
+ (*ai_list_itr)->unbind();
+ ++ai_list_itr;
+ }
}