aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/npcs/parrot.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2017-09-09 15:58:59 -0400
committerPaul Gilbert2017-09-09 15:58:59 -0400
commit635f189b9c04494f03293dc76d0d7587e7dcd641 (patch)
tree07214ef13f054c5220838c621b7ef88ba8adc73b /engines/titanic/npcs/parrot.cpp
parent41ee6431a905008fe303d9bdedc6010f5717bb5a (diff)
downloadscummvm-rg350-635f189b9c04494f03293dc76d0d7587e7dcd641.tar.gz
scummvm-rg350-635f189b9c04494f03293dc76d0d7587e7dcd641.tar.bz2
scummvm-rg350-635f189b9c04494f03293dc76d0d7587e7dcd641.zip
TITANIC: Fix parrot freezing after multiple chicken drags
Diffstat (limited to 'engines/titanic/npcs/parrot.cpp')
-rw-r--r--engines/titanic/npcs/parrot.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/engines/titanic/npcs/parrot.cpp b/engines/titanic/npcs/parrot.cpp
index dd033abbae..6277751efd 100644
--- a/engines/titanic/npcs/parrot.cpp
+++ b/engines/titanic/npcs/parrot.cpp
@@ -45,6 +45,7 @@ BEGIN_MESSAGE_MAP(CParrot, CTrueTalkNPC)
ON_MESSAGE(PreEnterViewMsg)
ON_MESSAGE(PanningAwayFromParrotMsg)
ON_MESSAGE(LeaveRoomMsg)
+ ON_MESSAGE(TrueTalkNotifySpeechStartedMsg)
ON_MESSAGE(TrueTalkNotifySpeechEndedMsg)
END_MESSAGE_MAP()
@@ -726,6 +727,15 @@ bool CParrot::LeaveRoomMsg(CLeaveRoomMsg *msg) {
return true;
}
+bool CParrot::TrueTalkNotifySpeechStartedMsg(CTrueTalkNotifySpeechStartedMsg *msg) {
+ // WORKAROUND: Fix parrot freezing up if you drag the chicken whilst
+ // he's still returning to the center from a prior chicken drag
+ if (_npcFlags & (NPCFLAG_MOVE_LEFT | NPCFLAG_MOVE_RIGHT))
+ _npcFlags &= ~(NPCFLAG_MOVING | NPCFLAG_MOVE_LEFT | NPCFLAG_MOVE_RIGHT);
+
+ return CTrueTalkNPC::TrueTalkNotifySpeechStartedMsg(msg);
+}
+
bool CParrot::TrueTalkNotifySpeechEndedMsg(CTrueTalkNotifySpeechEndedMsg *msg) {
if (msg->_dialogueId == 80022) {
// WORKAROUND: End of parrot speech after having fixed Titania