only remove ammo if 'm_iClip1' is smaller 'GetMaxClip1'

This commit is contained in:
kingofings 2025-07-05 14:09:47 +02:00 committed by EricS-Valve
parent 202ed8217d
commit 5d36df802a
1 changed files with 5 additions and 2 deletions

View File

@ -2090,8 +2090,11 @@ void CTFWeaponBase::IncrementAmmo( void )
{
if ( pPlayer && pPlayer->GetAmmoCount( m_iPrimaryAmmoType ) > 0 )
{
m_iClip1 = MIN( ( m_iClip1 + 1 ), GetMaxClip1() );
pPlayer->RemoveAmmo( 1, m_iPrimaryAmmoType );
if ( m_iClip1 < GetMaxClip1() )
{
m_iClip1++;
pPlayer->RemoveAmmo( 1, m_iPrimaryAmmoType );
}
}
}
}