Arsenal - Fix FUNC(baseAttachment) returning non-CBA item modes (#9916)

Update fnc_baseAttachment.sqf
This commit is contained in:
johnb432 2024-04-03 23:53:12 +02:00 committed by GitHub
parent 558849b91c
commit a72b3a43a5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -26,6 +26,14 @@ private _cfgWeapons = configfile >> "CfgWeapons";
private _config = _cfgWeapons >> _item;
_item = configName _config;
// If the switch config entries are inherited, ignore
if (
(inheritsFrom (_config >> "MRT_SwitchItemNextClass") isNotEqualTo (_config >> "MRT_SwitchItemNextClass")) ||
{inheritsFrom (_config >> "MRT_SwitchItemPrevClass") isNotEqualTo (_config >> "MRT_SwitchItemPrevClass")}
) exitWith {
_item // return
};
while {
_config = _cfgWeapons >> getText (_config >> "MRT_SwitchItemNextClass");
isClass _config && {_switchableClasses pushBackUnique configName _config != -1}