diff options
-rw-r--r-- | engines/pink/objects/actors/actor.h | 1 | ||||
-rw-r--r-- | engines/pink/objects/actors/lead_actor.cpp | 18 | ||||
-rw-r--r-- | engines/pink/objects/actors/supporting_actor.h | 2 |
3 files changed, 13 insertions, 8 deletions
diff --git a/engines/pink/objects/actors/actor.h b/engines/pink/objects/actors/actor.h index af11490998..ab84c6d417 100644 --- a/engines/pink/objects/actors/actor.h +++ b/engines/pink/objects/actors/actor.h @@ -57,6 +57,7 @@ public: void endAction() { _isActionEnded = true; } + virtual bool isSupporting() { return false; } virtual bool isCursor() { return false; } virtual bool isLeftClickHandlers() { return false; } diff --git a/engines/pink/objects/actors/lead_actor.cpp b/engines/pink/objects/actors/lead_actor.cpp index be0e91a669..b7b4222136 100644 --- a/engines/pink/objects/actors/lead_actor.cpp +++ b/engines/pink/objects/actors/lead_actor.cpp @@ -215,14 +215,16 @@ void LeadActor::onLeftButtonClick(const Common::Point point) { if (this == clickedActor) { _audioInfoMgr.stop(); onClick(); - } else if (isInteractingWith(clickedActor)) { - _recipient = clickedActor; - if (!startWalk()) { - _audioInfoMgr.stop(); - if (_isHaveItem) - sendUseClickMessage(clickedActor); - else - sendLeftClickMessage(clickedActor); + } else if (clickedActor->isSupporting()) { + if (isInteractingWith(clickedActor)) { + _recipient = clickedActor; + if (!startWalk()) { + _audioInfoMgr.stop(); + if (_isHaveItem) + sendUseClickMessage(clickedActor); + else + sendLeftClickMessage(clickedActor); + } } } else clickedActor->onLeftClickMessage(); diff --git a/engines/pink/objects/actors/supporting_actor.h b/engines/pink/objects/actors/supporting_actor.h index 69ccd03b3a..a037787eed 100644 --- a/engines/pink/objects/actors/supporting_actor.h +++ b/engines/pink/objects/actors/supporting_actor.h @@ -37,6 +37,8 @@ public: virtual void toConsole() override; + bool isSupporting() override { return true; } + bool isLeftClickHandlers() override; bool isUseClickHandlers(InventoryItem *item) override; |