diff --git a/engines/zvision/scripting/actions.cpp b/engines/zvision/scripting/actions.cpp index 5238561..266ef56 100644 --- a/engines/zvision/scripting/actions.cpp +++ b/engines/zvision/scripting/actions.cpp @@ -217,7 +217,24 @@ ActionDelayRender::ActionDelayRender(ZVision *engine, int32 slotkey, const Commo } bool ActionDelayRender::execute() { - _engine->setRenderDelay(_framesToDelay); + uint32 framesToDelay = _framesToDelay; + + // WORKAROUND: When approaching the Frobozz Electric building, the + // camera lingers on the building from a distance for a while, so it + // makes sense to delay for 100 frames. It doesn't make much sense if + // approaching the building from any other direction, so there we use + // a more standard value of 10 instead. + // + // This isn't entirely foolproof, as we can also "approach" from this + // angle when returning from the inventory, the settings dialog, etc. + if (_engine->getGameId() == GID_GRANDINQUISITOR && framesToDelay == 100) { + Location loc = _engine->getScriptManager()->getCurrentLocation(); + if (loc.world == 'p' && loc.room == 'x' && loc.node == '1' && loc.view == '0' && loc.offset != 53) { + framesToDelay = 10; + } + } + + _engine->setRenderDelay(framesToDelay); return true; }