Change this for consistency.

This commit is contained in:
Steel Titanium 2019-10-14 21:47:20 -04:00
parent 0f79396757
commit 597949f370
No known key found for this signature in database
GPG Key ID: 924BA411F18DFDBE
1 changed files with 12 additions and 10 deletions

View File

@ -1331,17 +1331,19 @@ void LUAh_IntermissionThinker(void)
return; return;
for (hookp = roothook; hookp; hookp = hookp->next) for (hookp = roothook; hookp; hookp = hookp->next)
if (hookp->type == hook_IntermissionThinker) {
{ if (hookp->type != hook_IntermissionThinker)
lua_pushfstring(gL, FMT_HOOKID, hookp->id); continue;
lua_gettable(gL, LUA_REGISTRYINDEX);
if (lua_pcall(gL, 0, 0, 0)) { lua_pushfstring(gL, FMT_HOOKID, hookp->id);
if (!hookp->error || cv_debug & DBG_LUA) lua_gettable(gL, LUA_REGISTRYINDEX);
CONS_Alert(CONS_WARNING,"%s\n",lua_tostring(gL, -1)); if (lua_pcall(gL, 0, 0, 0)) {
lua_pop(gL, 1); if (!hookp->error || cv_debug & DBG_LUA)
hookp->error = true; CONS_Alert(CONS_WARNING,"%s\n",lua_tostring(gL, -1));
} lua_pop(gL, 1);
hookp->error = true;
} }
}
} }
#endif #endif