aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKari Salminen2008-08-16 22:15:57 +0000
committerKari Salminen2008-08-16 22:15:57 +0000
commitcc82aeb18d9c5945560bdc2251d5b3c7147db9a5 (patch)
treec51d114d9610ab764153e8255fc004a0de70748f
parent08b4cf127bf2b810fbe284ea4f424ca342b27c6b (diff)
downloadscummvm-rg350-cc82aeb18d9c5945560bdc2251d5b3c7147db9a5.tar.gz
scummvm-rg350-cc82aeb18d9c5945560bdc2251d5b3c7147db9a5.tar.bz2
scummvm-rg350-cc82aeb18d9c5945560bdc2251d5b3c7147db9a5.zip
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
-rw-r--r--engines/cine/script_fw.cpp13
1 files changed, 12 insertions, 1 deletions
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;