Skip to content

AdvThrowing - Fix throwing not removing grenade on desynced inventory#11025

Merged
Drofseh merged 1 commit intomasterfrom
throwSync
Oct 5, 2025
Merged

AdvThrowing - Fix throwing not removing grenade on desynced inventory#11025
Drofseh merged 1 commit intomasterfrom
throwSync

Conversation

@PabstMirror
Copy link
Copy Markdown
Contributor

Fix #11023

@PabstMirror PabstMirror added the kind/bug-fix Release Notes: **FIXED:** label Jul 24, 2025
@PabstMirror
Copy link
Copy Markdown
Contributor Author

On "bugged" or desynced inventory
setAmmo will not change ammo count on the magazine
this causes both the _ammoCount var to be wrong (0) and and removal to never happen

this pr fixes

  • assuming that if mag's max count is 1 then it's always time to remove
  • if removing the specific 0 count mag fails, then just remove any mag
    this prevents having unlimited grenades to throw

@PabstMirror PabstMirror marked this pull request as ready for review July 26, 2025 03:50
@PabstMirror PabstMirror added this to the 3.20.1 milestone Jul 26, 2025
Copy link
Copy Markdown
Contributor

@johnb432 johnb432 left a comment

Choose a reason for hiding this comment

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

https://community.bistudio.com/wiki/currentThrowable might be able to help us when 2.22 is out - but atm, LGTM

@Drofseh Drofseh merged commit 7625c07 into master Oct 5, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug-fix Release Notes: **FIXED:**

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Throw infinite grenades by placing the backpack on the ground.

4 participants