It would be nice if the visibility indicator can also check for the viewdistance of the players (or the ace viewdistance value ace_viewdistance_limitViewDistance if it is server/mission forced)
(["ace_viewdistance_limitViewDistance"] call CBA_settings_fnc_priority) in ["server", "mission"] && {_pos distance _eyePos < ace_viewdistance_limitViewDistance}
Also nice would be if the place preview of groups is also considered for the visibility check. So if i place a group with the preview placement activ it should check if all units are visible.
|
{ |
|
// Check if the cursor's position is in the player's view (filter the local player and virtual units) |
|
if (_x != player && {side _x != sideLogic} && {((_x getRelDir _posHigh) + 90) mod 360 < 180}) then { |
|
private _eyePos = eyePos _x; |
|
if (lineIntersectsSurfaces [_eyePos, _pos, _x, objNull] isEqualTo [] || {lineIntersectsSurfaces [_eyePos, _posHigh, _x, objNull] isEqualTo []}) then { |
|
// Check visibility through smoke |
|
private _visibility = [objNull, "VIEW"] checkVisibility [_eyePos, _posHigh]; |
|
|
|
// Draw a line from each player that can see the cursor |
|
drawLine3D [ASLToAGL _eyePos, ASLToAGL _pos, [1, 0, 0, _visibility]]; |
|
|
|
_draw = true; |
|
}; |
|
}; |
|
} forEach allPlayers; |
It would be nice if the visibility indicator can also check for the viewdistance of the players (or the ace viewdistance value
ace_viewdistance_limitViewDistanceif it is server/mission forced)(["ace_viewdistance_limitViewDistance"] call CBA_settings_fnc_priority) in ["server", "mission"] && {_pos distance _eyePos < ace_viewdistance_limitViewDistance}Also nice would be if the place preview of groups is also considered for the visibility check. So if i place a group with the preview placement activ it should check if all units are visible.
ZEN/addons/visibility/functions/fnc_draw.sqf
Lines 31 to 45 in 86e4abd