feat(optics): add standalone air flir addon

This commit is contained in:
2026-06-23 22:13:07 -03:00
parent 38417d1d8b
commit ac86a519e7
14 changed files with 782 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
/*
Author: Brazilian Armed Forces
File: fn_initRSC.sqf
Purpose:
- Create and manage the EachFrame loop that updates the generic air FLIR optics
*/
disableSerialization;
params ["_display"];
if (isNil "BRAF_fnc_flirControls") then {
systemChat "[BRAF FLIR] WARNING: BRAF_fnc_flirControls is not loaded.";
};
uiNamespace setVariable ["BRAF_FLIR_UI_Display", _display];
[] call BRAF_fnc_shutdownRSC;
private _pfh = addMissionEventHandler ["EachFrame", {
if (cameraView != "GUNNER") exitWith {};
private _display = uiNamespace getVariable ["BRAF_FLIR_UI_Display", displayNull];
if (isNull _display) exitWith {
[] call BRAF_fnc_shutdownRSC;
};
private _veh = vehicle player;
if (isNull _veh) exitWith {
[] call BRAF_fnc_shutdownRSC;
};
[_display] call BRAF_fnc_flirControls;
}];
uiNamespace setVariable ["BRAF_FLIR_PFH_eachFrame", _pfh];