Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- params [
- ["_target", cursorObject,[objNull]],
- ["_begPos", [], [[]] ],
- ["_endPos", [], [[]] ]
- ];
- if (_begPos isEqualTo []) then {
- _begPos = (positionCameraToWorld [0,0,0]);
- };
- if (_endPos isEqualTo []) then {
- _endPos = ((_begPos vectorAdd ((getCameraViewDirection player) vectorMultiply 5)));
- };
- private _return = "";
- private _intersections = ([_target, "GEOM"] intersect [_begPos, _endPos]); //CTD DANGER
- if (!(_intersections isEqualTo [])) then {
- //direct Intersection found
- {
- private _selName = (_x select 0);
- if (
- ((_selName find "door_") > -1)
- || ((_selName find "hatch") > -1)
- || ((_selName find "dvere") > -1)
- || ((_selName find "gate_") > -1)
- || ((_selName find "doorr") > -1)
- || ((_selName find "doorl") > -1)
- || ((_selName find "frontdoor") > -1)
- ) exitWith {
- _return = _selName;
- };
- } forEach _intersections;
- };
- _return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement