Fix m249 reload (#230)

This commit is contained in:
Roman Chistokhodov 2021-12-11 05:33:11 +03:00 committed by GitHub
parent 310493aaeb
commit d862abafd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 5 deletions

View File

@ -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)

View File

@ -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;