Skip to content

Commit

Permalink
Advanced Fatigue - Change default terrain gradient factor setting (ac…
Browse files Browse the repository at this point in the history
…emod#10361)

* Change default terrain gradient factor setting

* Use scaling factor instead
  • Loading branch information
johnb432 authored Oct 7, 2024
1 parent df92544 commit 9f2e40c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions addons/advanced_fatigue/functions/fnc_mainLoop.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ private _velocity = velocity ACE_player;
private _normal = surfaceNormal (getPosWorld ACE_player);
private _movementVector = vectorNormalized _velocity;
private _fwdAngle = asin (_movementVector select 2);
private _sideAngle = if ((getPosATL ACE_player) select 2 > 0.01) then {
private _sideAngle = if ((getPosATL ACE_player) select 2 > 0.01) then {
0 // ignore terrain normal if not touching it
} else {
private _sideVector = vectorNormalized (_movementVector vectorCrossProduct _normal);
Expand Down Expand Up @@ -78,7 +78,8 @@ if (isNull objectParent ACE_player && {_currentSpeed > 0.1} && {isTouchingGround
};
};

_currentWork = [_duty, _gearMass, _terrainGradient * GVAR(terrainGradientFactor), _terrainFactor, _currentSpeed] call FUNC(getMetabolicCosts);
// Add a scaling factor of 0.1 to reduce excessive stamina consumption on default settings (see #10361)
_currentWork = [_duty, _gearMass, _terrainGradient * GVAR(terrainGradientFactor) * 0.1, _terrainFactor, _currentSpeed] call FUNC(getMetabolicCosts);
_currentWork = _currentWork max REE;
};

Expand Down

0 comments on commit 9f2e40c

Please sign in to comment.