diff options
author | Paul Gilbert | 2015-04-24 02:17:59 -0500 |
---|---|---|
committer | Paul Gilbert | 2015-04-24 02:17:59 -0500 |
commit | 572ad464901eedfd20ab5a35149e669f4bcac64a (patch) | |
tree | ccf831a95c97bd875130559450b99c980871bca1 /engines/sherlock | |
parent | e2b233e0bb62e14fcf454cda74966dd5df071654 (diff) | |
download | scummvm-rg350-572ad464901eedfd20ab5a35149e669f4bcac64a.tar.gz scummvm-rg350-572ad464901eedfd20ab5a35149e669f4bcac64a.tar.bz2 scummvm-rg350-572ad464901eedfd20ab5a35149e669f4bcac64a.zip |
SHERLOCK: Fix talk sequences being incorrectly started
Diffstat (limited to 'engines/sherlock')
-rw-r--r-- | engines/sherlock/objects.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/engines/sherlock/objects.cpp b/engines/sherlock/objects.cpp index 262006b3b1..888c34fa04 100644 --- a/engines/sherlock/objects.cpp +++ b/engines/sherlock/objects.cpp @@ -195,17 +195,17 @@ void Sprite::checkSprite() { for (uint idx = 0; idx < scene._bgShapes.size() && !talk._talkToAbort; ++idx) { Object &obj = scene._bgShapes[idx]; + if (obj._aType <= PERSON || obj._type == INVALID || obj._type == HIDDEN) + continue; - if (obj._aType > PERSON && obj._type != INVALID && obj._type != HIDDEN) { - if (obj._type == NO_SHAPE) { - objBounds = Common::Rect(obj._position.x, obj._position.y, - obj._position.x + obj._noShapeSize.x, obj._position.y + obj._noShapeSize.y); - } else { - int xp = obj._position.x + obj._imageFrame->_offset.x; - int yp = obj._position.y + obj._imageFrame->_offset.y; - objBounds = Common::Rect(xp, yp, - xp + obj._imageFrame->_frame.w, yp + obj._imageFrame->_frame.h); - } + if (obj._type == NO_SHAPE) { + objBounds = Common::Rect(obj._position.x, obj._position.y, + obj._position.x + obj._noShapeSize.x, obj._position.y + obj._noShapeSize.y); + } else { + int xp = obj._position.x + obj._imageFrame->_offset.x; + int yp = obj._position.y + obj._imageFrame->_offset.y; + objBounds = Common::Rect(xp, yp, + xp + obj._imageFrame->_frame.w, yp + obj._imageFrame->_frame.h); } if (objBounds.contains(pt)) { |