Tweaked fatigue in water

This commit is contained in:
BaerMitUmlaut 2016-11-14 21:55:26 +01:00
parent e4a4d8f56d
commit 1d8030d196
2 changed files with 18 additions and 4 deletions

View File

@ -47,10 +47,16 @@ if (_animType in ["idl", "mov", "adj"]) then {
}; };
} else { } else {
// swimming and diving // swimming and diving
if (_animType in ["swm", "ssw", "bsw", "dve", "sdv", "bdv"]) then { switch (true) do {
_duty = 5; case (_animType in ["swm", "ssw", "bsw"]): {
_duty = 6.5;
GVAR(isSwimming) = true; GVAR(isSwimming) = true;
}; };
case (_animType in ["dve", "sdv", "bdv"]): {
_duty = 2.5;
GVAR(isSwimming) = true;
};
};
}; };
_duty _duty

View File

@ -58,7 +58,15 @@ if (GVAR(ppeBlackoutLast) == 1) then {
// - Physical effects --------------------------------------------------------- // - Physical effects ---------------------------------------------------------
if (GVAR(isSwimming)) exitWith { 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 { if ((getAnimSpeedCoef _unit) != 1) then {
_unit setAnimSpeedCoef 1; _unit setAnimSpeedCoef 1;