Originally Posted by
Conan04
Can you explain it, i just starting to learn how to code, and every help is good for me. Here is the code:
void __fastcall PaintTraverse_Hooked(PVOID pPanels, int edx, unsigned int vguiPanel, bool forceRepaint, bool allowForce);
bool __stdcall Hooked_InPrediction()
{
bool result;
static InPrediction_ origFunc = (InPrediction_)Hooks::VMTPrediction.GetOriginalFun ction(14);
static DWORD *ecxVal = Interfaces::Prediction;
result = origFunc(ecxVal);
// If we are in the right place where the player view is calculated
// Calculate the change in the view and get rid of it
if (Menu::Window.VisualsTab.OtherNoVisualRecoil.GetSt ate() && (DWORD)(_ReturnAddress()) == Offsets::Functions::dwCalcPlayerView)
{
IClientEntity* pLocalEntity = NULL;
float* m_LocalViewAngles = NULL;
__asm
{
MOV pLocalEntity, ESI
MOV m_LocalViewAngles, EBX
}
Vector viewPunch = pLocalEntity->localPlayerExclusive()->GetViewPunchAngle();
Vector aimPunch = pLocalEntity->localPlayerExclusive()->GetAimPunchAngle();
m_LocalViewAngles[0] -= (viewPunch[0] + (aimPunch[0] * 2 * 0.4499999f));
m_LocalViewAngles[1] -= (viewPunch[1] + (aimPunch[1] * 2 * 0.4499999f));
m_LocalViewAngles[2] -= (viewPunch[2] + (aimPunch[2] * 2 * 0.4499999f));
return true;
}
return result;
}
The red is the wrong code.