diff options
author | Filippos Karapetis | 2007-12-09 15:43:08 +0000 |
---|---|---|
committer | Filippos Karapetis | 2007-12-09 15:43:08 +0000 |
commit | c84d9c1588ec3c7531dd4c0146369e6b35e5c059 (patch) | |
tree | 60bdce97c4fc5957f53b05e02ddd833eac4745bd /engines/saga | |
parent | 87fadf6b459183a383f66103721d5b0060ca832c (diff) | |
download | scummvm-rg350-c84d9c1588ec3c7531dd4c0146369e6b35e5c059.tar.gz scummvm-rg350-c84d9c1588ec3c7531dd4c0146369e6b35e5c059.tar.bz2 scummvm-rg350-c84d9c1588ec3c7531dd4c0146369e6b35e5c059.zip |
Fix to prevent having an incorrect sprite assigned to some objects in IHNM when those objects are dropped in the scene
svn-id: r29796
Diffstat (limited to 'engines/saga')
-rw-r--r-- | engines/saga/sfuncs.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/saga/sfuncs.cpp b/engines/saga/sfuncs.cpp index 74f192c7f7..b6865d6b0d 100644 --- a/engines/saga/sfuncs.cpp +++ b/engines/saga/sfuncs.cpp @@ -822,12 +822,12 @@ void Script::sfDropObject(SCRIPTFUNC_PARAMS) { obj->_sceneNumber = -1; if (_vm->getGameType() == GType_IHNM) { - if (_vm->getGameId() != GID_IHNM_DEMO) { + // Don't update _spriteListResourceId if spriteId is 0 and the object is not the + // psychic profile. If spriteId == 0, the object's sprite is incorrectly reset. + // This occurs in the IHNM demo and with some incorrect scripts in the retail version + // of the game + if (spriteId > 0 || (spriteId == 0 && objectId == IHNM_OBJ_PROFILE)) obj->_spriteListResourceId = spriteId; - } else { - // Don't update the object's _spriteListResourceId in the IHNM demo, as this function is - // called incorrectly there (with spriteId == 0, which resets the object sprites) - } } else { obj->_spriteListResourceId = OBJ_SPRITE_BASE + spriteId; } |