diff --git a/addons/advanced_fatigue/functions/fnc_getAnimDuty.sqf b/addons/advanced_fatigue/functions/fnc_getAnimDuty.sqf index 21eec5a88b..3698ff9113 100644 --- a/addons/advanced_fatigue/functions/fnc_getAnimDuty.sqf +++ b/addons/advanced_fatigue/functions/fnc_getAnimDuty.sqf @@ -47,9 +47,15 @@ if (_animType in ["idl", "mov", "adj"]) then { }; } else { // swimming and diving - if (_animType in ["swm", "ssw", "bsw", "dve", "sdv", "bdv"]) then { - _duty = 5; - GVAR(isSwimming) = true; + switch (true) do { + case (_animType in ["swm", "ssw", "bsw"]): { + _duty = 6.5; + GVAR(isSwimming) = true; + }; + case (_animType in ["dve", "sdv", "bdv"]): { + _duty = 2.5; + GVAR(isSwimming) = true; + }; }; }; diff --git a/addons/advanced_fatigue/functions/fnc_handleEffects.sqf b/addons/advanced_fatigue/functions/fnc_handleEffects.sqf index 1ecfb34a88..111727c826 100644 --- a/addons/advanced_fatigue/functions/fnc_handleEffects.sqf +++ b/addons/advanced_fatigue/functions/fnc_handleEffects.sqf @@ -58,7 +58,15 @@ if (GVAR(ppeBlackoutLast) == 1) then { // - Physical effects --------------------------------------------------------- if (GVAR(isSwimming)) exitWith { - _unit setAnimSpeedCoef (1 - _fatigue / 3); + _unit setAnimSpeedCoef linearConversion [0.7, 0.9, _fatigue, 1, 0.5, true]; + + if ((isSprintAllowed _unit) && {_fatigue > 0.7}) then { + [_unit, "blockSprint", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set); + } else { + if ((!isSprintAllowed _unit) && {_fatigue < 0.7}) then { + [_unit, "blockSprint", QUOTE(ADDON), false] call EFUNC(common,statusEffect_set); + }; + }; }; if ((getAnimSpeedCoef _unit) != 1) then { _unit setAnimSpeedCoef 1;