mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-31 20:45:32 +00:00
Fix SoundManager::isPlaying to consider multiple entries with the same Ptr/id
Now it returns true if *any* sounds matching the given Ptr and id are playing. The previous behaviour was causing problems with "zombie" sounds (sounds that have finished playing, but weren't removed from the map yet) making the isPlaying method return false even though there's another legitimately playing sound in the map.
This commit is contained in:
parent
3bd2aaddea
commit
f08cfa19ea
1 changed files with 2 additions and 2 deletions
|
@ -168,8 +168,8 @@ namespace MWSound
|
|||
SoundMap::const_iterator snditer = mActiveSounds.begin();
|
||||
while(snditer != mActiveSounds.end())
|
||||
{
|
||||
if(snditer->second.first == ptr && snditer->second.second == id)
|
||||
return snditer->first->isPlaying();
|
||||
if(snditer->second.first == ptr && snditer->second.second == id && snditer->first->isPlaying())
|
||||
return true;
|
||||
++snditer;
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue