TmpMenu/src/hooks/script/init_native_tables.cpp
maybegreat48 4a5dccd547 Huge protection improvements and other stuff (#1963)
* feat(protections): add a fuzzer
* feat(protections): improve protections
* feat(spoofing): add warning
* feat(world): force object cleanup
* fix(weapons): fix custom weapon code
* fix(weapons): fix for #1983
2023-08-19 13:01:08 +02:00

19 lines
504 B
C++

#include "hooking.hpp"
#include "native_hooks/native_hooks.hpp"
#include "services/script_patcher/script_patcher_service.hpp"
namespace big
{
bool hooks::init_native_tables(rage::scrProgram* program)
{
bool ret = g_hooking->get_original<hooks::init_native_tables>()(program);
if (program->m_code_size && program->m_code_blocks) // ensure that we aren't hooking SHV threads
{
g_script_patcher_service->on_script_load(program);
g_native_hooks->hook_program(program);
}
return ret;
}
}