[Scummvm-git-logs] scummvm master -> 5475281c092a1569594970566073d953de659f21

AndywinXp noreply at scummvm.org
Wed Jul 27 15:13:02 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:
5475281c09 SCUMM: Clean up boolean assignment in c108dc2


Commit: 5475281c092a1569594970566073d953de659f21
    https://github.com/scummvm/scummvm/commit/5475281c092a1569594970566073d953de659f21
Author: AndywinXp (andywinxp at gmail.com)
Date: 2022-07-27T17:12:55+02:00

Commit Message:
SCUMM: Clean up boolean assignment in c108dc2

...whoops. Thanks athrxx for the heads up.

Changed paths:
    engines/scumm/actor.cpp


diff --git a/engines/scumm/actor.cpp b/engines/scumm/actor.cpp
index 0150d073572..fdce7a09abc 100644
--- a/engines/scumm/actor.cpp
+++ b/engines/scumm/actor.cpp
@@ -1579,9 +1579,9 @@ void Actor::faceToObject(int obj) {
 		dir = (x2 > _pos.x) ? 90 : 270;
 	} else {
 		_vm->getObjectOrActorWidth(obj, width);
-		dir = _pos.x < x2;
+		dir = (_pos.x < x2) ? 1 : 0;
 		if (abs(_pos.x - x2) < width / 2)
-			dir = (_pos.y > y2) + 2;
+			dir = (_pos.y > y2) ? 3 : 2;
 
 		dir = oldDirToNewDir(dir);
 	}




More information about the Scummvm-git-logs mailing list