From dbfc657a2c305946483e60d8bd68bb40575fb3a4 Mon Sep 17 00:00:00 2001 From: Peter Kohaut Date: Sun, 10 Feb 2019 19:45:50 +0100 Subject: BLADERUNNER: Added sitcom mode Available via ScummVM game options --- engines/bladerunner/script/script.cpp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'engines/bladerunner/script') diff --git a/engines/bladerunner/script/script.cpp b/engines/bladerunner/script/script.cpp index 502344bf6f..4c205d5d4c 100644 --- a/engines/bladerunner/script/script.cpp +++ b/engines/bladerunner/script/script.cpp @@ -329,16 +329,12 @@ void ScriptBase::Actor_Says_With_Pause(int actorId, int sentenceId, float pause, actor->changeAnimationMode(kAnimationModeIdle, false); } - //TODO: sitcom - //if (_vm->isSitcom) - //{ - // int rnd = _vm->random(1, 100); - // if (rnd <= actor::get_unknown3(actor)) - // { - // int soundId = _vm->random(319, 327); - // _vm->_audioPlayer->play(soundId, 40, 0, 0, 50); - // } - //} + if (_vm->_sitcomMode) { + int rnd = Random_Query(1, 100); + if (rnd <= actor->getSitcomRatio()) { + Sound_Play(Random_Query(319, 327), 40, 0, 0, 50); + } + } if(pause > 0.0f && !_vm->_speechSkipped) { Delay(pause * 1000); } -- cgit v1.2.3