TmpMenu/src/hooks/protections/fragment_physics_crash.cpp
maybegreat48 97a8c5d60b Add more spoofing options and added clang-format (#1020)
* feat(Spoofing): add spoofing
* feat(Spoofing): prepare code for player attach
* remove(PlayerAttach): isn't going to work due to netsync architecture
* fix(GUI): fix scaling
* feat(Project): add clang-format file
* feat(Classes): update classes
* fix(BlackHole): remove unnecessary cleanup
* fix(Formatting): fix formatting for initializer lists
* feat(clang-format): Set tab width and 1 space before comment

Co-authored-by: Yimura <24669514+Yimura@users.noreply.github.com>
2023-03-01 21:27:15 +00:00

21 lines
573 B
C++

#include "hooking.hpp"
namespace big
{
bool hooks::fragment_physics_crash(uintptr_t a1, uint32_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5)
{
if (auto ptr = *reinterpret_cast<uintptr_t*>(a5 + 0x70); ptr)
if (auto ptr2 = *reinterpret_cast<uintptr_t*>(ptr + 8 * a2); !ptr2)
return false;
return g_hooking->get_original<hooks::fragment_physics_crash>()(a1, a2, a3, a4, a5);
}
bool hooks::fragment_physics_crash_2(float* a1, float* a2)
{
if (!a1 || !a2)
return false;
return g_hooking->get_original<hooks::fragment_physics_crash_2>()(a1, a2);
}
}