CSGO: aimbot + rcs issue
I am trying to have built in rcs with my aimbot, it worked fine but now I am trying to make the rcs will show clientsided as well but my smoothing seems to break it.
Where im setting my aimbot angles:
QAngle ViewAngles;
g_EngineClient->GetViewAngles(ViewAngles);
QAngle ToChange = Smooth(AimbotTargetAngle, ViewAngles);
QAngle Final = ViewAngles + ToChange;
Math::NormalizeAngles(Final);
Math::ClampAngles(Final);
pCmd->viewangles = Final;
if (g_LocalPlayer->m_iShotsFired() > 1)
pCmd->viewangles -= g_LocalPlayer->m_aimPunchAngle() * 2.f;
g_EngineClient->SetViewAngles(pCmd->viewangles);
Smoothing:
QAngle Smooth(QAngle finalangle, QAngle viewangles)
{
float smooth, targetsmooth = 0.0f;
auto pWeapon = g_LocalPlayer->m_hActiveWeapon();
if (!pWeapon) return viewangles;
if (pWeapon->IsPistol()) targetsmooth = g_Options.pistol_aimbot_smoothness;
else if (pWeapon->IsRifle()) targetsmooth = g_Options.rifle_aimbot_smoothness;
else if (pWeapon->IsSniper()) targetsmooth = g_Options.sniper_aimbot_smoothness;
else if (pWeapon->IsShotgun()) targetsmooth = g_Options.shotgun_aimbot_smoothness;
else if (pWeapon->IsSMG()) targetsmooth = g_Options.smg_aimbot_smoothness;
QAngle delta = finalangle - viewangles;
Math::NormalizeAngles(delta);
Math::ClampAngles(delta);
if (targetsmooth > 0.0f) smooth = powf(targetsmooth, 0.4f);
else if (targetsmooth <= 0.0f) smooth = powf(0.0001f, 0.4f);
smooth = std::min(0.99f, smooth);
QAngle toChange = delta - delta * smooth;
return toChange;
}
|