mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
8104c8f465
increase sway update frequency
31 lines
770 B
Plaintext
31 lines
770 B
Plaintext
#include "..\script_component.hpp"
|
|
/*
|
|
* 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 {
|
|
_baseline = 1 max ([missionNamespace, "ACE_setCustomAimCoef_baseline", "max"] call EFUNC(common,arithmeticGetResult));
|
|
};
|
|
|
|
private _multiplier = 1;
|
|
if (GVAR(swayFactorsMultiplier) isNotEqualTo []) then {
|
|
_multiplier = [missionNamespace, "ACE_setCustomAimCoef_multiplier", "product"] call EFUNC(common,arithmeticGetResult);
|
|
};
|
|
|
|
ACE_player setCustomAimCoef (_baseline * _multiplier);
|
|
|
|
[FUNC(swayLoop), [], 0.5] call CBA_fnc_waitAndExecute
|