]> git.mxchange.org Git - simgear.git/commitdiff
small fixes
authorehofman <ehofman>
Wed, 4 Nov 2009 10:25:59 +0000 (10:25 +0000)
committerTim Moore <timoore@redhat.com>
Wed, 4 Nov 2009 22:05:22 +0000 (23:05 +0100)
simgear/environment/visual_enviro.cxx
simgear/sound/sample_group.cxx

index e18ebededb47e96df1986d0dee94bbeaf457dc9c..b0cb219059f4b8ceecf844b8d7cb3581a0c85886 100644 (file)
@@ -755,8 +755,8 @@ void SGEnviro::drawLightning(void) {
                                ay = sin(course) * dist;
                                SGSharedPtr<SGSoundSample> snd = sampleGroup->find("thunder");
                                if( snd ) {
-                                       SGVec3f pos = SGVec3f(ax, ay, -sgEnviro.last_alt);
-                                       snd->set_relative_position(pos);
+                                       SGVec3d pos = SGVec3d(ax, ay, -sgEnviro.last_alt);
+                                       snd->set_position(pos);
                                        snd->play_once();
                                }
                        }
index c10d2dcefa6eeea4d518f41897fb1c8f228d5cc4..539ab61bfa233eb2fb67155ff64d93c7ce93cd81 100644 (file)
@@ -114,7 +114,7 @@ void SGSampleGroup::update( double dt ) {
     }
 
     // Update the position and orientation information for all samples.
-    if ( _changed ) {
+    if ( _changed || _smgr->has_changed() ) {
         update_pos_and_orientation();
         _changed = false;
     }