[Scummvm-cvs-logs] scummvm master -> e3d6b25d57fc1910a2217f693c0feabaf3fafd96

bluegr bluegr at gmail.com
Mon Jun 8 00:24:34 CEST 2015


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:
e3d6b25d57 SHERLOCK: Add missing check for the rightmost limit in adjustSprite


Commit: e3d6b25d57fc1910a2217f693c0feabaf3fafd96
    https://github.com/scummvm/scummvm/commit/e3d6b25d57fc1910a2217f693c0feabaf3fafd96
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2015-06-08T01:23:23+03:00

Commit Message:
SHERLOCK: Add missing check for the rightmost limit in adjustSprite

Changed paths:
    engines/sherlock/objects.cpp



diff --git a/engines/sherlock/objects.cpp b/engines/sherlock/objects.cpp
index 32f0562..bdb5543 100644
--- a/engines/sherlock/objects.cpp
+++ b/engines/sherlock/objects.cpp
@@ -247,6 +247,11 @@ void Sprite::adjustSprite() {
 			_position.x = LEFT_LIMIT * FIXED_INT_MULTIPLIER;
 			people.gotoStand(*this);
 		}
+
+		if ((_position.x / FIXED_INT_MULTIPLIER) > RIGHT_LIMIT) {
+			_position.x = RIGHT_LIMIT * FIXED_INT_MULTIPLIER;
+			people.gotoStand(*this);
+		}
 	} else if (!map._active) {
 		_position.y = CLIP((int)_position.y, (int)UPPER_LIMIT, (int)LOWER_LIMIT);
 		_position.x = CLIP((int)_position.x, (int)LEFT_LIMIT, (int)RIGHT_LIMIT);






More information about the Scummvm-git-logs mailing list