From e7b324da5ebd26b0eae9c080911fd40c6ca478fb Mon Sep 17 00:00:00 2001 From: Night Owl Date: Wed, 5 Jul 2017 19:17:59 +0500 Subject: [PATCH] Merge https://github.com/SamVanheer/HLEnhanced/commit/19c8e45d8f92d0e09171f9f1b5b3fd0f25d109b6 --- dlls/mp5.cpp | 6 ++++++ dlls/weapons.h | 1 + 2 files changed, 7 insertions(+) diff --git a/dlls/mp5.cpp b/dlls/mp5.cpp index 7131f888..a13257a1 100644 --- a/dlls/mp5.cpp +++ b/dlls/mp5.cpp @@ -270,6 +270,12 @@ void CMP5::WeaponIdle( void ) m_flTimeWeaponIdle = UTIL_SharedRandomFloat( m_pPlayer->random_seed, 10, 15 ); // how long till we do this again. } +BOOL CMP5::IsUseable() +{ + //Can be used if the player has AR grenades. - Solokiller + return CBasePlayerWeapon::IsUseable() || m_pPlayer->m_rgAmmo[m_iSecondaryAmmoType] > 0; +} + class CMP5AmmoClip : public CBasePlayerAmmo { void Spawn( void ) diff --git a/dlls/weapons.h b/dlls/weapons.h index 7d99e8a6..86e9c7f6 100644 --- a/dlls/weapons.h +++ b/dlls/weapons.h @@ -563,6 +563,7 @@ public: BOOL Deploy( void ); void Reload( void ); void WeaponIdle( void ); + BOOL IsUseable(); float m_flNextAnimTime; int m_iShell;