Update addons/csw/functions/fnc_compatibleMagazines.sqf

This commit is contained in:
johnb432 2024-02-07 09:18:35 -08:00 committed by GitHub
parent c94d29c88b
commit ee6a9532ea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -23,7 +23,7 @@ if !((typeOf _csw) in GVAR(initializedStaticTypes)) exitWith {createHashMap};
// fast exit for csw with single weapon, most common scenario
if (count allTurrets _csw isEqualTo 1 && {count weapons _csw isEqualTo 1}) exitWith {
+(GVAR(compatibleMagsCache) get ((weapons _csw) select 0)) // return
+(GVAR(compatibleMagsCache) getOrDefault [(weapons _csw) select 0, createHashMap]) // return
};
private _weapons = [];