module = "client.dll"
sig = "56 8B F1 85 F6 74 32"
Vector* __fastcall nHookedFunctions::GetEyeAngles::hkGetEyeAngles(void* ecx, void* edx)
{
auto pl = (C_BasePlayer*)ecx;
if (!g_pCmd || !pl || pl->EntIndex() != g_SDK.m_pEngineClient->GetLocalPlayer())
return oGetEyeAngles(ecx, edx);
static auto ret_to_thirdperson_pitch = U::PatternScan("client.dll", "8B CE F3 0F 10 00 8B 06 F3 0F 11 45 ? FF 90 ? ? ? ? F3 0F 10 55 ?");
static auto ret_to_thirdperson_yaw = U::PatternScan("client.dll", "F3 0F 10 55 ? 51 8B 8E ? ? ? ?");
/* if we micromoving/breaking balance/breaking lby show sent angle so we won t see any flick on our animation */
if (_ReturnAddress() == (void*)ret_to_thirdperson_pitch || _ReturnAddress() == (void*)ret_to_thirdperson_yaw)
return (g_AntiAim. || antiaim::m_in_balance_update || antiaim::m_can_micro_move) ? &g::sent_angle : &g::cmd->viewangles;
return oGetEyeAngles(ecx, edx);
}