aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorrichiesams2013-08-31 18:09:24 -0500
committerWillem Jan Palenstijn2013-09-24 13:59:40 +0200
commit07fdcdf312e5498508affe825db37a6f1644f738 (patch)
tree6b7970417683336e7a47dea978378c4dde657be6 /engines
parent04bf6f79e93d3a86e6ec2e8c391e59a5f1dd230c (diff)
downloadscummvm-rg350-07fdcdf312e5498508affe825db37a6f1644f738.tar.gz
scummvm-rg350-07fdcdf312e5498508affe825db37a6f1644f738.tar.bz2
scummvm-rg350-07fdcdf312e5498508affe825db37a6f1644f738.zip
ZVISION: Only do return pathing after the mouse is captured
Diffstat (limited to 'engines')
-rw-r--r--engines/zvision/lever_control.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/engines/zvision/lever_control.cpp b/engines/zvision/lever_control.cpp
index 91e54075b6..744fde1e1c 100644
--- a/engines/zvision/lever_control.cpp
+++ b/engines/zvision/lever_control.cpp
@@ -203,12 +203,14 @@ void LeverControl::onMouseUp(const Common::Point &screenSpacePos, const Common::
return;
}
- _mouseIsCaptured = false;
- _engine->getScriptManager()->setStateValue(_key, _currentFrame);
+ if (_mouseIsCaptured) {
+ _mouseIsCaptured = false;
+ _engine->getScriptManager()->setStateValue(_key, _currentFrame);
- _isReturning = true;
- _returnRoutesCurrentProgress = _frameInfo[_currentFrame].returnRoute.begin();
- _returnRoutesCurrentFrame = _currentFrame;
+ _isReturning = true;
+ _returnRoutesCurrentProgress = _frameInfo[_currentFrame].returnRoute.begin();
+ _returnRoutesCurrentFrame = _currentFrame;
+ }
}
bool LeverControl::onMouseMove(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos) {