[Scummvm-git-logs] scummvm master -> c4bf8575c1740ffca017b7c3e731944747726d00
dreammaster
dreammaster at scummvm.org
Sat Aug 26 01:04:02 CEST 2017
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
c4bf8575c1 TITANIC: Fix Door/Bellbot remaining when summoned outside doors
Commit: c4bf8575c1740ffca017b7c3e731944747726d00
https://github.com/scummvm/scummvm/commit/c4bf8575c1740ffca017b7c3e731944747726d00
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-08-25T19:03:55-04:00
Commit Message:
TITANIC: Fix Door/Bellbot remaining when summoned outside doors
Changed paths:
engines/titanic/npcs/bellbot.cpp
engines/titanic/npcs/bellbot.h
engines/titanic/npcs/doorbot.cpp
diff --git a/engines/titanic/npcs/bellbot.cpp b/engines/titanic/npcs/bellbot.cpp
index 56420ba..c6c6a9e 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);
diff --git a/engines/titanic/npcs/bellbot.h b/engines/titanic/npcs/bellbot.h
index c246901..538c299 100644
--- a/engines/titanic/npcs/bellbot.h
+++ b/engines/titanic/npcs/bellbot.h
@@ -30,6 +30,7 @@ namespace Titanic {
class CBellBot : public CTrueTalkNPC {
DECLARE_MESSAGE_MAP;
bool OnSummonBotMsg(COnSummonBotMsg *msg);
+ bool EnterViewMsg(CEnterViewMsg *msg);
bool LeaveViewMsg(CLeaveViewMsg *msg);
bool MovieEndMsg(CMovieEndMsg *msg);
bool Use(CUse *msg);
diff --git a/engines/titanic/npcs/doorbot.cpp b/engines/titanic/npcs/doorbot.cpp
index 391c60a..066191e 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);
More information about the Scummvm-git-logs
mailing list