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

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Wed Jun 20 03:45:39 CEST 2007


Revision: 27553
          http://scummvm.svn.sourceforge.net/scummvm/?rev=27553&view=rev
Author:   thebluegr
Date:     2007-06-19 18:45:38 -0700 (Tue, 19 Jun 2007)

Log Message:
-----------
Fix crashes with some savegames in IHNM

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

Modified: scummvm/trunk/engines/saga/saveload.cpp
===================================================================
--- scummvm/trunk/engines/saga/saveload.cpp	2007-06-20 01:01:29 UTC (rev 27552)
+++ scummvm/trunk/engines/saga/saveload.cpp	2007-06-20 01:45:38 UTC (rev 27553)
@@ -310,7 +310,12 @@
 	if (getGameType() != GType_ITE) {
 		if (_scene->currentProtag() != 0 && _scene->currentChapterNumber() != 6) {
 			ActorData *actor1 = _actor->getFirstActor();
-			ActorData *actor2 = _actor->getActor(_scene->currentProtag());
+			// Original stores the current protagonist ID from sfSwapActors:
+			//ActorData *actor2 = _actor->getActor(_scene->currentProtag());
+			// However, we already store the protagonist, so merely getting the saved
+			// protagonist is easier and safer, and works without glitches
+			ActorData *actor2 = _actor->_protagonist;
+
 			SWAP(actor1->_location, actor2->_location);
 
 			actor2->_flags &= ~kProtagonist;


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