]> git.mxchange.org Git - flightgear.git/blobdiff - src/Environment/fgclouds.cxx
fix a pointer reference.
[flightgear.git] / src / Environment / fgclouds.cxx
index 867798af467765c7aeec6959479dd77debc8c41a..1498a00f47096502c7386c14c327a6657b20427b 100644 (file)
@@ -68,9 +68,10 @@ void FGClouds::init(void) {
                snd_lightning = new SGSoundSample(globals->get_fg_root().c_str(), "Sounds/thunder.wav");
                snd_lightning->set_max_dist(7000.0f);
                snd_lightning->set_reference_dist(3000.0f);
-               SGSoundMgr *soundMgr = globals->get_soundmgr();
-               soundMgr->add( snd_lightning, "thunder" );
-               sgEnviro.set_soundMgr( soundMgr );
+               SGSoundMgr *smgr = globals->get_soundmgr();
+               SGSampleGroup *sgr = smgr->find("weather", true);
+               sgr->add( snd_lightning, "thunder" );
+               sgEnviro.set_sampleGroup( sgr );
        }
 }