Исходник HkDrawModelStateOverlay Hook (lw)

Начинающий
Статус
Оффлайн
Регистрация
3 Окт 2021
Сообщения
9
Реакции[?]
10
Поинты[?]
0
Hook:
C++:
using DrawOthModel = int(__thiscall*)(ConVar*);

int __fastcall hkDrawOtherModels(ConVar* thisptr, int edx) {
    static auto original = draw_other_model->get_func_address<DrawOthModel>(13);

    //If I understood correctly, it is the i_client_renderable vtable
    static int* return_check = (int*)util::FindSignature("client.dll", "85 C0 75 54 8B 0D ? ? ? ?");

    if (_ReturnAddress() == return_check)
        return true;

    return original(thisptr);
}
Initialization :
C++:
static const auto draw_model = m_cvar()->FindVar(crypt_str("r_drawmodelstatsoverlay"));
hooks::draw_other_model = new vmthook(reinterpret_cast<DWORD**>(draw_model));
hooks::draw_other_model->hook_function(reinterpret_cast<uintptr_t>(hooks::hkDrawOtherModels), 13);
It may be useful to someone. With this hook you will be able to render ragdoll chams. For those who could not hook themselves
 
Последнее редактирование:
Сверху Снизу