From af8184d7d90d1ff4e023fc0202d3386147807b2c Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 15 Jan 2017 22:46:54 -0500 Subject: TITANIC: Woarkound original bug when SuccUBus eats the chicken --- engines/titanic/npcs/succubus.cpp | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'engines/titanic/npcs/succubus.cpp') diff --git a/engines/titanic/npcs/succubus.cpp b/engines/titanic/npcs/succubus.cpp index b69bfbce4c..3534ba03e3 100644 --- a/engines/titanic/npcs/succubus.cpp +++ b/engines/titanic/npcs/succubus.cpp @@ -310,15 +310,22 @@ bool CSuccUBus::SubAcceptCCarryMsg(CSubAcceptCCarryMsg *msg) { _field158 = 2; } + // WORKAROUND: The original had code below to return the chicken + // to the dispensor after eaten, but since _fullViewName isn't + // set, it didn't work. I've added code below in the else block + // that replicates what happens when the parrot eats the chicken CViewItem *view = parseView(chicken->_fullViewName); - if (!view) - return false; - - item->setPosition(item->_origPos); - item->moveUnder(view); + if (view) { + item->setPosition(item->_origPos); + item->moveUnder(view); - CSUBTransition transMsg; - transMsg.execute(this); + CSUBTransition transMsg; + transMsg.execute(this); + } else { + CActMsg actMsg("Eaten"); + actMsg.execute(chicken); + return false; + } } } -- cgit v1.2.3