Skip to content

Commit

Permalink
Advanced Fatigue - Fix metabolic cost mass multiplier for walking (#9368
Browse files Browse the repository at this point in the history
)

4 -> 2
  • Loading branch information
LinkIsGrim committed Sep 7, 2023
1 parent be4f714 commit 017e097
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions addons/advanced_fatigue/functions/fnc_getMetabolicCosts.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,19 @@ if (GVAR(isSwimming)) then {
_terrainGradient = 0;
};

// Metabolic cost for walking and running is different
if (_velocity > 2) then {
// Running
(
2.10 * SIM_BODYMASS
+ 4 * (SIM_BODYMASS + _gearMass) * ((_gearMass / SIM_BODYMASS) ^ 2)
+ (SIM_BODYMASS + _gearMass) * (0.90 * (_velocity ^ 2) + 0.66 * _velocity * _terrainGradient)
+ (SIM_BODYMASS + _gearMass) * (0.9 * (_velocity ^ 2) + 0.66 * _velocity * _terrainGradient)
) * 0.23 * _duty
} else {
// Walking
(
1.05 * SIM_BODYMASS
+ 4 * (SIM_BODYMASS + _gearMass) * ((_gearMass / SIM_BODYMASS) ^ 2)
+ 2 * (SIM_BODYMASS + _gearMass) * ((_gearMass / SIM_BODYMASS) ^ 2)
+ (SIM_BODYMASS + _gearMass) * (1.15 * (_velocity ^ 2) + 0.66 * _velocity * _terrainGradient)
) * 0.23 * _duty
};

0 comments on commit 017e097

Please sign in to comment.