slightly quicker

This commit is contained in:
Bailey Danyluk 2024-08-30 00:53:56 -06:00
parent 3370d89fbe
commit 0293eaa423

View File

@ -62,25 +62,14 @@ if (isNull _trackingTarget) then {
} forEach _potentialTargets; } forEach _potentialTargets;
}; };
if (true || {accTime > 0 && !isGamePaused}) then { if (accTime > 0 && !isGamePaused) then {
// If there are flares nearby, check if they will confuse missile // If there are flares nearby, check if they will confuse missile
private _nearby = _trackingTarget nearObjects _flareDistanceFilter; private _nearby = _trackingTarget nearObjects _flareDistanceFilter;
_nearby = _nearby select { _nearby = _nearby select {
// 2 = IR blocking // 2 = IR blocking
private _blocking = configOf _x >> "weaponLockSystem"; (([getNumber (configOf _x >> "weaponLockSystem"), 4] call EFUNC(common,binarizeNumber)) select 1) && // Check if chaff can break radar lock
private _isFlare = false; {[_projectile, getPosASLVisual _x, _seekerAngle] call FUNC(checkSeekerAngle)} && // Check if within view
if (isNumber _blocking) then { {[_projectile, _x, false] call FUNC(checkLos)} // Check if can be seen
_isFlare = (2 == getNumber _blocking);
};
if (isText _blocking) then {
_isFlare = ("2" in getText _blocking);
};
private _withinView = [_projectile, getPosASLVisual _x, _seekerAngle] call FUNC(checkSeekerAngle);
private _canSee = [_projectile, _x, false] call FUNC(checkLos);
(_x isEqualTo _target && _trackingTarget isNotEqualTo _target) || { (_withinView && _canSee && _isFlare) }
}; };
private _frontAspectMultiplier = 1; private _frontAspectMultiplier = 1;