SCUMM: Fix o6_freezeUnfreeze() for v7-8 (fix bug #13511)

FT, DIG and COMI interpreters explicitly ask for flag == 2 instead of flag >= 0x80.
This fixes a class of bugs in which some scripts which should have been paused
still manage to execute.
This commit is contained in:
AndywinXp 2022-05-28 22:10:41 +02:00
parent 1bb10c0b3d
commit de93de1c67

View file

@ -883,8 +883,9 @@ void ScummEngine::freezeScripts(int flag) {
return;
}
bool flagCondition = _game.version >= 7 ? flag == 2 : flag >= 0x80;
for (i = 0; i < NUM_SCRIPT_SLOT; i++) {
if (_currentScript != i && vm.slot[i].status != ssDead && (!vm.slot[i].freezeResistant || flag >= 0x80)) {
if (_currentScript != i && vm.slot[i].status != ssDead && (!vm.slot[i].freezeResistant || flagCondition)) {
vm.slot[i].status |= 0x80;
vm.slot[i].freezeCount++;
}