Page MenuHomeFeedback Tracker

Removing all throwables via addMagazineCargo/addMagazineAmmoCargo leaves a '0th' grenade
Feedback, NormalPublic

Description

https://feedback.bistudio.com/T74244#2602970

Currently, if you have 1 grenade in your vest and you run (vestContainer player) addMagazineCargo ["HandGrenade", -1], the grenade selector in the top right will say 0x, but you can still throw the grenade.

Testing was done on the latest dev branch (2.17.151825).

Details

Severity
None
Resolution
Open
Reproducibility
Always
Operating System
Windows 11 x64
Category
Inventory
Steps To Reproduce
  1. Place down unit, set as playable in a new mission
  2. Make sure unit has 1 grenade of any type
  3. Play mission
  4. Remove 1 grenade via _container addMagazineCargo [_grenade, -1] (e.g. (vestContainer player) addMagazineCargo ["HandGrenade", -1])
  5. Observe that counter for grenade type is at 0x (grenade doesn't have to be selected when the code above is executed)
  6. You can throw the '0th' grenade

addMagazineAmmoCargo is broken in same way.

Additional Information

removeItem, removeItemFromX and removeMagazines aren't broken.
removeMagazine is unknown, as it's broken but in a different way (see https://feedback.bistudio.com/T79813).

Interestingly, removeItems doesn't work on grenades, it throws the following error:

11:40:54 Warning Message: No entry 'bin\config.bin/CfgWeapons.HandGrenade'
11:40:54 Warning Message: No entry '.scope'
11:40:54 Warning Message: '/' is not a value
11:40:54 Warning Message: Error: creating weapon HandGrenade with scope=private

with more lines after that (but imo not relevant here).

Event Timeline

johnb43 created this task.May 18 2024, 11:46 AM
johnb43 updated the task description. (Show Details)May 18 2024, 11:49 AM
dedmen set Ref Ticket to AIII-55525.May 28 2024, 5:59 PM
dedmen changed the task status from New to Feedback.May 28 2024, 6:10 PM

Tested with the latest profiling branch - has indeed been fixed. Tyvm!