Browse Source

Apply CROWBAR_FIX_RAPID_CROWBAR to knife (#251)

This will apply the crowbar swing delay fix to the knife, preventing rapid melee.
opforfixed
M.Millar 3 years ago committed by GitHub
parent
commit
81dce2f203
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      dlls/gearbox/knife.cpp

5
dlls/gearbox/knife.cpp

@ -228,7 +228,12 @@ int CKnife::Swing(int fFirst) @@ -228,7 +228,12 @@ int CKnife::Swing(int fFirst)
}
m_pPlayer->m_iWeaponVolume = KNIFE_BODYHIT_VOLUME;
if (!pEntity->IsAlive())
{
#if CROWBAR_FIX_RAPID_CROWBAR
m_flNextPrimaryAttack = GetNextAttackDelay(0.25);
#endif
return TRUE;
}
else
flVol = 0.1;

Loading…
Cancel
Save