From 412f7105f06343c6a592a58df4b575fd64b74024 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Wed, 8 Sep 2004 07:10:54 +0000 Subject: 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 --- sword2/logic.cpp | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'sword2/logic.cpp') diff --git a/sword2/logic.cpp b/sword2/logic.cpp index ef6855dc35..aa5f3c7627 100644 --- a/sword2/logic.cpp +++ b/sword2/logic.cpp @@ -31,16 +31,6 @@ namespace Sword2 { -/** - * Reset the script variables. If the resource is already open, this won't do - * anything, I beleive. - */ - -void Logic::resetScriptVars(void) { - _scriptVars = (uint32 *) (_vm->_resman->openResource(1) + sizeof(StandardHeader)); - _vm->_resman->closeResource(1); -} - /** * Do one cycle of the current session. */ -- cgit v1.2.3