void CWeaponSG550::PrimaryAttack() { CMomentumPlayer *pPlayer = GetPlayerOwner(); if (!pPlayer) return; if (!FBitSet(pPlayer->GetFlags(), FL_ONGROUND)) SG550Fire(0.45f * (1 - m_flAccuracy)); else if (pPlayer->GetAbsVelocity().Length2D() > 5) SG550Fire(0.15f); else if (FBitSet(pPlayer->GetFlags(), FL_DUCKING)) SG550Fire(0.04f * (1 - m_flAccuracy)); else SG550Fire(0.05f * (1 - m_flAccuracy)); }
/* <2a0eef> ../cstrike/dlls/wpn_shared/wpn_sg550.cpp:132 */ void CSG550::__MAKE_VHOOK(PrimaryAttack)(void) { if (!(m_pPlayer->pev->flags & FL_ONGROUND)) { SG550Fire(0.45 * (1 - m_flAccuracy), 0.25, FALSE); } else if (m_pPlayer->pev->velocity.Length2D() > 0) { SG550Fire(0.15, 0.25, FALSE); } else if (m_pPlayer->pev->flags & FL_DUCKING) { SG550Fire(0.04 * (1 - m_flAccuracy), 0.25, FALSE); } else { SG550Fire(0.05 * (1 - m_flAccuracy), 0.25, FALSE); } }
void CSG550::PrimaryAttack( void ) { if( !FBitSet( m_pPlayer->pev->flags, FL_ONGROUND ) ) { SG550Fire( 0.45 * ( 1 - m_flAccuracy ), 0.25, FALSE ); } else if( m_pPlayer->pev->velocity.Length2D() > 0 ) { SG550Fire( 0.15, 0.25, FALSE ); } else if( FBitSet( m_pPlayer->pev->flags, FL_DUCKING ) ) { SG550Fire( 0.04 * ( 1 - m_flAccuracy ), 0.25, FALSE ); } else { SG550Fire( 0.05 * ( 1 - m_flAccuracy ), 0.25, FALSE ); } }