make sure update_late isn't executed when dt=0

This commit is contained in:
ehofman
2009-10-17 13:09:27 +00:00
committed by Tim Moore
parent e2b8a21ff5
commit 811cd0653f
2 changed files with 4 additions and 1 deletions

View File

@@ -183,4 +183,7 @@ void SGSoundSample::update_absolute_position() {
orient = SGQuatd::fromRealImag(0, _relative_pos) * _orientation;
_absolute_pos = -SGVec3d::fromGeod(_base_pos) -orient.rotate(SGVec3d::e1());
float vel = length(_velocity);
_velocity = toVec3d(_orivec * vel);
}

View File

@@ -222,7 +222,7 @@ void SGSoundMgr::unbind ()
// run the audio scheduler
void SGSoundMgr::update_late( double dt ) {
if (_working) {
if (_working && dt != 0.0) {
alcSuspendContext(_context);
sample_group_map_iterator sample_grp_current = _sample_groups.begin();