Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General - Make some local vars private #10339

Merged
merged 3 commits into from
Sep 28, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions addons/advanced_ballistics/functions/fnc_diagnoseWeapons.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
{
Expand Down
2 changes: 1 addition & 1 deletion addons/arsenal/defines.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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\
Expand Down
2 changes: 1 addition & 1 deletion addons/artillerytables/functions/fnc_calculateMaxAngle.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ TRACE_2("callExtension:artillery:find_max_angle",_muzzleVelocity,_airFriction);
) params ["_data", "_code"];
TRACE_1("",_code);
(parseSimpleArray _data) params ["_bestAngle", "_bestDistance", ""];
PabstMirror marked this conversation as resolved.
Show resolved Hide resolved
_returns = [deg _bestAngle * 6400 / 360, _bestDistance];
private _returns = [deg _bestAngle * 6400 / 360, _bestDistance];
_returns params ["_bestAngle", "_bestDistance"];

_returns
PabstMirror marked this conversation as resolved.
Show resolved Hide resolved
4 changes: 2 additions & 2 deletions addons/atragmx/functions/fnc_calculate_solution.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
2 changes: 1 addition & 1 deletion addons/frag/functions/fnc_findReflections.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion addons/frag/functions/fnc_frago.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ if (_targets isNotEqualTo []) then {

private _fragObjSpeed = _fragVelocity * (1 - random 0.5);

PabstMirror marked this conversation as resolved.
Show resolved Hide resolved
_fragObjVelocity = _vectorDir vectorMultiply _fragObjSpeed;
private _fragObjVelocity = _vectorDir vectorMultiply _fragObjSpeed;

private _fragObj = createVehicleLocal [selectRandom _fragTypes, _fragPosAGL, [], 0, "CAN_COLLIDE"];
_fragObj setVectorDir _vectorDir;
Expand Down
2 changes: 1 addition & 1 deletion addons/interact_menu/functions/fnc_renderActionPoints.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ private _fnc_renderSelfActions = {
};

{
_action = _x;
private _action = _x;
[_target, _action, _pos] call FUNC(renderBaseMenu);
} forEach _classActions;
};
Expand Down
2 changes: 1 addition & 1 deletion addons/maptools/functions/fnc_updateMapToolMarkers.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion addons/microdagr/functions/fnc_showApplicationPage.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ if (GVAR(currentApplicationPage) == APP_MODE_INFODISPLAY) then {

if (GVAR(currentApplicationPage) == APP_MODE_MAP) then {
_theMap = if (GVAR(mapShowTexture)) then {_display displayCtrl IDC_MAPDETAILS} else {_display displayCtrl IDC_MAPPLAIN};
PabstMirror marked this conversation as resolved.
Show resolved Hide resolved
_mapSize = (ctrlPosition _theMap) select 3;
private _mapSize = (ctrlPosition _theMap) select 3;
_theMap ctrlMapAnimAdd [0, (GVAR(mapZoom) / _mapSize), GVAR(mapPosition)];
ctrlMapAnimCommit _theMap;
if (GVAR(mapAutoTrackPosition)) then {
Expand Down