From 705cf3cc87e6a6ef30a686d5aa65fad1510da61d Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Mon, 12 Nov 2007 09:53:10 +0000 Subject: Adjustments to the talk state machine so information dialogs (if any) correctly occur at the end of a conversation (such as giving the bar to Ewan) svn-id: r29481 --- engines/lure/hotspots.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'engines/lure') diff --git a/engines/lure/hotspots.cpp b/engines/lure/hotspots.cpp index 8f86edbab4..fd2344772e 100644 --- a/engines/lure/hotspots.cpp +++ b/engines/lure/hotspots.cpp @@ -3333,6 +3333,12 @@ void HotspotTickHandlers::talkAnimHandler(Hotspot &h) { case TALK_RESPOND: // Handle initial response to show the question in a talk dialog if needed + if (h.resource()->talkCountdown != 0) { + // Current talk dialog already pending needs to finish + h.handleTalkDialog(); + return; + } + // Get the original question for display selectedLine = res.getTalkSelection(); entry = talkSelections[selectedLine-1]; @@ -3400,10 +3406,11 @@ void HotspotTickHandlers::talkAnimHandler(Hotspot &h) { case TALK_RESPONSE_WAIT: // Wait until the character's response has finished being displayed charHotspot = res.getActiveHotspot(talkDestCharacter); + assert(charHotspot); debugC(ERROR_DETAILED, kLureDebugAnimations, "Player talk dialog countdown %d", (charHotspot) ? charHotspot->resource()->talkCountdown : 0); - if (res.getTalkingCharacter() != 0) + if ((charHotspot->resource()->talkCountdown > 0) || (res.getTalkingCharacter() != 0)) return; result = _talkResponse->postSequenceId; -- cgit v1.2.3