this is not needed anymore
This commit is contained in:
1 parent
2a5d1fb84a
commit
f52db71ec6
3 files changed
+1
-37
No files matched your search
+1
-34
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user