From d483e58a9999afd3a0027abcc65921f5c67d337d Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 6 Dec 2003 15:59:17 +0000 Subject: regression fix (bug #855313) svn-id: r11524 --- scumm/object.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'scumm') 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; -- cgit v1.2.3