Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: loadout_addItems may not add any primary magazines #3153

Closed
jaj22 opened this issue Feb 17, 2024 · 0 comments · Fixed by #3154
Closed

[Bug]: loadout_addItems may not add any primary magazines #3153

jaj22 opened this issue Feb 17, 2024 · 0 comments · Fixed by #3154
Labels
Bug Something isn't working

Comments

@jaj22
Copy link

jaj22 commented Feb 17, 2024

The loadout_addItems function seems to have a bug that can cause primary magazines to go missing. I think it's because it always adds all items in a batch (eg. all five primary magazines) to the first container that fits, or the backpack (potentially overloaded) as a fallback. There's logic for trimming the batches, but this only applies if the total free space is insufficient. So the failure case would be this:

  • Batch of magazines would fit in uniform + vest total load.
  • Batch of magazines doesn't fit in either uniform or vest.
  • The unit has no backpack.

Easiest fix is probably to add a check for the no-backpack case and dump the whole batch into the vest in that case.

@jaj22 jaj22 added the Bug Something isn't working label Feb 17, 2024
@jaj22 jaj22 added this to the 3.6 milestone Feb 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants