mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'medical-rewrite' of https://github.com/acemod/ACE3 into medical-rewrite
This commit is contained in:
commit
f004504a53
@ -1,6 +1,24 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
[missionNamespace, "ACE_setCustomAimCoef", QUOTE(ADDON), {
|
||||
private _unit = ACE_player;
|
||||
private _fatigue = _unit getVariable [QGVAR(aimFatigue), 0];
|
||||
|
||||
switch (stance _unit) do {
|
||||
case ("CROUCH"): {
|
||||
1.0 + _fatigue ^ 2 * 0.1
|
||||
};
|
||||
case ("PRONE"): {
|
||||
1.0 + _fatigue ^ 2 * 2.0
|
||||
};
|
||||
default {
|
||||
1.5 + _fatigue ^ 2 * 3.0
|
||||
};
|
||||
};
|
||||
}] call EFUNC(common,arithmeticSetSource);
|
||||
|
||||
["ace_settingsInitialized", {
|
||||
if (!GVAR(enabled)) exitWith {};
|
||||
|
||||
|
@ -77,14 +77,7 @@ if (_overexhausted) then {
|
||||
};
|
||||
};
|
||||
|
||||
switch (stance _unit) do {
|
||||
case ("CROUCH"): {
|
||||
_unit setCustomAimCoef (1.0 + _fatigue ^ 2 * 0.1);
|
||||
};
|
||||
case ("PRONE"): {
|
||||
_unit setCustomAimCoef (1.0 + _fatigue ^ 2 * 2.0);
|
||||
};
|
||||
default {
|
||||
_unit setCustomAimCoef (1.5 + _fatigue ^ 2 * 3.0);
|
||||
};
|
||||
};
|
||||
_unit setVariable [QGVAR(aimFatigue), _fatigue];
|
||||
|
||||
private _aimCoef = [missionNamespace, "ACE_setCustomAimCoef", "max"] call EFUNC(common,arithmeticGetResult);
|
||||
_unit setCustomAimCoef _aimCoef;
|
||||
|
Loading…
Reference in New Issue
Block a user