From 0301ccc8a88283d02b65749fd21f90e71582f14d Mon Sep 17 00:00:00 2001 From: Joost Peters Date: Sat, 21 Feb 2004 20:20:35 +0000 Subject: Fix for bug #899881 (Sounds played when sound turned off) svn-id: r12975 --- queen/graphics.cpp | 6 ++++-- queen/logic.cpp | 3 ++- queen/talk.cpp | 3 ++- 3 files changed, 8 insertions(+), 4 deletions(-) (limited to 'queen') 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; } } diff --git a/queen/logic.cpp b/queen/logic.cpp index 8181abe32e..4f6edb14b3 100644 --- a/queen/logic.cpp +++ b/queen/logic.cpp @@ -1723,7 +1723,8 @@ void Logic::asmMakeLightningHitPlane() { lightningBob->y = 0; // 23/2/95 - Play lightning SFX - _vm->sound()->playSfx(currentRoomSfx(), false); + if (_vm->sound()->sfxOn()) + _vm->sound()->playSfx(currentRoomSfx(), false); _vm->bankMan()->unpack(18, lightningBob->frameNum, 15); _vm->bankMan()->unpack(4, planeBob ->frameNum, 15); diff --git a/queen/talk.cpp b/queen/talk.cpp index 1d0223f19b..c0d7fd02e8 100644 --- a/queen/talk.cpp +++ b/queen/talk.cpp @@ -773,7 +773,8 @@ void Talk::stringAnimation(const SpeechParameters *parameters, int startFrame, i if (frame > 500) { frame -= 500; - _vm->sound()->playSfx(_vm->logic()->currentRoomSfx(), false); + if (_vm->sound()->sfxOn()) + _vm->sound()->playSfx(_vm->logic()->currentRoomSfx(), false); } if (torso) { -- cgit v1.2.3