Arsenal - Changes for CBA Disposable hashs (#9998)

* Arsenal - Changes for CBA Disposable hashs

* Update addons/arsenal/functions/fnc_onSelChangedRight.sqf

Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>

* Update addons/arsenal/functions/fnc_onSelChangedRight.sqf

Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>

---------

Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
This commit is contained in:
PabstMirror 2024-05-21 20:23:46 -05:00 committed by GitHub
parent 4cf61a026b
commit 52762c1e62
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -69,7 +69,14 @@ switch (_currentItemsIndex) do {
// Secondary weapon
case IDX_CURR_SECONDARY_WEAPON_ITEMS: {
private _currentItemInSlot = (GVAR(currentItems) select IDX_CURR_SECONDARY_WEAPON_ITEMS) select _itemIndex;
private _isDisposable = CBA_disposable_replaceDisposableLauncher && {!isNil {CBA_disposable_loadedLaunchers getVariable (secondaryWeapon GVAR(center))}};
private _isDisposable = CBA_disposable_replaceDisposableLauncher && {!isNil "CBA_disposable_loadedLaunchers"} &&
{
if (CBA_disposable_loadedLaunchers isEqualType createHashMap) then { // after CBA 3.18
(secondaryWeapon GVAR(center)) in CBA_disposable_loadedLaunchers
} else {
!isNil {CBA_disposable_loadedLaunchers getVariable (secondaryWeapon player)}
}
};
// If removal
if (_item == "") then {