[Scummvm-git-logs] scummvm master -> 033084505cba8929b440f89a7f565d0e331c6c49

athrxx athrxx at scummvm.org
Mon Aug 23 13:49:29 UTC 2021


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:
033084505c SCUMM: (COMI) - fix bug no. 4424 ("Guybrush walks in place when examining certain objects")


Commit: 033084505cba8929b440f89a7f565d0e331c6c49
    https://github.com/scummvm/scummvm/commit/033084505cba8929b440f89a7f565d0e331c6c49
Author: athrxx (athrxx at scummvm.org)
Date: 2021-08-23T15:48:10+02:00

Commit Message:
SCUMM: (COMI) - fix bug no. 4424 ("Guybrush walks in place when examining certain objects")

Minor walking code fix from disasm. I have verified that the changes have to be applied to all SCUMM7/8 games, but not to the lower versions.

Changed paths:
    engines/scumm/actor.cpp


diff --git a/engines/scumm/actor.cpp b/engines/scumm/actor.cpp
index 768c927610..be5ee5b1c2 100644
--- a/engines/scumm/actor.cpp
+++ b/engines/scumm/actor.cpp
@@ -587,7 +587,11 @@ int Actor::actorWalkStep() {
 	int distY = ABS(_walkdata.next.y - _walkdata.cur.y);
 
 	if (ABS(_pos.x - _walkdata.cur.x) >= distX && ABS(_pos.y - _walkdata.cur.y) >= distY) {
-		_moving &= ~MF_IN_LEG;
+		// I have checked that only the v7/8 games have this different (non-)handling of the moving flag. Our code was
+		// correct for the lower versions. For COMI this fixes one part of the issues that caused ticket #4424 (wrong
+		// movement data being reported by ScummEngine_v8::o8_wait()).
+		if (_vm->_game.version < 7)
+			_moving &= ~MF_IN_LEG;
 		return 0;
 	}
 
@@ -910,7 +914,10 @@ void Actor::walkActor() {
 			if (_facing != new_dir)
 				setDirection(new_dir);
 			else
-				_moving = 0;
+				// I have checked that only the v7/8 games have this different handling of the moving flag. Our code was
+				// correct for the lower versions. For COMI this fixes one part of the issues that caused ticket #4424
+				// (wrong movement data being reported by ScummEngine_v8::o8_wait()).
+				_moving = (_vm->_game.version >= 7) ? (_moving & ~MF_TURN) : 0;
 			return;
 		}
 




More information about the Scummvm-git-logs mailing list