Refactor code to make it easier to do 'nopredict' inside of any function without having a dependency on world model.

This commit is contained in:
2023-03-01 16:07:13 -05:00
parent aa77480fb5
commit 9ce34d950b
15 changed files with 86 additions and 49 deletions

View File

@@ -85,7 +85,8 @@ void LuaSnap::deserialize(StreamBuffer *sb) {
void *ud = sb->lua_reader_ud(len);
// Call eris with the permanents table and passing the snapshot as a lua_Reader.
lua_getfield(state_, LUA_REGISTRYINDEX, "unpersist");
lua_pushstring(state_, "unpersist");
lua_rawget(state_, LUA_REGISTRYINDEX);
eris_undump(state_, sb->lua_reader, ud);
assert(lua_gettop(state_) == 2);