scenery: Allow switching off particle systems on scenery load.
This commit is contained in:
@@ -402,20 +402,22 @@ sgLoad3DModel_internal(const SGPath& path,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<SGPropertyNode_ptr> particle_nodes;
|
if (dbOptions->getPluginStringData("SimGear::PARTICLESYSTEM") != "OFF") {
|
||||||
particle_nodes = props->getChildren("particlesystem");
|
std::vector<SGPropertyNode_ptr> particle_nodes;
|
||||||
for (unsigned i = 0; i < particle_nodes.size(); ++i) {
|
particle_nodes = props->getChildren("particlesystem");
|
||||||
osg::ref_ptr<SGReaderWriterOptions> options2;
|
for (unsigned i = 0; i < particle_nodes.size(); ++i) {
|
||||||
options2 = new SGReaderWriterOptions(*options);
|
osg::ref_ptr<SGReaderWriterOptions> options2;
|
||||||
if (i==0) {
|
options2 = new SGReaderWriterOptions(*options);
|
||||||
if (!texturepath.extension().empty())
|
if (i==0) {
|
||||||
texturepath = texturepath.dir();
|
if (!texturepath.extension().empty())
|
||||||
|
texturepath = texturepath.dir();
|
||||||
options2->setDatabasePath(texturepath.str());
|
|
||||||
|
options2->setDatabasePath(texturepath.str());
|
||||||
|
}
|
||||||
|
group->addChild(Particles::appendParticles(particle_nodes[i],
|
||||||
|
prop_root,
|
||||||
|
options2.get()));
|
||||||
}
|
}
|
||||||
group->addChild(Particles::appendParticles(particle_nodes[i],
|
|
||||||
prop_root,
|
|
||||||
options2.get()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<SGPropertyNode_ptr> text_nodes;
|
std::vector<SGPropertyNode_ptr> text_nodes;
|
||||||
|
|||||||
Reference in New Issue
Block a user