[Scummvm-git-logs] scummvm master -> 933927259e629c12f2ce06f250a89029381065f0

dreammaster dreammaster at scummvm.org
Sat Aug 5 23:10:08 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:
933927259e TITANIC: Fix releasing chicken in middle of parrot leaning out to eat


Commit: 933927259e629c12f2ce06f250a89029381065f0
    https://github.com/scummvm/scummvm/commit/933927259e629c12f2ce06f250a89029381065f0
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-08-05T17:09:46-04:00

Commit Message:
TITANIC: Fix releasing chicken in middle of parrot leaning out to eat

Changed paths:
    engines/titanic/npcs/parrot.cpp


diff --git a/engines/titanic/npcs/parrot.cpp b/engines/titanic/npcs/parrot.cpp
index e5c52f9..60d11c0 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);
 			}





More information about the Scummvm-git-logs mailing list