diff options
-rw-r--r-- | engines/pink/objects/actors/lead_actor.cpp | 4 | ||||
-rw-r--r-- | engines/pink/objects/inventory.cpp | 7 |
2 files changed, 5 insertions, 6 deletions
diff --git a/engines/pink/objects/actors/lead_actor.cpp b/engines/pink/objects/actors/lead_actor.cpp index 1db74d2599..d5c04c4e1f 100644 --- a/engines/pink/objects/actors/lead_actor.cpp +++ b/engines/pink/objects/actors/lead_actor.cpp @@ -391,7 +391,9 @@ Actor *LeadActor::getActorByPoint(const Common::Point point) { } void LeadActor::startInventory(bool paused) { - getInventoryMgr()->start(paused); + if (!getInventoryMgr()->start(paused)) + return; + if (!paused) { _isHaveItem = false; _stateCopy = _state; diff --git a/engines/pink/objects/inventory.cpp b/engines/pink/objects/inventory.cpp index f81275938c..94a316350b 100644 --- a/engines/pink/objects/inventory.cpp +++ b/engines/pink/objects/inventory.cpp @@ -99,11 +99,8 @@ void InventoryMgr::setItemOwner(const Common::String &owner, InventoryItem *item } bool InventoryMgr::start(bool paused) { - if (!_item) { - _item = findInventoryItem(_lead->getName()); - if (!_item) - return false; - } + if (!isPinkOwnsAnyItems()) + return false; _window = _lead->getPage()->findActor(kInventoryWindowActor); _itemActor = _lead->getPage()->findActor(kInventoryItemActor); |