ACE3/addons/laserpointer/functions/fnc_onDraw.sqf

31 lines
686 B
Plaintext
Raw Normal View History

#include "script_component.hpp"
2015-11-23 19:52:04 +00:00
/*
* Author: commy2
* Draw the visible laser beams of all cached units.
*
* Arguments:
* None
*
* Return Value:
* None
*
* Example:
* call ACE_laserpointer_fnc_onDraw
*
2015-11-23 19:52:04 +00:00
* Public: No
*/
2015-01-17 22:38:13 +00:00
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);
};