void FGAirport::loadSceneryDefinitions() const
{
- // allow users to disable the scenery data in the short-term
- // longer term, this option can probably disappear
- if (!fgGetBool("/sim/paths/use-custom-scenery-data")) {
- return;
- }
-
SGPath path;
SGPropertyNode_ptr rootNode = new SGPropertyNode;
if (XMLLoader::findAirportData(ident(), "threshold", path)) {
void XMLLoader::load(FGAirportDynamics* d) {
FGAirportDynamicsXMLLoader visitor(d);
- if (fgGetBool("/sim/paths/use-custom-scenery-data") == false) {
- SGPath parkpath( globals->get_fg_root() );
- parkpath.append( "/AI/Airports/" );
- parkpath.append( d->getId() );
- parkpath.append( "parking.xml" );
- SG_LOG(SG_GENERAL, SG_DEBUG, "running old loader:" << parkpath.c_str());
- if (parkpath.exists()) {
- try {
- readXML(parkpath.str(), visitor);
- d->init();
- }
- catch (const sg_exception &) {
- }
- }
- } else {
- if(loadAirportXMLDataIntoVisitor(d->getId(), "groundnet", visitor)) {
- d->init();
- }
+ if(loadAirportXMLDataIntoVisitor(d->getId(), "groundnet", visitor)) {
+ d->init();
}
}
void XMLLoader::load(FGRunwayPreference* p) {
FGRunwayPreferenceXMLLoader visitor(p);
- if (fgGetBool("/sim/paths/use-custom-scenery-data") == false) {
- SGPath rwyPrefPath( globals->get_fg_root() );
- rwyPrefPath.append( "AI/Airports/" );
- rwyPrefPath.append( p->getId() );
- rwyPrefPath.append( "rwyuse.xml" );
- if (rwyPrefPath.exists()) {
- try {
- readXML(rwyPrefPath.str(), visitor);
- }
- catch (const sg_exception &) {
- }
- }
- } else {
- loadAirportXMLDataIntoVisitor(p->getId(), "rwyuse", visitor);
- }
+ loadAirportXMLDataIntoVisitor(p->getId(), "rwyuse", visitor);
}
void XMLLoader::load(FGSidStar* p) {
FGTileMgr::loadTileModel(const string& modelPath, bool cacheModel)
{
SGPath fullPath = modelPath;
- if ((fullPath.isRelative())&&
- (fgGetBool("/sim/paths/use-custom-scenery-data") == true)) {
+ if (fullPath.isRelative()) {
string_list sc = globals->get_fg_scenery();
for (string_list_iterator it = sc.begin(); it != sc.end(); ++it) {