Вопрос HkFindMDL issues

Начинающий
Статус
Оффлайн
Регистрация
19 Окт 2017
Сообщения
21
Реакции[?]
4
Поинты[?]
0
Hello, I recently hooked FindMDL for arm/bomb/weapon changing. I run into an issue with an access violation in my original return; attached is my code.

C++:
constexpr auto hkFindMDL = 10;



namespace hkFindMDL {

    using fn = model_t (__ thiscall *) (void *, char * FilePath);

    model_t __fastcall hook (void * ecx, void * edx, char * FilePath); // just this ptr

}

inline hkFindMDL :: fn o_hkFindMDL = nullptr;



model_t __fastcall Hooks :: hkFindMDL :: hook (void * ecx, void * edx, char * FilePath)

{

    if (g_EngineClient-> IsConnected () && g_EngineClient-> IsInGame ()) {

        if (strstr (FilePath, "arms"))

            return o_hkFindMDL (ecx, "models / weapons / v_models / arms / v_bare_hands.mdl");

    }



    return o_hkFindMDL (ecx, FilePath); //------> this is where I have an original return Access violation.

}

Again, like I said there is an access violation in the original return- the index should be up-to-date, any insights are appreciated.
 
Сверху Снизу