mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-01-27 15:14:21 +00:00
Merge some code from hlsdk2.4.
This commit is contained in:
parent
e2826aa0ea
commit
30a4b33aaa
@ -596,6 +596,11 @@ void CBasePlayerWeapon::ItemPostFrame( void )
|
||||
m_fInReload = FALSE;
|
||||
}
|
||||
|
||||
if( !( m_pPlayer->pev->button & IN_ATTACK ) )
|
||||
{
|
||||
m_flLastFireTime = 0.0f;
|
||||
}
|
||||
|
||||
if( ( m_pPlayer->pev->button & IN_ATTACK2 ) && CanAttack( m_flNextSecondaryAttack, gpGlobals->time, UseDecrement() ) )
|
||||
{
|
||||
if( pszAmmo2() && !m_pPlayer->m_rgAmmo[SecondaryAmmoIndex()] )
|
||||
@ -927,6 +932,7 @@ BOOL CBasePlayerWeapon::DefaultDeploy( char *szViewModel, char *szWeaponModel, i
|
||||
|
||||
m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 0.5;
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 1.0;
|
||||
m_flLastFireTime = 0.0f;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user