aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2017-02-18 17:06:30 -0500
committerPaul Gilbert2017-02-18 17:06:30 -0500
commit0343c0d3378fac49af4e0e0c8c82d4bf3c6404b6 (patch)
treee71c2acdf2bad9e84ae2b24d9ebae36ccf1137d7 /engines
parentd65c717a448d9afe9dc820756fa16e835d31176e (diff)
downloadscummvm-rg350-0343c0d3378fac49af4e0e0c8c82d4bf3c6404b6.tar.gz
scummvm-rg350-0343c0d3378fac49af4e0e0c8c82d4bf3c6404b6.tar.bz2
scummvm-rg350-0343c0d3378fac49af4e0e0c8c82d4bf3c6404b6.zip
TITANIC: Fix adding held items to inventory after unlocking arms
Diffstat (limited to 'engines')
-rw-r--r--engines/titanic/carry/arm.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/titanic/carry/arm.cpp b/engines/titanic/carry/arm.cpp
index a843b5bb33..e7d340d6cb 100644
--- a/engines/titanic/carry/arm.cpp
+++ b/engines/titanic/carry/arm.cpp
@@ -164,10 +164,10 @@ bool CArm::MaitreDHappyMsg(CMaitreDHappyMsg *msg) {
if (!_armUnlocked)
playSound("z#47.wav");
if (_heldItemName == "Key" || _heldItemName == "AuditoryCentre") {
- CGameObject *child = dynamic_cast<CGameObject *>(getFirstChild());
- if (child) {
- child->setVisible(true);
- petAddToInventory();
+ CGameObject *heldItem = dynamic_cast<CGameObject *>(getFirstChild());
+ if (heldItem) {
+ heldItem->setVisible(true);
+ heldItem->petAddToInventory();
}
_visibleFrame = _unlockedFrame;