mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 19:19:56 +00:00
Merge pull request #860 from kcat/master
Start underwater sound after updating sounds
This commit is contained in:
commit
681cbaf04e
1 changed files with 7 additions and 7 deletions
|
@ -844,13 +844,6 @@ namespace MWSound
|
|||
env
|
||||
);
|
||||
|
||||
if(mListenerUnderwater)
|
||||
{
|
||||
// Play underwater sound (after updating listener)
|
||||
if(!(mUnderwaterSound && mOutput->isSoundPlaying(mUnderwaterSound)))
|
||||
mUnderwaterSound = playSound("Underwater", 1.0f, 1.0f, Play_TypeSfx, Play_LoopNoEnv);
|
||||
}
|
||||
|
||||
// Check if any sounds are finished playing, and trash them
|
||||
SoundMap::iterator snditer = mActiveSounds.begin();
|
||||
while(snditer != mActiveSounds.end())
|
||||
|
@ -979,6 +972,13 @@ namespace MWSound
|
|||
++trkiter;
|
||||
}
|
||||
}
|
||||
|
||||
if(mListenerUnderwater)
|
||||
{
|
||||
// Play underwater sound (after updating sounds)
|
||||
if(!(mUnderwaterSound && mOutput->isSoundPlaying(mUnderwaterSound)))
|
||||
mUnderwaterSound = playSound("Underwater", 1.0f, 1.0f, Play_TypeSfx, Play_LoopNoEnv);
|
||||
}
|
||||
mOutput->finishUpdate();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue