diff options
author | Paul Gilbert | 2007-11-13 09:49:43 +0000 |
---|---|---|
committer | Paul Gilbert | 2007-11-13 09:49:43 +0000 |
commit | 149e87ecfbc115daafe35febecf2cd9a44b81fdd (patch) | |
tree | 174ff40e57e061abcb7c9f5f73fe048409345b98 | |
parent | e8771aab0c2f5c3a7e8764b600471bb9cb1e6602 (diff) | |
download | scummvm-rg350-149e87ecfbc115daafe35febecf2cd9a44b81fdd.tar.gz scummvm-rg350-149e87ecfbc115daafe35febecf2cd9a44b81fdd.tar.bz2 scummvm-rg350-149e87ecfbc115daafe35febecf2cd9a44b81fdd.zip |
Added guard to prevent one character's talk dialog interrupting another one that's already in-progress
svn-id: r29492
-rw-r--r-- | engines/lure/hotspots.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/engines/lure/hotspots.cpp b/engines/lure/hotspots.cpp index 9ccaaafc8b..dd73889102 100644 --- a/engines/lure/hotspots.cpp +++ b/engines/lure/hotspots.cpp @@ -890,6 +890,16 @@ void Hotspot::startTalkDialog() { if (room.roomNumber() != roomNumber()) return; + + if (room.isDialogActive()) { + // There's already an active dialog, so need to wait until it's finished + ++_data->talkCountdown; + if (delayCtr() > 0) + setDelayCtr(delayCtr() + 1); + + return; + } + room.setTalkDialog(hotspotId(), _data->talkDestCharacterId, _data->useHotspotId, _data->talkMessageId); } @@ -3225,6 +3235,7 @@ void HotspotTickHandlers::talkAnimHandler(Hotspot &h) { Resources &res = Resources::getReference(); StringData &strings = StringData::getReference(); Screen &screen = Screen::getReference(); + Room &room = Room::getReference(); Mouse &mouse = Mouse::getReference(); TalkSelections &talkSelections = res.getTalkSelections(); TalkData *data = res.getTalkData(); @@ -3244,6 +3255,11 @@ void HotspotTickHandlers::talkAnimHandler(Hotspot &h) { case TALK_NONE: talkDestCharacter = h.resource()->talkDestCharacterId; assert(talkDestCharacter != 0); + + // Make sure any other dialog is finished before we start talking + if (room.isDialogActive()) + return; + // Fall through to TALK_START case TALK_START: |