From 3c35ae36d4db1ac036373c3300d4443aee62aad8 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Thu, 1 Dec 2016 21:28:31 -0500 Subject: TITANIC: Fix Succubus greeting message when there's mail --- engines/titanic/core/game_object.cpp | 4 ++-- engines/titanic/core/game_object.h | 2 +- engines/titanic/npcs/succubus.cpp | 3 ++- engines/titanic/true_talk/succubus_script.cpp | 3 +-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/engines/titanic/core/game_object.cpp b/engines/titanic/core/game_object.cpp index fc25abc98e..3a5f6567a6 100644 --- a/engines/titanic/core/game_object.cpp +++ b/engines/titanic/core/game_object.cpp @@ -1426,11 +1426,11 @@ void CGameObject::setState1C(bool flag) { getGameManager()->_gameState._field1C = flag; } -void CGameObject::addMail(int mailId) { +void CGameObject::addMail(uint destRoomFlags) { CMailMan *mailMan = getMailMan(); if (mailMan) { makeDirty(); - mailMan->addMail(this, mailId); + mailMan->addMail(this, destRoomFlags); } } diff --git a/engines/titanic/core/game_object.h b/engines/titanic/core/game_object.h index 8affbd114a..9417fd7aa3 100644 --- a/engines/titanic/core/game_object.h +++ b/engines/titanic/core/game_object.h @@ -794,7 +794,7 @@ public: /** * Adds an object to the mail list */ - void addMail(int mailId); + void addMail(uint destRoomFlags); /** * Remove an object from the mail list diff --git a/engines/titanic/npcs/succubus.cpp b/engines/titanic/npcs/succubus.cpp index 574e999b33..806b144684 100644 --- a/engines/titanic/npcs/succubus.cpp +++ b/engines/titanic/npcs/succubus.cpp @@ -526,7 +526,7 @@ bool CSuccUBus::MovieEndMsg(CMovieEndMsg *msg) { if (msg->_endFrame == _endFrame9) { bool flag = false; - if (pet && mailExists(petRoomFlags)) { + if (pet && !mailExists(petRoomFlags)) { CGameObject *mailObject = _v3 && compareRoomNameTo("Titania") ? findMailByFlags(3, petRoomFlags) : findMailByFlags(_field140, petRoomFlags); @@ -666,6 +666,7 @@ bool CSuccUBus::TurnOn(CTurnOn *msg) { uint petRoomFlags = pet->getRoomFlags(); if (mailExists(petRoomFlags) && _endFrame1 >= 0) + // Mail canister present playMovie(_endFrame1, _endFrame1, 0); _enabled = true; diff --git a/engines/titanic/true_talk/succubus_script.cpp b/engines/titanic/true_talk/succubus_script.cpp index 888d23e17c..29a085d422 100644 --- a/engines/titanic/true_talk/succubus_script.cpp +++ b/engines/titanic/true_talk/succubus_script.cpp @@ -178,8 +178,7 @@ ScriptChangedResult SuccUBusScript::scriptChanged(const TTroomScript *roomScript if (id >= 230000 && id <= 230245) { addResponse(getDialogueId(id)); applyResponse(); - } - else if (id >= 70000 && id <= 70243) { + } else if (id >= 70000 && id <= 70243) { addResponse(id); applyResponse(); } -- cgit v1.2.3