1
0
Fork 0

Expose aircraft-dirs under /sim (read-only, for security)

This commit is contained in:
James Turner 2010-08-16 11:00:54 +01:00
parent e43456ba43
commit dbd9935c52

View file

@ -105,6 +105,7 @@ FGGlobals::FGGlobals() :
airwaynet( NULL ),
multiplayer_mgr( NULL )
{
}
@ -239,7 +240,15 @@ void FGGlobals::append_aircraft_path(const std::string& path)
return;
}
unsigned int index = fg_aircraft_dirs.size();
fg_aircraft_dirs.push_back(path);
// make aircraft dirs available to Nasal
SGPropertyNode* sim = fgGetNode("/sim", true);
sim->removeChild("fg-aircraft", index, false);
SGPropertyNode* n = sim->getChild("fg-aircraft", index, true);
n->setStringValue(path);
n->setAttribute(SGPropertyNode::WRITE, false);
}
void FGGlobals::append_aircraft_paths(const std::string& path)