diff options
author | Torbjörn Andersson | 2005-10-02 13:49:58 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2005-10-02 13:49:58 +0000 |
commit | f912a940e909f38976d0be7c1bc667494485688b (patch) | |
tree | 3d184107f108b3167eba29256b976c7918a488b9 | |
parent | 4d9a2cb884fa4ba6fdba26a09b352e176c879021 (diff) | |
download | scummvm-rg350-f912a940e909f38976d0be7c1bc667494485688b.tar.gz scummvm-rg350-f912a940e909f38976d0be7c1bc667494485688b.tar.bz2 scummvm-rg350-f912a940e909f38976d0be7c1bc667494485688b.zip |
Fixed overlapping speech in ferret puzzle. See bug #1260904.
svn-id: r18925
-rw-r--r-- | saga/puzzle.cpp | 22 | ||||
-rw-r--r-- | saga/puzzle.h | 4 |
2 files changed, 20 insertions, 6 deletions
diff --git a/saga/puzzle.cpp b/saga/puzzle.cpp index 9c76c61297..0b9cb4de97 100644 --- a/saga/puzzle.cpp +++ b/saga/puzzle.cpp @@ -477,7 +477,17 @@ void Puzzle::solicitHint(void) { Common::g_timer->removeTimerProc(&hintTimerCallback); - switch(_hintRqState) { + switch (_hintRqState) { + case kRQSpeaking: + if (_vm->_actor->isSpeaking()) { + Common::g_timer->installTimerProc(&hintTimerCallback, 50000, this); + break; + } + + _hintRqState = _hintNextRqState; + Common::g_timer->installTimerProc(&hintTimerCallback, 333333, this); + break; + case kRQNoHint: // Pick a random hint request. i = _hintOffer++; @@ -500,8 +510,9 @@ void Puzzle::solicitHint(void) { _hintRqState = kRQSakkaDenies; Common::g_timer->installTimerProc(&hintTimerCallback, 200000, this); } else { - _hintRqState = kRQHintRequested; - Common::g_timer->installTimerProc(&hintTimerCallback, 400000, this); + _hintRqState = kRQSpeaking; + _hintNextRqState = kRQHintRequested; + Common::g_timer->installTimerProc(&hintTimerCallback, 50000, this); } break; @@ -512,8 +523,9 @@ void Puzzle::solicitHint(void) { _vm->_interface->setRightPortrait(RID_ITE_SAKKA_APPRAISING); - _hintRqState = kRQHintRequestedStage2; - Common::g_timer->installTimerProc(&hintTimerCallback, 400000, this); + _hintRqState = kRQSpeaking; + _hintNextRqState = kRQHintRequestedStage2; + Common::g_timer->installTimerProc(&hintTimerCallback, 50000, this); _vm->_interface->converseClear(); _vm->_interface->converseAddText(optionsStr[_lang][kROAccept], 1, 0, 0 ); diff --git a/saga/puzzle.h b/saga/puzzle.h index 5f1c2d8766..c2814461ff 100644 --- a/saga/puzzle.h +++ b/saga/puzzle.h @@ -40,7 +40,8 @@ private: kRQHintRequested = 1, kRQHintRequestedStage2 = 2, kRQSakkaDenies = 3, - kRQSkipEverything = 4 + kRQSkipEverything = 4, + kRQSpeaking = 5 }; SagaEngine *_vm; @@ -51,6 +52,7 @@ private: bool _sliding; kRQStates _hintRqState; + kRQStates _hintNextRqState; int _hintGiver; int _hintSpeaker; int _hintOffer; |