aboutsummaryrefslogtreecommitdiff
path: root/engines/saga
diff options
context:
space:
mode:
authorFilippos Karapetis2007-12-31 22:45:30 +0000
committerFilippos Karapetis2007-12-31 22:45:30 +0000
commita8d3967f63f51c77b8a934ec05b09803185afa12 (patch)
tree9ad0582f07f407054e050b2b6b20dd22ead03f07 /engines/saga
parentbe11104d7056c41d4c326c6762162a1c7e64dfd2 (diff)
downloadscummvm-rg350-a8d3967f63f51c77b8a934ec05b09803185afa12.tar.gz
scummvm-rg350-a8d3967f63f51c77b8a934ec05b09803185afa12.tar.bz2
scummvm-rg350-a8d3967f63f51c77b8a934ec05b09803185afa12.zip
Fix for bug #1861126 - "IHNM: Crash when Gorrister cuts sheet in the mooring ring"
svn-id: r30109
Diffstat (limited to 'engines/saga')
-rw-r--r--engines/saga/sfuncs.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/engines/saga/sfuncs.cpp b/engines/saga/sfuncs.cpp
index b6865d6b0d..7d6a8da403 100644
--- a/engines/saga/sfuncs.cpp
+++ b/engines/saga/sfuncs.cpp
@@ -277,6 +277,23 @@ void Script::sfTakeObject(SCRIPTFUNC_PARAMS) {
if (obj->_sceneNumber != ITE_SCENE_INV) {
obj->_sceneNumber = ITE_SCENE_INV;
+ // WORKAROUND for a problematic object in IHNM
+ // There are 3 different scenes in front of the zeppelin, in Gorrister's chapter. A scene where the
+ // zeppelin is in the air (scene 17), a scene where it approaches Gorrister's (scene 16) and another one
+ // where it has landed (scene 18).
+ // In two of these scenes (the "on air" and "approaching" ones), when the player uses the knife with the
+ // rope, the associated script picks up object id 16392. In the "zeppelin landed" scene (scene 18), the
+ // associated script picks up object id 16390. This seems to be a script bug, as it should be id 16392,
+ // like in the other two scenes, as it is the same object (the rope). Picking up object 16390 leads to an
+ // assertion anyway, therefore we change the problematic object (16390) to the correct one (16392) here.
+ // Fixes bug #1861126 - "IHNM: Crash when Gorrister cuts sheet in the mooring ring"
+ if (_vm->getGameType() == GType_IHNM) {
+ if (_vm->_scene->currentChapterNumber() == 1 && _vm->_scene->currentSceneNumber() == 18) {
+ if (objectId == 16390)
+ objectId = 16392;
+ }
+ }
+
// WORKAROUND for two incorrect object sprites in the IHNM demo
// (the mirror and the icon in Ted's part). Set them correctly here
if (_vm->getGameId() == GID_IHNM_DEMO) {