mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
search for door in geometry lod (lineintersectssurface)
This commit is contained in:
parent
5a3a32f236
commit
6f64fcd0fb
@ -19,18 +19,16 @@
|
||||
|
||||
params ["_distance"];
|
||||
|
||||
private ["_position0", "_position1", "_intersections", "_count", "_house", "_door"];
|
||||
private ["_position0", "_position1", "_intersections", "_house", "_door"];
|
||||
|
||||
_position0 = positionCameraToWorld [0, 0, 0];
|
||||
_position1 = positionCameraToWorld [0, 0, _distance];
|
||||
|
||||
_intersections = lineIntersectsWith [AGLToASL _position0, AGLToASL _position1, objNull, objNull, true]; // @todo LIS
|
||||
_intersections = lineIntersectsSurfaces [AGLToASL _position0, AGLToASL _position1, cameraOn, objNull, true, 1, "GEOM"];
|
||||
|
||||
_count = count _intersections;
|
||||
if (_intersections isEqualTo []) exitWith {[objNull, ""]};
|
||||
|
||||
if (_count == 0) exitWith {[objNull, ""]};
|
||||
|
||||
_house = _intersections select (_count - 1);
|
||||
_house = _intersections select 0 select 2;
|
||||
|
||||
// shithouse is bugged
|
||||
if (typeOf _house == "") exitWith {[objNull, ""]};
|
||||
|
@ -19,7 +19,7 @@
|
||||
params ["_unit", "_team"];
|
||||
|
||||
// make sure correct team is set on JIP
|
||||
_unit setVariable [QGVAR(assignedFireTeam), _team, true]; // @todo reset variable for Respawn+JIP - bug
|
||||
_unit setVariable [QGVAR(assignedFireTeam), _team, true];
|
||||
|
||||
// join fire team on every machine in that group
|
||||
["assignTeam", units group _unit, [_unit, _team]] call EFUNC(common,targetEvent);
|
||||
|
Loading…
Reference in New Issue
Block a user