Skip to content
Snippets Groups Projects
Commit 0d70e16b authored by ChaoLoveIceMDBoy's avatar ChaoLoveIceMDBoy
Browse files

Updated LUAh_GameQuit to use new error handler

parent 08e9efee
Branches
Tags
1 merge request!847GameQuit Hook
...@@ -1778,13 +1778,15 @@ void LUAh_GameQuit(void) ...@@ -1778,13 +1778,15 @@ void LUAh_GameQuit(void)
if (!gL || !(hooksAvailable[hook_GameQuit/8] & (1<<(hook_GameQuit%8)))) if (!gL || !(hooksAvailable[hook_GameQuit/8] & (1<<(hook_GameQuit%8))))
return; return;
lua_pushcfunction(gL, LUA_GetErrorMessage);
for (hookp = roothook; hookp; hookp = hookp->next) for (hookp = roothook; hookp; hookp = hookp->next)
{ {
if (hookp->type != hook_GameQuit) if (hookp->type != hook_GameQuit)
continue; continue;
PushHook(gL, hookp); PushHook(gL, hookp);
if (lua_pcall(gL, 0, 0, 0)) { if (lua_pcall(gL, 0, 0, 1)) {
if (!hookp->error || cv_debug & DBG_LUA) if (!hookp->error || cv_debug & DBG_LUA)
CONS_Alert(CONS_WARNING,"%s\n",lua_tostring(gL, -1)); CONS_Alert(CONS_WARNING,"%s\n",lua_tostring(gL, -1));
lua_pop(gL, 1); lua_pop(gL, 1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment