diff --git a/stead/snapshots.lua b/stead/snapshots.lua index 423d843..635b602 100644 --- a/stead/snapshots.lua +++ b/stead/snapshots.lua @@ -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(); diff --git a/stead/stead.lua b/stead/stead.lua index 7d25fdb..1822c74 100644 --- a/stead/stead.lua +++ b/stead/stead.lua @@ -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)