2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2023-09-05 14:20:06 +00:00
|
|
|
/*
|
|
|
|
* Author: Jonpas
|
|
|
|
* waitAndExecute Handler for periodic NVG assignment.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* None
|
|
|
|
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [] call ace_ai_fnc_assignNVGpfh
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
TRACE_1("assignNVGpfh",count allUnits);
|
|
|
|
|
|
|
|
if (!GVAR(assignNVG)) exitWith { TRACE_1("shutdown loop",_this); GVAR(assignNVGthread) = false; };
|
|
|
|
|
|
|
|
GVAR(assignNVGstate) = sunOrMoon < 1 || {moonIntensity > 0.8};
|
|
|
|
|
|
|
|
{
|
|
|
|
_x call FUNC(assignNVG);
|
|
|
|
} forEach allUnits;
|
|
|
|
|
|
|
|
[FUNC(assignNVGpfh), [], 300] call CBA_fnc_waitAndExecute;
|