You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Basically If one gives any of the melee weapons (except spy knives tf_weapon_knife) a fire speed bonus and holds primary attack button, then once the delay between fires becomes 0.2 or less the weapon will never register hits until you release the fire button when it'll register one hit.
The reason
All melee weapons except spy knives have a small delay before they actually do the action of hitting the target. This delay is controlled with m_flSmackTime netprop. Problem occurs when m_flNextPrimaryAttack < m_flSmackTime. In this case new attack occurs before the previous attack ends, the new attack sets m_flSmackTime to higher value and thus the old attack is "forgotten".
Fix
My solution consists of:
In function CTFWeaponBaseMelee::Swing putting the following code at the end:
+ if(m_flSmackTime >= m_flNextPrimaryAttack)+ {+ m_flSmackTime = m_flNextPrimaryAttack - 0.01;+ //m_flSmackTime = m_flNextPrimaryAttack //This might work as well, but not sure+ }
}