sp/src/game/server/hl2/weapon_pistol.cpp
void CWeaponPistol::ItemPostFrame( void )
{
	CBasePlayer *pOwner = ToBasePlayer( GetOwner() );

	if ( pOwner == NULL )
		return;

	//Allow a refire as fast as the player can click
	if ( ( ( pOwner->m_nButtons & IN_ATTACK ) == false ) && ( m_flSoonestPrimaryAttack < gpGlobals->curtime ) )
	{
		m_flNextPrimaryAttack = gpGlobals->curtime - 0.1f;
	}
	else if ( ( pOwner->m_nButtons & IN_ATTACK ) && ( m_flNextPrimaryAttack < gpGlobals->curtime ) && ( m_iClip1 <= 0 ) )
	{
		DryFire();
		return;
	}

	BaseClass::ItemPostFrame();
}
//-----------------------------------------------------------------------------
// Purpose: Allows firing as fast as button is pressed
//-----------------------------------------------------------------------------
Allows firing as fast as button is pressed
Allows firing as fast as button is pressed
void CWeaponPistol::ItemPostFrame( void )
{
	CBasePlayer *pOwner = ToBasePlayer( GetOwner() );
	if ( pOwner == NULL )
		return;
	if ( ( ( pOwner->m_nButtons & IN_ATTACK ) == false ) && ( m_flSoonestPrimaryAttack < gpGlobals->curtime ) )
	{
		m_flNextPrimaryAttack = gpGlobals->curtime - 0.1f;
	}
	else if ( ( pOwner->m_nButtons & IN_ATTACK ) && ( m_flNextPrimaryAttack < gpGlobals->curtime ) && ( m_iClip1 <= 0 ) )
	{
		DryFire();
		return;
	}
	BaseClass::ItemPostFrame();
}
void CWeaponPistol :: ItemPostFrame ( void ) { CBasePlayer * pOwner = ToBasePlayer ( GetOwner ( ) ) ; if ( pOwner == NULL ) return ; if ( ( ( pOwner -> m_nButtons & IN_ATTACK ) == false ) && ( m_flSoonestPrimaryAttack < gpGlobals -> curtime ) ) { m_flNextPrimaryAttack = gpGlobals -> curtime - 0.1f ; } else if ( ( pOwner -> m_nButtons & IN_ATTACK ) && ( m_flNextPrimaryAttack < gpGlobals -> curtime ) && ( m_iClip1 <= 0 ) ) { DryFire ( ) ; return ; } BaseClass :: ItemPostFrame ( ) ; }
Purpose: Allows firing as fast as button is pressed
Purpose : Allows firing as fast as button is pressed
//Allow a refire as fast as the player can click