From e181ba5aa1f659fe05b7833f256a2557b2d40d9d Mon Sep 17 00:00:00 2001 From: johnb432 <58661205+johnb432@users.noreply.github.com> Date: Sun, 9 Jul 2023 23:13:43 +0200 Subject: [PATCH] Gunbag - Fix arsenal caching conflicting with CBA_fnc_setLoadout (#9250) * Update XEH_preInit.sqf * Update addons/gunbag/XEH_preInit.sqf --------- Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> --- addons/gunbag/XEH_preInit.sqf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/addons/gunbag/XEH_preInit.sqf b/addons/gunbag/XEH_preInit.sqf index 78c6741dbb..7829c58074 100644 --- a/addons/gunbag/XEH_preInit.sqf +++ b/addons/gunbag/XEH_preInit.sqf @@ -49,6 +49,11 @@ PREP_RECOMPILE_END; private _gunbagWeapon = _extendedInfo getOrDefault [QGVAR(gunbagWeapon), []]; if (_gunbagWeapon isNotEqualTo []) then { (backpackContainer _unit) setVariable [QGVAR(gunbagWeapon), _gunbagWeapon, true]; + + // Prevent the arsenal closed event from overwriting new info + if (!isNil QGVAR(arsenalCache)) then { + GVAR(arsenalCache) = _gunbagWeapon; + }; }; }] call CBA_fnc_addEventHandler;