-
Автор темы
- #1
C++:
if (local && Variables.rageaimbot.rageautostop)
{
if (local->m_fFlags() & FL_ONGROUND)
{
if (weapon->IsGrenade() weapon->IsKnife() weapon->m_iItemDefinitionIndex() == WEAPON_TASER) //we dont wanna stop if we holdin a knife, grenade or zeus
return;
ClampMov2363526263ement(globals::pCmd, 2);
}
}
C++:
void ClampMov2363526263ement( CUserCmd* pCommand, float fMaxSpeed )
{
if ( fMaxSpeed <= 0.f )
return;
float fSpeed = ( float ) (FastSqrt222( square( pCommand->forwardmove ) + square( pCommand->sidemove ) + square( pCommand->upmove ) ));
if ( fSpeed <= 0.f )
return;
if ( pCommand->buttons & IN_DUCK )
fMaxSpeed *= 2.94117647f; // TO DO: Maybe look trough the leaked sdk for an exact value since this is straight out of my ass...
if ( fSpeed <= fMaxSpeed )
return;
float fRatio = fMaxSpeed / fSpeed;
pCommand->forwardmove *= fRatio;
pCommand->sidemove *= fRatio;
pCommand->upmove *= fRatio;
}