Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool IsRemotekill = true;
- typedef bool(__cdecl *_IntersectSegment)(const IntersectQuery &Query, IntersectInfo *pInfo);
- _IntersectSegment pIntersectSegment;
- bool hkIntersectSegment(RemoteQuery* rQuery, RemoteInfo* rInfo)
- {
- oRemoteKill = (tRemoteKill)(0x683A30);
- DWORD pLTClientShell = *(DWORD*)(CShell + 0x12994FC);
- CPlayer* Me = GetPlayerByIndex(pLTClientShell,GetMyIndex(pLTClientShell));
- if (IsRemotekill)
- {
- for (int i = 0; i < 16; i++)
- {
- CPlayer* pPlayer = GetPlayerByIndex(pLTClientShell, i);
- if (IsVisible(GetBonePosition(Me->Object, 6), GetBonePosition(pPlayer->Object, 6)) && isValidClient(pPlayer) && Me != pPlayer && Me->Team != pPlayer->Team)
- {
- D3DXVECTOR3 Pos = GetBonePosition(pPlayer->Object, 6);
- rQuery->rFrom = Pos + D3DXVECTOR3(0.0f, 50.0f, 0.0f);
- rQuery->rTo = Pos - D3DXVECTOR3(0.0f, 50.0f, 0.0f);
- rQuery->rFlags = ::INTERSECT_OBJECTS | ::IGNORE_NONSOLID | ::INTERSECT_HPOLY;
- rQuery->rFilterFn = FilterObjs;
- bool Result = oRemoteKill(*rQuery, rInfo);
- if (Result)
- {
- rInfo->hObjImpact = pPlayer->Object;
- rInfo->vImpactPos = Pos;
- }
- return oRemoteKill(*rQuery, rInfo);
- }
- }
- }
- return oRemoteKill(*rQuery, rInfo);
- }
- #define aILTClient 0x12994F0
- void StartRemote()
- {
- if (! IsGameReadyForHook()) return;
- DWORD crossfire = (DWORD)GetModuleHandleA(eCF);
- if (crossfire == NULL) return;
- if ( CShell !=NULL)
- {
- uint32_t LTClient = *reinterpret_cast<uint32_t*>( CShell + aILTClient);
- oRemoteKill = (tRemoteKill)*reinterpret_cast<uint32_t*>(LTClient + 0x7C);
- *reinterpret_cast<uint32_t*>(LTClient + 0x7C) = (uint32_t)hkIntersectSegment;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement