]> git.mxchange.org Git - flightgear.git/commitdiff
Do not use properties but get the position and orientation information straight from...
authorErik Hofman <erik@ehofman.com>
Mon, 13 Jun 2016 11:50:40 +0000 (13:50 +0200)
committerRoland Haeder <roland@mxchange.org>
Thu, 22 Sep 2016 21:27:36 +0000 (23:27 +0200)
src/Sound/soundmanager.cxx

index 0637b96a0e070d34a15daeb9d5618aef44ebcea1..48277980c032f611da84ea5e69282905bdd0ede8 100644 (file)
@@ -32,6 +32,7 @@
 #include "soundmanager.hxx"
 #include "Main/globals.hxx"
 #include "Main/fg_props.hxx"
+#include "Viewer/view.hxx"
 
 #include <vector>
 #include <string>
@@ -183,6 +184,7 @@ void FGSoundManager::update(double dt)
         }
         if (enabled)
         {
+#if 0
             SGVec3d cartPos(_viewX->getDoubleValue(),
                             _viewY->getDoubleValue(),
                             _viewZ->getDoubleValue());
@@ -196,6 +198,12 @@ void FGSoundManager::update(double dt)
             }
 
             set_orientation( viewOrientation );
+#else
+
+            set_position( globals->get_current_view()->getViewPosition(),
+                          globals->get_current_view()->getPosition() );
+            set_orientation( globals->get_current_view()->getViewOrientation() );
+#endif
 
             SGVec3d velocity(SGVec3d::zeros());
             if (!stationaryView()) {