Particles: changes to support new API in SimGear
Matches corresponding SimGear rewrite of global particle manager code.
This commit is contained in:
parent
3e2233cba7
commit
d57bc67420
2 changed files with 4 additions and 0 deletions
|
@ -269,6 +269,9 @@ FGEnvironmentMgr::update (double dt)
|
|||
auto particlesManager = simgear::ParticlesGlobalManager::instance();
|
||||
particlesManager->setWindFrom(_environment->get_wind_from_heading_deg(),
|
||||
_environment->get_wind_speed_kt());
|
||||
particlesManager->setSimTime(dt);
|
||||
particlesManager->setCurrentPosition(globals->get_aircraft_position());
|
||||
|
||||
if( _cloudLayersDirty ) {
|
||||
_cloudLayersDirty = false;
|
||||
fgClouds->set_update_event( fgClouds->get_update_event()+1 );
|
||||
|
|
|
@ -456,6 +456,7 @@ void FGScenery::init() {
|
|||
particles_branch->setName("Particles");
|
||||
scene_graph->addChild(particles_branch.get());
|
||||
paricles->setSwitchNode(fgGetNode("/sim/rendering/particles", true));
|
||||
paricles->initFromMainThread();
|
||||
|
||||
// Set up the precipitation system.
|
||||
precipitation_branch = new osg::Group;
|
||||
|
|
Loading…
Add table
Reference in a new issue