1
0
Fork 0

Remove /sim/paths/use-custom-scenery-data.

Scenery people tell me that this is always set to true
today. Thus we can remove this property as this allows
me for some further osg loader cleanups.
This commit is contained in:
Mathias Froehlich 2012-03-15 18:48:57 +01:00
parent 5caa42af8e
commit 8d3e1b06be
4 changed files with 4 additions and 45 deletions

View file

@ -403,12 +403,6 @@ void FGAirport::loadProcedures() const
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)) {

View file

@ -38,44 +38,14 @@ XMLLoader::~XMLLoader() {}
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) {

View file

@ -241,10 +241,6 @@ bool fgNavDBInit( FGNavList *navlist, FGNavList *loclist, FGNavList *gslist,
SGPropertyNode* ilsDataForRunwayAndNavaid(FGRunway* aRunway, const std::string& aNavIdent)
{
if (!fgGetBool("/sim/paths/use-custom-scenery-data")) {
return NULL;
}
if (!aRunway) {
return NULL;
}

View file

@ -224,8 +224,7 @@ osg::Node*
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) {