ACE3/addons/laserpointer/functions/fnc_onDraw.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

31 lines
689 B
Plaintext

#include "..\script_component.hpp"
/*
* Author: commy2
* Draw the visible laser beams of all cached units.
*
* Arguments:
* None
*
* Return Value:
* None
*
* Example:
* call ACE_laserpointer_fnc_onDraw
*
* Public: No
*/
if (count GVAR(redLaserUnits) + count GVAR(greenLaserUnits) > 0 && {!GVAR(isTI)}) then {
private _brightness = 2 - call EFUNC(common,ambientBrightness);
{
// red laser. draw green dot anyway in IR mode
[_x, 100, GVAR(isIR), _brightness] call FUNC(drawLaserpoint);
} count GVAR(redLaserUnits);
{
// green laser
[_x, 100, true, _brightness] call FUNC(drawLaserpoint);
} count GVAR(greenLaserUnits);
};