aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2009-11-20 21:50:17 +0000
committerFilippos Karapetis2009-11-20 21:50:17 +0000
commit8b4dabea834443d317a2f849e38d581fcb0eb86a (patch)
treedd7e5d20c3e603ebb9b83a221ea2da3de13d70cc /engines
parent3ee2d9375c1fb9ad3972036123c83695abe50caa (diff)
downloadscummvm-rg350-8b4dabea834443d317a2f849e38d581fcb0eb86a.tar.gz
scummvm-rg350-8b4dabea834443d317a2f849e38d581fcb0eb86a.tar.bz2
scummvm-rg350-8b4dabea834443d317a2f849e38d581fcb0eb86a.zip
Fixed game restarting regression
svn-id: r46026
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/game.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/sci/engine/game.cpp b/engines/sci/engine/game.cpp
index 0f5226c33e..dec2b22598 100644
--- a/engines/sci/engine/game.cpp
+++ b/engines/sci/engine/game.cpp
@@ -433,11 +433,14 @@ int game_exit(EngineState *s) {
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