SCI: Reverted commit db7dea3

The original check was correct, and the associated MG bug (#3049515) has
actually been fixed with another commit.

Fixes bug (regression) #3315639 - "Character Glitches in KQ4 SCI".
Many thanks to waltervn and wjp for their help on this
This commit is contained in:
Filippos Karapetis 2011-06-13 16:43:04 +03:00
parent 3e6f031fc5
commit bfa26ffc44

View File

@ -84,7 +84,14 @@ reg_t GfxCompare::canBeHereCheckRectList(reg_t checkObject, const Common::Rect &
curRect.right = readSelectorValue(_segMan, curObject, SELECTOR(brRight));
curRect.bottom = readSelectorValue(_segMan, curObject, SELECTOR(brBottom));
// Check if curRect is within checkRect
if (checkRect.contains(curRect))
// This behavior is slightly odd, but it's how the original SCI
// engine did it: a rect cannot be contained within itself
// (there is no equality). Do NOT change this to contains(), as
// it breaks KQ4 early (bug #3315639).
if (curRect.right > checkRect.left &&
curRect.left < checkRect.right &&
curRect.bottom > checkRect.top &&
curRect.top < checkRect.bottom)
return curObject;
}
}