| 2301 | } |
| 2302 | |
| 2303 | void CallRegisteredLuaFunctions(LuaCallID calltype) |
| 2304 | { |
| 2305 | assert((unsigned int)calltype < (unsigned int)LUACALL_COUNT); |
| 2306 | const char* idstring = luaCallIDStrings[calltype]; |
| 2307 | |
| 2308 | if (!L) |
| 2309 | return; |
| 2310 | |
| 2311 | lua_settop(L, 0); |
| 2312 | lua_getfield(L, LUA_REGISTRYINDEX, idstring); |
| 2313 | |
| 2314 | int errorcode = 0; |
| 2315 | if (lua_isfunction(L, -1)) |
| 2316 | { |
| 2317 | errorcode = lua_pcall(L, 0, 0, 0); |
| 2318 | if (errorcode) |
| 2319 | HandleCallbackError(L); |
| 2320 | } |
| 2321 | else |
| 2322 | { |
| 2323 | lua_pop(L, 1); |
| 2324 | } |
| 2325 | } |
| 2326 | |
| 2327 | void ForceExecuteLuaFrameFunctions() |
| 2328 | { |
no test coverage detected