From dee52083d359434fc3ac51a871c1b836d092d2ac Mon Sep 17 00:00:00 2001 From: hybrid Date: Thu, 11 Jun 2026 19:55:41 +0300 Subject: init --- Client/Module/UAV/uav_spotter.sqf | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Client/Module/UAV/uav_spotter.sqf (limited to 'Client/Module/UAV/uav_spotter.sqf') diff --git a/Client/Module/UAV/uav_spotter.sqf b/Client/Module/UAV/uav_spotter.sqf new file mode 100644 index 0000000..b1b0b17 --- /dev/null +++ b/Client/Module/UAV/uav_spotter.sqf @@ -0,0 +1,28 @@ +/* + Author: Benny + Name: uav_spotter.sqf + Parameters: + 0 - UAV + Description: + This file handle the UAV 'spotting' ability. If the UAV knows about an hostile unit, it'll reveal it's average location on the map. +*/ + +Private ['_delay','_range','_sensitivity','_uav']; +_uav = _this select 0; +_delay = 'WFBE_UAVSPOTTINGDELAY' Call GetNamespace; +_range = 'WFBE_UAVSPOTTINGRANGE' Call GetNamespace; +_sensitivity = 'WFBE_UAVSPOTTINGDETECTION' Call GetNamespace; + +while {true} do { + sleep _delay; + if (!alive _uav || isNull _uav) exitWith {}; + + { + if (_uav knowsAbout _x > _sensitivity && side _x != sideJoined && side _x != civilian) then { + sleep (0.05 + random 0.05); + WFBE_UAV_Reveal = [sideJoined,'CLTFNCUAV_REVEAL',[_uav,_x]]; + publicVariable 'WFBE_UAV_Reveal'; + if (isHostedServer) then {[sideJoined,'CLTFNCUAV_REVEAL',[_uav,_x]] Spawn HandlePVF}; + }; + } forEach (_uav nearEntities _range); +}; -- cgit v1.3.1