Skip to content

Commit

Permalink
Fix holding +attack2 disallowing certain weapons from firing
Browse files Browse the repository at this point in the history
 - Affected all weapons without clips (melee, autorifle, etc)
  • Loading branch information
squeek502 committed Sep 11, 2016
1 parent f783252 commit 6e50824
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion game_shared/ff/ff_weapon_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ void CFFWeaponBase::ItemPostFrame()
bool bFired = false;

// Secondary attack has priority
if ((pOwner->m_nButtons & IN_ATTACK2) && (m_flNextSecondaryAttack <= gpGlobals->curtime))
if (HasAltFire() && (pOwner->m_nButtons & IN_ATTACK2) && (m_flNextSecondaryAttack <= gpGlobals->curtime))
{
if (UsesSecondaryAmmo() && pOwner->GetAmmoCount(m_iSecondaryAmmoType) <=0)
{
Expand Down
1 change: 1 addition & 0 deletions game_shared/ff/ff_weapon_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ class CFFWeaponBase : public CBaseCombatWeapon

// All FF weapons are predicted
virtual bool IsPredicted() const { return true; }
virtual bool HasAltFire() const { return false; }

// All predicted weapons need to implement and return true
virtual FFWeaponID GetWeaponID() const { AssertMsg(0, "GetWeaponID() not defined for weapon"); return FF_WEAPON_NONE; }
Expand Down

0 comments on commit 6e50824

Please sign in to comment.