Skip to content

Commit

Permalink
Gunbag - Fix arsenal caching conflicting with CBA_fnc_setLoadout (#9250)
Browse files Browse the repository at this point in the history
* Update XEH_preInit.sqf

* Update addons/gunbag/XEH_preInit.sqf

---------

Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
  • Loading branch information
johnb432 and LinkIsGrim authored Jul 9, 2023
1 parent 1aa7eb2 commit e181ba5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions addons/gunbag/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit e181ba5

Please sign in to comment.