Closed Aham-Admin closed 4 years ago
U should hook bsp query not engine client...
reinterpret_cast<void*>(get_virtual(interfaces::engine->get_bsp_query()
get_bsp_querry() doesnt exist as a method. and from searching up I cant find a method that would work
edit. Nvm the method was bsp_query()
void* get_bsp_query() { using original_fn = void*(__thiscall*)(iv_engine_client*); return (*(original_fn * *)this)[41](this); }
edit 2: crashes
using list_leaves_in_box_fn = int(__fastcall*)(std::uintptr_t ecx, std::uintptr_t edx, Vector & mins, Vector & maxs, unsigned short* list, int list_max);
list_leaves_in_box_fn o_list_leaves_in_box = nullptr;
auto list_leaves_in_box_target = reinterpret_cast<void*>(get_virtual(g_pEngine->GetBSPTreeQuery(), 6));
if (MH_CreateHook(list_leaves_in_box_target, &hooks::list_leaves_in_box, reinterpret_cast<void**>(&o_list_leaves_in_box)) != MH_OK) {
throw std::runtime_error("5");
return false;
}
using list_leaves_in_box_fn = int(__fastcall*)(std::uintptr_t ecx, std::uintptr_t edx, Vector & mins, Vector & maxs, unsigned short* list, int list_max); list_leaves_in_box_fn o_list_leaves_in_box = nullptr; auto list_leaves_in_box_target = reinterpret_cast<void*>(get_virtual(g_pEngine->GetBSPTreeQuery(), 6)); if (MH_CreateHook(list_leaves_in_box_target, &hooks::list_leaves_in_box, reinterpret_cast<void**>(&o_list_leaves_in_box)) != MH_OK) { throw std::runtime_error("5"); return false; }
That is exactly what I have. The method Im missing is g_pEngine->GetBSPTreeQuery()
for the base your using. For the base for this cheat the engine interface doesn't have a GetBSPTreeQuery or any method to get it.
add it then???
void* get_bsp_query() { using original_fn = void*(__thiscall*)(iv_engine_client*); return (*(original_fn * *)this)[41](this); }
This is the method... It causes crashing
I mean this is not even related to the base, just add bsp query method and hook it, nothing else to say
So I looked at this tutorial and for the life of me I cant find what interface would work. I tried engine and it gives a esp error https://www.unknowncheats.me/forum/counterstrike-global-offensive/330483-disable-model-occulusion.html my code for intitializing the hook reinterpret_cast<void*>(get_virtual(interfaces::engine, 6));