aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/npcs/doorbot.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2017-08-25 19:03:55 -0400
committerPaul Gilbert2017-08-25 19:03:55 -0400
commitc4bf8575c1740ffca017b7c3e731944747726d00 (patch)
tree37b90a483525b9dfe4e3ffc18cb9acaa1c9484dd /engines/titanic/npcs/doorbot.cpp
parent8e62240ed95acd53187815299f105cf7924a12c4 (diff)
downloadscummvm-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/doorbot.cpp')
-rw-r--r--engines/titanic/npcs/doorbot.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/engines/titanic/npcs/doorbot.cpp b/engines/titanic/npcs/doorbot.cpp
index 391c60aba3..066191ed56 100644
--- a/engines/titanic/npcs/doorbot.cpp
+++ b/engines/titanic/npcs/doorbot.cpp
@@ -23,6 +23,7 @@
#include "titanic/npcs/doorbot.h"
#include "titanic/core/room_item.h"
#include "titanic/debugger.h"
+#include "titanic/pet_control/pet_control.h"
namespace Titanic {
@@ -551,6 +552,12 @@ bool CDoorbot::TextInputMsg(CTextInputMsg *msg) {
}
bool CDoorbot::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("DoorBot"))
+ petMoveToHiddenRoom();
+
if ((_npcFlags & NPCFLAG_DOORBOT_INTRO) && _introMovieNum == 7)
playClip("SE Move And Turn", MOVIE_NOTIFY_OBJECT);