aboutsummaryrefslogtreecommitdiff
path: root/engines/pink/objects
diff options
context:
space:
mode:
authorAndrei Prykhodko2018-06-23 21:08:45 +0300
committerEugene Sandulenko2018-06-28 23:51:32 +0200
commit2d8b2be6c58c42313ecbe63a52d7843093312acc (patch)
tree818da771eee3771c3942499cf7f4efa7fe49c62e /engines/pink/objects
parentc5062e0f74376ba1d88a126c2995f0f2ccc9ab18 (diff)
downloadscummvm-rg350-2d8b2be6c58c42313ecbe63a52d7843093312acc.tar.gz
scummvm-rg350-2d8b2be6c58c42313ecbe63a52d7843093312acc.tar.bz2
scummvm-rg350-2d8b2be6c58c42313ecbe63a52d7843093312acc.zip
PINK: rework setItemOwner method
Diffstat (limited to 'engines/pink/objects')
-rw-r--r--engines/pink/objects/inventory.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/engines/pink/objects/inventory.cpp b/engines/pink/objects/inventory.cpp
index f22925da33..b4c1f7db56 100644
--- a/engines/pink/objects/inventory.cpp
+++ b/engines/pink/objects/inventory.cpp
@@ -91,11 +91,10 @@ void InventoryMgr::setItemOwner(const Common::String &owner, InventoryItem *item
if (item == _item && _lead->getName() != owner)
_item = nullptr;
+ else if (_lead->getName() == owner)
+ _item = item;
item->_currentOwner = owner;
-
- if (_lead->getName() == owner)
- _item = item;
}
bool InventoryMgr::start(bool paused) {