diff --git a/addons/advanced_ballistics/functions/fnc_diagnoseWeapons.sqf b/addons/advanced_ballistics/functions/fnc_diagnoseWeapons.sqf index b197af9d709..b3f4053bdd9 100644 --- a/addons/advanced_ballistics/functions/fnc_diagnoseWeapons.sqf +++ b/addons/advanced_ballistics/functions/fnc_diagnoseWeapons.sqf @@ -108,16 +108,16 @@ for "_i" from 0 to (count _cfgWeapons)-1 do { }; if (_weapons find _weapon == -1) then { _weapons pushBack _weapon; - _magIndex = _magazines find _magazine; - _magSpeed = _magazineInitSpeeds select _magIndex; + private _magIndex = _magazines find _magazine; + private _magSpeed = _magazineInitSpeeds select _magIndex; _weaponInitSpeeds pushBack (_abInitialSpeed / _magSpeed); }; } forEach _data; { _x params ["_magazineIndex", "_abInitialSpeed", "_magazine", "_weapon"]; - _magIndex = _magazines find _magazine; - _magSpeed = _magazineInitSpeeds select _magIndex; - _wepIndex = _weapons find _weapon; + private _magIndex = _magazines find _magazine; + private _magSpeed = _magazineInitSpeeds select _magIndex; + private _wepIndex = _weapons find _weapon; _wepSpeed = _weaponInitSpeeds select _wepIndex; } forEach _data; { diff --git a/addons/arsenal/defines.hpp b/addons/arsenal/defines.hpp index ecd50f7a479..5b8a733724b 100644 --- a/addons/arsenal/defines.hpp +++ b/addons/arsenal/defines.hpp @@ -434,7 +434,7 @@ if (!isNil QGVAR(customRightPanelButtons)) then {\ _ctrl ctrlCommit 0;\ };\ if (isNull (_display displayCtrl (61 + _plusId))) then {\ - _ctrl = _display ctrlCreate [QGVAR(customArsenalButton_Button), 61 + _plusId];\ + private _ctrl = _display ctrlCreate [QGVAR(customArsenalButton_Button), 61 + _plusId];\ _ctrl ctrlSetPosition [\ safeZoneW + safeZoneX - 10 * GRID_W,\ safeZoneY + (88 + (10 * _forEachIndex)) * GRID_H\ diff --git a/addons/artillerytables/functions/fnc_calculateMaxAngle.sqf b/addons/artillerytables/functions/fnc_calculateMaxAngle.sqf index 62d3cc91a23..9866ec4b28e 100644 --- a/addons/artillerytables/functions/fnc_calculateMaxAngle.sqf +++ b/addons/artillerytables/functions/fnc_calculateMaxAngle.sqf @@ -24,8 +24,5 @@ TRACE_2("callExtension:artillery:find_max_angle",_muzzleVelocity,_airFriction); "ace" callExtension ["artillery:find_max_angle", [_muzzleVelocity, _airFriction]] ) params ["_data", "_code"]; TRACE_1("",_code); -(parseSimpleArray _data) params ["_bestAngle", "_bestDistance", ""]; -_returns = [deg _bestAngle * 6400 / 360, _bestDistance]; -_returns params ["_bestAngle", "_bestDistance"]; - -_returns +(parseSimpleArray _data) params ["_bestAngle", "_bestDistance"]; +[deg _bestAngle * 6400 / 360, _bestDistance] // return diff --git a/addons/atragmx/functions/fnc_calculate_solution.sqf b/addons/atragmx/functions/fnc_calculate_solution.sqf index 7b56217799d..e910017f2fc 100644 --- a/addons/atragmx/functions/fnc_calculate_solution.sqf +++ b/addons/atragmx/functions/fnc_calculate_solution.sqf @@ -155,7 +155,7 @@ while {_TOF < 15 && (_bulletPos select 1) < _targetRange} do { _windage2 = - atan(_windDrift / _trueRange); _lead = (_targetSpeed * _TOF) / (tan(MRAD_TO_DEG(1)) * _trueRange); }; - _kineticEnergy = 0.5 * (_bulletMass / 1000 * (_bulletSpeed ^ 2)); + private _kineticEnergy = 0.5 * (_bulletMass / 1000 * (_bulletSpeed ^ 2)); _kineticEnergy = _kineticEnergy * 0.737562149; if ((missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) && (_bulletPos select 1) > 0) then { @@ -191,7 +191,7 @@ if (_targetRange != 0) then { _lead = (_targetSpeed * _TOF) / (tan(MRAD_TO_DEG(1)) * _targetRange); }; -_kineticEnergy = 0.5 * (_bulletMass / 1000 * (_bulletSpeed ^ 2)); +private _kineticEnergy = 0.5 * (_bulletMass / 1000 * (_bulletSpeed ^ 2)); _kineticEnergy = _kineticEnergy * 0.737562149; if ((missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) && (_bulletPos select 1) > 0) then { diff --git a/addons/atragmx/functions/fnc_recalculate_muzzle_velocity.sqf b/addons/atragmx/functions/fnc_recalculate_muzzle_velocity.sqf index f7e4709cc11..0d5c83ae01c 100644 --- a/addons/atragmx/functions/fnc_recalculate_muzzle_velocity.sqf +++ b/addons/atragmx/functions/fnc_recalculate_muzzle_velocity.sqf @@ -45,7 +45,7 @@ for "_index" from 1 to (_lookupTableSize - 1) do { (_lookupTable select _lowerIndex) params ["_lowerDistance", "_lowerMuzzleVelocity"]; (_lookupTable select _upperIndex) params ["_upperDistance", "_upperMuzzleVelocity"]; -_muzzleVelocity = 100 max (linearConversion [_lowerDistance, _upperDistance, GVAR(temperature), _lowerMuzzleVelocity, _upperMuzzleVelocity]) min 1400; +private _muzzleVelocity = 100 max (linearConversion [_lowerDistance, _upperDistance, GVAR(temperature), _lowerMuzzleVelocity, _upperMuzzleVelocity]) min 1400; if (_muzzleVelocity != GVAR(workingMemory) select 1) then { GVAR(workingMemory) set [1, _muzzleVelocity]; diff --git a/addons/frag/functions/fnc_findReflections.sqf b/addons/frag/functions/fnc_findReflections.sqf index a753934fe85..00a26022e2b 100644 --- a/addons/frag/functions/fnc_findReflections.sqf +++ b/addons/frag/functions/fnc_findReflections.sqf @@ -75,7 +75,7 @@ if (_zIndex < 5) then { } forEach _nlos; { if !(_forEachIndex in _excludes) then { - _testPos = _x; + private _testPos = _x; if (_testPos vectorDistanceSqr _bucketPos <= 30) then { _bucketList pushBack _x; _excludes pushBack _forEachIndex; diff --git a/addons/frag/functions/fnc_frago.sqf b/addons/frag/functions/fnc_frago.sqf index 0284d3249ae..bda1aa58f6d 100644 --- a/addons/frag/functions/fnc_frago.sqf +++ b/addons/frag/functions/fnc_frago.sqf @@ -142,8 +142,7 @@ if (_targets isNotEqualTo []) then { private _vectorDir = [cos (_sectorOffset + _randomDir), sin (_sectorOffset + _randomDir), sin (30 - (random 45))]; private _fragObjSpeed = _fragVelocity * (1 - random 0.5); - - _fragObjVelocity = _vectorDir vectorMultiply _fragObjSpeed; + private _fragObjVelocity = _vectorDir vectorMultiply _fragObjSpeed; private _fragObj = createVehicleLocal [selectRandom _fragTypes, _fragPosAGL, [], 0, "CAN_COLLIDE"]; _fragObj setVectorDir _vectorDir; diff --git a/addons/interact_menu/functions/fnc_renderActionPoints.sqf b/addons/interact_menu/functions/fnc_renderActionPoints.sqf index 502e4de6f94..1887a6d790e 100644 --- a/addons/interact_menu/functions/fnc_renderActionPoints.sqf +++ b/addons/interact_menu/functions/fnc_renderActionPoints.sqf @@ -105,7 +105,7 @@ private _fnc_renderSelfActions = { }; { - _action = _x; + private _action = _x; [_target, _action, _pos] call FUNC(renderBaseMenu); } forEach _classActions; }; diff --git a/addons/maptools/functions/fnc_updateMapToolMarkers.sqf b/addons/maptools/functions/fnc_updateMapToolMarkers.sqf index 1a6d83b6985..f26c831b7e8 100644 --- a/addons/maptools/functions/fnc_updateMapToolMarkers.sqf +++ b/addons/maptools/functions/fnc_updateMapToolMarkers.sqf @@ -71,7 +71,7 @@ if (GVAR(plottingBoard_Shown) == 0) then { // Rotate all points of polyline if (_count >= 4) then { // polylines need at least 2 points (2 components per point) - _rotatedPolyline = []; + private _rotatedPolyline = []; for "_i" from 0 to _count - 1 step 2 do { _rotatedPolyPos = [[0, 0], [_polyline select _i, _polyline select (_i + 1)], -_angle] call CBA_fnc_vectRotate2D; diff --git a/addons/microdagr/functions/fnc_showApplicationPage.sqf b/addons/microdagr/functions/fnc_showApplicationPage.sqf index e150bf2261a..daa5edd28a5 100644 --- a/addons/microdagr/functions/fnc_showApplicationPage.sqf +++ b/addons/microdagr/functions/fnc_showApplicationPage.sqf @@ -57,8 +57,8 @@ if (GVAR(currentApplicationPage) == APP_MODE_INFODISPLAY) then { (_display displayCtrl IDC_MAPDETAILS) ctrlShow ((GVAR(currentApplicationPage) == APP_MODE_MAP) && {GVAR(mapShowTexture)}); if (GVAR(currentApplicationPage) == APP_MODE_MAP) then { - _theMap = if (GVAR(mapShowTexture)) then {_display displayCtrl IDC_MAPDETAILS} else {_display displayCtrl IDC_MAPPLAIN}; - _mapSize = (ctrlPosition _theMap) select 3; + private _theMap = if (GVAR(mapShowTexture)) then {_display displayCtrl IDC_MAPDETAILS} else {_display displayCtrl IDC_MAPPLAIN}; + private _mapSize = (ctrlPosition _theMap) select 3; _theMap ctrlMapAnimAdd [0, (GVAR(mapZoom) / _mapSize), GVAR(mapPosition)]; ctrlMapAnimCommit _theMap; if (GVAR(mapAutoTrackPosition)) then {