[Scummvm-cvs-logs] SF.net SVN: scummvm:[46026] scummvm/trunk/engines/sci/engine/game.cpp

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Fri Nov 20 22:50:20 CET 2009


Revision: 46026
          http://scummvm.svn.sourceforge.net/scummvm/?rev=46026&view=rev
Author:   thebluegr
Date:     2009-11-20 21:50:17 +0000 (Fri, 20 Nov 2009)

Log Message:
-----------
Fixed game restarting regression

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/game.cpp

Modified: scummvm/trunk/engines/sci/engine/game.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/game.cpp	2009-11-20 21:25:36 UTC (rev 46025)
+++ scummvm/trunk/engines/sci/engine/game.cpp	2009-11-20 21:50:17 UTC (rev 46026)
@@ -433,11 +433,14 @@
 		game_init_sound(s, SFX_STATE_FLAG_NOSOUND);
 	}
 
-	// Note: It's a bad idea to delete the segment manager here.
+	// Note: It's a bad idea to delete the segment manager here
+	// when loading a game.
 	// This function is called right after a game is loaded, and
 	// the segment manager has already been initialized from the
 	// save game. Deleting or resetting it here will result in
 	// invalidating the loaded save state
+	if (s->restarting_flags & SCI_GAME_IS_RESTARTING_NOW)
+		s->_segMan->resetSegMan();
 
 	// TODO Free parser segment here
 


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