Page MenuHomeFeedback Tracker

Arsenal replaces Backpack even if nothing changed
New, NormalPublic

Description

When going into the Arsenal it automatically removes the player backpack, Adds it back again, Readds all Items that were in it before.
This breaks all Mods that assign variables to backpacks like TFAR (https://github.com/michail-nikolaev/task-force-arma-3-radio/issues/1145)

Problematic code is in a3\functions_f_bootcamp\Inventory\fn_arsenal.sqf
in the Handler for "SelectItem" for the display IDC_RSCDISPLAYARSENAL_TAB_BACKPACK
Line 1663 in 1.64

The same also happens to uniforms and vests which creates problems there with the bug linked below.
Fix would be to check if current selected item is really different than the one the player currently has on him, and only replace it if it really differs.

Fix for this would also fix https://feedback.bistudio.com/T119795

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 8 x64
Category
Virtual Arsenal
Steps To Reproduce
  1. Place player with backpack in mission
  2. Assign variable using
(unitBackpack player) setVariable ["test","test"];
  1. test variable using
systemChat str ((unitBackpack player) getVariable "test");
  1. Open arsenal and without changing anything close it again.
  2. test variable again using
systemChat str ((unitBackpack player) getVariable "test");
  1. This will return Nil because the backpack was removed and readded which cleared its variables

Event Timeline

dedmen created this task.Oct 7 2016, 9:18 PM