diff options
author | Paul Gilbert | 2017-08-25 19:03:55 -0400 |
---|---|---|
committer | Paul Gilbert | 2017-08-25 19:03:55 -0400 |
commit | c4bf8575c1740ffca017b7c3e731944747726d00 (patch) | |
tree | 37b90a483525b9dfe4e3ffc18cb9acaa1c9484dd /engines/titanic/npcs/bellbot.cpp | |
parent | 8e62240ed95acd53187815299f105cf7924a12c4 (diff) | |
download | scummvm-rg350-c4bf8575c1740ffca017b7c3e731944747726d00.tar.gz scummvm-rg350-c4bf8575c1740ffca017b7c3e731944747726d00.tar.bz2 scummvm-rg350-c4bf8575c1740ffca017b7c3e731944747726d00.zip |
TITANIC: Fix Door/Bellbot remaining when summoned outside doors
Diffstat (limited to 'engines/titanic/npcs/bellbot.cpp')
-rw-r--r-- | engines/titanic/npcs/bellbot.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/engines/titanic/npcs/bellbot.cpp b/engines/titanic/npcs/bellbot.cpp index 56420ba0de..c6c6a9e3a6 100644 --- a/engines/titanic/npcs/bellbot.cpp +++ b/engines/titanic/npcs/bellbot.cpp @@ -30,6 +30,7 @@ namespace Titanic { BEGIN_MESSAGE_MAP(CBellBot, CTrueTalkNPC) ON_MESSAGE(OnSummonBotMsg) + ON_MESSAGE(EnterViewMsg) ON_MESSAGE(LeaveViewMsg) ON_MESSAGE(MovieEndMsg) ON_MESSAGE(Use) @@ -98,6 +99,16 @@ bool CBellBot::OnSummonBotMsg(COnSummonBotMsg *msg) { return true; } +bool CBellBot::EnterViewMsg(CEnterViewMsg *msg) { + // WORKAROUND: Calling bot in front of doors and then going through them + // can leave it in the view. Detect this and properly remove him when + // the player returns to that view + if (msg->_newView == getParent() && getPetControl()->canSummonBot("BellBot")) + petMoveToHiddenRoom(); + + return true; +} + bool CBellBot::LeaveViewMsg(CLeaveViewMsg *msg) { if (_npcFlags & NPCFLAG_MOVING) { performAction(true); |