feat(Protections): Reenabled CanApplyData (#740)

* fix(CanApplyData): correct crash_blocked msg
This commit is contained in:
Yimura 2022-12-30 11:48:59 +01:00 committed by GitHub
parent 441b86c207
commit 37bc755f8b
2 changed files with 19 additions and 1 deletions

View File

@ -28,5 +28,23 @@ namespace rage
static_assert(consteval_joaat("test") == 0x3f75ccc1);
}
inline consteval rage::joaat_t operator""_j(const char* s, std::size_t n)
{
rage::joaat_t result = 0;
for (std::size_t i = 0; i < n; i++)
{
result += rage::joaat_to_lower(s[i]);
result += (result << 10);
result ^= (result >> 6);
}
result += (result << 3);
result ^= (result >> 11);
result += (result << 15);
return result;
}
#define RAGE_JOAAT_IMPL(str) (::rage::consteval_joaat(str))
#define RAGE_JOAAT(str) (std::integral_constant<rage::joaat_t, RAGE_JOAAT_IMPL(str)>::value)

View File

@ -56,7 +56,7 @@ namespace big
detour_hook_helper::add<hooks::received_clone_create>("RCC", g_pointers->m_received_clone_create);
detour_hook_helper::add<hooks::received_clone_sync>("RCS", g_pointers->m_received_clone_sync);
// detour_hook_helper::add<hooks::can_apply_data>("CAD", g_pointers->m_can_apply_data);
detour_hook_helper::add<hooks::can_apply_data>("CAD", g_pointers->m_can_apply_data);
detour_hook_helper::add<hooks::get_network_event_data>("GNED", g_pointers->m_get_network_event_data);
detour_hook_helper::add<hooks::write_player_gamer_data_node>("WPGDN", g_pointers->m_write_player_gamer_data_node);