working on snapshots

This commit is contained in:
p.kosyh 2010-07-14 18:53:42 +00:00
parent b95a963f07
commit 3167b2f77d
2 changed files with 3 additions and 7 deletions

View file

@ -26,11 +26,10 @@ stead.restore_snapshot = function (nr)
if not ss[nr] then return nil, true end -- nothing todo
local i,v
stead:init();
-- game.lifes:zap();
gamefile("main.lua", true);
stead.pclr();
-- if type(init) == 'function' then -- no hooks here!!!
-- init();
-- end
local f, err = loadstring(ss[nr]);
if not f then return end
local i,r = f();

View file

@ -1638,8 +1638,6 @@ function gamefile(file, forget)
if forget then
game._scripts = { }
end
stead:init();
game.lifes:zap();
dofile(file);
game:ini();
if #game._scripts == 0 or file ~= game._scripts[#game._scripts] then
@ -1647,7 +1645,6 @@ function gamefile(file, forget)
stead.table.insert(game._scripts, file);
end
end
return goto(here())
end
function do_savegame(s, h)