From: Erik Hofman Date: Mon, 13 Jun 2016 11:50:40 +0000 (+0200) Subject: Do not use properties but get the position and orientation information straight from... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=de095b6c119ac9c856509ac8bba11ea1880f300e;p=flightgear.git Do not use properties but get the position and orientation information straight from the view manager --- diff --git a/src/Sound/soundmanager.cxx b/src/Sound/soundmanager.cxx index 0637b96a0..48277980c 100644 --- a/src/Sound/soundmanager.cxx +++ b/src/Sound/soundmanager.cxx @@ -32,6 +32,7 @@ #include "soundmanager.hxx" #include "Main/globals.hxx" #include "Main/fg_props.hxx" +#include "Viewer/view.hxx" #include #include @@ -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()) {