This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
YimMenu/BigBaseV2/src/hooks/gta_thread_kill.cpp

17 lines
472 B
C++
Raw Normal View History

#include "hooking.hpp"
#include "native_hooks/native_hooks.hpp"
namespace big
{
rage::eThreadState hooks::gta_thread_kill(GtaThread* thread)
{
rage::eThreadState result = g_hooking->m_gta_thread_kill_hook.get_original<decltype(&gta_thread_kill)>()(thread);
g_native_hooks->do_cleanup_for_thread(thread);
if (thread->m_script_hash == RAGE_JOAAT("freemode"))
g->protections.freemode_terminated = !(result == rage::eThreadState::running);
return result;
}
}