diff --git a/addons/viewdistance/XEH_clientInit.sqf b/addons/viewdistance/XEH_clientInit.sqf index 1fed0bd818..eb609a40f9 100644 --- a/addons/viewdistance/XEH_clientInit.sqf +++ b/addons/viewdistance/XEH_clientInit.sqf @@ -26,4 +26,8 @@ if (!hasInterface) exitWith {}; ["vehicle",{ [false] call FUNC(adaptViewDistance); }] call CBA_fnc_addPlayerEventHandler; + ["ACE_controlledUAV", { + [false] call FUNC(adaptViewDistance); + }] call CBA_fnc_addEventHandler; + }] call CBA_fnc_addEventHandler; diff --git a/addons/viewdistance/functions/fnc_adaptViewDistance.sqf b/addons/viewdistance/functions/fnc_adaptViewDistance.sqf index 4816ee946e..0277b96244 100644 --- a/addons/viewdistance/functions/fnc_adaptViewDistance.sqf +++ b/addons/viewdistance/functions/fnc_adaptViewDistance.sqf @@ -22,6 +22,12 @@ if (!GVAR(enabled) || isNull ACE_player) exitWith {}; private _vehicle = vehicle ACE_player; +ACE_controlledUAV params ["_uav"]; +if (!isNull _uav) then { + TRACE_1("using UAV",ACE_controlledUAV); + _vehicle = _uav; +}; + private _landVehicle = _vehicle isKindOf "LandVehicle" || {_vehicle isKindOf "Ship_F"}; private _airVehicle = _vehicle isKindOf "Air";