mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Advanced Fatigue - Disable sway when Advanced Fatigue is off (#9867)
Disabled sway when advanced fatigue is off
This commit is contained in:
parent
af3c95a5a6
commit
b4eaa1e270
@ -2,35 +2,6 @@
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
["baseline", {
|
||||
private _fatigue = ACE_player getVariable [QGVAR(aimFatigue), 0];
|
||||
switch (stance ACE_player) do {
|
||||
case ("CROUCH"): {
|
||||
(1.0 + _fatigue ^ 2 * 0.1)
|
||||
};
|
||||
case ("PRONE"): {
|
||||
(1.0 + _fatigue ^ 2 * 2.0)
|
||||
};
|
||||
default {
|
||||
(1.5 + _fatigue ^ 2 * 3.0)
|
||||
};
|
||||
};
|
||||
}, QUOTE(ADDON)] call EFUNC(common,addSwayFactor);
|
||||
|
||||
["multiplier", {
|
||||
switch (true) do {
|
||||
case (isWeaponRested ACE_player): {
|
||||
GVAR(swayFactor) * GVAR(restedSwayFactor)
|
||||
};
|
||||
case (isWeaponDeployed ACE_player): {
|
||||
GVAR(swayFactor) * GVAR(deployedSwayFactor)
|
||||
};
|
||||
default {
|
||||
GVAR(swayFactor)
|
||||
};
|
||||
};
|
||||
}, QUOTE(ADDON)] call EFUNC(common,addSwayFactor);
|
||||
|
||||
// recheck weapon inertia after weapon swap, change of attachments or switching unit
|
||||
["weapon", {[ACE_player] call FUNC(getWeaponInertia)}, true] call CBA_fnc_addPlayerEventHandler;
|
||||
["loadout", {[ACE_player] call FUNC(getWeaponInertia)}, true] call CBA_fnc_addPlayerEventHandler;
|
||||
@ -39,6 +10,35 @@ if (!hasInterface) exitWith {};
|
||||
["CBA_settingsInitialized", {
|
||||
if (!GVAR(enabled)) exitWith {};
|
||||
|
||||
["baseline", {
|
||||
private _fatigue = ACE_player getVariable [QGVAR(aimFatigue), 0];
|
||||
switch (stance ACE_player) do {
|
||||
case ("CROUCH"): {
|
||||
(1.0 + _fatigue ^ 2 * 0.1)
|
||||
};
|
||||
case ("PRONE"): {
|
||||
(1.0 + _fatigue ^ 2 * 2.0)
|
||||
};
|
||||
default {
|
||||
(1.5 + _fatigue ^ 2 * 3.0)
|
||||
};
|
||||
};
|
||||
}, QUOTE(ADDON)] call EFUNC(common,addSwayFactor);
|
||||
|
||||
["multiplier", {
|
||||
switch (true) do {
|
||||
case (isWeaponRested ACE_player): {
|
||||
GVAR(swayFactor) * GVAR(restedSwayFactor)
|
||||
};
|
||||
case (isWeaponDeployed ACE_player): {
|
||||
GVAR(swayFactor) * GVAR(deployedSwayFactor)
|
||||
};
|
||||
default {
|
||||
GVAR(swayFactor)
|
||||
};
|
||||
};
|
||||
}, QUOTE(ADDON)] call EFUNC(common,addSwayFactor);
|
||||
|
||||
// - Post process effect ------------------------------------------------------
|
||||
GVAR(ppeBlackout) = ppEffectCreate ["ColorCorrections", 4220];
|
||||
GVAR(ppeBlackout) ppEffectEnable true;
|
||||
|
Loading…
Reference in New Issue
Block a user