Ticket #6791: framedelay.txt

File framedelay.txt, 1.2 KB (added by eriktorbjorn, 8 years ago)
Line 
1diff --git a/engines/zvision/scripting/actions.cpp b/engines/zvision/scripting/actions.cpp
2index 5238561..266ef56 100644
3--- a/engines/zvision/scripting/actions.cpp
4+++ b/engines/zvision/scripting/actions.cpp
5@@ -217,7 +217,24 @@ ActionDelayRender::ActionDelayRender(ZVision *engine, int32 slotkey, const Commo
6 }
7
8 bool ActionDelayRender::execute() {
9- _engine->setRenderDelay(_framesToDelay);
10+ uint32 framesToDelay = _framesToDelay;
11+
12+ // WORKAROUND: When approaching the Frobozz Electric building, the
13+ // camera lingers on the building from a distance for a while, so it
14+ // makes sense to delay for 100 frames. It doesn't make much sense if
15+ // approaching the building from any other direction, so there we use
16+ // a more standard value of 10 instead.
17+ //
18+ // This isn't entirely foolproof, as we can also "approach" from this
19+ // angle when returning from the inventory, the settings dialog, etc.
20+ if (_engine->getGameId() == GID_GRANDINQUISITOR && framesToDelay == 100) {
21+ Location loc = _engine->getScriptManager()->getCurrentLocation();
22+ if (loc.world == 'p' && loc.room == 'x' && loc.node == '1' && loc.view == '0' && loc.offset != 53) {
23+ framesToDelay = 10;
24+ }
25+ }
26+
27+ _engine->setRenderDelay(framesToDelay);
28 return true;
29 }
30