From a5f288fbd65c0ff1115dd10e8f92e60afc10ccc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20Mu=C3=B1oz?= Date: Mon, 10 Jul 2023 09:36:58 -0400 Subject: [PATCH] Fix Glock and Famas undesired ammo decreasing on burst mode (#832) --- regamedll/dlls/weapons.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/regamedll/dlls/weapons.cpp b/regamedll/dlls/weapons.cpp index b3746dea..9606e79c 100644 --- a/regamedll/dlls/weapons.cpp +++ b/regamedll/dlls/weapons.cpp @@ -761,8 +761,9 @@ 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); } @@ -770,7 +771,9 @@ void CBasePlayerWeapon::FireRemaining(int &shotsFired, float &shootTime, BOOL bI { 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