From 53a2c30cb014997887e29f5fd0db1348d05990f0 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 14 Feb 2015 15:27:01 +0200 Subject: 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. --- engines/zvision/scripting/actions.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'engines/zvision') 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(_framesToDelay, 10); } bool ActionDelayRender::execute() { -- cgit v1.2.3