Try fixing occasional bug with missing mp5 reload animation when holding primary attack after clip was depleted

This commit is contained in:
Roman Chistokhodov 2021-02-11 02:34:07 +03:00 committed by Andrey Akhmichin
parent 9fecfb50f3
commit 397286021c

View File

@ -372,7 +372,7 @@ void CBasePlayerWeapon::ItemPostFrame( void )
m_fFireOnEmpty = FALSE;
// weapon is useable. Reload if empty and weapon has waited as long as it has to after firing
if( m_iClip == 0 && !( iFlags() & ITEM_FLAG_NOAUTORELOAD ) && m_flNextPrimaryAttack < 0.0f )
if( m_iClip == 0 && !( iFlags() & ITEM_FLAG_NOAUTORELOAD ) && m_flNextPrimaryAttack <= 0.0f )
{
Reload();
return;