diff --git a/addons/javelin/functions/fnc_onOpticDraw.sqf b/addons/javelin/functions/fnc_onOpticDraw.sqf index adbd2fde1c..74f7c49746 100644 --- a/addons/javelin/functions/fnc_onOpticDraw.sqf +++ b/addons/javelin/functions/fnc_onOpticDraw.sqf @@ -5,12 +5,15 @@ TRACE_1("enter", _this); #define __TRACKINTERVAL 0 // how frequent the check should be. #define __LOCKONTIME 3 // Lock on won't occur sooner +private["_apos", "_aposX", "_aposY", "_args", "_boundsInput", "_bpos", "_canFire", "_constraintBottom"]; +private["_constraintLeft", "_constraintRight", "_constraintTop", "_currentTarget", "_fireDisabledEH"]; +private["_firedEH", "_fov", "_lastTick", "_lockTime", "_maxX", "_maxY", "_minX", "_minY", "_newTarget"]; +private["_offsetX", "_offsetY", "_pos", "_randomLockInterval", "_randomPosWithinBounds", "_range"]; +private["_runTime", "_soundTime", "_targetArray", "_zamerny"]; #define __OffsetX ((ctrlPosition __JavelinIGUITargetingLineV) select 0) - 0.5 #define __OffsetY ((ctrlPosition __JavelinIGUITargetingLineH) select 1) - 0.5 -private["_isJavelin", "_args", "_lastTick", "_runTime", "_soundTime", "_lockTime", "_newTarget", "_currentTarget", "_range", "_pos", "_targetArray"]; - // Reset arguments if we havnt rendered in over a second _args = uiNamespace getVariable[QGVAR(arguments), [] ]; if( (count _args) > 0) then { diff --git a/addons/javelin/functions/fnc_onOpticUnload.sqf b/addons/javelin/functions/fnc_onOpticUnload.sqf index 4086c02766..187b6cf589 100644 --- a/addons/javelin/functions/fnc_onOpticUnload.sqf +++ b/addons/javelin/functions/fnc_onOpticUnload.sqf @@ -1,6 +1,7 @@ //#define DEBUG_MODE_FULL #include "script_component.hpp" TRACE_1("enter", _this); +private["_args", "_disableFireEH", "_pfh"]; uiNameSpace setVariable ['ACE_RscOptics_javelin',nil]; 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; diff --git a/addons/laser_selfdesignate/functions/fnc_findLaserSource.sqf b/addons/laser_selfdesignate/functions/fnc_findLaserSource.sqf index ac1ae7e438..27beed3c6a 100644 --- a/addons/laser_selfdesignate/functions/fnc_findLaserSource.sqf +++ b/addons/laser_selfdesignate/functions/fnc_findLaserSource.sqf @@ -13,7 +13,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; diff --git a/addons/missileguidance/functions/fnc_attackProfile_JAV_DIR.sqf b/addons/missileguidance/functions/fnc_attackProfile_JAV_DIR.sqf index 1e13c57ccc..d84b3b126b 100644 --- a/addons/missileguidance/functions/fnc_attackProfile_JAV_DIR.sqf +++ b/addons/missileguidance/functions/fnc_attackProfile_JAV_DIR.sqf @@ -9,6 +9,7 @@ EXPLODE_7_PVT(((_this select 1) select 0),_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile); private["_targetPos", "_projectilePos", "_target", "_seekerTargetPos", "_launchParams", "_targetLaunchParams"]; private["_distanceToTarget", "_distanceToShooter", "_addHeight", "_returnTargetPos", "_state"]; +private["_cruisAlt", "_distanceShooterToTarget", "_shooterPos"]; _seekerTargetPos = _this select 0; _launchParams = _this select 1; diff --git a/addons/missileguidance/functions/fnc_attackProfile_JAV_TOP.sqf b/addons/missileguidance/functions/fnc_attackProfile_JAV_TOP.sqf index e9064da404..393abebc19 100644 --- a/addons/missileguidance/functions/fnc_attackProfile_JAV_TOP.sqf +++ b/addons/missileguidance/functions/fnc_attackProfile_JAV_TOP.sqf @@ -9,6 +9,8 @@ EXPLODE_7_PVT(((_this select 1) select 0),_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile); private["_targetPos", "_projectilePos", "_target", "_seekerTargetPos", "_launchParams", "_targetLaunchParams"]; private["_distanceToTarget", "_distanceToShooter", "_addHeight", "_returnTargetPos", "_state"]; +private["_cruisAlt", "_distanceShooterToTarget", "_shooterPos"]; + _seekerTargetPos = _this select 0; _launchParams = _this select 1; diff --git a/addons/missileguidance/functions/fnc_attackProfile_LIN.sqf b/addons/missileguidance/functions/fnc_attackProfile_LIN.sqf index 032ae51791..8c67e68402 100644 --- a/addons/missileguidance/functions/fnc_attackProfile_LIN.sqf +++ b/addons/missileguidance/functions/fnc_attackProfile_LIN.sqf @@ -3,7 +3,7 @@ EXPLODE_7_PVT(((_this select 1) select 0),_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile); private["_targetPos", "_projectilePos", "_target", "_seekerTargetPos", "_launchParams", "_targetLaunchParams"]; -private["_distanceToTarget", "_distanceToShooter", "_addHeight", "_returnTargetPos"]; +private["_distanceToTarget", "_distanceToShooter", "_addHeight", "_returnTargetPos", "_shooterPos"]; _seekerTargetPos = _this select 0; _launchParams = _this select 1; diff --git a/addons/missileguidance/functions/fnc_doAttackProfile.sqf b/addons/missileguidance/functions/fnc_doAttackProfile.sqf index fa7c6f4f8b..b9a3502035 100644 --- a/addons/missileguidance/functions/fnc_doAttackProfile.sqf +++ b/addons/missileguidance/functions/fnc_doAttackProfile.sqf @@ -2,8 +2,7 @@ #include "script_component.hpp" EXPLODE_7_PVT(((_this select 1) select 0),_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile); -private["_attackProfilePos"]; - +private["_testName", "_attackProfilePos", "_attackProfile", "_attackProfileName", "_attackProfilesCfg", "_i", "_launchParams", "_testame", "_testProfile"]; _launchParams = ((_this select 1) select 1); _attackProfileName = _launchParams select 3; diff --git a/addons/missileguidance/functions/fnc_doSeekerSearch.sqf b/addons/missileguidance/functions/fnc_doSeekerSearch.sqf index 1e43d83218..081ab16353 100644 --- a/addons/missileguidance/functions/fnc_doSeekerSearch.sqf +++ b/addons/missileguidance/functions/fnc_doSeekerSearch.sqf @@ -2,7 +2,7 @@ #include "script_component.hpp" EXPLODE_7_PVT(((_this select 1) select 0),_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile); -private["_seekerProfilePos"]; +private["_seekerProfilePos", "_i", "_launchParams", "_seekerType", "_seekerTypeName", "_seekerTypesCfg", "_testName", "_testProfile"]; _launchParams = ((_this select 1) select 1); _seekerTypeName = _launchParams select 2; diff --git a/addons/missileguidance/functions/fnc_guidancePFH.sqf b/addons/missileguidance/functions/fnc_guidancePFH.sqf index 2487e3b28f..614323d63f 100644 --- a/addons/missileguidance/functions/fnc_guidancePFH.sqf +++ b/addons/missileguidance/functions/fnc_guidancePFH.sqf @@ -7,6 +7,7 @@ private["_launchParams", "_targetLaunchParams", "_flightParams", "_seekerParams" private["_lastRunTime", "_runtimeDelta", "_adjustTime", "_args", "_seekerTargetPos", "_projectilePos"]; private["_profileAdjustedTargetPos", "_incDeflection", "_minDeflection", "_maxDeflection"]; private["_targetVector", "_adjustVector", "_finalAdjustVector", "_changeVector", "_pitch", "_yaw", "_roll"]; +private["_PS", "_distanceToTarget", "_targetRelativeVector", "_vectorTo"]; _args = _this select 0; EXPLODE_7_PVT((_args select 0),_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile); diff --git a/addons/missileguidance/functions/fnc_onFired.sqf b/addons/missileguidance/functions/fnc_onFired.sqf index e36742bce5..071b2bbf99 100644 --- a/addons/missileguidance/functions/fnc_onFired.sqf +++ b/addons/missileguidance/functions/fnc_onFired.sqf @@ -8,6 +8,8 @@ if(GVAR(enabled) < 1 || {!local _projectile} ) exitWith { false }; if( !isPlayer _shooter && { GVAR(enabled) < 2 } ) exitWith { false }; private["_config", "_enabled", "_target", "_seekerType", "_attackProfile"]; +private["_args", "_canUseLock", "_guidingUnit", "_launchPos", "_lockMode", "_targetPos", "_vanillaTarget"]; + PARAMS_7(_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile); // Bail on not missile diff --git a/addons/missileguidance/functions/fnc_rotateVectLine.sqf b/addons/missileguidance/functions/fnc_rotateVectLine.sqf index b0360cc330..b9904f0e5a 100644 --- a/addons/missileguidance/functions/fnc_rotateVectLine.sqf +++ b/addons/missileguidance/functions/fnc_rotateVectLine.sqf @@ -1,4 +1,5 @@ #include "script_component.hpp" +private["_d", "_map", "_p", "_theta", "_u"]; _map = _this select 0; _theta = _this select 1; diff --git a/addons/missileguidance/functions/fnc_seekerType_Optic.sqf b/addons/missileguidance/functions/fnc_seekerType_Optic.sqf index 45e378c975..872f33a917 100644 --- a/addons/missileguidance/functions/fnc_seekerType_Optic.sqf +++ b/addons/missileguidance/functions/fnc_seekerType_Optic.sqf @@ -3,6 +3,7 @@ EXPLODE_7_PVT(((_this select 1) select 0),_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile); private["_targets", "_foundTargetPos", "_launchParams", "_seekerParams", "_targetLaunchParams"]; +private["_angleFov", "_angleOkay", "_losOkay", "_seekerTargetPos", "_sensorPos", "_target"]; _seekerTargetPos = _this select 0; diff --git a/addons/missileguidance/functions/fnc_seekerType_SALH.sqf b/addons/missileguidance/functions/fnc_seekerType_SALH.sqf index 07f997a041..7aafad1114 100644 --- a/addons/missileguidance/functions/fnc_seekerType_SALH.sqf +++ b/addons/missileguidance/functions/fnc_seekerType_SALH.sqf @@ -2,8 +2,8 @@ #include "script_component.hpp" EXPLODE_7_PVT(((_this select 1) select 0),_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile); +private["_angleFov", "_canSeeTarget", "_foundTargetPos", "_laserResult", "_launchParams", "_seekerParams", "_seekerTargetPos", "_sensorPos", "_target"]; _seekerTargetPos = _this select 0; - _launchParams = _this select 1; _seekerParams = _launchParams select 3; _angleFov = _seekerParams select 0; diff --git a/tools/search_privates.py b/tools/search_privates.py index 4b418de8d6..f3fbf60c10 100644 --- a/tools/search_privates.py +++ b/tools/search_privates.py @@ -81,10 +81,25 @@ def check_privates(filepath): if len(missing) > 0: print (filepath) + + private_output = 'private['; + first = True + for bad_priv in missing: + if first: + first = False + private_output = private_output + '"' + bad_priv + else: + private_output = private_output + '", "' + bad_priv + + private_output = private_output + '"];'; + print private_output + for bad_priv in missing: print ('\t' + bad_priv) bad_count_file = bad_count_file + 1 - + + + return bad_count_file def main():