diff --git a/addons/map_gestures/functions/fnc_drawMapGestures.sqf b/addons/map_gestures/functions/fnc_drawMapGestures.sqf index 13c08a03fc..ef0f08b24c 100644 --- a/addons/map_gestures/functions/fnc_drawMapGestures.sqf +++ b/addons/map_gestures/functions/fnc_drawMapGestures.sqf @@ -46,8 +46,8 @@ params ["_mapHandle"]; _grpName = groupID _group; // If color settings for the group exist, then use those, otherwise fall back to the default colors - _color = if (HASH_HASKEY(GVAR(GroupColorConfigurationMapping),_grpName)) then { - (GVAR(GroupColorConfigurations) select (HASH_GET(GVAR(GroupColorConfigurationMapping),_grpName))) select (_x != leader _group) + _color = if ([GVAR(GroupColorConfigurationMapping), _grpName] call CBA_fnc_hashHasKey) then { + (GVAR(GroupColorConfigurations) select ([GVAR(GroupColorConfigurationMapping), _grpName] call CBA_fnc_hashGet)) select (_x != leader _group) } else { if (_x == leader _group) then {GVAR(defaultLeadColor)} else {GVAR(defaultColor)}; }; diff --git a/addons/map_gestures/functions/fnc_moduleGroupSettings.sqf b/addons/map_gestures/functions/fnc_moduleGroupSettings.sqf index 9c21bf867d..52ae6d0a49 100644 --- a/addons/map_gestures/functions/fnc_moduleGroupSettings.sqf +++ b/addons/map_gestures/functions/fnc_moduleGroupSettings.sqf @@ -31,15 +31,15 @@ if (!([_color] call FUNC(isValidColorArray))) exitWith {ERROR("color is not a va // If we already have color configurations from another source, use those, otherwise use default. _configurations = if (isNil QGVAR(GroupColorConfigurations)) then { [] } else { +GVAR(GroupColorConfigurations) }; -_configurationGroupMappings = if(isNil QGVAR(GroupColorConfigurationMapping)) then { HASH_CREATE } else { +GVAR(GroupColorConfigurationMapping) }; +_configurationGroupMappings = if(isNil QGVAR(GroupColorConfigurationMapping)) then { [] call CBA_fnc_hashCreate } else { +GVAR(GroupColorConfigurationMapping) }; // Save custom color configuration and keep the index of the entry. _configurationIndex = _configurations pushBack [_leadColor, _color]; // Add all synchronized groups and reference custom configuration for them { - HASH_SET(_configurationGroupMappings,groupID (group _x),_configurationIndex); -} count _units; + [_configurationGroupMappings, groupID group _x, _configurationIndex] call CBA_fnc_hashSet; +} forEach _units; [QGVAR(GroupColorConfigurations), _configurations, false, true] call EFUNC(common,setSetting); [QGVAR(GroupColorConfigurationMapping), _configurationGroupMappings, false, true] call EFUNC(common,setSetting);