diff options
author | James Haley | 2015-02-20 20:01:02 -0600 |
---|---|---|
committer | James Haley | 2015-02-20 20:01:02 -0600 |
commit | 5160ceb4512b8bb5839df898a4aff0c6779578c5 (patch) | |
tree | 46ce255ad92387323038235b92b935b91e9c03e9 /src | |
parent | dcf2c6a09c97c284b6cdff8c791cce8fe03fd69d (diff) | |
download | chocolate-doom-5160ceb4512b8bb5839df898a4aff0c6779578c5.tar.gz chocolate-doom-5160ceb4512b8bb5839df898a4aff0c6779578c5.tar.bz2 chocolate-doom-5160ceb4512b8bb5839df898a4aff0c6779578c5.zip |
Strife sound priority fix
The Strife binary has another priority check in the first loop inside
S_GetChannel. TODO: Does DOS Doom have this as well? Find out.
Resolves issue #506.
Diffstat (limited to 'src')
-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; } |