Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool CAimbot::IsValid ( int index )
- {
- CEntity* pEntity = g_pEntList->GetEntityByIndex ( index );
- if ( !pEntity )
- return false;
- if ( !pEntity->IsValid () )
- return false;
- if ( pEntity->GetTeamNum () == pLocalEntity->GetTeamNum () )
- return false;
- if ( pEntity->GetHealth () > 100 )
- return false;
- m_aimorigin = pEntity->GetHitboxPosition ( convar::aimbot_hitbox );
- if ( m_aimorigin.IsZero () )
- return false;
- if ( pLocalEntity->GetEyePosition ().DistTo ( m_aimorigin ) > 8192.0f )
- return false;
- Vector viewangles;
- g_pEngine->GetViewAngles ( viewangles );
- if ( GetFOV ( viewangles, pLocalEntity->GetEyePosition (), m_aimorigin ) > convar::aimbot_fov )
- return false;
- if ( !IsVisible ( pLocalEntity->GetEyePosition (), m_aimorigin ) )
- return false;
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement