mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Privates, newline braces, typos
This commit is contained in:
parent
86d7143890
commit
9b2ebfcbe8
@ -1,7 +1,7 @@
|
|||||||
// by commy2
|
// by commy2
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
// fixes laser when being captured. Needed, because the selectionpsoition of the right hand is used
|
// fixes laser when being captured. Needed, because the selectionPosition of the right hand is used
|
||||||
["SetHandcuffed", {if (_this select 1) then {(_this select 0) action ["GunLightOff", _this select 0]};}] call EFUNC(common,addEventHandler);
|
["SetHandcuffed", {if (_this select 1) then {(_this select 0) action ["GunLightOff", _this select 0]};}] call EFUNC(common,addEventHandler);
|
||||||
|
|
||||||
//If user has ASDG JR without the compat patch, then ace's' laser pointers won't be compatible with anything
|
//If user has ASDG JR without the compat patch, then ace's' laser pointers won't be compatible with anything
|
||||||
@ -30,7 +30,7 @@ GVAR(nearUnits) = [];
|
|||||||
|
|
||||||
GVAR(nearUnits) = _nearUnits;
|
GVAR(nearUnits) = _nearUnits;
|
||||||
|
|
||||||
} , 5, []] call CBA_fnc_addPerFrameHandler;
|
}, 5, []] call CBA_fnc_addPerFrameHandler;
|
||||||
|
|
||||||
addMissionEventHandler ["Draw3D", {
|
addMissionEventHandler ["Draw3D", {
|
||||||
call FUNC(onDraw);
|
call FUNC(onDraw);
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
// by commy2 and esteldunedain
|
// by commy2 and esteldunedain
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
private ["_brightness", "_p0", "_p1", "_p0Pos", "_offV1", "_offV2", "_offV3", "_camPos", "_intermediatePos", "_iteration", "_light", "_line", "_pL", "_pL2", "_pX", "_size", "_units", "_fnc_getDistanceToTerrain", "_fnc_doesIntersectWithMan"];
|
||||||
|
|
||||||
// init object
|
// init object
|
||||||
/*if (isNil QGVAR(laserdot)) then {
|
/*if (isNil QGVAR(laserdot)) then {
|
||||||
_light = "#lightpoint" createVehicleLocal [0,0,0];
|
_light = "#lightpoint" createVehicleLocal [0,0,0];
|
||||||
@ -47,7 +49,7 @@ _p1 = _p0 vectorAdd (_v1 vectorMultiply _range);
|
|||||||
//Debugaaa = lineIntersectsObjs [_p0, _p1, objNull, _unit, false, 2];
|
//Debugaaa = lineIntersectsObjs [_p0, _p1, objNull, _unit, false, 2];
|
||||||
|
|
||||||
_fnc_getDistanceToTerrain = {
|
_fnc_getDistanceToTerrain = {
|
||||||
private "_distance";
|
private ["_distance"];
|
||||||
|
|
||||||
_pX = + _p0;
|
_pX = + _p0;
|
||||||
_line = [_p0, _pX];
|
_line = [_p0, _pX];
|
||||||
@ -55,9 +57,7 @@ _fnc_getDistanceToTerrain = {
|
|||||||
_distance = _this;
|
_distance = _this;
|
||||||
_iteration = _distance;
|
_iteration = _distance;
|
||||||
|
|
||||||
while {
|
while {_iteration > 0.05 / 2} do {
|
||||||
_iteration > 0.05 / 2
|
|
||||||
} do {
|
|
||||||
_iteration = _iteration / 2;
|
_iteration = _iteration / 2;
|
||||||
|
|
||||||
_pX = _p0 vectorAdd (_v1 vectorMultiply _distance);
|
_pX = _p0 vectorAdd (_v1 vectorMultiply _distance);
|
||||||
|
@ -1,18 +1,19 @@
|
|||||||
// by commy2
|
// by commy2
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
_brightness = 2 - call EFUNC(common,ambientBrightness);
|
private ["_brightness", "_cacheName", "_isIR", "_laser", "_laserID", "_weapon"];
|
||||||
_isIR = currentVisionMode ACE_player;
|
|
||||||
|
|
||||||
|
_isIR = currentVisionMode ACE_player;
|
||||||
if (_isIR == 2) exitWith {};
|
if (_isIR == 2) exitWith {};
|
||||||
|
|
||||||
_isIR = _isIR == 1;
|
_isIR = _isIR == 1;
|
||||||
|
|
||||||
|
_brightness = 2 - call EFUNC(common,ambientBrightness);
|
||||||
|
|
||||||
{
|
{
|
||||||
_weapon = currentWeapon _x;
|
_weapon = currentWeapon _x;
|
||||||
|
|
||||||
_laser = switch (_weapon) do {
|
_laser = switch (_weapon) do {
|
||||||
case (""): {""};
|
|
||||||
case (primaryWeapon _x): {
|
case (primaryWeapon _x): {
|
||||||
primaryWeaponItems _x select 1;
|
primaryWeaponItems _x select 1;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user