Do not use properties but get the position and orientation information straight from the view manager
This commit is contained in:
parent
a61c0bfdb4
commit
3963d2cdee
1 changed files with 8 additions and 0 deletions
|
@ -32,6 +32,7 @@
|
||||||
#include "soundmanager.hxx"
|
#include "soundmanager.hxx"
|
||||||
#include "Main/globals.hxx"
|
#include "Main/globals.hxx"
|
||||||
#include "Main/fg_props.hxx"
|
#include "Main/fg_props.hxx"
|
||||||
|
#include "Viewer/view.hxx"
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -183,6 +184,7 @@ void FGSoundManager::update(double dt)
|
||||||
}
|
}
|
||||||
if (enabled)
|
if (enabled)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
SGVec3d cartPos(_viewX->getDoubleValue(),
|
SGVec3d cartPos(_viewX->getDoubleValue(),
|
||||||
_viewY->getDoubleValue(),
|
_viewY->getDoubleValue(),
|
||||||
_viewZ->getDoubleValue());
|
_viewZ->getDoubleValue());
|
||||||
|
@ -196,6 +198,12 @@ void FGSoundManager::update(double dt)
|
||||||
}
|
}
|
||||||
|
|
||||||
set_orientation( viewOrientation );
|
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());
|
SGVec3d velocity(SGVec3d::zeros());
|
||||||
if (!stationaryView()) {
|
if (!stationaryView()) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue