ACE3/addons/missileguidance/functions/fnc_checkLos.sqf

23 lines
494 B
Plaintext
Raw Normal View History

#include "script_component.hpp"
2016-05-30 16:37:03 +00:00
/*
* Author: jaynus
* Returns whether the seeker object can see the target position with checkVisibility
2016-05-30 16:37:03 +00:00
*
2016-06-18 09:50:41 +00:00
* Arguments:
2016-10-12 22:35:24 +00:00
* 0: Seeker <OBJECT>
* 1: Target <OBJECT>
*
2016-06-18 09:50:41 +00:00
* Return Value:
2016-10-12 22:35:24 +00:00
* Has LOS <BOOL>
*
* Example:
* [player, cursorTarget] call ace_missileguidance_fnc_checkLOS;
*
* Public: No
2016-05-30 16:37:03 +00:00
*/
params ["_seeker", "_target"];
2016-05-30 16:37:03 +00:00
private _visibility = [_seeker, "VIEW", _target] checkVisibility [getPosASL _seeker, aimPos _target];
_visibility > 0.001