diff options
author | whiterandrek | 2018-06-13 20:30:55 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2018-06-28 23:51:32 +0200 |
commit | 64bb3baab8be289d211317da58637084d9656423 (patch) | |
tree | 6a6e37bd6933886157fac19b6c45102564aa488d /engines | |
parent | 1af15bf46bb47b689c9cda2c27a03db0f49d1c22 (diff) | |
download | scummvm-rg350-64bb3baab8be289d211317da58637084d9656423.tar.gz scummvm-rg350-64bb3baab8be289d211317da58637084d9656423.tar.bz2 scummvm-rg350-64bb3baab8be289d211317da58637084d9656423.zip |
PINK: fix pausing when click on panther with empty inventory
Diffstat (limited to 'engines')
-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); |