mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-30 23:43:10 +00:00
SAGA: When trying to access a wrong hitzone, adjust it to a valid one and continue with a warning instead of exiting with an error . We don't normally get invalid hitzones in ITE, but we do in IHNM, so this is used for now to bypass the places where IHNM crashes. It's now possible to climb the steps to the second floor of the zeppelin with Gorrister
svn-id: r27072
This commit is contained in:
parent
83c5c2ae4e
commit
f6b8c98c13
@ -110,7 +110,12 @@ public:
|
||||
int hitTest(const Point& testPoint);
|
||||
HitZone *getHitZone(int16 index) {
|
||||
if ((index < 0) || (index >= _hitZoneListCount)) {
|
||||
error("ObjectMap::getHitZone wrong index 0x%X", index);
|
||||
// HACK: If we get a wrong hitzone, return the last hitzone in the list
|
||||
// Normally, we don't get wrong hitzones in ITE, however IHNM still seems
|
||||
// to have problems with some, therefore just throw a warning for now and
|
||||
// continue with a valid hitzone
|
||||
warning("ObjectMap::getHitZone wrong index 0x%X, adjusting it to 0x%X", index, _hitZoneListCount - 1);
|
||||
index = _hitZoneListCount - 1;
|
||||
}
|
||||
return _hitZoneList[index];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user