diff options
author | Simon Howard | 2015-02-22 00:32:49 -0500 |
---|---|---|
committer | Simon Howard | 2015-02-22 00:32:49 -0500 |
commit | 074026b37ee26e78ae1c25907d2b7211b3e5fe91 (patch) | |
tree | 0d502248f7c0812fec174c864140bad927447c2e /src/strife | |
parent | 01a743cd351d146e9b9ea7f7ca5b1c05e01da68e (diff) | |
parent | 5160ceb4512b8bb5839df898a4aff0c6779578c5 (diff) | |
download | chocolate-doom-074026b37ee26e78ae1c25907d2b7211b3e5fe91.tar.gz chocolate-doom-074026b37ee26e78ae1c25907d2b7211b3e5fe91.tar.bz2 chocolate-doom-074026b37ee26e78ae1c25907d2b7211b3e5fe91.zip |
Merge branch 'master' of github.com:chocolate-doom/chocolate-doom
Diffstat (limited to 'src/strife')
-rw-r--r-- | src/strife/s_sound.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/strife/s_sound.c b/src/strife/s_sound.c index 7a919737..d22f84e4 100644 --- a/src/strife/s_sound.c +++ b/src/strife/s_sound.c @@ -277,7 +277,7 @@ static int S_GetChannel(mobj_t *origin, sfxinfo_t *sfxinfo, boolean isvoice) channel_t* c; // Find an open channel - for (cnum=0 ; cnum<snd_channels ; cnum++) + for (cnum=0 ; cnum<snd_channels ; cnum++) { if (!channels[cnum].sfxinfo) { @@ -286,6 +286,11 @@ static int S_GetChannel(mobj_t *origin, sfxinfo_t *sfxinfo, boolean isvoice) else if (origin && channels[cnum].origin == origin && (isvoice || cnum != i_voicehandle)) // haleyjd { + // haleyjd 20150220: [STRIFE] missing sound channel priority check + // Is a higher priority sound by same origin already playing? + if(!isvoice && sfxinfo->priority > channels[cnum].sfxinfo->priority) + return -1; + S_StopChannel(cnum); break; } |