aboutsummaryrefslogtreecommitdiff
path: root/engines/zvision
diff options
context:
space:
mode:
authorFilippos Karapetis2015-02-14 15:27:01 +0200
committerFilippos Karapetis2015-02-14 15:27:01 +0200
commit53a2c30cb014997887e29f5fd0db1348d05990f0 (patch)
tree8d46ea88cf86743bafee552a958fd6804b4e790d /engines/zvision
parent9ce285a11e1bfc981c518e89f2401b1896b4a367 (diff)
downloadscummvm-rg350-53a2c30cb014997887e29f5fd0db1348d05990f0.tar.gz
scummvm-rg350-53a2c30cb014997887e29f5fd0db1348d05990f0.tar.bz2
scummvm-rg350-53a2c30cb014997887e29f5fd0db1348d05990f0.zip
ZVISION: Fix script bug #6791 (max value of delay_render)
This fixes the delay outside the Frobozz Electric building. In all other places, delay_render is called with a value ranging from 1 to 10, so the 100 here looks to be a script bug, and causes an unnecessary long pause in that scene. Thus, we're capping the frame delay value to 10.
Diffstat (limited to 'engines/zvision')
-rw-r--r--engines/zvision/scripting/actions.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/zvision/scripting/actions.cpp b/engines/zvision/scripting/actions.cpp
index 90d32e47ce..21c97e766b 100644
--- a/engines/zvision/scripting/actions.cpp
+++ b/engines/zvision/scripting/actions.cpp
@@ -217,6 +217,9 @@ ActionDelayRender::ActionDelayRender(ZVision *engine, int32 slotkey, const Commo
ResultAction(engine, slotkey) {
_framesToDelay = 0;
sscanf(line.c_str(), "%u", &_framesToDelay);
+ // Limit to 10 frames maximum. This fixes the script bug in ZGI scene px10
+ // (outside Frobozz Electric building), where this is set to 100 (bug #6791).
+ _framesToDelay = MIN<uint32>(_framesToDelay, 10);
}
bool ActionDelayRender::execute() {