From cc82aeb18d9c5945560bdc2251d5b3c7147db9a5 Mon Sep 17 00:00:00 2001 From: Kari Salminen Date: Sat, 16 Aug 2008 22:15:57 +0000 Subject: Workaround for bug #2054882 (FW: Impossible to survive entering monastery (regression)): For Future Wars o1_compareGlobalVar now compares global variable 255 to be equal to everything. The scripts probably tested global variable 255 for equality with some value (Maybe 143?) to see whether copy protection was properly passed. svn-id: r33950 --- engines/cine/script_fw.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/engines/cine/script_fw.cpp b/engines/cine/script_fw.cpp index 97f45488f2..6c13647ff3 100644 --- a/engines/cine/script_fw.cpp +++ b/engines/cine/script_fw.cpp @@ -1501,7 +1501,18 @@ int FWScript::o1_compareGlobalVar() { debugC(5, kCineDebugScript, "Line: %d: compare globalVars[%d] and %d", _line, varIdx, value); - _compare = compareVars(_globalVars[varIdx], value); + // WORKAROUND for bug #2054882. Without this, the monks will always + // kill you as an impostor, even if you enter the monastery in disguise. + // + // TODO: Check whether this might be worked around in some other way + // like setting global variable 255 to 143 in Future Wars (This is + // supposedly what Future Wars checks for from time to time during + // gameplay to verify that copy protection was successfully passed). + if (varIdx == 255 && (g_cine->getGameType() == Cine::GType_FW)) { + _compare = kCmpEQ; + } else { + _compare = compareVars(_globalVars[varIdx], value); + } } return 0; -- cgit v1.2.3