diff options
| author | Torbjörn Andersson | 2018-06-30 17:50:16 +0200 | 
|---|---|---|
| committer | Eugene Sandulenko | 2018-07-29 09:48:47 +0200 | 
| commit | f6a0e197b1929bc14d5e1a5b8ce61db5b14833f9 (patch) | |
| tree | 276af62293bbc63675f202b231e4a3b9f6eb2247 | |
| parent | 2982792eb1498962db855f7213bc2306d24e73cb (diff) | |
| download | scummvm-rg350-f6a0e197b1929bc14d5e1a5b8ce61db5b14833f9.tar.gz scummvm-rg350-f6a0e197b1929bc14d5e1a5b8ce61db5b14833f9.tar.bz2 scummvm-rg350-f6a0e197b1929bc14d5e1a5b8ce61db5b14833f9.zip  | |
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.
| -rw-r--r-- | engines/zvision/scripting/scr_file_handling.cpp | 22 | 
1 files changed, 22 insertions, 0 deletions
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();  | 
