mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
parent
da9defba3b
commit
7239f3e88c
@ -5,24 +5,24 @@
|
||||
* Arguments:
|
||||
* 0: Seeker [Object]
|
||||
* 1: Target [Object]
|
||||
*
|
||||
*
|
||||
* Return Value:
|
||||
* Boolean
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
private["_seeker", "_seekerPos", "_target", "_targetPos", "_return", "_vectorTo", "_searchPos"];
|
||||
_seeker = _this select 0;
|
||||
_target = _this select 1;
|
||||
|
||||
params ["_seeker", "_target"];
|
||||
|
||||
if ((isNil "_seeker") || {isNil "_target"}) exitWith {false};
|
||||
|
||||
_targetPos = getPosASL _target;
|
||||
_seekerPos = getPosASL _seeker;
|
||||
_return = true;
|
||||
private _targetPos = getPosASL _target;
|
||||
private _targetAimPos = aimPos _target;
|
||||
private _seekerPos = getPosASL _seeker;
|
||||
private _return = true;
|
||||
|
||||
if(!(terrainIntersectASL [ _seekerPos, _targetPos])) then {
|
||||
if (!((terrainIntersectASL [_seekerPos, _targetPos]) && {terrainIntersectASL [_seekerPos, _targetAimPos]})) then {
|
||||
if(lineIntersects [_seekerPos, _targetPos, _seeker, _target]) then {
|
||||
_return = false;
|
||||
_return = false;
|
||||
};
|
||||
} else {
|
||||
_return = false;
|
||||
|
Loading…
Reference in New Issue
Block a user