ACE3/addons/ai/functions/fnc_assignNVGpfh.sqf
jonpas 742626ff1a
General - Relative script_component.hpp includes (#9378)
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2023-09-12 20:58:10 +02:00

28 lines
549 B
Plaintext

#include "..\script_component.hpp"
/*
* 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;