diff --git a/src/lua_hooklib.c b/src/lua_hooklib.c index 6f6f5dc61..12c09a8ba 100644 --- a/src/lua_hooklib.c +++ b/src/lua_hooklib.c @@ -934,40 +934,7 @@ int LUA_HookHurtMsg(player_t *player, mobj_t *inflictor, mobj_t *source) return hook.status; } -#if 0 -void LUA_HookNetArchive(lua_CFunction archFunc) -{ - const hook_t * map = &hookIds[HOOK(NetVars)]; - Hook_State hook; - hook.force_mobj = false; - /* this is a remarkable case where the stack isn't reset */ - if (map->numHooks > 0) - { - // stack: tables - I_Assert(lua_gettop(gL) > 0); - I_Assert(lua_istable(gL, -1)); - - push_error_handler(); - lua_insert(gL, EINDEX); - - begin_hook_values(&hook); - - // tables becomes an upvalue of archFunc - lua_pushvalue(gL, -1); - lua_pushcclosure(gL, archFunc, 2); - // stack: tables, archFunc - - init_hook_call(&hook, 0, res_none); - call_mapped(&hook, map); - - lua_pop(gL, 1); // pop archFunc - lua_remove(gL, EINDEX); // pop error handler - // stack: tables - } -} -#endif - -void LUA_HookNetArchive(lua_CFunction archFunc, savebuffer_t *save) // +void LUA_HookNetArchive(lua_CFunction archFunc, savebuffer_t *save) { const hook_t * map = &hookIds[HOOK(NetVars)]; Hook_State hook; diff --git a/src/lua_script.c b/src/lua_script.c index 7ed3d8b56..9ad0c1a27 100644 --- a/src/lua_script.c +++ b/src/lua_script.c @@ -1363,7 +1363,6 @@ void LUA_Archive(savebuffer_t *save, boolean network) WRITEUINT32(save->p, UINT32_MAX); // end of mobjs marker, replaces mobjnum. LUA_HookNetArchive(NetArchive, save); // call the NetArchive hook in archive mode - //LUA_HookNetArchive(NetArchive); // call the NetArchive hook in archive mode } ArchiveTables(&save->p); @@ -1404,7 +1403,6 @@ void LUA_UnArchive(savebuffer_t *save, boolean network) } while(mobjnum != UINT32_MAX); // repeat until end of mobjs marker. LUA_HookNetArchive(NetUnArchive, save); // call the NetArchive hook in unarchive mode - //LUA_HookNetArchive(NetUnArchive); // call the NetArchive hook in unarchive mode } UnArchiveTables(&save->p, network); diff --git a/src/lua_script.h b/src/lua_script.h index 738aca9d8..c524e94dc 100644 --- a/src/lua_script.h +++ b/src/lua_script.h @@ -74,7 +74,6 @@ void LUA_CVarChanged(const char *name); // lua_consolelib.c int Lua_optoption(lua_State *L, int narg, int def, int list_ref); int Lua_CreateFieldTable(lua_State *L, const char *const lst[]); void LUA_HookNetArchive(lua_CFunction archFunc, savebuffer_t *save); -//void LUA_HookNetArchive(lua_CFunction archFunc); // Console wrapper void COM_Lua_f(void);