diff options
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); |