Skip to content

Commit 7b5b72f

Browse files
authored
Minor performance boost to checkVisibilityList (#467)
After changing back to terrainIntersectASL from checkVisibility it is no longer necessary to adjust the checked position. This speeds up the check. In one test scenario: 0.0088 ms to 0.0077 ms
1 parent 823cf09 commit 7b5b72f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

addons/main/functions/fnc_checkVisibilityList.sqf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ private _return = _checkList findIf {
2727

2828
// get variables
2929
private _posASL = AGLToASL _x;
30-
_posASL = _eyePos vectorAdd ((_posASL vectorDiff _eyePos) vectorMultiply 0.6);
30+
//_posASL = _eyePos vectorAdd ((_posASL vectorDiff _eyePos) vectorMultiply 0.6); ~ uncommented until we may return to checkVisibility test ~ nk
3131

3232
// check visibility
3333
!(terrainIntersectASL [_eyePos, _posASL])

0 commit comments

Comments
 (0)