mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 18:19:55 +00:00
Allow to play only one copy of given sound at time (bug #3647)
This commit is contained in:
parent
8c6a8ca48d
commit
1aaa8a76c5
1 changed files with 3 additions and 0 deletions
|
@ -579,6 +579,9 @@ namespace MWSound
|
|||
if((mode&Play_RemoveAtDistance) && (mListenerPos-objpos).length2() > 2000*2000)
|
||||
return MWBase::SoundPtr();
|
||||
|
||||
// Only one copy of given sound can be played at time on ptr, so stop previous copy
|
||||
stopSound3D(ptr, soundId);
|
||||
|
||||
if(!(mode&Play_NoPlayerLocal) && ptr == MWMechanics::getPlayer())
|
||||
{
|
||||
sound.reset(new Sound(volume * sfx->mVolume, basevol, pitch, mode|type|Play_2D));
|
||||
|
|
Loading…
Reference in a new issue