game/server/hl2/weapon_garand.cpp
bool CWeaponAnnabelle::StartReload( void )
{
	CBaseCombatCharacter *pOwner  = GetOwner();
	
	if ( pOwner == NULL )
		return false;

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

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

	// If shotgun totally emptied then a pump animation is needed
	if (m_iClip1 <= 0)
	{
		m_bNeedPump = true;
	}

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

	if (j <= 0)
		return false;

	SendWeaponAnim( ACT_SHOTGUN_RELOAD_START );

	// Make shotgun shell visible
	SetBodygroup(1,0);

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

	m_bInReload = true;
	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 CWeaponAnnabelle::StartReload( void )
{
	CBaseCombatCharacter *pOwner  = GetOwner();
	if ( pOwner == NULL )
		return false;
	if (pOwner->GetAmmoCount(m_iPrimaryAmmoType) <= 0)
		return false;
	if (m_iClip1 >= GetMaxClip1())
		return false;
	if (m_iClip1 <= 0)
	{
		m_bNeedPump = true;
	}
	int j = MIN(1, pOwner->GetAmmoCount(m_iPrimaryAmmoType));
	if (j <= 0)
		return false;
	SendWeaponAnim( ACT_SHOTGUN_RELOAD_START );
	SetBodygroup(1,0);
	pOwner->m_flNextAttack = gpGlobals->curtime;
	m_flNextPrimaryAttack = gpGlobals->curtime + SequenceDuration();
	m_bInReload = true;
	return true;
}
bool CWeaponAnnabelle :: StartReload ( void ) { CBaseCombatCharacter * pOwner = GetOwner ( ) ; if ( pOwner == NULL ) return false ; if ( pOwner -> GetAmmoCount ( m_iPrimaryAmmoType ) <= 0 ) return false ; if ( m_iClip1 >= GetMaxClip1 ( ) ) return false ; if ( m_iClip1 <= 0 ) { m_bNeedPump = true ; } int j = MIN ( 1 , pOwner -> GetAmmoCount ( m_iPrimaryAmmoType ) ) ; if ( j <= 0 ) return false ; SendWeaponAnim ( ACT_SHOTGUN_RELOAD_START ) ; SetBodygroup ( 1 , 0 ) ; pOwner -> m_flNextAttack = gpGlobals -> curtime ; m_flNextPrimaryAttack = gpGlobals -> curtime + SequenceDuration ( ) ; m_bInReload = true ; 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 :
// If shotgun totally emptied then a pump animation is needed // Make shotgun shell visible