aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Prykhodko2018-06-29 14:43:01 +0300
committerAndrei Prykhodko2018-06-29 14:43:57 +0300
commitab2085f0e8ffd090bc2a6a028e1b4897edf0265d (patch)
tree1f1edd9929072bf9b83df3c8fe976de5faa1994c
parentc8990f800caddc77278c6421fd275ed941a7a309 (diff)
downloadscummvm-rg350-ab2085f0e8ffd090bc2a6a028e1b4897edf0265d.tar.gz
scummvm-rg350-ab2085f0e8ffd090bc2a6a028e1b4897edf0265d.tar.bz2
scummvm-rg350-ab2085f0e8ffd090bc2a6a028e1b4897edf0265d.zip
PINK: fixed sending leftClickMessage under some circumstances
-rw-r--r--engines/pink/objects/actors/actor.h1
-rw-r--r--engines/pink/objects/actors/lead_actor.cpp18
-rw-r--r--engines/pink/objects/actors/supporting_actor.h2
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;