aboutsummaryrefslogtreecommitdiff
path: root/engines/bladerunner/bladerunner.cpp
diff options
context:
space:
mode:
authorThanasis Antoniou2019-04-04 21:01:25 +0300
committerThanasis Antoniou2019-04-04 21:03:10 +0300
commitf04705084c6745b67766f33eac25cc73b4d3f524 (patch)
treef54608dbc31fff10871fa0ded267104a61f16893 /engines/bladerunner/bladerunner.cpp
parente4b78f4f621a7d73c08099c3b7674f3966cf8da4 (diff)
downloadscummvm-rg350-f04705084c6745b67766f33eac25cc73b4d3f524.tar.gz
scummvm-rg350-f04705084c6745b67766f33eac25cc73b4d3f524.tar.bz2
scummvm-rg350-f04705084c6745b67766f33eac25cc73b4d3f524.zip
BLADERUNNER: Support wait for dialogue queues to finish
Fixes a Crazylegs bug where he can interrupt himself Could probably be used elsewhere if there are any other such cases.
Diffstat (limited to 'engines/bladerunner/bladerunner.cpp')
-rw-r--r--engines/bladerunner/bladerunner.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/engines/bladerunner/bladerunner.cpp b/engines/bladerunner/bladerunner.cpp
index 911a46ad83..2752baa393 100644
--- a/engines/bladerunner/bladerunner.cpp
+++ b/engines/bladerunner/bladerunner.cpp
@@ -1693,6 +1693,22 @@ void BladeRunnerEngine::loopActorSpeaking() {
playerGainsControl();
}
+/**
+* To be used only for when there is a chance an ongoing dialogue in a dialogue queue
+* might be interrupted AND that is unwanted behavior (sometimes, it's intended that the dialogue
+* can be interrupted without necessarily being finished).
+*/
+void BladeRunnerEngine::loopQueuedDialogueStillPlaying() {
+ if (_actorDialogueQueue->isEmpty()) {
+ return;
+ }
+
+ do {
+ gameTick();
+ } while (_gameIsRunning && !_actorDialogueQueue->isEmpty());
+
+}
+
void BladeRunnerEngine::outtakePlay(int id, bool noLocalization, int container) {
Common::String name = _gameInfo->getOuttake(id);