General - Cleanup some unused/missing vars (#10447)

* General - Cleanup some unused vars

* AI - Fix undefined var in garrisonMove

* Update lints.toml
This commit is contained in:
PabstMirror
2024-10-22 12:24:01 -05:00
committed by GitHub
parent d7c84607d9
commit 4c6fec374f
8 changed files with 17 additions and 15 deletions

View File

@ -8,3 +8,17 @@ options.ignore = [
options.ignore = [
"SLX_*", "ACE_*"
]
[sqf.undefined]
enabled = true
options.check_orphan_code = true
[sqf.unused]
#enabled = true #many false positives without DEBUG_MODE_FULL
options.check_params = false
[sqf.shadowed]
enabled = false
[sqf.not_private]
enabled = true

View File

@ -40,7 +40,7 @@ if (_speed > 2) then {
private _graded = 2.1 * SIM_BODYMASS + 4 * (SIM_BODYMASS + _gearMass) * ((_gearMass / SIM_BODYMASS) ^ 2) + _terrainFactor * (SIM_BODYMASS + _gearMass) * (0.9 * (_speed ^ 2) + 0.66 * _speed * _terrainGradient);
private _terrainImpact = abs ((_graded / _baseline) - 1);
hintSilent format ["FwdAngle: %1 | SideAngle: %2 \n TerrainFactor: %3 | TerrainGradient: %4 \n TerrainImpact: %5 \n Speed: %6 | CarriedLoad: %7 \n Duty: %8 | Work: %9",
_fwdAngle toFixed 1,
_fwdAngle toFixed 1, //IGNORE_PRIVATE_WARNING ["_fwdAngle", "_sideAngle"]; // from mainLoop
_sideAngle toFixed 1,
_terrainFactor toFixed 2,
_terrainGradient toFixed 1,

View File

@ -120,6 +120,7 @@ if (isNil QGVAR(garrison_moveUnitPFH)) then {
};
case ((_unitPosTimer + 5) < CBA_missionTime && {_unitOldPos distance _unitPos < 0.5}) : {
(_unit getVariable [QGVAR(garrisonMove_failSafe), [CBA_missionTime, 5]]) params ["_failSafeTimer", "_failSafeRemainingAttemps"];
call _fnc_attemptFailed;
};

View File

@ -143,12 +143,6 @@ private _sortCache = uiNamespace getVariable QGVAR(sortCache);
private _faceCache = uiNamespace getVariable QGVAR(faceCache);
private _insigniaCache = uiNamespace getVariable QGVAR(insigniaCache);
private _countColumns = if (_right) then {
count lnbGetColumnsPosition _panel
} else {
0
};
private _for = if (_right) then {
for "_i" from 0 to (lnbSize _panel select 0) - 1
} else {

View File

@ -17,8 +17,6 @@
params ["_control", "_container", "_hasItems"];
private _loadRemaining = maxLoad _container - loadAbs _container;
private _item = "";
private _color = [];
private _alpha = 1;

View File

@ -34,14 +34,12 @@ if (_zIndex < 5) then {
_zAng = 90;
};
for "_i" from 0 to _radi do {
private _test = true;
private _vec = [1, ((_i * _split) + _rand) % 360, _zAng] call CBA_fnc_polar2vect;
for "_x" from 1 to _distanceCount do {
private _testPos = _pos vectorAdd (_vec vectorMultiply _x);
// drop ["\a3\data_f\Cl_basic","","Billboard",1,15,ASLtoATL _testPos,[0,0,0],1,1.275,1.0,0.0,[1],[[1,0,0,1]],[0],0.0,2.0,"","",""];
private _res = lineIntersectsWith [_pos, _testPos];
if (count _res > 0) exitWith {
_test = false;
_nlos pushBack _lastPos;
// {
// _x addEventHandler ["HandleDamage", { diag_log text format ["this: %1", _this]; }];

View File

@ -90,7 +90,7 @@ if (_isActive || { CBA_missionTime >= _timeWhenActive }) then {
_projectile setMissileTarget _target;
} else {
if (GVAR(debug_drawGuidanceInfo)) then {
_seekerTypeName = "MWR - EXT";
_seekerTypeName = "MWR - EXT"; //IGNORE_PRIVATE_WARNING ["_seekerTypeName"]; // from doSeekerSearch
};
// External radar homing
// if the target is in the remote targets for the side, whoever the donor is will "datalink" the target for the hellfire.

View File

@ -24,9 +24,6 @@ params [["_unit", objNull, [objNull]], ["_sink", objNull, [objNull]], ["_startin
private _bestPosASL = [];
private _bestPosDistance = 1e38;
private _viewPos = _startingPosASL vectorAdd (((positionCameraToWorld [0,0,0]) vectorFromTo (positionCameraToWorld [0,0,1])) vectorMultiply 3);
private _modelVector = _startingPosASL vectorFromTo (_sink modelToWorldWorld [0,0,0]);
private _modelVectorLow = _startingPosASL vectorFromTo (_sink modelToWorldWorld [0,0,-1]);
{
private _endPosASL = _x;