mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
parent
4c96278bb4
commit
74dfa6ca33
@ -16,13 +16,17 @@ GVAR(nearUnits) = [];
|
||||
|
||||
// @todo. Maybe move to common?
|
||||
[{
|
||||
// handle RHS / bugged vehicle slots
|
||||
private _camPosAGL = positionCameraToWorld [0,0,0];
|
||||
if !((_camPosAGL select 0) isEqualType 0) exitWith {};
|
||||
|
||||
private _nearUnits = [];
|
||||
{
|
||||
_nearUnits append crew _x;
|
||||
if (count _nearUnits > 10) exitWith {
|
||||
_nearUnits resize 10;
|
||||
};
|
||||
} forEach nearestObjects [positionCameraToWorld [0,0,0], ["AllVehicles"], 50]; // when moving this, search also for units inside vehicles. currently breaks the laser in FFV
|
||||
} forEach nearestObjects [_camPosAGL, ["AllVehicles"], 50]; // when moving this, search also for units inside vehicles. currently breaks the laser in FFV
|
||||
|
||||
GVAR(nearUnits) = _nearUnits;
|
||||
|
||||
|
@ -68,6 +68,8 @@ private _ambientBrightness = ((([] call EFUNC(common,ambientBrightness)) + ([0,
|
||||
private _maxDistance = _ambientBrightness * GVAR(PlayerNamesViewDistance);
|
||||
|
||||
private _camPosAGL = positionCameraToWorld [0, 0, 0];
|
||||
if !((_camPosAGL select 0) isEqualType 0) exitWith {}; // handle RHS / bugged vehicle slots
|
||||
|
||||
private _camPosASL = AGLtoASL _camPosAGL;
|
||||
private _vecy = (AGLtoASL positionCameraToWorld [0, 0, 1]) vectorDiff _camPosASL;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user