diff options
author | Filippos Karapetis | 2015-06-08 01:23:23 +0300 |
---|---|---|
committer | Filippos Karapetis | 2015-06-08 01:23:23 +0300 |
commit | e3d6b25d57fc1910a2217f693c0feabaf3fafd96 (patch) | |
tree | c26744798553b91020f5c938b91dc4caf0f61fc4 /engines | |
parent | eb5579df54ff3522f0cc7b0bfa00812eff616a70 (diff) | |
download | scummvm-rg350-e3d6b25d57fc1910a2217f693c0feabaf3fafd96.tar.gz scummvm-rg350-e3d6b25d57fc1910a2217f693c0feabaf3fafd96.tar.bz2 scummvm-rg350-e3d6b25d57fc1910a2217f693c0feabaf3fafd96.zip |
SHERLOCK: Add missing check for the rightmost limit in adjustSprite
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sherlock/objects.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/engines/sherlock/objects.cpp b/engines/sherlock/objects.cpp index 32f0562ce6..bdb554330a 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); |