aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/true_talk/tt_talker.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2017-09-24 14:09:24 -0400
committerPaul Gilbert2017-09-24 14:09:24 -0400
commit65811506f8bc92f8fd3bbf5c3ce51ef74da11af6 (patch)
treea7359c5255c4a48721e22f5304e8020e6a5396b1 /engines/titanic/true_talk/tt_talker.cpp
parent26183f7289281f515298cf0363a24d6ee4f5b685 (diff)
downloadscummvm-rg350-65811506f8bc92f8fd3bbf5c3ce51ef74da11af6.tar.gz
scummvm-rg350-65811506f8bc92f8fd3bbf5c3ce51ef74da11af6.tar.bz2
scummvm-rg350-65811506f8bc92f8fd3bbf5c3ce51ef74da11af6.zip
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.
Diffstat (limited to 'engines/titanic/true_talk/tt_talker.cpp')
-rw-r--r--engines/titanic/true_talk/tt_talker.cpp12
1 files changed, 6 insertions, 6 deletions
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