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

athrxx noreply at scummvm.org
Sat Oct 28 18:54:50 UTC 2023


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:
a72678d2d2 SCUMM: (v7/v8) - fix walk code regression


Commit: a72678d2d2822d916694b6e6ee2949520f677262
    https://github.com/scummvm/scummvm/commit/a72678d2d2822d916694b6e6ee2949520f677262
Author: athrxx (athrxx at scummvm.org)
Date: 2023-10-28T20:53:44+02:00

Commit Message:
SCUMM: (v7/v8) - fix walk code regression

(missing room check)
This was (again) a very old bug that got unmasked
by recent changes. There was even a comment
from 2003 about how original DIG checked for the
current room, but we - allegedly - wouldn't have to
do that.

There is still a FIXME about Loom. I'll have a look at
that, too, since it is not difficult to do...

Changed paths:
    engines/scumm/actor.cpp


diff --git a/engines/scumm/actor.cpp b/engines/scumm/actor.cpp
index 61db234ae62..9e1a5c45a4a 100644
--- a/engines/scumm/actor.cpp
+++ b/engines/scumm/actor.cpp
@@ -1378,18 +1378,12 @@ int Actor::remapDirection(int dir, bool is_walking) {
 	bool flipX;
 	bool flipY;
 
-	// FIXME: It seems that at least in The Dig the original code does
-	// check _ignoreBoxes here. However, it breaks some animations in Loom,
+	// FIXME: It seems that checking _ignoreBoxes here breaks some animations in Loom,
 	// causing Bobbin to face towards the camera instead of away from it
 	// in some places: After the tree has been destroyed by lightning, and
 	// when entering the dark tunnels beyond the dragon's lair at the very
 	// least. Possibly other places as well.
-	//
-	// The Dig also checks if the actor is in the current room, but that's
-	// not necessary here because we never call the function unless the
-	// actor is in the current room anyway.
-
-	if (!_ignoreBoxes || _vm->_game.id == GID_LOOM) {
+	if ((!_ignoreBoxes && (_vm->_game.version < 7 || isInCurrentRoom())) || _vm->_game.id == GID_LOOM) {
 		if (_walkbox != kOldInvalidBox) {
 			assert(_walkbox < ARRAYSIZE(_vm->_extraBoxFlags));
 			specdir = _vm->_extraBoxFlags[_walkbox];




More information about the Scummvm-git-logs mailing list