[Scummvm-git-logs] scummvm master -> e5601d34fe78400911d5d158ff3cdcd439ca60e1

bluegr noreply at scummvm.org
Sat Jun 11 16:13:35 UTC 2022


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
e5601d34fe SCUMM: Fix Captain Dread's head when Guybrush says "It's me again."


Commit: e5601d34fe78400911d5d158ff3cdcd439ca60e1
    https://github.com/scummvm/scummvm/commit/e5601d34fe78400911d5d158ff3cdcd439ca60e1
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2022-06-11T19:13:32+03:00

Commit Message:
SCUMM: Fix Captain Dread's head when Guybrush says "It's me again."

When Guybrush interacts with Dread, Dread should turn and face him if
he's not already looking at him. But the original script forgot to do
this check on Bit[129] if Guybrush already met him, tries giving him
an object and then immediately talks to him.

Since Dread's movement is always done by 32 bytes of opcodes, we can
just skip that if its first drawObject() call was done although
Bit[129] was set.

Changed paths:
    engines/scumm/script_v5.cpp


diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp
index 265d50c171d..38e83dd5d69 100644
--- a/engines/scumm/script_v5.cpp
+++ b/engines/scumm/script_v5.cpp
@@ -951,6 +951,18 @@ void ScummEngine_v5::o5_drawObject() {
 		}
 	}
 
+	// WORKAROUND: Captain Dread's head will glitch if you have already talked to him,
+	// give him an object and then immediately talk to him again ("It's me again.").
+	// This is because the original script forgot to check Bit[129] (= already facing
+	// Guybrush) in that particular case, and so Dread would always try to turn and
+	// face Guybrush even if he's already looking at him.  drawObject() should never
+	// be called if Bit[129] is set in that script, so if it does happen, it means
+	// the check was missing, and so we ignore the next 32 bytes of Dread's reaction.
+	if (_game.id == GID_MONKEY2 && _currentRoom == 22 && vm.slot[_currentScript].number == 201 && obj == 237 && state == 1 && readVar(0x8000 + 129) == 1 && _enableEnhancements) {
+		_scriptPointer += 32;
+		return;
+	}
+
 	idx = getObjectIndex(obj);
 	if (idx == -1)
 		return;




More information about the Scummvm-git-logs mailing list