2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2023-09-02 22:09:19 +00:00
|
|
|
/*
|
|
|
|
* Author: LinkIsGrim
|
|
|
|
* Calculates and applies final sway coefficient from sway factors
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* call ace_common_fnc_swayLoop
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
|
|
|
private _baseline = 1;
|
|
|
|
if (GVAR(swayFactorsBaseline) isNotEqualTo []) then {
|
2024-03-24 21:28:14 +00:00
|
|
|
_baseline = 1 max ([missionNamespace, "ACE_setCustomAimCoef_baseline", "max"] call FUNC(arithmeticGetResult));
|
2023-09-02 22:09:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
private _multiplier = 1;
|
|
|
|
if (GVAR(swayFactorsMultiplier) isNotEqualTo []) then {
|
2024-03-24 21:28:14 +00:00
|
|
|
_multiplier = [missionNamespace, "ACE_setCustomAimCoef_multiplier", "product"] call FUNC(arithmeticGetResult);
|
2023-09-02 22:09:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
ACE_player setCustomAimCoef (_baseline * _multiplier);
|
|
|
|
|
2023-10-15 00:21:08 +00:00
|
|
|
[FUNC(swayLoop), [], 0.5] call CBA_fnc_waitAndExecute
|