]> git.mxchange.org Git - simgear.git/commitdiff
make the relative positions fixed against the body again.
authorehofman <ehofman>
Wed, 18 Nov 2009 13:49:25 +0000 (13:49 +0000)
committerTim Moore <timoore@redhat.com>
Wed, 18 Nov 2009 22:25:55 +0000 (23:25 +0100)
simgear/sound/sample_openal.cxx

index 08eec611d3087e49197a296e42741641295a769e..db7cd465dc3786560a1199d7341868e08cf16a69 100644 (file)
@@ -197,9 +197,10 @@ SGSoundSample::~SGSoundSample() {
 
 void SGSoundSample::update_pos_and_orientation() {
 
-       // position is in basic view, no need to rotate
-       // (proper alignment is set in xmlsound)
-    _absolute_pos = _base_pos + _relative_pos;
+    _absolute_pos = _base_pos;
+    if (_relative_pos[0] || _relative_pos[1] || _relative_pos[2] ) {
+       _absolute_pos += _rotation.rotate( _relative_pos );
+    }
 
     _orivec = SGVec3f::zeros();
     if ( _direction[0] || _direction[1] || _direction[2] ) {