diff options
author | Simon Howard | 2008-10-08 22:44:35 +0000 |
---|---|---|
committer | Simon Howard | 2008-10-08 22:44:35 +0000 |
commit | 9736ada9a68709c1aea0093aef12f2855d152b2c (patch) | |
tree | 7830e7c44ec73006b5b47f0de6b6642633629440 | |
parent | 7f69666e50aa954c1339890e1e471846d84680a7 (diff) | |
download | chocolate-doom-9736ada9a68709c1aea0093aef12f2855d152b2c.tar.gz chocolate-doom-9736ada9a68709c1aea0093aef12f2855d152b2c.tar.bz2 chocolate-doom-9736ada9a68709c1aea0093aef12f2855d152b2c.zip |
Fix sound effects!
Subversion-branch: /branches/raven-branch
Subversion-revision: 1345
-rw-r--r-- | src/hexen/s_sound.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/hexen/s_sound.c b/src/hexen/s_sound.c index 5588ec05..80d6a85d 100644 --- a/src/hexen/s_sound.c +++ b/src/hexen/s_sound.c @@ -392,6 +392,8 @@ void S_StartSoundAtVolume(mobj_t * origin, int sound_id, int volume) } } + Channel[i].mo = origin; + vol = (SoundCurve[dist] * (snd_MaxVolume * 8) * volume) >> 14; if (origin == players[displayplayer].mo) { @@ -423,11 +425,15 @@ void S_StartSoundAtVolume(mobj_t * origin, int sound_id, int volume) Channel[i].pitch = 127; } #endif + if (S_sfx[sound_id].lumpnum == 0) + { + S_sfx[sound_id].lumpnum = I_GetSfxLumpNum(&S_sfx[sound_id]); + } + Channel[i].handle = I_StartSound(&S_sfx[sound_id], i, vol, sep /* , Channel[i].pitch] */); - Channel[i].mo = origin; Channel[i].sound_id = sound_id; Channel[i].priority = priority; Channel[i].volume = volume; |