mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
742626ff1a
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
28 lines
549 B
Plaintext
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;
|