diff --git a/addons/laser/XEH_pre_init.sqf b/addons/laser/XEH_pre_init.sqf index de56274759..2dd6e666eb 100644 --- a/addons/laser/XEH_pre_init.sqf +++ b/addons/laser/XEH_pre_init.sqf @@ -8,9 +8,6 @@ PREP(checkLos); PREP(findStrongestRay); -PREP(translateToModelSpace); -PREP(translateToWeaponSpace); - PREP(onLaserDesignatorDraw); PREP(seekerFindLaserSpot); diff --git a/addons/laser/functions/fnc_findStrongestRay.sqf b/addons/laser/functions/fnc_findStrongestRay.sqf index e4238361cb..811b75d351 100644 --- a/addons/laser/functions/fnc_findStrongestRay.sqf +++ b/addons/laser/functions/fnc_findStrongestRay.sqf @@ -1,5 +1,5 @@ #include "script_component.hpp" - +private["_checkPos", "_i", "_largest", "_largestSpot", "_list", "_outliers", "_remainingSpots", "_samplePos", "_spot", "_spots", "_testPos"]; _list = _this select 0; _checkPos = _this select 1; _spots = []; diff --git a/addons/laser/functions/fnc_laserTargetPFH.sqf b/addons/laser/functions/fnc_laserTargetPFH.sqf index d73d9f070a..4c4f242482 100644 --- a/addons/laser/functions/fnc_laserTargetPFH.sqf +++ b/addons/laser/functions/fnc_laserTargetPFH.sqf @@ -2,7 +2,7 @@ #include "script_component.hpp" TRACE_1("enter", _this); -private["_args", "_laserTarget"]; +private["_args", "_laserTarget", "_pos", "_shooter", "_uuid"]; //TRACE_1("enter", _this); _args = _this select 0; _laserTarget = _args select 0; diff --git a/addons/laser/functions/fnc_laser_init.sqf b/addons/laser/functions/fnc_laser_init.sqf index 378ee38407..2be349c294 100644 --- a/addons/laser/functions/fnc_laser_init.sqf +++ b/addons/laser/functions/fnc_laser_init.sqf @@ -3,6 +3,7 @@ TRACE_1("enter", _this); PARAMS_1(_laserTarget); +private["_uuid"]; // Add the target to the global targets array // Everyone tracks them diff --git a/addons/laser/functions/fnc_rotateVectLine.sqf b/addons/laser/functions/fnc_rotateVectLine.sqf index ec85a83cb7..8bae491c4e 100644 --- a/addons/laser/functions/fnc_rotateVectLine.sqf +++ b/addons/laser/functions/fnc_rotateVectLine.sqf @@ -1,5 +1,5 @@ #include "script_component.hpp" - +private["_d", "_map", "_p", "_theta", "_u"]; _map = _this select 0; _theta = _this select 1; diff --git a/addons/laser/functions/fnc_seekerFindLaserSpot.sqf b/addons/laser/functions/fnc_seekerFindLaserSpot.sqf index 41ea877739..77713eb591 100644 --- a/addons/laser/functions/fnc_seekerFindLaserSpot.sqf +++ b/addons/laser/functions/fnc_seekerFindLaserSpot.sqf @@ -15,10 +15,11 @@ #include "script_component.hpp" -private ["_pos", "_seekerWavelengths", "_seekerCode", "_spots", "_buckets", "_excludes", "_bucketIndex", "_finalPos", "_owner", "_obj", "_x", "_method", - "_emitterWavelength", "_laserCode", "_divergence", "_laser", "_laserPos", "_laserDir", "_res", "_bucketPos", "_bucketList", "_c", "_forEachIndex", "_index", - "_testPos", "_finalBuckets", "_largest", "_largestIndex", "_finalBucket", "_owners", "_avgX", "_avgY", "_avgZ", "_count", "_maxOwner", "_maxOwnerIndex", "_finalOwner"]; - +private ["_pos", "_seekerWavelengths", "_seekerCode", "_spots", "_buckets", "_excludes", "_bucketIndex", "_finalPos", "_owner", "_obj", "_x", "_method"]; +private ["_emitterWavelength", "_laserCode", "_divergence", "_laser", "_laserPos", "_laserDir", "_res", "_bucketPos", "_bucketList", "_c", "_forEachIndex", "_index"]; +private ["_testPos", "_finalBuckets", "_largest", "_largestIndex", "_finalBucket", "_owners", "_avgX", "_avgY", "_avgZ", "_count", "_maxOwner", "_maxOwnerIndex", "_finalOwner"]; +private["_dir", "_seekerCos", "_seekerFov", "_testDotProduct", "_testPoint", "_testPointVector"]; + _pos = _this select 0; _dir = vectorNormalized (_this select 1); _seekerFov = _this select 2; diff --git a/addons/laser/functions/fnc_shootCone.sqf b/addons/laser/functions/fnc_shootCone.sqf index 801353d4f7..a7187aa0e4 100644 --- a/addons/laser/functions/fnc_shootCone.sqf +++ b/addons/laser/functions/fnc_shootCone.sqf @@ -1,7 +1,6 @@ #include "script_component.hpp" //#define DEBUG_MODE_FULL -private ["_divergence","_pos","_vec","_longestReturn","_shortestReturn","_resultPositions","_p1","_p2","_p","_v","_cp","_vecRotateMap","_result", - "_resultPos","_distance","_count","_pos2","_radOffset","_offset","_offsetPos","_offsetVector"]; +private ["_i", "_divergence","_pos","_vec","_longestReturn","_shortestReturn","_resultPositions","_p1","_p2","_p","_v","_cp","_vecRotateMap","_result", "_resultPos","_distance","_count","_pos2","_radOffset","_offset","_offsetPos","_offsetVector"]; _divergence = 0.3; _pos = _this select 0; _vec = _this select 1; diff --git a/addons/laser/functions/fnc_translateToModelSpace.sqf b/addons/laser/functions/fnc_translateToModelSpace.sqf deleted file mode 100644 index 1e2e930ac7..0000000000 --- a/addons/laser/functions/fnc_translateToModelSpace.sqf +++ /dev/null @@ -1,16 +0,0 @@ -_object = _this select 0; -_origin = getPosASL _object; -_matrix = _this select 1; -_xVec = _matrix select 0; -_yVec = _matrix select 1; -_zVec = _matrix select 2; - -_offset = _this select 2; - -_x = _offset select 0; -_y = _offset select 1; -_z = _offset select 2; - -_out = (((_xVec vectorMultiply _x) vectorAdd (_yVec vectorMultiply _y)) vectorAdd (_zVec vectorMultiply _z)) vectorAdd _origin; - -_out; \ No newline at end of file diff --git a/addons/laser/functions/fnc_translateToWeaponSpace.sqf b/addons/laser/functions/fnc_translateToWeaponSpace.sqf deleted file mode 100644 index 2c7dc5e6da..0000000000 --- a/addons/laser/functions/fnc_translateToWeaponSpace.sqf +++ /dev/null @@ -1,22 +0,0 @@ -_object = _this select 0; -_origin = getPosASL _object; -_matrix = _this select 1; -_xVec = _matrix select 0; -_yVec = _matrix select 1; -_zVec = _matrix select 2; - -_offset = _this select 2; - -_offset = _offset vectorDiff _origin; - -_x = _offset select 0; -_y = _offset select 1; -_z = _offset select 2; - -_out = [ - ((_xVec select 0)*_x) + ((_xVec select 1)*_y) + ((_xVec select 2)*_z), - ((_yVec select 0)*_x) + ((_yVec select 1)*_y) + ((_yVec select 2)*_z), - ((_zVec select 0)*_x) + ((_zVec select 1)*_y) + ((_zVec select 2)*_z) - ]; - -_out; \ No newline at end of file diff --git a/addons/laser/functions/fnc_vanillaLaserSeekerHandler.sqf b/addons/laser/functions/fnc_vanillaLaserSeekerHandler.sqf index 38cd1839f9..091c4f7acf 100644 --- a/addons/laser/functions/fnc_vanillaLaserSeekerHandler.sqf +++ b/addons/laser/functions/fnc_vanillaLaserSeekerHandler.sqf @@ -12,7 +12,7 @@ //#define DEBUG_MODE_FULL #include "script_component.hpp" -private["_emitter", "_owner", "_gunnerInfo", "_turretInfo", "_povPos", "_povDir"]; +private["_emmiter", "_owner", "_gunnerInfo", "_turretInfo", "_povPos", "_povDir"]; _emmiter = _this select 0; _owner = _this select 1;