Added luasnap checkpointing mechanism

This commit is contained in:
2021-02-09 17:15:54 -05:00
parent 368d066cc7
commit 8f557ff387
11 changed files with 349 additions and 73 deletions

View File

@@ -16,9 +16,13 @@ public:
Viewer();
~Viewer();
// Snapshot/rollback the lua state (temporary hack)
void snapshot() { world_->lua_snap_.snapshot(); }
void rollback() { world_->lua_snap_.rollback(); }
// Get the lua state for interaction.
//
lua_State *get_lua_state() { return world_->get_lua_state(); }
lua_State *state() { return world_->state(); }
// Get the player ID of the current player.
//