aboutsummaryrefslogtreecommitdiff
path: root/queen/graphics.cpp
diff options
context:
space:
mode:
authorJoost Peters2004-02-21 20:20:35 +0000
committerJoost Peters2004-02-21 20:20:35 +0000
commit0301ccc8a88283d02b65749fd21f90e71582f14d (patch)
tree0e60d852713c5279049abae14bcb48cc18d03302 /queen/graphics.cpp
parent1d7eafe675e08835a0f1128996b1f8a72561825d (diff)
downloadscummvm-rg350-0301ccc8a88283d02b65749fd21f90e71582f14d.tar.gz
scummvm-rg350-0301ccc8a88283d02b65749fd21f90e71582f14d.tar.bz2
scummvm-rg350-0301ccc8a88283d02b65749fd21f90e71582f14d.zip
Fix for bug #899881 (Sounds played when sound turned off)
svn-id: r12975
Diffstat (limited to 'queen/graphics.cpp')
-rw-r--r--queen/graphics.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/queen/graphics.cpp b/queen/graphics.cpp
index e845b4e6c8..dc7301a8f7 100644
--- a/queen/graphics.cpp
+++ b/queen/graphics.cpp
@@ -343,7 +343,8 @@ void Graphics::sortBobs() {
if (pbs->animating) {
pbs->animOneStep();
if (pbs->frameNum > 500) { // SFX frame
- _vm->sound()->playSfx(_vm->logic()->currentRoomSfx(), false);
+ if (_vm->sound()->sfxOn())
+ _vm->sound()->playSfx(_vm->logic()->currentRoomSfx(), false);
pbs->frameNum -= 500;
}
}
@@ -1112,7 +1113,8 @@ void BamScene::playSfx() {
// this problem since their playSfx() function returns immediately
// if a sound is already being played.
if (_lastSoundIndex == 0 || _index - _lastSoundIndex >= SFX_SKIP) {
- _vm->sound()->playSfx(_vm->logic()->currentRoomSfx(), false);
+ if (_vm->sound()->sfxOn())
+ _vm->sound()->playSfx(_vm->logic()->currentRoomSfx(), false);
_lastSoundIndex = _index;
}
}