diff options
Diffstat (limited to 'engines/mohawk/riven_stacks')
-rw-r--r-- | engines/mohawk/riven_stacks/pspit.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/engines/mohawk/riven_stacks/pspit.cpp b/engines/mohawk/riven_stacks/pspit.cpp index 37d159ff94..3c8b4306e4 100644 --- a/engines/mohawk/riven_stacks/pspit.cpp +++ b/engines/mohawk/riven_stacks/pspit.cpp @@ -87,6 +87,19 @@ void PSpit::xpisland990_elevcombo(const ArgumentArray &args) { _vm->delay(500); _vm->_cursor->showCursor(); + // If the user released the mouse button during the wait time, the mouse up event + // is not forwarded to the game script handler. The button appears to be down + // until the user moves the mouse outside of the button hotspot. + // This happens with the original engine as well. + // To work around this issue we run the mouse up script if the mouse is not + // pressed anymore at this point. + if (!mouseIsDown()) { + Common::String buttonName = Common::String::format("combo%d", args[0]); + RivenHotspot *button = _vm->getCard()->getHotspotByName(buttonName); + RivenScriptPtr mouseUpScript = button->getScript(kMouseUpScript); + _vm->_scriptMan->runScript(mouseUpScript, false); + } + // It is impossible to get here if Gehn is not trapped. However, // the original also disallows brute forcing the ending if you have // not yet trapped Gehn. |