aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/npcs
diff options
context:
space:
mode:
authorPaul Gilbert2017-08-05 17:09:46 -0400
committerPaul Gilbert2017-08-05 17:09:46 -0400
commit933927259e629c12f2ce06f250a89029381065f0 (patch)
tree509fd32107b91654e29fa3ec85e4ff587ef17f2e /engines/titanic/npcs
parent5984111a26775f8b2065e3b4abc630cc539e13cd (diff)
downloadscummvm-rg350-933927259e629c12f2ce06f250a89029381065f0.tar.gz
scummvm-rg350-933927259e629c12f2ce06f250a89029381065f0.tar.bz2
scummvm-rg350-933927259e629c12f2ce06f250a89029381065f0.zip
TITANIC: Fix releasing chicken in middle of parrot leaning out to eat
Diffstat (limited to 'engines/titanic/npcs')
-rw-r--r--engines/titanic/npcs/parrot.cpp31
1 files changed, 19 insertions, 12 deletions
diff --git a/engines/titanic/npcs/parrot.cpp b/engines/titanic/npcs/parrot.cpp
index e5c52f9615..60d11c0a6e 100644
--- a/engines/titanic/npcs/parrot.cpp
+++ b/engines/titanic/npcs/parrot.cpp
@@ -23,6 +23,8 @@
#include "titanic/npcs/parrot.h"
#include "titanic/core/project_item.h"
#include "titanic/carry/carry.h"
+#include "titanic/carry/chicken.h"
+#include "titanic/game_manager.h"
namespace Titanic {
@@ -249,22 +251,27 @@ bool CParrot::MovieEndMsg(CMovieEndMsg *msg) {
return true;
} else if (clipExistsByEnd("Lean Over To Chicken", msg->_endFrame)) {
- // Leaning left out of cage to eat the chicken
- playClip("Eat Chicken");
+ // WORKAROUND: Do what the original obviously intended but got
+ // wrong.. only flag chicken as eaten if it's still being dragged
+ CTreeItem *dragItem = getGameManager()->_dragItem;
+ CCarry *chicken = dynamic_cast<CCarry *>(dragItem);
+
+ if (chicken)
+ playClip("Eat Chicken");
playClip("Eat Chicken 2", MOVIE_NOTIFY_OBJECT);
- _eatingChicken = true;
- CStatusChangeMsg statusMsg;
- statusMsg._newStatus = 0;
- statusMsg.execute("PerchCoreHolder");
+ if (chicken) {
+ _eatingChicken = true;
- CTrueTalkTriggerActionMsg actionMsg;
- actionMsg._action = 280266;
- actionMsg._param2 = 1;
- actionMsg.execute(this);
+ CStatusChangeMsg statusMsg;
+ statusMsg._newStatus = 0;
+ statusMsg.execute("PerchCoreHolder");
+
+ CTrueTalkTriggerActionMsg actionMsg;
+ actionMsg._action = 280266;
+ actionMsg._param2 = 1;
+ actionMsg.execute(this);
- CCarry *chicken = dynamic_cast<CCarry *>(findUnder(getRoot(), "Chicken"));
- if (chicken) {
CActMsg actMsg("Eaten");
actMsg.execute(chicken);
}