From 65811506f8bc92f8fd3bbf5c3ce51ef74da11af6 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 24 Sep 2017 14:09:24 -0400 Subject: TITANIC: Don't launch further bot speeches when exiting game Previously, notifying bots to the end of a speech fragment was done in ~TTtalker. Which caused problems when in progress talkers were freed when exiting the game with a speech was in progress, since it would try to start the next following speech fragment. --- engines/titanic/true_talk/tt_talker.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'engines/titanic/true_talk/tt_talker.cpp') diff --git a/engines/titanic/true_talk/tt_talker.cpp b/engines/titanic/true_talk/tt_talker.cpp index b296ec25d1..a2c5e4cc97 100644 --- a/engines/titanic/true_talk/tt_talker.cpp +++ b/engines/titanic/true_talk/tt_talker.cpp @@ -34,7 +34,12 @@ void TTtalker::speechStarted(const CString &dialogueStr, uint dialogueId, uint s msg.execute(_npc, nullptr, MSGFLAG_BREAK_IF_HANDLED); } -TTtalker::~TTtalker() { +void TTtalker::endSpeech(int val) { + _done = true; + _talkEndState = val; +} + +void TTtalker::speechEnded() { CPetControl *petControl = _npc->getPetControl(); if (petControl) // Add in final line @@ -45,9 +50,4 @@ TTtalker::~TTtalker() { endedMsg.execute(_npc, nullptr, MSGFLAG_BREAK_IF_HANDLED); } -void TTtalker::endSpeech(int val) { - _done = true; - _talkEndState = val; -} - } // End of namespace Titanic -- cgit v1.2.3