mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-30 23:43:10 +00:00
Fix for bug #899881 (Sounds played when sound turned off)
svn-id: r12975
This commit is contained in:
parent
1d7eafe675
commit
0301ccc8a8
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user