diff options
author | Paul Gilbert | 2016-11-06 22:31:27 -0500 |
---|---|---|
committer | Paul Gilbert | 2016-11-06 22:31:27 -0500 |
commit | 73030bd42f3bc3fb21bf44a9b0cb26e0f4b10e6e (patch) | |
tree | e15c56b2034240423854b3d583cc453dfbc8d4f6 /engines | |
parent | 0c7c72b75073910ba2e2ef32f5259f39d8ed2503 (diff) | |
download | scummvm-rg350-73030bd42f3bc3fb21bf44a9b0cb26e0f4b10e6e.tar.gz scummvm-rg350-73030bd42f3bc3fb21bf44a9b0cb26e0f4b10e6e.tar.bz2 scummvm-rg350-73030bd42f3bc3fb21bf44a9b0cb26e0f4b10e6e.zip |
TITANIC: Fix BellBot's intro speech
Diffstat (limited to 'engines')
-rw-r--r-- | engines/titanic/npcs/bellbot.cpp | 4 | ||||
-rw-r--r-- | engines/titanic/true_talk/bellbot_script.cpp | 2 | ||||
-rw-r--r-- | engines/titanic/true_talk/tt_npc_script.cpp | 5 |
3 files changed, 6 insertions, 5 deletions
diff --git a/engines/titanic/npcs/bellbot.cpp b/engines/titanic/npcs/bellbot.cpp index 2514d20df6..1326655299 100644 --- a/engines/titanic/npcs/bellbot.cpp +++ b/engines/titanic/npcs/bellbot.cpp @@ -238,8 +238,6 @@ bool CBellBot::NPCPlayTalkingAnimationMsg(CNPCPlayTalkingAnimationMsg *msg) { bool CBellBot::TimerMsg(CTimerMsg *msg) { if (msg->_action == "SummonDoorbot") { - CTrueTalkNPC::TimerMsg(msg); - } else { CRoomItem *room = getRoom(); if (room) { CSummonBotMsg botMsg; @@ -249,6 +247,8 @@ bool CBellBot::TimerMsg(CTimerMsg *msg) { } _npcFlags &= ~NPCFLAG_20000; + } else { + CTrueTalkNPC::TimerMsg(msg); } return true; diff --git a/engines/titanic/true_talk/bellbot_script.cpp b/engines/titanic/true_talk/bellbot_script.cpp index 038285ec8d..9f9b6fa267 100644 --- a/engines/titanic/true_talk/bellbot_script.cpp +++ b/engines/titanic/true_talk/bellbot_script.cpp @@ -527,7 +527,7 @@ int BellbotScript::handleQuote(const TTroomScript *roomScript, const TTsentence int BellbotScript::updateState(uint oldId, uint newId, int index) { if (!getValue(25)) { - newId = 202043 - getValue(1) <= 2 ? 994 : 0; + newId = 202043 - (getValue(1) <= 2 ? 994 : 0); CTrueTalkManager::setFlags(25, 1); } diff --git a/engines/titanic/true_talk/tt_npc_script.cpp b/engines/titanic/true_talk/tt_npc_script.cpp index 74e2f4f66b..bfb97c8c37 100644 --- a/engines/titanic/true_talk/tt_npc_script.cpp +++ b/engines/titanic/true_talk/tt_npc_script.cpp @@ -338,12 +338,13 @@ uint TTnpcScript::getRangeValue(uint id) { case SF_RANDOM: { uint count = range->_values.size(); - uint index = getRandomNumber(count) - 1; + int index = (int)getRandomNumber(count) - 1; if (count > 1 && range->_values[index] == range->_priorIndex) { for (int retry = 0; retry < 8 && index != range->_priorIndex; ++retry) - index = getRandomNumber(count) - 1; + index = (int)getRandomNumber(count) - 1; } + assert(index >= 0); range->_priorIndex = index; return range->_values[index]; } |