mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 04:21:47 +00:00
Updated LUAh_GameQuit to use new error handler
This commit is contained in:
parent
1b831c0bbe
commit
75932c45d4
1 changed files with 3 additions and 1 deletions
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue