diff options
author | Max Horn | 2003-12-06 15:59:17 +0000 |
---|---|---|
committer | Max Horn | 2003-12-06 15:59:17 +0000 |
commit | d483e58a9999afd3a0027abcc65921f5c67d337d (patch) | |
tree | 487f82d70c26f767d46bef647ba317a3131bc5fe /scumm | |
parent | c9559ef0d5262a32900140d3a36bc876e3afed2f (diff) | |
download | scummvm-rg350-d483e58a9999afd3a0027abcc65921f5c67d337d.tar.gz scummvm-rg350-d483e58a9999afd3a0027abcc65921f5c67d337d.tar.bz2 scummvm-rg350-d483e58a9999afd3a0027abcc65921f5c67d337d.zip |
regression fix (bug #855313)
svn-id: r11524
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/object.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/scumm/object.cpp b/scumm/object.cpp index caca11911b..4b681770c0 100644 --- a/scumm/object.cpp +++ b/scumm/object.cpp @@ -293,9 +293,11 @@ int ScummEngine::getObjActToObjActDist(int a, int b) { if (getObjectOrActorXY(b, x2, y2) == -1) return 0xFF; - // Only call FOO in V5 games. Older versions don't seem to make this - // call at all, and using it caused at least one bug (#853874). - if (acta && _version == 5) { + // Perform adjustXYToBeInBox() *only* if the first item is an + // actor and the second is an object. This used to not check + // whether the second item is a non-actor, which caused bug + // #853874). + if (acta && !actb) { AdjustBoxResult r = acta->adjustXYToBeInBox(x2, y2); x2 = r.x; y2 = r.y; |