From ca7464b158c5ad69c504168cd249dce4135d1a5d Mon Sep 17 00:00:00 2001 From: Night Owl Date: Wed, 5 Jul 2017 16:51:43 +0500 Subject: [PATCH] Merge https://github.com/SamVanheer/HLEnhanced/commit/60a45fb6cd027168e2c546d64f1176ed830070d8 --- dlls/weapons.cpp | 2 ++ dlls/weapons.h | 1 + 2 files changed, 3 insertions(+) diff --git a/dlls/weapons.cpp b/dlls/weapons.cpp index 854425ad..ff083ee7 100644 --- a/dlls/weapons.cpp +++ b/dlls/weapons.cpp @@ -598,6 +598,8 @@ BOOL CanAttack( float attack_time, float curtime, BOOL isPredicted ) void CBasePlayerWeapon::ItemPostFrame( void ) { + WeaponTick(); + if( ( m_fInReload ) && ( m_pPlayer->m_flNextAttack <= UTIL_WeaponTimeBase() ) ) { // complete the reload. diff --git a/dlls/weapons.h b/dlls/weapons.h index 6f5de37a..a7c40678 100644 --- a/dlls/weapons.h +++ b/dlls/weapons.h @@ -318,6 +318,7 @@ public: virtual void PrimaryAttack( void ) { return; } // do "+ATTACK" virtual void SecondaryAttack( void ) { return; } // do "+ATTACK2" virtual void Reload( void ) { return; } // do "+RELOAD" + virtual void WeaponTick() {} // Always called at beginning of ItemPostFrame. - Solokiller virtual void WeaponIdle( void ) { return; } // called when no buttons pressed virtual int UpdateClientData( CBasePlayer *pPlayer ); // sends hud info to client dll, if things have changed virtual void RetireWeapon( void );