From f6a0e197b1929bc14d5e1a5b8ce61db5b14833f9 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sat, 30 Jun 2018 17:50:16 +0200 Subject: ZVISION: Add workaround for ZGI bug #10605 It's possible to get the "Fire! Fire!" timer stuck after setting the the inquisitor doll on fire. This should work around that. --- engines/zvision/scripting/scr_file_handling.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/engines/zvision/scripting/scr_file_handling.cpp b/engines/zvision/scripting/scr_file_handling.cpp index cc845424c7..88d43e0b00 100644 --- a/engines/zvision/scripting/scr_file_handling.cpp +++ b/engines/zvision/scripting/scr_file_handling.cpp @@ -222,6 +222,28 @@ bool ScriptManager::parseCriteria(Common::SeekableReadStream &stream, Common::Li entry.argumentIsAKey = false; } + // WORKAROUND for a script bug in Zork: Grand Inquisitor. If the + // fire timer is killed (e.g. by the inventory screen) with less + // than 10 units left, it will get stuck and never time out. We + // work around that by changing the condition from "greater than + // 10" to "greater than 0 but not 2 (the magic time-out value)". + // + // I have a sneaking suspicion that there may be other timer + // glitches like this, but this one makes the game unplayable + // and is easy to trigger. + if (_engine->getGameId() == GID_GRANDINQUISITOR && key == 17162) { + Puzzle::CriteriaEntry entry0; + entry0.key = 17161; // pe_fire + entry0.criteriaOperator = Puzzle::GREATER_THAN; + entry0.argumentIsAKey = false; + entry0.argument = 0; + + criteriaList.back().push_back(entry0); + + entry.criteriaOperator = Puzzle::NOT_EQUAL_TO; + entry.argument = 2; + } + criteriaList.back().push_back(entry); line = stream.readLine(); -- cgit v1.2.3