Skip to content

Commit

Permalink
Fix cas ammo consumption logic (#5824)
Browse files Browse the repository at this point in the history
# About the pull request

<!-- Remove this text and explain what the purpose of your PR is.

Mention if you have tested your changes. If you changed a map, make sure
you used the mapmerge tool.
If this is an Issue Correction, you can type "Fixes Issue #169420" to
link the PR to the corresponding Issue number #169420.

Remember: something that is self-evident to you might not be to others.
Explain your rationale fully, even if you feel it goes without saying.
-->
Fix #5578
# Explain why it's good for the game
Bugs bad
# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>

Put screenshots and videos here with an empty line between the
screenshots and the `<details>` tags.

</details>


# Changelog
:cl:
fix: ammo consumption logic for cas tgui correctly counts
/:cl:
  • Loading branch information
mullenpaul committed Feb 27, 2024
1 parent a854bbb commit 7eafea9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ const OffsetDetailed = (
return <>error</>;
}
const ammoConsumption = weaponFm.offsets
.map((x) => (x === '-' ? props.equipment.burst : 0))
.map((x) => (x === '-' ? 0 : props.equipment.burst))
.reduce(
(accumulator, currentValue) => (accumulator ?? 0) + (currentValue ?? 0),
0
Expand Down

0 comments on commit 7eafea9

Please sign in to comment.