diff options
author | athrxx | 2016-04-03 13:02:02 +0200 |
---|---|---|
committer | athrxx | 2016-04-03 13:06:16 +0200 |
commit | 97a69022fd2cb7314d1ecc9e86b1a7dbc29dca67 (patch) | |
tree | c9d6f8dcbf45f1b79365be0a978d4be61fa97c4c /engines/kyra/sound_lol.cpp | |
parent | d643036c206fff904232d3d7678cf0f3d57e55b4 (diff) | |
download | scummvm-rg350-97a69022fd2cb7314d1ecc9e86b1a7dbc29dca67.tar.gz scummvm-rg350-97a69022fd2cb7314d1ecc9e86b1a7dbc29dca67.tar.bz2 scummvm-rg350-97a69022fd2cb7314d1ecc9e86b1a7dbc29dca67.zip |
KYRA: (LOL) fix bug #7104 (LOL-CD: mixing sfx and voice mode does not work)
Diffstat (limited to 'engines/kyra/sound_lol.cpp')
-rw-r--r-- | engines/kyra/sound_lol.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/kyra/sound_lol.cpp b/engines/kyra/sound_lol.cpp index 8be0cb6ab9..6e7551ed0e 100644 --- a/engines/kyra/sound_lol.cpp +++ b/engines/kyra/sound_lol.cpp @@ -161,7 +161,7 @@ void LoLEngine::snd_playSoundEffect(int track, int volume) { return; _lastSfxTrack = track; - if (track == -1 || track >= _ingameSoundListSize) + if (track == -1 || track >= _ingameSoundIndexSize) return; volume &= 0xFF; @@ -216,10 +216,10 @@ bool LoLEngine::snd_processEnvironmentalSoundEffect(int soundId, int block) { for (int i = 3; i > 0; i--) { int dir = calcMonsterDirection(cbl & 0x1F, cbl >> 5, block & 0x1F, block >> 5); cbl = (cbl + blockShiftTable[dir]) & 0x3FF; - if (cbl != block) { - if (testWallFlag(cbl, 0, 1)) - _environmentSfxVol >>= 1; - } + if (cbl == block) + break; + if (testWallFlag(cbl, 0, 1)) + _environmentSfxVol >>= 1; } } |