Add workaround for bug #1668393 - ZAK FM-TOWNS: Crash when entering Hostel from outside.
svn-id: r42590
This commit is contained in:
parent
d9c2544a4c
commit
1d40f78499
1 changed files with 13 additions and 3 deletions
|
@ -1138,10 +1138,20 @@ void ScummEngine_v5::o5_ifClassOfIs() {
|
||||||
|
|
||||||
while ((_opcode = fetchScriptByte()) != 0xFF) {
|
while ((_opcode = fetchScriptByte()) != 0xFF) {
|
||||||
cls = getVarOrDirectWord(PARAM_1);
|
cls = getVarOrDirectWord(PARAM_1);
|
||||||
|
|
||||||
|
// WORKAROUND bug #1668393: Due to a script bug, the wrong opcode is used
|
||||||
|
// to check the state of the inside door (object 465) of the Hostel on Mars,
|
||||||
|
// when opening the Hostel door from the outside.
|
||||||
|
if (_game.id == GID_ZAK && _game.platform == Common::kPlatformFMTowns &&
|
||||||
|
vm.slot[_currentScript].number == 205 && _currentRoom == 185 &&
|
||||||
|
obj == 465 && cls == 0) {
|
||||||
|
cond = (getState(obj) == 0);
|
||||||
|
} else {
|
||||||
b = getClass(obj, cls);
|
b = getClass(obj, cls);
|
||||||
if (((cls & 0x80) && !b) || (!(cls & 0x80) && b))
|
if (((cls & 0x80) && !b) || (!(cls & 0x80) && b))
|
||||||
cond = false;
|
cond = false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
jumpRelative(cond);
|
jumpRelative(cond);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue