diff options
author | Torbjörn Andersson | 2004-09-08 07:10:54 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2004-09-08 07:10:54 +0000 |
commit | 412f7105f06343c6a592a58df4b575fd64b74024 (patch) | |
tree | 70a5b6f55392470120ea4329c84f8f4ffa355251 /sword2/controls.cpp | |
parent | d662863db152e85c85f82220e37eed20d89d7fdd (diff) | |
download | scummvm-rg350-412f7105f06343c6a592a58df4b575fd64b74024.tar.gz scummvm-rg350-412f7105f06343c6a592a58df4b575fd64b74024.tar.bz2 scummvm-rg350-412f7105f06343c6a592a58df4b575fd64b74024.zip |
Fixed evil regression #2. Restarting the game, or using the "start" debug
command, would close the global script variables and player object
resources, without reopening them again. This made them fair game for the
resource expiration mechanism. The player object is probably referenced
often enough to stay alive, but the variables died on me pretty quickly,
causing ScummVM to crash.
I've also added a "reslist" debug command to make this sort of things
easier to spot. By default it only lists resources with refCount > 0. Use
"reslist 0" to see all the cached resources as well.
svn-id: r14958
Diffstat (limited to 'sword2/controls.cpp')
-rw-r--r-- | sword2/controls.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sword2/controls.cpp b/sword2/controls.cpp index 6b8b5462b7..452dff64f4 100644 --- a/sword2/controls.cpp +++ b/sword2/controls.cpp @@ -1598,9 +1598,8 @@ void Gui::restartControl(void) { // global variables _vm->_resman->removeAll(); - // Reopen global variables resource & send address to interpreter - - // it won't be moving - _vm->_logic->resetScriptVars(); + // Reopen global variables resource and player object + _vm->setupPersistentResources(); Logic::_scriptVars[DEMO] = temp_demo_flag; |