Skip to content

Fix #231: correct gun ready and shots-left reporting#251

Open
Ally-for-Hire wants to merge 1 commit intoACE-Project-Team:devfrom
Ally-for-Hire:fix/231-gun-ready-ammo-reporting
Open

Fix #231: correct gun ready and shots-left reporting#251
Ally-for-Hire wants to merge 1 commit intoACE-Project-Team:devfrom
Ally-for-Hire:fix/231-gun-ready-ammo-reporting

Conversation

@Ally-for-Hire
Copy link
Copy Markdown
Contributor

@Ally-for-Hire Ally-for-Hire commented Apr 8, 2026

Addresses #231

This updates acf_gun state reporting so wire outputs reflect the actual chamber state instead of just the reload timer. Guns now report Ready = 1 only when NextFire has elapsed and a non-empty round is still loaded, which fixes the case where a gun could stay "ready" after running out of ammo.

It also corrects Shots Left for empty chambers. Single-shot guns were still reporting one round in the gun even when all linked crates were empty and the chamber had already been cleared. The output now returns 0 whenever BulletData.Type == "Empty".

The fix intentionally avoids auto-calling LoadAmmo() from Think(). That preserves existing unload behavior, so using Unload can still leave the gun empty instead of immediately reloading from a linked crate once the timer expires.

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.

1 participant