From a7e425bd6b159c6bd21ac483ced20540afbf061c Mon Sep 17 00:00:00 2001 From: some-evil-kitty <106408180+some-evil-kitty@users.noreply.github.com> Date: Thu, 14 May 2026 09:39:18 -0400 Subject: [PATCH 01/11] Update fnc_camshake.sqf --- addons/recoil/functions/fnc_camshake.sqf | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/addons/recoil/functions/fnc_camshake.sqf b/addons/recoil/functions/fnc_camshake.sqf index 9c6e78608f8..b17caec8b7b 100644 --- a/addons/recoil/functions/fnc_camshake.sqf +++ b/addons/recoil/functions/fnc_camshake.sqf @@ -48,6 +48,14 @@ private _recoil = GVAR(recoilCache) getOrDefaultCall [_weapon + _muzzle, { _recoil = [0, 0]; }; + private _customShakeCoef = if (isArray (configFile >> "CfgRecoils" >> _recoil >> GVAR(customShakeCoef)) then { + getArray (configFile >> "CfgRecoils" >> _recoil) + } else { + 1 + }; + + _recoil = _recoil vectorMultiply _customShakeCoef; + TRACE_3("Caching Recoil config",_weapon,_muzzle,_recoil); // Ensure format is correct From 1eaefae2aeb801d3bea715b9448aa8c9f6261d02 Mon Sep 17 00:00:00 2001 From: some-evil-kitty <106408180+some-evil-kitty@users.noreply.github.com> Date: Thu, 14 May 2026 09:44:19 -0400 Subject: [PATCH 02/11] Update fnc_camshake.sqf --- addons/recoil/functions/fnc_camshake.sqf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/recoil/functions/fnc_camshake.sqf b/addons/recoil/functions/fnc_camshake.sqf index b17caec8b7b..f2cbafe9bee 100644 --- a/addons/recoil/functions/fnc_camshake.sqf +++ b/addons/recoil/functions/fnc_camshake.sqf @@ -48,8 +48,8 @@ private _recoil = GVAR(recoilCache) getOrDefaultCall [_weapon + _muzzle, { _recoil = [0, 0]; }; - private _customShakeCoef = if (isArray (configFile >> "CfgRecoils" >> _recoil >> GVAR(customShakeCoef)) then { - getArray (configFile >> "CfgRecoils" >> _recoil) + private _customShakeCoef = if ((_recoil isNotEqualTo [0, 0]) && (isNumber (configFile >> "CfgRecoils" >> _recoil >> QGVAR(customShakeCoef)) then { + getNumber (configFile >> "CfgRecoils" >> _recoil >> QGVAR(customShakeCoef)) } else { 1 }; From a8b820e63ef1cd665f7f35f07ad39d3d46f93bdc Mon Sep 17 00:00:00 2001 From: some-evil-kitty <106408180+some-evil-kitty@users.noreply.github.com> Date: Thu, 14 May 2026 09:50:45 -0400 Subject: [PATCH 03/11] lol --- addons/recoil/functions/fnc_camshake.sqf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/recoil/functions/fnc_camshake.sqf b/addons/recoil/functions/fnc_camshake.sqf index f2cbafe9bee..71e96c9376a 100644 --- a/addons/recoil/functions/fnc_camshake.sqf +++ b/addons/recoil/functions/fnc_camshake.sqf @@ -48,12 +48,13 @@ private _recoil = GVAR(recoilCache) getOrDefaultCall [_weapon + _muzzle, { _recoil = [0, 0]; }; - private _customShakeCoef = if ((_recoil isNotEqualTo [0, 0]) && (isNumber (configFile >> "CfgRecoils" >> _recoil >> QGVAR(customShakeCoef)) then { + private _customShakeCoef = if ((_recoil isNotEqualTo [0, 0]) && (isNumber (configFile >> "CfgRecoils" >> _recoil >> QGVAR(customShakeCoef))) then { getNumber (configFile >> "CfgRecoils" >> _recoil >> QGVAR(customShakeCoef)) } else { 1 }; + _recoil = _recoil vectorMultiply _customShakeCoef; TRACE_3("Caching Recoil config",_weapon,_muzzle,_recoil); From dff4c896093a49246b4aa3aae809f7f7b9069f49 Mon Sep 17 00:00:00 2001 From: some-evil-kitty <106408180+some-evil-kitty@users.noreply.github.com> Date: Thu, 14 May 2026 09:53:22 -0400 Subject: [PATCH 04/11] lol #2 --- addons/recoil/functions/fnc_camshake.sqf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/recoil/functions/fnc_camshake.sqf b/addons/recoil/functions/fnc_camshake.sqf index 71e96c9376a..ea0565a27ec 100644 --- a/addons/recoil/functions/fnc_camshake.sqf +++ b/addons/recoil/functions/fnc_camshake.sqf @@ -48,13 +48,14 @@ private _recoil = GVAR(recoilCache) getOrDefaultCall [_weapon + _muzzle, { _recoil = [0, 0]; }; - private _customShakeCoef = if ((_recoil isNotEqualTo [0, 0]) && (isNumber (configFile >> "CfgRecoils" >> _recoil >> QGVAR(customShakeCoef))) then { + private _customShakeCoef = if ((_recoil isNotEqualTo [0, 0]) && (isNumber (configFile >> "CfgRecoils" >> _recoil >> QGVAR(customShakeCoef)))) then { getNumber (configFile >> "CfgRecoils" >> _recoil >> QGVAR(customShakeCoef)) } else { 1 }; + _recoil = _recoil vectorMultiply _customShakeCoef; TRACE_3("Caching Recoil config",_weapon,_muzzle,_recoil); From 503ff62a783ce451720326415830b72da5ee31e1 Mon Sep 17 00:00:00 2001 From: some-evil-kitty <106408180+some-evil-kitty@users.noreply.github.com> Date: Tue, 26 May 2026 18:03:08 -0400 Subject: [PATCH 05/11] Update fnc_camshake.sqf --- addons/recoil/functions/fnc_camshake.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/recoil/functions/fnc_camshake.sqf b/addons/recoil/functions/fnc_camshake.sqf index ea0565a27ec..e0b798e6af3 100644 --- a/addons/recoil/functions/fnc_camshake.sqf +++ b/addons/recoil/functions/fnc_camshake.sqf @@ -48,7 +48,7 @@ private _recoil = GVAR(recoilCache) getOrDefaultCall [_weapon + _muzzle, { _recoil = [0, 0]; }; - private _customShakeCoef = if ((_recoil isNotEqualTo [0, 0]) && (isNumber (configFile >> "CfgRecoils" >> _recoil >> QGVAR(customShakeCoef)))) then { + private _customShakeCoef = if (isNumber (configFile >> "CfgRecoils" >> _recoil >> QGVAR(customShakeCoef))) then { getNumber (configFile >> "CfgRecoils" >> _recoil >> QGVAR(customShakeCoef)) } else { 1 From caf25ea19175fb084a9ebb1667f8519d1b61f777 Mon Sep 17 00:00:00 2001 From: some-evil-kitty <106408180+some-evil-kitty@users.noreply.github.com> Date: Thu, 28 May 2026 10:14:03 -0400 Subject: [PATCH 06/11] Update fnc_camshake.sqf --- addons/recoil/functions/fnc_camshake.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/recoil/functions/fnc_camshake.sqf b/addons/recoil/functions/fnc_camshake.sqf index e0b798e6af3..15e28662a9e 100644 --- a/addons/recoil/functions/fnc_camshake.sqf +++ b/addons/recoil/functions/fnc_camshake.sqf @@ -72,7 +72,7 @@ private _powerCoef = RECOIL_COEF * linearConversion [0, 1, random 1, _recoil sel if (isWeaponRested _unit) then {_powerMod = _powerMod - 0.07}; if (isWeaponDeployed _unit) then {_powerMod = _powerMod - 0.11}; if (_weapon isEqualTo secondaryWeapon _unit) then { - _powerCoef = _powerCoef + 25.0; + _powerCoef = _powerCoef + GVAR(extraLauncherShake); }; private _camshake = [ From 3102605e9666df2c24444be2ec21be8946a27e94 Mon Sep 17 00:00:00 2001 From: some-evil-kitty <106408180+some-evil-kitty@users.noreply.github.com> Date: Thu, 28 May 2026 10:14:42 -0400 Subject: [PATCH 07/11] Update XEH_postInit.sqf --- addons/recoil/XEH_postInit.sqf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/recoil/XEH_postInit.sqf b/addons/recoil/XEH_postInit.sqf index 639b22d6f94..2f1fc13635d 100644 --- a/addons/recoil/XEH_postInit.sqf +++ b/addons/recoil/XEH_postInit.sqf @@ -1,4 +1,7 @@ #include "script_component.hpp" +// This is too niche to be a setting, but making it not a magic number is good +GVAR(extraLauncherShake) = 25.0; + // Register fire event handler ["ace_firedPlayer", LINKFUNC(camShake)] call CBA_fnc_addEventHandler; From 2811625c0f04e9197b30dabbb29acbb21c9ab995 Mon Sep 17 00:00:00 2001 From: some-evil-kitty <106408180+some-evil-kitty@users.noreply.github.com> Date: Thu, 28 May 2026 13:44:02 -0400 Subject: [PATCH 08/11] Update XEH_postInit.sqf --- addons/recoil/XEH_postInit.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/recoil/XEH_postInit.sqf b/addons/recoil/XEH_postInit.sqf index 2f1fc13635d..71381842d65 100644 --- a/addons/recoil/XEH_postInit.sqf +++ b/addons/recoil/XEH_postInit.sqf @@ -1,6 +1,6 @@ #include "script_component.hpp" -// This is too niche to be a setting, but making it not a magic number is good +// This is too niche to be a setting, but making it not just hardcoded is good GVAR(extraLauncherShake) = 25.0; // Register fire event handler From a8559fd22a37b7a5e71f9a4302e02fa23766cafa Mon Sep 17 00:00:00 2001 From: some-evil-kitty <106408180+some-evil-kitty@users.noreply.github.com> Date: Mon, 1 Jun 2026 12:00:07 -0400 Subject: [PATCH 09/11] Update XEH_preInit.sqf --- addons/recoil/XEH_preInit.sqf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/recoil/XEH_preInit.sqf b/addons/recoil/XEH_preInit.sqf index 1566a79fd48..11c0a294a2a 100644 --- a/addons/recoil/XEH_preInit.sqf +++ b/addons/recoil/XEH_preInit.sqf @@ -9,4 +9,8 @@ PREP_RECOMPILE_END; GVAR(recoilCache) = createHashMap; +// This is too niche to be a setting, but making it not just hardcoded is good +GVAR(extraLauncherShake) = 25.0; + + ADDON = true; From 7e347a0af993c23708ea8390a7fb5f373e50440d Mon Sep 17 00:00:00 2001 From: some-evil-kitty <106408180+some-evil-kitty@users.noreply.github.com> Date: Mon, 1 Jun 2026 12:00:10 -0400 Subject: [PATCH 10/11] Update XEH_postInit.sqf --- addons/recoil/XEH_postInit.sqf | 3 --- 1 file changed, 3 deletions(-) diff --git a/addons/recoil/XEH_postInit.sqf b/addons/recoil/XEH_postInit.sqf index 71381842d65..639b22d6f94 100644 --- a/addons/recoil/XEH_postInit.sqf +++ b/addons/recoil/XEH_postInit.sqf @@ -1,7 +1,4 @@ #include "script_component.hpp" -// This is too niche to be a setting, but making it not just hardcoded is good -GVAR(extraLauncherShake) = 25.0; - // Register fire event handler ["ace_firedPlayer", LINKFUNC(camShake)] call CBA_fnc_addEventHandler; From 5388605c9048a886e3b5e1f1f9ba587c54c26587 Mon Sep 17 00:00:00 2001 From: some-evil-kitty <106408180+some-evil-kitty@users.noreply.github.com> Date: Tue, 2 Jun 2026 08:12:47 -0400 Subject: [PATCH 11/11] Update fnc_camshake.sqf --- addons/recoil/functions/fnc_camshake.sqf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/recoil/functions/fnc_camshake.sqf b/addons/recoil/functions/fnc_camshake.sqf index 15e28662a9e..918758800ac 100644 --- a/addons/recoil/functions/fnc_camshake.sqf +++ b/addons/recoil/functions/fnc_camshake.sqf @@ -38,6 +38,12 @@ private _recoil = GVAR(recoilCache) getOrDefaultCall [_weapon + _muzzle, { getText (_config >> _muzzle >> "recoil") }; + private _customShakeCoef = if (isNumber (configFile >> "CfgRecoils" >> _recoil >> QGVAR(customShakeCoef))) then { + getNumber (configFile >> "CfgRecoils" >> _recoil >> QGVAR(customShakeCoef)) + } else { + 1 + }; + if (isClass (configFile >> "CfgRecoils" >> _recoil)) then { _recoil = getArray (configFile >> "CfgRecoils" >> _recoil >> "kickBack"); @@ -48,12 +54,6 @@ private _recoil = GVAR(recoilCache) getOrDefaultCall [_weapon + _muzzle, { _recoil = [0, 0]; }; - private _customShakeCoef = if (isNumber (configFile >> "CfgRecoils" >> _recoil >> QGVAR(customShakeCoef))) then { - getNumber (configFile >> "CfgRecoils" >> _recoil >> QGVAR(customShakeCoef)) - } else { - 1 - }; - _recoil = _recoil vectorMultiply _customShakeCoef;