aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/kyra/text_v2.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/engines/kyra/text_v2.cpp b/engines/kyra/text_v2.cpp
index 828371407d..c968d41aed 100644
--- a/engines/kyra/text_v2.cpp
+++ b/engines/kyra/text_v2.cpp
@@ -180,7 +180,11 @@ void KyraEngine_v2::objectChat(const char *str, int object, int vocHigh, int voc
objectChatInit(str, object, vocHigh, vocLow);
_chatText = str;
_chatObject = object;
- _chatIsNote = (chatGetType(str) == -1);
+ int chatType = chatGetType(str);
+ if (chatType == -1) {
+ _chatIsNote = true;
+ chatType = 0;
+ }
if (_mainCharacter.facing > 7)
_mainCharacter.facing = 5;
@@ -197,7 +201,7 @@ void KyraEngine_v2::objectChat(const char *str, int object, int vocHigh, int voc
};
assert(_mainCharacter.facing * 3 + object < ARRAYSIZE(talkScriptTable));
- int script = talkScriptTable[_mainCharacter.facing * 3 + object];
+ int script = talkScriptTable[_mainCharacter.facing * 3 + chatType];
static const char *chatScriptFilenames[] = {
"_Z1FSTMT.EMC",