X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fsound%2Fsample_group.cxx;h=f384663142a0e866e3a8d422006d64e1cf4b2465;hb=afb18ca75b90e5a2e0bf791ba2e38812128ab0a8;hp=bd1bf4851b238176f5c613a2d49a766cf30e034c;hpb=01c62932bd25bb0a388fffa5d3f0b84f24bf196a;p=simgear.git diff --git a/simgear/sound/sample_group.cxx b/simgear/sound/sample_group.cxx index bd1bf485..f3846631 100644 --- a/simgear/sound/sample_group.cxx +++ b/simgear/sound/sample_group.cxx @@ -324,11 +324,12 @@ void SGSampleGroup::set_volume( float vol ) void SGSampleGroup::update_pos_and_orientation() { SGVec3d position = SGVec3d::fromGeod(_base_pos) - _smgr->get_position(); - SGQuatd ec2body= SGQuatd::fromLonLat(_base_pos) * _orientation; + SGQuatd hlOr = SGQuatd::fromLonLat(_base_pos); + SGQuatd ec2body = hlOr*_orientation; SGVec3f velocity = SGVec3f::zeros(); if ( _velocity[0] || _velocity[1] || _velocity[2] ) { - velocity = toVec3f( ec2body.backTransform(_velocity*SG_FEET_TO_METER) ); + velocity = toVec3f( hlOr.backTransform(_velocity*SG_FEET_TO_METER) ); } sample_map_iterator sample_current = _samples.begin();