sp/src/game/shared/hl2/weapon_css_base.cpp
bool CBase_CSS_HL2_Shotgun::Reload( void )
{
	// Check that StartReload was called first
	if (!m_bInReload)
	{
		Warning("ERROR: Shotgun Reload called incorrectly!\n");
	}

	CBaseCombatCharacter *pOwner  = GetOwner();
	
	if ( pOwner == NULL )
		return false;

	if (pOwner->GetAmmoCount(m_iPrimaryAmmoType) <= 0)
		return false;

	if (m_iClip1 >= GetMaxClip1())
		return false;

	int j = MIN(1, pOwner->GetAmmoCount(m_iPrimaryAmmoType));

	if (j <= 0)
		return false;

	FillClip();
	// Play reload on different channel as otherwise steals channel away from fire sound
	WeaponSound(RELOAD);
	SendWeaponAnim( ACT_VM_RELOAD );

	pOwner->m_flNextAttack = gpGlobals->curtime;
	m_flNextPrimaryAttack = gpGlobals->curtime + SequenceDuration();

	return true;
}
//-----------------------------------------------------------------------------
// Purpose: Override so only reload one shell at a time
// Input  :
// Output :
//-----------------------------------------------------------------------------
Override so only reload one shell at a time
Input  :
Output .
Override so only reload one shell at a time Input : Output .
bool CBase_CSS_HL2_Shotgun::Reload( void )
{
	if (!m_bInReload)
	{
		Warning("ERROR: Shotgun Reload called incorrectly!\n");
	}
	CBaseCombatCharacter *pOwner  = GetOwner();
	if ( pOwner == NULL )
		return false;
	if (pOwner->GetAmmoCount(m_iPrimaryAmmoType) <= 0)
		return false;
	if (m_iClip1 >= GetMaxClip1())
		return false;
	int j = MIN(1, pOwner->GetAmmoCount(m_iPrimaryAmmoType));
	if (j <= 0)
		return false;
	FillClip();
	WeaponSound(RELOAD);
	SendWeaponAnim( ACT_VM_RELOAD );
	pOwner->m_flNextAttack = gpGlobals->curtime;
	m_flNextPrimaryAttack = gpGlobals->curtime + SequenceDuration();
	return true;
}
bool CBase_CSS_HL2_Shotgun :: Reload ( void ) { if ( ! m_bInReload ) { Warning ( " \n " ) ; } CBaseCombatCharacter * pOwner = GetOwner ( ) ; if ( pOwner == NULL ) return false ; if ( pOwner -> GetAmmoCount ( m_iPrimaryAmmoType ) <= 0 ) return false ; if ( m_iClip1 >= GetMaxClip1 ( ) ) return false ; int j = MIN ( 1 , pOwner -> GetAmmoCount ( m_iPrimaryAmmoType ) ) ; if ( j <= 0 ) return false ; FillClip ( ) ; WeaponSound ( RELOAD ) ; SendWeaponAnim ( ACT_VM_RELOAD ) ; pOwner -> m_flNextAttack = gpGlobals -> curtime ; m_flNextPrimaryAttack = gpGlobals -> curtime + SequenceDuration ( ) ; return true ; }
Purpose: Override so only reload one shell at a time
Input  :
Output :
Purpose : Override so only reload one shell at a time Input : Output :
// Check that StartReload was called first // Play reload on different channel as otherwise steals channel away from fire sound