Skip to content

Commit

Permalink
Removed some lazy evals
Browse files Browse the repository at this point in the history
* Halves the worst case run time
* Increases the best case run time by 7%
  • Loading branch information
ulteq committed Nov 6, 2017
1 parent 41383c8 commit f2e84c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/advanced_fatigue/functions/fnc_mainLoop.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ if (GVAR(isProne)) then {
_currentSpeed = _currentSpeed min 1.5;
};

if ((vehicle ACE_player == ACE_player) && {_currentSpeed > 0.1} && {isTouchingGround ACE_player || {underwater ACE_player}}) then {
if ((vehicle ACE_player == ACE_player) && _currentSpeed > 0.1 && (isTouchingGround ACE_player || {underwater ACE_player})) then {
_currentWork = [ACE_player, _currentSpeed, _fwdAngle, _sideAngle] call FUNC(getMetabolicCosts);
_currentWork = _currentWork max REE;
};
Expand Down

0 comments on commit f2e84c9

Please sign in to comment.