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

dreammaster noreply at scummvm.org
Tue Aug 11 05:55:02 UTC 2026


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

Summary:
dff2019686 SHERLOCK: TATTOO: Fix delta.x sign during vertical walks


Commit: dff201968679291a21eeea8948d5492732d05c99
    https://github.com/scummvm/scummvm/commit/dff201968679291a21eeea8948d5492732d05c99
Author: Mingyang Li (tslmy at outlook.com)
Date: 2026-08-11T15:54:57+10:00

Commit Message:
SHERLOCK: TATTOO: Fix delta.x sign during vertical walks

In TattooPerson::setWalking(), the vertical-movement branch determined
the sign of _delta.x by comparing _walkDest.x against
_position.y / FIXED_INT_MULTIPLIER, instead of _position.x. The
mirrored horizontal-movement branch a few lines above correctly
compares against _position.x.

When Holmes needs to walk mostly vertically to reach a destination
(e.g. to talk to an NPC whose talk position requires more vertical
than horizontal travel), _delta.x could get the wrong sign. This made
him drift sideways in the wrong direction, which triggered
setWalking() to re-fire on the next frame and flip the sign back,
producing a visible left-right oscillation (Holmes appearing to
spin/step in place) instead of walking to the destination.

Co-authored-by: Copilot <223556219+Copilot at users.noreply.github.com>

Changed paths:
    engines/sherlock/tattoo/tattoo_people.cpp


diff --git a/engines/sherlock/tattoo/tattoo_people.cpp b/engines/sherlock/tattoo/tattoo_people.cpp
index d142e8848f5..16278a425f8 100644
--- a/engines/sherlock/tattoo/tattoo_people.cpp
+++ b/engines/sherlock/tattoo/tattoo_people.cpp
@@ -479,7 +479,7 @@ void TattooPerson::setWalking() {
 			else
 				_delta.x = (delta.x * FIXED_INT_MULTIPLIER) / delta.y;
 
-			if (_walkDest.x < _position.y / FIXED_INT_MULTIPLIER)
+			if (_walkDest.x < _position.x / FIXED_INT_MULTIPLIER)
 				_delta.x = -_delta.x;
 
 			// Set how many times we should add the delta's to the players position




More information about the Scummvm-git-logs mailing list