Skip to content

Fix: Glock18 and Famas undesired ammo decreasing on burst mode#832

Merged
wopox1337 merged 1 commit intorehlds:masterfrom
dystopm:fireremaining-fix
Jul 10, 2023
Merged

Fix: Glock18 and Famas undesired ammo decreasing on burst mode#832
wopox1337 merged 1 commit intorehlds:masterfrom
dystopm:fireremaining-fix

Conversation

@dystopm
Copy link
Contributor

@dystopm dystopm commented May 16, 2023

Consider the next scenario:

  1. Get a glock with clip-bpammo of 20-1
  2. Shoot 3 bullets on burst mode, leaving clip-bpammo of 17-1
  3. Try to reload, won't let

You need to call TabulateAmmo to enable reload again (shoot in single mode).

There is no reason to decrease bpammo on clip decreasing action anyways.
(and there is no reason to use ammo_ members from CBaseEntity)

@dystopm
Copy link
Contributor Author

dystopm commented Jul 6, 2023

@s1lentq @wopox1337 it's worth it?

@wopox1337 wopox1337 self-requested a review July 10, 2023 12:57
{
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;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't understand the original logic behind valve's original GameDLL. Why does it need to reduce ammo from the holster every time a shot is fired? It's weird.

@wopox1337 wopox1337 changed the title Fix Glock and Famas undesired ammo decreasing on burst mode Fix: Glock18 and Famas undesired ammo decreasing on burst mode Jul 10, 2023
@wopox1337 wopox1337 merged commit a5f288f into rehlds:master Jul 10, 2023
@dystopm dystopm deleted the fireremaining-fix branch July 19, 2023 16:28
yohimik pushed a commit to yohimik/ReGameDLL_CS that referenced this pull request Jun 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants