mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
remove drawline3d
This commit is contained in:
parent
3da3543381
commit
83ce3fa2bd
@ -1,6 +1,19 @@
|
||||
// by commy2 and esteldunedain
|
||||
#include "script_component.hpp"
|
||||
|
||||
// init object
|
||||
/*if (isNil QGVAR(laserdot)) then {
|
||||
_light = "#lightpoint" createVehicleLocal [0,0,0];
|
||||
_light setLightBrightness 10;
|
||||
_light setLightColor [1,0,0];
|
||||
_light setLightAmbient [1,0,0];
|
||||
_light setLightDayLight true;
|
||||
//_light lightAttachObject [GVAR(laserdot), [0,0,0]];
|
||||
_light setLightAttenuation [0.04,4,4,0,0.04,0.08];
|
||||
|
||||
GVAR(laserdot) = _light;
|
||||
};*/
|
||||
|
||||
EXPLODE_3_PVT(_this,_unit,_range,_isGreen);
|
||||
|
||||
_p0Pos = _unit modelToWorldVisual (_unit selectionPosition "righthand");
|
||||
@ -97,15 +110,15 @@ if (!surfaceIsWater _pL) then {
|
||||
_pL = ASLtoATL _pL;
|
||||
};
|
||||
|
||||
if (call EFUNC(common,ambientBrightness) < 0.2) then {
|
||||
drawLine3D [
|
||||
_p0Pos,
|
||||
_pL,
|
||||
[[1,0,0,1], [0,1,0,1]] select _isGreen
|
||||
];
|
||||
};
|
||||
/*
|
||||
drawLine3D [
|
||||
_p0Pos,
|
||||
_pL,
|
||||
[[1,0,0,1], [0,1,0,1]] select _isGreen
|
||||
];
|
||||
*/
|
||||
|
||||
_size = 2 * (_range - (positionCameraToWorld [0,0,0] distance _pL)) / _range;
|
||||
_size = 2 * (_range - (positionCameraToWorld [0,0,0] vectorDistance _pL)) / _range;
|
||||
|
||||
_camPos = positionCameraToWorld [0,0,0.2];
|
||||
if (count ([_unit, "FIRE"] intersect [_camPos, _pL]) > 0) exitWith {};
|
||||
@ -116,6 +129,8 @@ if (!surfaceIsWater _camPos) then { _camPos = ATLtoASL _camPos; };
|
||||
if ( terrainIntersectASL [_camPos, _pL2]) exitWith {};
|
||||
if ( lineIntersects [_camPos, _pL2]) exitWith {};
|
||||
|
||||
//GVAR(laserdot) setPos _pL;
|
||||
|
||||
drawIcon3D [
|
||||
format ["\a3\weapons_f\acc\data\collimdot_%1_ca.paa", ["red", "green"] select _isGreen],
|
||||
[[1,0.25,0.25,0.5*_brightness], [0.25,1,0.25,0.5*_brightness]] select _isGreen,
|
||||
|
@ -28,7 +28,7 @@ _isIR = _isIR == 1;
|
||||
_laserID = ["ACE_acc_pointer_red", "ACE_acc_pointer_green"] find _laser;
|
||||
|
||||
if (_laserID > -1 && {_x isFlashlightOn _weapon}) then {
|
||||
[_x, 30, _laserID == 1 || _isIR] call FUNC(drawLaserpoint);
|
||||
[_x, 50, _laserID == 1 || _isIR] call FUNC(drawLaserpoint);
|
||||
};
|
||||
|
||||
} forEach GVAR(nearUnits);
|
||||
|
Loading…
Reference in New Issue
Block a user