Skip to content

Commit

Permalink
Fix Glock and Famas undesired ammo decreasing on burst mode (#832)
Browse files Browse the repository at this point in the history
  • Loading branch information
dystopm authored Jul 10, 2023
1 parent 8ddda26 commit a5f288f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion regamedll/dlls/weapons.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -761,16 +761,19 @@ void CBasePlayerWeapon::FireRemaining(int &shotsFired, float &shootTime, BOOL bI
if (bIsGlock)
{
vecDir = m_pPlayer->FireBullets3(vecSrc, gpGlobals->v_forward, 0.05, 8192, 1, BULLET_PLAYER_9MM, 18, 0.9, m_pPlayer->pev, true, m_pPlayer->random_seed);
#ifndef REGAMEDLL_FIXES
--m_pPlayer->ammo_9mm;

#endif
PLAYBACK_EVENT_FULL(flag, m_pPlayer->edict(), m_usFireGlock18, 0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y,
int(m_pPlayer->pev->punchangle.x * 10000), int(m_pPlayer->pev->punchangle.y * 10000), m_iClip == 0, FALSE);
}
else
{

vecDir = m_pPlayer->FireBullets3(vecSrc, gpGlobals->v_forward, m_fBurstSpread, 8192, 2, BULLET_PLAYER_556MM, 30, 0.96, m_pPlayer->pev, false, m_pPlayer->random_seed);
#ifndef REGAMEDLL_FIXES
--m_pPlayer->ammo_556nato;
#endif

#ifdef REGAMEDLL_ADD
// HACKHACK: client-side weapon prediction fix
Expand Down

0 comments on commit a5f288f

Please sign in to comment.