SCUMM: Fix teleporting Rusty glitch in Loom (bug #13370)

Don't let the "send Rusty's ghost to guard the rift" script start as
long as the "make Rusty's ghost appear" script is running, because once
he reaches the rift he will then instantly teleport back to his body.

This bug happens in the original as well, though at least in ScummVM it
behaves a little bit differently in the FM Towns version than in any of
the other I tried. The fix still works for all of them, though.

The VGA talkie version is not affected, because there Rusty's ghost
appears in the rift, and the dialog makes sense regardless of whether
Bobbin or Rusty speaks first.
This commit is contained in:
Torbjörn Andersson 2022-03-23 10:40:27 +01:00
parent 1a3111d76f
commit 9c7cd2c7e2

View File

@ -2383,6 +2383,18 @@ void ScummEngine_v5::o5_startScript() {
getWordVararg(data);
// WORKAROUND bug #13370: If you try to leave the plateau before
// healing Rusty, his ghost will block the way. But this should not
// happen during the cutscene where he first appears, because then he
// will appear to teleport from one spot to another.
//
// In the VGA talkie version Rusty just appears in the rift, rather
// than gliding in from off-stage. The only thing that's affected is
// whether Bobbin or Rusty speaks first, and the dialog makes sense
// either way.
if (_game.id == GID_LOOM && _game.version == 3 && script == 207 && isScriptRunning(98))
return;
// WORKAROUND bug #2198: Script 171 loads a complete room resource,
// instead of the actual script, causing invalid opcode cases
if (_game.id == GID_ZAK && _game.platform == Common::kPlatformFMTowns && script == 171)