diff options
author | Fabian Greffrath | 2015-03-26 16:31:57 +0100 |
---|---|---|
committer | Fabian Greffrath | 2015-03-26 16:31:57 +0100 |
commit | 27b5915111ffbdae97ce0c415157e104ee6f3493 (patch) | |
tree | 850fc62208b642b07047e0a9ea968c365d4dfd1f /src/strife/s_sound.c | |
parent | 350ac122030d198b187255b19b2519ef8267364a (diff) | |
parent | ad027ef6dbfeebabe0e6701eec968e9d474e497f (diff) | |
download | chocolate-doom-27b5915111ffbdae97ce0c415157e104ee6f3493.tar.gz chocolate-doom-27b5915111ffbdae97ce0c415157e104ee6f3493.tar.bz2 chocolate-doom-27b5915111ffbdae97ce0c415157e104ee6f3493.zip |
Merge branch 'master' of https://github.com/chocolate-doom/chocolate-doom into hexndemo
Diffstat (limited to 'src/strife/s_sound.c')
-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; } |