/*
    Author: Brazilian Armed Forces
    File: fn_shutdownRSC.sqf

    Purpose:
      - Stop the EachFrame loop and clear the generic air FLIR runtime state
*/

private _pfh = uiNamespace getVariable ["BRAF_FLIR_PFH_eachFrame", -1];

if (_pfh > -1) then {
    removeMissionEventHandler ["EachFrame", _pfh];
};

uiNamespace setVariable ["BRAF_FLIR_PFH_eachFrame", nil];
uiNamespace setVariable ["BRAF_FLIR_UI_Display", nil];
