Forward-port maniac hack :)

svn-id: r13242
This commit is contained in:
James Brown 2004-03-13 12:55:40 +00:00
parent ac17175f6c
commit 7000cb00e4

View file

@ -444,7 +444,17 @@ int ScummEngine_v2::readVar(uint var) {
void ScummEngine_v2::writeVar(uint var, int value) {
checkRange(_numVariables - 1, 0, var, "Variable %d out of range(r)");
debug(6, "writeVar(%d) = %d", var, value);
_scummVars[var] = value;
// HACK: Ender's hack around a bug in Maniac. If you take the last dime from
// Weird Ed's piggybank, this disables the New Kid option and runs the Jail
// cutscene. Script 116 sets var[175] to 1, which disables New Kid in
// script 164. Unfortunatly, when New Kid is reenabled (var[175] = 0) in
// script 89, script 164 isn't reran to redraw it. Why? Dunno. Hack? Yes.
if ((var == 175) && (_gameId == GID_MANIAC) && (vm.slot[_currentScript].number == 89))
runScript(164, 0, 0, 0);
}
void ScummEngine_v2::getResultPosIndirect() {