diff options
author | Paul Gilbert | 2017-09-09 15:58:59 -0400 |
---|---|---|
committer | Paul Gilbert | 2017-09-09 15:58:59 -0400 |
commit | 635f189b9c04494f03293dc76d0d7587e7dcd641 (patch) | |
tree | 07214ef13f054c5220838c621b7ef88ba8adc73b | |
parent | 41ee6431a905008fe303d9bdedc6010f5717bb5a (diff) | |
download | scummvm-rg350-635f189b9c04494f03293dc76d0d7587e7dcd641.tar.gz scummvm-rg350-635f189b9c04494f03293dc76d0d7587e7dcd641.tar.bz2 scummvm-rg350-635f189b9c04494f03293dc76d0d7587e7dcd641.zip |
TITANIC: Fix parrot freezing after multiple chicken drags
-rw-r--r-- | engines/titanic/npcs/parrot.cpp | 10 | ||||
-rw-r--r-- | engines/titanic/npcs/parrot.h | 1 |
2 files changed, 11 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 diff --git a/engines/titanic/npcs/parrot.h b/engines/titanic/npcs/parrot.h index 6fc4d6a182..ee275158e6 100644 --- a/engines/titanic/npcs/parrot.h +++ b/engines/titanic/npcs/parrot.h @@ -51,6 +51,7 @@ class CParrot : public CTrueTalkNPC { bool PreEnterViewMsg(CPreEnterViewMsg *msg); bool PanningAwayFromParrotMsg(CPanningAwayFromParrotMsg *msg); bool LeaveRoomMsg(CLeaveRoomMsg *msg); + bool TrueTalkNotifySpeechStartedMsg(CTrueTalkNotifySpeechStartedMsg *msg); bool TrueTalkNotifySpeechEndedMsg(CTrueTalkNotifySpeechEndedMsg *msg); public: static bool _eatingChicken; |