-
Notifications
You must be signed in to change notification settings - Fork 8
/
framestage.cpp
38 lines (29 loc) · 1.11 KB
/
framestage.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include "main.hpp"
bool bOnce = false; /*https://www.unknowncheats.me/forum/1190911-post11.html */
void hkFrameStage(void* thisptr, ClientFrameStage_t curStage) {
C_BaseEntity* pLocal = (C_BaseEntity*)pEntList->GetClientEntity(pEngine->GetLocalPlayer());
Vector* pPunchAngle = nullptr;
Vector* pViewAngle = nullptr;
Vector vPunchAngle;
Vector vViewAngle;
if (curStage == FRAME_RENDER_START)
{
if (pLocal)
{
pPunchAngle = (Vector*)((uintptr_t)pLocal + offsets.DT_BasePlayer.m_aimPunchAngle);
pViewAngle = (Vector*)((uintptr_t)pLocal + offsets.DT_BasePlayer.m_viewPunchAngle);
if (pPunchAngle && pViewAngle)
{
vPunchAngle = *pPunchAngle;
vViewAngle = *pViewAngle;
pPunchAngle->Init();
pViewAngle->Init();
}
}
}
client_vmt->GetOriginalMethod<tFrameStage>(36)(thisptr, curStage);
if (pPunchAngle && pViewAngle) {
*pPunchAngle = vPunchAngle;
*pViewAngle = vViewAngle;
}
}