refactor: Move find_script_thread to gta_util
This commit is contained in:
parent
1d6fa013de
commit
842bb3617a
@ -54,4 +54,20 @@ namespace big::gta_util
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
inline GtaThread* find_script_thread(rage::joaat_t hash)
|
||||
{
|
||||
for (auto thread : *g_pointers->m_script_threads)
|
||||
{
|
||||
if (thread
|
||||
&& thread->m_context.m_thread_id
|
||||
&& thread->m_handler
|
||||
&& thread->m_script_hash == hash)
|
||||
{
|
||||
return thread;
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
@ -17,22 +17,6 @@
|
||||
|
||||
namespace big
|
||||
{
|
||||
static GtaThread *find_script_thread(rage::joaat_t hash)
|
||||
{
|
||||
for (auto thread : *g_pointers->m_script_threads)
|
||||
{
|
||||
if (thread
|
||||
&& thread->m_context.m_thread_id
|
||||
&& thread->m_handler
|
||||
&& thread->m_script_hash == hash)
|
||||
{
|
||||
return thread;
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
hooking::hooking() :
|
||||
m_swapchain_hook(*g_pointers->m_swapchain, hooks::swapchain_num_funcs),
|
||||
// SetCursorPos
|
||||
|
Reference in New Issue
Block a user