Browse Source

Fix m249 reload (#230)

opforfixed
Roman Chistokhodov 3 years ago committed by GitHub
parent
commit
d862abafd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      dlls/gearbox/m249.cpp
  2. 2
      dlls/weapons.h

7
dlls/gearbox/m249.cpp

@ -219,20 +219,19 @@ void CM249::Reload(void)
} }
} }
void CM249::WeaponTick() void CM249::ItemPostFrame()
{ {
if ( m_fInSpecialReload ) if ( m_fInSpecialReload )
{ {
if (m_pPlayer->m_flNextAttack <= UTIL_WeaponTimeBase()) if (m_pPlayer->m_flNextAttack <= UTIL_WeaponTimeBase())
{ {
UpdateTape();
m_fInSpecialReload = FALSE; m_fInSpecialReload = FALSE;
SendWeaponAnim( M249_RELOAD1, UseDecrement(), pev->body ); SendWeaponAnim( M249_RELOAD1, UseDecrement(), pev->body );
m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 2.4; m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 2.4;
} }
return;
} }
CBasePlayerWeapon::ItemPostFrame();
} }
void CM249::WeaponIdle(void) void CM249::WeaponIdle(void)

2
dlls/weapons.h

@ -1248,7 +1248,7 @@ public:
BOOL Deploy(void); BOOL Deploy(void);
void Holster(int skiplocal = 0); void Holster(int skiplocal = 0);
void Reload(void); void Reload(void);
void WeaponTick(); void ItemPostFrame();
void WeaponIdle(void); void WeaponIdle(void);
virtual BOOL ShouldWeaponIdle(void) { return TRUE; } virtual BOOL ShouldWeaponIdle(void) { return TRUE; }
float m_flNextAnimTime; float m_flNextAnimTime;

Loading…
Cancel
Save