Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
- {
- if (dwReason == DLL_PROCESS_ATTACH)
- {
- CreateThread; while (true) loop{
- if (pFrameWork && pFrameWork->GetClientActor(&pLclActor))
- {
- if (SelfBools.recul)
- {
- pLclActor->GetPlayer()->m_ignoreRecoil = true;
- IActor *pLclActor = NULL;
- }
- SSystemGlobalEnvironment* pSSGE = (SSystemGlobalEnvironment*)(*(DWORD*)(SsystemGlobalEnvironmentAdressEU));
- I3DEngine* p3DEngine = pSSGE->p3DEngine;
- IGame* pIGame = IGame::GetIGame();
- ICVar* pLclICVar = pIGame->GetICvar();
- IGameFramework* pFrameWork = IGameFramework::GetGameFramework();
- )
- if (!bInit) {
- Original_Present = (Prototype_Present)DetourFunction((PBYTE)GetDeviceAddress(17), (PBYTE)Hooked_Present);
- Original_DrawIndexedPrimitive = (Prototype_DrawIndexedPrimitive)DetourFunction((PBYTE)GetDeviceAddress(82), (PBYTE)Hooked_DrawIndexedPrimitive);
- bInit = true;
- }
- }
- else if (dwReason == DLL_PROCESS_DETACH)
- {
- DetourRemove((PBYTE)Original_Present, (PBYTE)Hooked_Present);
- DetourRemove((PBYTE)Original_DrawIndexedPrimitive, (PBYTE)Hooked_DrawIndexedPrimitive);
- }
- return TRUE;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement