Skip to content

Commit

Permalink
General - Misc code cleanup (#10587)
Browse files Browse the repository at this point in the history
  • Loading branch information
PabstMirror authored Dec 23, 2024
1 parent 46ddfc7 commit 2a3c156
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 15 deletions.
12 changes: 5 additions & 7 deletions addons/artillerytables/dev/showShotInfo.inc.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,9 @@ INFO("showing shot info");
}, {
params ["", "_shootPos", "_lastPos"];
private _mkrB = createMarker [format ["shotInfo-%1-%2",_shootPos,_lastPos], _lastPos];
_mkrB setMarkerType "mil_dot";
_mkrB setMarkerColor "ColorGreen";
_mkrB setMarkerSize [0.5,0.5];
private _diff = _lastPos vectorDiff _shootPos;
_mkrB setMarkerText format ["%1", _diff apply {round _x}];
_mkrB setMarkerTypeLocal "mil_dot";
_mkrB setMarkerColorLocal "ColorGreen";
_mkrB setMarkerSizeLocal [0.5,0.5];

private _dist2d = _shootPos distance2D _lastPos;
private _dir = _shootPos getDir _lastPos;
Expand All @@ -42,7 +40,7 @@ INFO("showing shot info");
}, [_proj, _shootPos, [0,0,0], _submunitionAmmo]] call CBA_fnc_waitUntilAndExecute;

private _mkrA = createMarker [format ["shotInfo-%1",_shootPos], _shootPos];
_mkrA setMarkerType "mil_dot";
_mkrA setMarkerColor "ColorRed";
_mkrA setMarkerTypeLocal "mil_dot";
_mkrA setMarkerColorLocal "ColorRed";
_mkrA setMarkerSize [0.5,0.5];
}] call CBA_fnc_addClassEventHandler;
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ if (_removeAmmoDuringCookoff) then {
_magazineIndex = _virtualAmmo findIf {(_x select 0) == _magazineClassname};

if (_magazineIndex == -1) exitWith {
TRACE_1("no virtual magazine",_magazineClass);
TRACE_1("no virtual magazine",_magazineClassname);
};

if (_newAmmoCount <= 0) then {
Expand Down
2 changes: 1 addition & 1 deletion addons/missile_hud/functions/fnc_getCurrentWeapon.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

params ["_unit", "_vehicle", "_turretPath"];
TRACE_2("registerElement",_condition,_generator);
TRACE_3("getCurrentWeapon",_unit,_vehicle,_turretPath);

private _currentWeapon = if (_unit isEqualTo _vehicle) then {
currentWeapon _unit
Expand Down
5 changes: 0 additions & 5 deletions addons/missileguidance/functions/fnc_seekerType_Doppler.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,6 @@ if (_isActive || { CBA_missionTime >= _timeWhenActive }) then {
private _a2 = 180 - ((_seekerAngle / 2) + _a1);
private _seekerBaseRadiusAtGround = ACTIVE_RADAR_MINIMUM_SCAN_AREA max (_distanceToExpectedTarget / sin(_a2) * sin(_seekerAngle / 2));

private _lastKnownSpeed = if (_lastKnownVelocity isEqualTo [0, 0, 0]) then {
0
} else {
vectorMagnitude _lastKnownVelocity
};
private _seekerBaseRadiusAdjusted = linearConversion [0, _seekerBaseRadiusAtGround, (CBA_missionTime - _lastTimeSeen) * vectorMagnitude _lastKnownVelocity, ACTIVE_RADAR_MINIMUM_SCAN_AREA, _seekerBaseRadiusAtGround, false];
if (_doesntHaveTarget) then {
_seekerBaseRadiusAdjusted = _seekerBaseRadiusAtGround;
Expand Down
1 change: 1 addition & 0 deletions addons/missileguidance/functions/fnc_seekerType_IR.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#define TRACK_ON_PAUSE false
#endif

//IGNORE_PRIVATE_WARNING ["_args"]; // from doSeekerSearch
_args params ["_firedEH", "_launchParams", "_flightParams", "_seekerParams", "_stateParams", "_targetData"];
_firedEH params ["_shooter","","","","_ammo","","_projectile"];
_launchParams params ["_shooter","_targetLaunchParams","_seekerType","_attackProfile","_lockMode","_laserInfo","_navigationType"];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ if !(_maskedByGround) exitWith {
private _nearby = _target nearObjects 50;
_nearby = _nearby select {
// 8 = radar blocking
private _blocking = configOf _x >> "weaponLockSystem";
(([getNumber (configOf _x >> "weaponLockSystem"), 4] call EFUNC(common,binarizeNumber)) select 3) && // Check if chaff can break radar lock
{[_projectile, getPosASLVisual _x, _seekerAngle] call FUNC(checkSeekerAngle)} && // Check if within view
{[_projectile, _x, false] call FUNC(checkLos)} // Check if can be seen
Expand Down
1 change: 1 addition & 0 deletions addons/zeus/functions/fnc_moduleSuicideBomber.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#define SCANNING_PERIOD 1

#ifdef DEBUG_MODE_FULL
#undef SCANNING_PERIOD
#define SCANNING_PERIOD 0
#endif

Expand Down

0 comments on commit 2a3c156

Please sign in to comment.