diff options
-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); |