From d862abafd71a4918f38bb42a61ab71ad1c714cb3 Mon Sep 17 00:00:00 2001 From: Roman Chistokhodov Date: Sat, 11 Dec 2021 05:33:11 +0300 Subject: [PATCH] Fix m249 reload (#230) --- dlls/gearbox/m249.cpp | 7 +++---- dlls/weapons.h | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/dlls/gearbox/m249.cpp b/dlls/gearbox/m249.cpp index 3c497fa4..a03170a8 100644 --- a/dlls/gearbox/m249.cpp +++ b/dlls/gearbox/m249.cpp @@ -219,20 +219,19 @@ void CM249::Reload(void) } } -void CM249::WeaponTick() +void CM249::ItemPostFrame() { if ( m_fInSpecialReload ) { if (m_pPlayer->m_flNextAttack <= UTIL_WeaponTimeBase()) { - UpdateTape(); m_fInSpecialReload = FALSE; SendWeaponAnim( M249_RELOAD1, UseDecrement(), pev->body ); m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 2.4; } - - return; } + + CBasePlayerWeapon::ItemPostFrame(); } void CM249::WeaponIdle(void) diff --git a/dlls/weapons.h b/dlls/weapons.h index 6c96b621..a2f7e4a8 100644 --- a/dlls/weapons.h +++ b/dlls/weapons.h @@ -1248,7 +1248,7 @@ public: BOOL Deploy(void); void Holster(int skiplocal = 0); void Reload(void); - void WeaponTick(); + void ItemPostFrame(); void WeaponIdle(void); virtual BOOL ShouldWeaponIdle(void) { return TRUE; } float m_flNextAnimTime;