[Scummvm-cvs-logs] SF.net SVN: scummvm: [29796] scummvm/trunk/engines/saga/sfuncs.cpp

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Sun Dec 9 16:43:08 CET 2007


Revision: 29796
          http://scummvm.svn.sourceforge.net/scummvm/?rev=29796&view=rev
Author:   thebluegr
Date:     2007-12-09 07:43:08 -0800 (Sun, 09 Dec 2007)

Log Message:
-----------
Fix to prevent having an incorrect sprite assigned to some objects in IHNM when those objects are dropped in the scene

Modified Paths:
--------------
    scummvm/trunk/engines/saga/sfuncs.cpp

Modified: scummvm/trunk/engines/saga/sfuncs.cpp
===================================================================
--- scummvm/trunk/engines/saga/sfuncs.cpp	2007-12-09 15:24:06 UTC (rev 29795)
+++ scummvm/trunk/engines/saga/sfuncs.cpp	2007-12-09 15:43:08 UTC (rev 29796)
@@ -822,12 +822,12 @@
 			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;
 	}


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list