aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/zvision/lever_control.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/zvision/lever_control.cpp b/engines/zvision/lever_control.cpp
index 7f0cd401b2..f3d369fbfb 100644
--- a/engines/zvision/lever_control.cpp
+++ b/engines/zvision/lever_control.cpp
@@ -260,7 +260,6 @@ bool LeverControl::process(uint32 deltaTimeInMillis) {
if (_returnRoutesCurrentProgress == _frameInfo[_currentFrame].returnRoute.end()) {
_isReturning = false;
_currentFrame = _returnRoutesCurrentFrame;
- _engine->getScriptManager()->setStateValue(_key, _currentFrame);
return false;
}
@@ -271,6 +270,7 @@ bool LeverControl::process(uint32 deltaTimeInMillis) {
_returnRoutesCurrentFrame--;
}
+ _engine->getScriptManager()->setStateValue(_key, _returnRoutesCurrentFrame);
renderFrame(_returnRoutesCurrentFrame);
}
}