diff options
author | Bastien Bouclet | 2019-02-02 13:30:44 +0100 |
---|---|---|
committer | Bastien Bouclet | 2019-02-02 13:30:44 +0100 |
commit | 27a7a67778a1cd59e24ffe756b68cdd8888e19d4 (patch) | |
tree | 355791f8e7a4d274171fbc123089672aab64ffcc | |
parent | 19d92484fdbae556a5238b13535e34f8436f399b (diff) | |
download | scummvm-rg350-27a7a67778a1cd59e24ffe756b68cdd8888e19d4.tar.gz scummvm-rg350-27a7a67778a1cd59e24ffe756b68cdd8888e19d4.tar.bz2 scummvm-rg350-27a7a67778a1cd59e24ffe756b68cdd8888e19d4.zip |
MOHAWK: RIVEN: Prevent the card leave script from recursing
Recursion would happen when multiple events are received in the same
frame. This could happen when mashing both the mouse and the keyboard to
move around faster, as noticed by a speedrunner.
-rw-r--r-- | engines/mohawk/riven_card.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/engines/mohawk/riven_card.cpp b/engines/mohawk/riven_card.cpp index 555688ce7e..9026f2e8fb 100644 --- a/engines/mohawk/riven_card.cpp +++ b/engines/mohawk/riven_card.cpp @@ -917,10 +917,12 @@ void RivenCard::leave() { if (_pressedHotspot) { script += _pressedHotspot->getScript(kMouseUpScript); + _pressedHotspot = nullptr; } if (_hoveredHotspot) { script += _hoveredHotspot->getScript(kMouseLeaveScript); + _hoveredHotspot = nullptr; } script += getScript(kCardLeaveScript); |