Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void cAimbot::ExtraPolation( cEntity *pLocal, cEntity *pEntity, static Vector m_vecPosition, Vector &vEyePos, int Index )
- {
- Vector vOld[ 65 ];
- Vector vOldMe;
- Vector vAccel[ 65 ];
- Vector vMyAccel;
- Vector vecEnemyVelocity = pEntity->GetVelocity( );
- Vector vMyVel = pLocal->GetVelocity( );
- Vector vDelta = vecEnemyVelocity - vOld[ Index ];
- vOld[ Index ] = vecEnemyVelocity;
- if( vDelta != Vector( 0.0f, 0.0f, 0.0f ) )
- {
- vAccel[ Index ] = vDelta;
- }
- Vector vDeltaMe = vMyVel - vOldMe;
- vOldMe = vMyVel;
- if( vDeltaMe != Vector( 0.0f, 0.0f, 0.0f ) )
- {
- vMyAccel = vDeltaMe;
- }
- float flTick = pGlobals->interval_per_tick;
- int iFakeLagCmd = sPlayerList[ Index ].flLostTick;
- if( iFakeLagCmd > 5.0f )
- {
- flTick += pGlobals->interval_per_tick * sPlayerList[ Index ].flLostTick;
- if( vAccel[ Index ] != Vector( 0.0f, 0.0f, 0.0f ) || vMyAccel != Vector( 0.0f, 0.0f, 0.0f ) )
- {
- Vector vDivide;
- VectorDivide( ( vAccel[ Index ] - vMyAccel ) * sqrt( flTick ) + ( vecEnemyVelocity - vMyVel ) * flTick + m_vecPosition - vEyePos , 0.5f, vDivide );
- m_vecPosition -= vDivide;
- g_pCvar->FindVar( "cl_interpolate" )->SetValue( "0.695" );
- g_pCvar->FindVar( "cl_updaterate" )->SetValue( "1048576" );
- g_pCvar->FindVar( "cl_cmdrate" )->SetValue( "1048576" );
- }
- }
- if( iFakeLagCmd <= 5.0f && iFakeLagCmd > 1.0f )
- {
- flTick += pGlobals->interval_per_tick * sPlayerList[ Index ].flLostTick;
- if( vAccel[ Index ] != Vector( 0.0f, 0.0f, 0.0f ) || vMyAccel != Vector( 0.0f, 0.0f, 0.0f ) )
- {
- Vector vDivide;
- VectorDivide( ( vAccel[ Index ] - vMyAccel ) * sqrt( flTick ) + ( vecEnemyVelocity - vMyVel ) * flTick + m_vecPosition - vEyePos , 0.5f, vDivide );
- m_vecPosition -= vDivide;
- g_pCvar->FindVar( "cl_interpolate" )->SetValue( "0.7" );
- g_pCvar->FindVar( "cl_updaterate" )->SetValue( "66" );
- g_pCvar->FindVar( "cl_cmdrate" )->SetValue( "66" );
- }
- }
- if( iFakeLagCmd == 1.0f )
- {
- if( vAccel[ Index ] != Vector( 0.0f, 0.0f, 0.0f ) || vMyAccel != Vector( 0.0f, 0.0f, 0.0f ) )
- {
- Vector vDivide;
- VectorDivide( ( vAccel[ Index ] - vMyAccel ) * sqrt( flTick ) + ( vecEnemyVelocity - vMyVel ) * flTick + m_vecPosition - vEyePos , 0.5f, vDivide );
- m_vecPosition += vDivide;
- g_pCvar->FindVar( "cl_updaterate" )->SetValue( "67" );
- g_pCvar->FindVar( "cl_cmdrate" )->SetValue( "67" );
- g_pCvar->FindVar( "cl_interpolate" )->SetValue( "1" );
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement