Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General - Change CBA Namespaces to HashMap #8801

Merged
merged 32 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
c84e7a4
medical_treatment
LinkIsGrim Jan 26, 2022
5911773
advanced_throwing
LinkIsGrim Jan 26, 2022
76f8a6d
common, csw
LinkIsGrim Jan 26, 2022
402cac9
Merge branch 'master' into pr/8801
johnb432 Nov 12, 2023
080c254
Update fnc_replaceRegisteredItems.sqf
johnb432 Nov 12, 2023
26429ab
Sanitised numerous components
johnb432 Dec 29, 2023
ad6e93b
Merged master
johnb432 Dec 29, 2023
eef5bb6
Update XEH_postInit.sqf
johnb432 Dec 29, 2023
45e5ceb
Update XEH_postInit.sqf
johnb432 Dec 29, 2023
50ab94a
Merge branch 'master' into pr/8801
johnb432 Feb 14, 2024
01308b6
FUNC -> LINKFUNC
johnb432 Feb 14, 2024
e8926bb
Merged master
johnb432 Mar 26, 2024
444ea38
Changed tagging hashmap
johnb432 Mar 26, 2024
1a422c7
Merge branch 'master' into pr/8801
johnb432 Mar 31, 2024
7c62205
Reverted some changes
johnb432 Mar 31, 2024
6d02be7
Merge branch 'master' into pr/8801
johnb432 Apr 4, 2024
997a809
Reverted some changes
johnb432 Apr 4, 2024
cd34c3b
Update XEH_clientInit.sqf
johnb432 Apr 4, 2024
b010914
Merge branch 'master' into pr/8801
johnb432 Apr 6, 2024
a8add4c
Tweaks and fixes
johnb432 Apr 6, 2024
284a97c
Fix number replacements
johnb432 Apr 6, 2024
4a06c35
Minor cleanup
johnb432 Apr 10, 2024
61a53fc
Merge branch 'master' into pr/8801
johnb432 May 29, 2024
65bb81e
Update fnc_getMagazineName.sqf
johnb432 May 29, 2024
acc61c8
Update fnc_getMagazineName.sqf
johnb432 May 29, 2024
f1d1f43
Minor improvement
johnb432 May 30, 2024
b1c4b13
Merge branch 'master' into pr/8801
johnb432 Jun 5, 2024
a23a3e4
Made factions case-sensitive and added `toLowerANSI` to be safe
johnb432 Jun 5, 2024
599145e
Update fnc_getDetectedObject.sqf
johnb432 Jun 6, 2024
a40765e
Update addons/common/functions/fnc_actionKeysNamesConverted.sqf
johnb432 Jun 11, 2024
7483b06
Throw error if item doesn't exist
johnb432 Jun 11, 2024
1e0ff30
Merge branch 'namespaces-to-hashmaps' of https://github.com/LinkIsGri…
johnb432 Jun 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions addons/advanced_throwing/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,6 @@ if (!hasInterface) exitWith {};
// Temporary Wind Info indication
GVAR(tempWindInfo) = false;

// Ammo/Magazines look-up hash for correctness of initSpeed
GVAR(ammoMagLookup) = call CBA_fnc_createNamespace;
{
{
private _ammo = getText (configFile >> "CfgMagazines" >> _x >> "ammo");
if (_ammo != "") then { GVAR(ammoMagLookup) setVariable [_ammo, _x]; };
} forEach (getArray (configFile >> "CfgWeapons" >> "Throw" >> _x >> "magazines"));
} forEach getArray (configFile >> "CfgWeapons" >> "Throw" >> "muzzles");


// Add keybinds
["ACE3 Weapons", QGVAR(prepare), localize LSTRING(Prepare), {
// Condition
Expand Down
18 changes: 18 additions & 0 deletions addons/advanced_throwing/XEH_preStart.sqf
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
#include "script_component.hpp"

#include "XEH_PREP.hpp"

// Ammo/Magazines look-up hash for correctness of initSpeed
private _cfgMagazines = configFile >> "CfgMagazines";
private _cfgAmmo = configFile >> "CfgAmmo";
private _cfgThrow = configFile >> "CfgWeapons" >> "Throw";

private _ammoMagLookup = createHashMap;

{
{
private _ammo = getText (_cfgMagazines >> _x >> "ammo");
if (_ammo != "") then {
_ammoMagLookup set [configName (_cfgAmmo >> _ammo), _x];
};
} forEach (getArray (_cfgThrow >> _x >> "magazines"));
} forEach (getArray (_cfgThrow >> "muzzles"));

uiNamespace setVariable [QGVAR(ammoMagLookup), compileFinal _ammoMagLookup];
11 changes: 4 additions & 7 deletions addons/advanced_throwing/functions/fnc_drawThrowable.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,10 @@ if ((!_primed) && {!((_throwableMag in (uniformItems ACE_player)) || {_throwable

// Get correct throw power for primed grenade
if (_primed) then {
private _ammoType = typeOf _activeThrowable;
_throwableMag = GVAR(ammoMagLookup) getVariable _ammoType;
if (isNil "_throwableMag") then {
// What we're trying to throw must not be a normal throwable because it is not in our lookup hash (e.g. 40mm smoke)
// Just use HandGrenade as it has an average initSpeed value
_throwableMag = "HandGrenade";
};
// If ammo type is not found:
// What we're trying to throw must not be a normal throwable because it is not in our lookup hash (e.g. 40mm smoke)
// Just use HandGrenade as it has an average initSpeed value
_throwableMag = (uiNamespace getVariable QGVAR(ammoMagLookup)) getOrDefault [typeOf _activeThrowable, "HandGrenade"];
};

// Some throwables have different classname for magazine and ammo
Expand Down
2 changes: 1 addition & 1 deletion addons/captives/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ if (isServer) then {
}];
};

["unit", FUNC(handlePlayerChanged)] call CBA_fnc_addPlayerEventHandler;
["unit", LINKFUNC(handlePlayerChanged)] call CBA_fnc_addPlayerEventHandler;
[QGVAR(moveInCaptive), LINKFUNC(vehicleCaptiveMoveIn)] call CBA_fnc_addEventHandler;
[QGVAR(moveOutCaptive), LINKFUNC(vehicleCaptiveMoveOut)] call CBA_fnc_addEventHandler;

Expand Down
2 changes: 1 addition & 1 deletion addons/common/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ if (isServer) then {
INFO_3("[%1] DC - Was Zeus [%2] while controlling unit [%3] - manually clearing `bis_fnc_moduleRemoteControl_owner`",[_x] call FUNC(getName),_dcPlayer,_x);
_x setVariable ["bis_fnc_moduleRemoteControl_owner", nil, true];
};
} forEach (curatorEditableObjects _zeusLogic);
} forEach (curatorEditableObjects _zeusLogic);
};
}];
};
Expand Down
10 changes: 5 additions & 5 deletions addons/common/functions/fnc_actionKeysNamesConverted.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,18 @@ if (isNil "_keyTable") then {
};
};

private _keyCache = uiNamespace getVariable [QGVAR(keyNameCache), locationNull];
private _keyCache = uiNamespace getVariable QGVAR(keyNameCache); // @TODO: Move cache creation to preStart/somewhere else

if (isNull _keyCache) then {
_keyCache = call CBA_fnc_createNamespace;
if (isNil "_keyCache") then {
_keyCache = createHashMap;
uiNamespace setVariable [QGVAR(keyNameCache), _keyCache];
};

params [["_action", "", [""]]];

private _keybinds = actionKeysNamesArray _action apply {
private _keyName = _x;
private _keybind = _keyCache getVariable _keyName;
private _keybind = _keyCache get _keyName;

if (isNil "_keybind") then {
private _key = -1;
Expand Down Expand Up @@ -101,7 +101,7 @@ private _keybinds = actionKeysNamesArray _action apply {

// cache
_keybind = [_key, _shift, _ctrl, _alt];
_keyCache setVariable [_keyName, _keybind];
_keyCache set [_keyName, _keybind];
};

_keybind
Expand Down
3 changes: 1 addition & 2 deletions addons/common/functions/fnc_getSettingData.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ scopeName "main";
if (_x select 0 == _name) then {
_x breakOut "main";
};
false
} count GVAR(settings);
} forEach GVAR(settings);

[]
15 changes: 11 additions & 4 deletions addons/common/functions/fnc_registerItemReplacement.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,23 @@
params [["_oldItem", "", [0,""]], ["_newItems", "", ["", []]], ["_replaceInherited", false, [false]]];
TRACE_3("registerItemReplacement",_oldItem,_newItems,_replaceInherited);


// Setup on first run
if (isNil QGVAR(itemReplacements)) then {
GVAR(itemReplacements) = [] call CBA_fnc_createNamespace;
GVAR(itemReplacements) = createHashMap;
GVAR(inheritedReplacements) = [];
GVAR(oldItems) = [];
["loadout", LINKFUNC(replaceRegisteredItems)] call CBA_fnc_addPlayerEventHandler;
};

// Get config case - if item doesn't exist, "" is returned
if (_oldItem isEqualType "") then {
_oldItem = _oldItem call FUNC(getConfigName);
};

if (_oldItem isEqualTo "") exitWith {
ERROR("Item doesn't exist");
};

// Save item replacement
// $ prefix is used for types (numbers) and replacements with inheritance
if (_replaceInherited) then {
Expand All @@ -42,9 +50,8 @@ if (_newItems isEqualType "") then {
_newItems = [_newItems];
};

private _oldReplacements = GVAR(itemReplacements) getVariable [_oldItem, []];
private _oldReplacements = GVAR(itemReplacements) getOrDefault [_oldItem, [], true];
_oldReplacements append _newItems;
GVAR(itemReplacements) setVariable [_oldItem, _oldReplacements];

// Force item scan when new replacement was registered in PostInit
if !(isNull ACE_player) then {
Expand Down
6 changes: 3 additions & 3 deletions addons/common/functions/fnc_replaceRegisteredItems.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ for "_i" from 0 to count _newItems - 1 do {
private _replacements = [];

// Determine replacement items: direct replacements, ...
private _directReplacements = GVAR(itemReplacements) getVariable _item;
private _directReplacements = GVAR(itemReplacements) get _item;
if (!isNil "_directReplacements") then {
_doReplace = true;
_replacements append _directReplacements;
};

// ... item type replacements ...
private _type = getNumber (_cfgWeapons >> _item >> "ItemInfo" >> "type");
private _typeReplacements = GVAR(itemReplacements) getVariable ("$" + str _type);
private _typeReplacements = GVAR(itemReplacements) get ("$" + str _type);
if (!isNil "_typeReplacements") then {
_doReplace = true;
_replacements append _typeReplacements;
Expand All @@ -59,7 +59,7 @@ for "_i" from 0 to count _newItems - 1 do {
// ... and inherited replacements
{
if (_item isKindOf [_x, _cfgWeapons]) then {
private _inheritedReplacements = GVAR(itemReplacements) getVariable _x;
private _inheritedReplacements = GVAR(itemReplacements) get _x;
if (!isNil "_inheritedReplacements") then {
_doReplace = true;
_replacements append _inheritedReplacements;
Expand Down
2 changes: 1 addition & 1 deletion addons/dagr/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ GVAR(vectorConnected) = false;
GVAR(noVectorData) = true;
GVAR(vectorGrid) = "00000000";

[QEGVAR(vector,rangefinderData), FUNC(handleRangeFinderData)] call CBA_fnc_addEventHandler;
[QEGVAR(vector,rangefinderData), LINKFUNC(handleRangeFinderData)] call CBA_fnc_addEventHandler;
2 changes: 1 addition & 1 deletion addons/dogtags/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ PREP_RECOMPILE_START;
#include "XEH_PREP.hpp"
PREP_RECOMPILE_END;

GVAR(disabledFactions) = [] call CBA_fnc_createNamespace;
GVAR(disabledFactions) = createHashMap;

ADDON = true;
2 changes: 1 addition & 1 deletion addons/dogtags/functions/fnc_canCheckDogtag.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ params ["_player", "_target"];
if (isNull _target) exitWith {false};

// check if disabled for faction
if ([GVAR(disabledFactions) getVariable faction _target] param [0, false]) exitWith {false};
if ((faction _target) in GVAR(disabledFactions)) exitWith {false};

(!alive _target) || {_target getVariable ["ACE_isUnconscious", false]}
2 changes: 1 addition & 1 deletion addons/dogtags/functions/fnc_canTakeDogtag.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ params ["_player", "_target"];
if (isNull _target) exitWith {false};

// check if disabled for faction
if ([GVAR(disabledFactions) getVariable faction _target] param [0, false]) exitWith {false};
if ((faction _target) in GVAR(disabledFactions)) exitWith {false};

(!alive _target) || {_target getVariable ["ACE_isUnconscious", false]}
7 changes: 6 additions & 1 deletion addons/dogtags/functions/fnc_disableFactionDogtags.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,9 @@

params [["_faction", "", [""]]];

GVAR(disabledFactions) setVariable [_faction, true];
_faction = configName (configFile >> "CfgFactionClasses" >> _faction);

// Faction doesn't exist
if (_faction == "") exitWith {};

GVAR(disabledFactions) set [_faction, true];
2 changes: 1 addition & 1 deletion addons/explosives/functions/fnc_addClacker.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ private _detonators = [_unit] call FUNC(getDetonators);
if !(_x in _detonators) exitWith{
_hasRequired = false;
};
} count _requiredItems;
} forEach _requiredItems;

if !(_hasRequired) exitWith {};
private _config = ConfigFile >> "CfgMagazines" >> _magazineClass >> "ACE_Triggers" >> configName _config;
Expand Down
2 changes: 1 addition & 1 deletion addons/frag/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if (isServer) then {
}] call CBA_fnc_addEventHandler;

// Cache for ammo type configs
GVAR(cacheRoundsTypesToTrack) = [false] call CBA_fnc_createNamespace;
GVAR(cacheRoundsTypesToTrack) = createHashMap;


// Debug stuff:
Expand Down
2 changes: 1 addition & 1 deletion addons/frag/functions/fnc_findReflections.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ if (_zIndex < 5) then {
// _dirvec = _pos vectorFromTo ((player modelToWorldVisualWorld (player selectionPosition "Spine3")));
// _dirvec = _dirvec vectorMultiply 100;
// _can setVelocity _dirvec;
[DFUNC(doExplosions), 0, [_explosions, 0]] call CBA_fnc_addPerFrameHandler;
[LINKFUNC(doExplosions), 0, [_explosions, 0]] call CBA_fnc_addPerFrameHandler;
[_pfhID] call CBA_fnc_removePerFrameHandler;
};
END_COUNTER(fnc_findReflections);
4 changes: 2 additions & 2 deletions addons/frag/functions/fnc_fired.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
//IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"];
TRACE_10("firedEH:",_unit,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile,_vehicle,_gunner,_turret);

private _shouldAdd = GVAR(cacheRoundsTypesToTrack) getVariable _ammo;
private _shouldAdd = GVAR(cacheRoundsTypesToTrack) get _ammo;
if (isNil "_shouldAdd") then {
TRACE_1("no cache for round",_ammo);

Expand All @@ -40,7 +40,7 @@ if (isNil "_shouldAdd") then {
};

TRACE_6("Setting Cache",_skip,_explosive,_indirectRange,_force,_fragPower,_shouldAdd);
GVAR(cacheRoundsTypesToTrack) setVariable [_ammo, _shouldAdd];
GVAR(cacheRoundsTypesToTrack) set [_ammo, _shouldAdd];
};

if (_shouldAdd) then {
Expand Down
2 changes: 1 addition & 1 deletion addons/map/XEH_postInitClient.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ LOG(MSG_INIT);
// Calculate the maximum zoom allowed for this map
call FUNC(determineZoom);

GVAR(flashlights) = [] call CBA_fnc_createNamespace;
GVAR(flashlights) = createHashMap;

["CBA_settingsInitialized", {
if (isMultiplayer && {GVAR(DefaultChannel) != -1}) then {
Expand Down
15 changes: 4 additions & 11 deletions addons/map/functions/fnc_isFlashlight.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,12 @@

params [["_class", "", [""]]];

private _isFlashlight = GVAR(flashlights) getVariable _class;

if (isNil "_isFlashlight") then {
GVAR(flashlights) getOrDefaultCall [_class, {
private _items = ([_class] + (_class call CBA_fnc_switchableAttachments));
private _cfgWeapons = configFile >> "CfgWeapons";

// if this item or any of the switchable items is a flashlight
_isFlashlight = _items findIf {
_items findIf {
private _weaponConfig = _cfgWeapons >> _x;

[
Expand All @@ -34,10 +32,5 @@ if (isNil "_isFlashlight") then {
isText (_x >> "ACE_Flashlight_Colour")
|| {!(getArray (_x >> "ambient") in [[], [0,0,0]]) && {getNumber (_x >> "irLight") == 0}}
} != -1 // return
} != -1;

// cache value
GVAR(flashlights) setVariable [_class, _isFlashlight];
};

_isFlashlight // return
} != -1 // return
}, true] // return
2 changes: 1 addition & 1 deletion addons/map_gestures/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ PREP_RECOMPILE_END;

#include "initSettings.inc.sqf"

GVAR(GroupColorCfgMappingNew) = call CBA_fnc_createNamespace;
GVAR(GroupColorCfgMappingNew) = createHashMap;

ADDON = true;
2 changes: 1 addition & 1 deletion addons/map_gestures/functions/fnc_addGroupColorMapping.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ if (_group == "") exitWith {ERROR("Group ID is blank, which is not valid.")};
if (!([_leadColor] call FUNC(isValidColorArray))) exitWith {ERROR("leadColor is not a valid color array.")};
if (!([_unitColor] call FUNC(isValidColorArray))) exitWith {ERROR("color is not a valid color array.")};

GVAR(GroupColorCfgMappingNew) setVariable [_group, [_leadColor, _unitColor]];
GVAR(GroupColorCfgMappingNew) set [toLower _group, [_leadColor, _unitColor]];
2 changes: 1 addition & 1 deletion addons/map_gestures/functions/fnc_drawMapGestures.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ private _players = [_positions, FUNC(getProximityPlayers), missionNamespace, QGV
};

// If color settings for the group exist, then use those, otherwise fall back to the default colors
private _colorMap = GVAR(GroupColorCfgMappingNew) getVariable [(groupID (group _x)), [GVAR(defaultLeadColor), GVAR(defaultColor)]];
private _colorMap = GVAR(GroupColorCfgMappingNew) getOrDefault [toLower groupID (group _x), [GVAR(defaultLeadColor), GVAR(defaultColor)]];
private _color = _colorMap select (_x != leader _x);

TRACE_2("",_colorMap,_color);
Expand Down
16 changes: 1 addition & 15 deletions addons/medical_blood/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,8 @@ PREP_RECOMPILE_END;

#include "initSettings.inc.sqf"

// Damage types which do not cause blood spurts
GVAR(noBloodDamageTypes) = createHashMapFromArray (call (uiNamespace getVariable QGVAR(noBloodDamageTypes)));

// blood object model namespace
GVAR(models) = [] call CBA_fnc_createNamespace;

{
_x params ["_name", "_model"];

// createSimpleObject expects a path without the leading slash
if ((_model select [0,1]) isEqualTo "\") then {
_model = _model select [1];
};

GVAR(models) setVariable [_name, _model];
} forEach [
GVAR(models) = createHashMapFromArray [
// higher number means bigger model
["blooddrop_1", QPATHTOF(data\ace_drop_1.p3d)],
["blooddrop_2", QPATHTOF(data\ace_drop_2.p3d)],
Expand Down
5 changes: 1 addition & 4 deletions addons/medical_blood/XEH_preStart.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,4 @@

// Damage types which do not cause blood spurts
private _noBloodDamageTypes = "getNumber (_x >> 'noBlood') == 1" configClasses (configFile >> "ACE_Medical_Injuries" >> "damageTypes");
uiNamespace setVariable [
QGVAR(noBloodDamageTypes),
compileFinal str (_noBloodDamageTypes apply {[configName _x, nil]})
];
uiNamespace setVariable [QGVAR(noBloodDamageTypes), compileFinal (_noBloodDamageTypes createHashMapFromArray [])];
LinkIsGrim marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion addons/medical_blood/functions/fnc_createBlood.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
params ["_type", "_position", "_source"];
TRACE_3("Creating blood",_type,_position,_source);

private _model = GVAR(models) getVariable _type;
private _model = GVAR(models) get _type;

private _bloodDrop = createSimpleObject [_model, [0, 0, 0]];
_bloodDrop setDir random 360;
Expand Down
2 changes: 1 addition & 1 deletion addons/medical_blood/functions/fnc_handleWoundReceived.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ params ["_unit", "_allDamages", "_shooter", "_damageType"];
(_allDamages select 0) params ["_damage"];

// Don't bleed if damage type does not cause bleeding
if (_damageType in GVAR(noBloodDamageTypes)) exitWith {};
if (_damageType in (uiNamespace getVariable QGVAR(noBloodDamageTypes))) exitWith {};

// Don't bleed when players only and a non-player unit is wounded
if (GVAR(enabledFor) == BLOOD_ONLY_PLAYERS && {!isPlayer _unit && {_unit != ACE_player}}) exitWith {};
Expand Down
11 changes: 6 additions & 5 deletions addons/medical_engine/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,12 @@ GVAR(armorCache) = createHashMap;
// with handle damage not returning full results.
GVAR(fixedStatics) = [];

GVAR(animations) = [] call CBA_fnc_createNamespace;
GVAR(animations) setVariable [QUNCON_ANIM(faceUp), [QUNCON_ANIM(2),QUNCON_ANIM(2_1),QUNCON_ANIM(7_1),QUNCON_ANIM(8_1),QUNCON_ANIM(5_1),QUNCON_ANIM(6_1)]];
GVAR(animations) setVariable [QUNCON_ANIM(faceDown), [QUNCON_ANIM(1),QUNCON_ANIM(3),QUNCON_ANIM(4),"unconscious",QUNCON_ANIM(9),QUNCON_ANIM(3_1),QUNCON_ANIM(4_1)]];
GVAR(animations) setVariable [QUNCON_ANIM(faceLeft), [QUNCON_ANIM(7),QUNCON_ANIM(8),QUNCON_ANIM(1_1),QUNCON_ANIM(7_1),QUNCON_ANIM(8_1)]];
GVAR(animations) setVariable [QUNCON_ANIM(faceRight), [QUNCON_ANIM(5),QUNCON_ANIM(6),QUNCON_ANIM(10),QUNCON_ANIM(5_1),QUNCON_ANIM(6_1)]];
GVAR(animations) = createHashMapFromArray [
[QUNCON_ANIM(faceUp), [QUNCON_ANIM(2),QUNCON_ANIM(2_1),QUNCON_ANIM(7_1),QUNCON_ANIM(8_1),QUNCON_ANIM(5_1),QUNCON_ANIM(6_1)]],
[QUNCON_ANIM(faceDown), [QUNCON_ANIM(1),QUNCON_ANIM(3),QUNCON_ANIM(4),"unconscious",QUNCON_ANIM(9),QUNCON_ANIM(3_1),QUNCON_ANIM(4_1)]],
[QUNCON_ANIM(faceLeft), [QUNCON_ANIM(7),QUNCON_ANIM(8),QUNCON_ANIM(1_1),QUNCON_ANIM(7_1),QUNCON_ANIM(8_1)]],
[QUNCON_ANIM(faceRight), [QUNCON_ANIM(5),QUNCON_ANIM(6),QUNCON_ANIM(10),QUNCON_ANIM(5_1),QUNCON_ANIM(6_1)]]
];

private _fnc_fixStatic = {
params ["_vehicle"];
Expand Down
Loading
Loading