From 5403c7c034d443b390f8403c070f0995788d7ae4 Mon Sep 17 00:00:00 2001 From: johnb432 <58661205+johnb432@users.noreply.github.com> Date: Tue, 15 Oct 2024 18:03:20 +0200 Subject: [PATCH] Advanced Ballistics - Minor optimisation (#10399) Update fnc_handleFired.sqf --- addons/advanced_ballistics/functions/fnc_handleFired.sqf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/advanced_ballistics/functions/fnc_handleFired.sqf b/addons/advanced_ballistics/functions/fnc_handleFired.sqf index 7d00168160f..5fc6cd18bf1 100644 --- a/addons/advanced_ballistics/functions/fnc_handleFired.sqf +++ b/addons/advanced_ballistics/functions/fnc_handleFired.sqf @@ -50,7 +50,7 @@ if (_abort) then { if (GVAR(bulletTraceEnabled) && {_muzzleVelocity > BULLET_TRACE_MIN_VELOCITY} && {cameraView == "GUNNER"}) then { if (currentWeapon ACE_player == binocular ACE_player) exitWith { _abort = false }; - if (currentWeapon ACE_player == primaryWeapon ACE_player && {count primaryWeaponItems ACE_player > 2}) then { + if (currentWeapon ACE_player == primaryWeapon ACE_player) then { private _opticsName = (primaryWeaponItems ACE_player) select 2; private _opticType = getNumber(configFile >> "CfgWeapons" >> _opticsName >> "ItemInfo" >> "opticType"); if (_opticType == 2) exitWith { _abort = false }; @@ -103,7 +103,7 @@ if (GVAR(bulletTraceEnabled) && {_muzzleVelocity > BULLET_TRACE_MIN_VELOCITY} && if (currentWeapon ACE_player == binocular ACE_player) then { _bulletTraceVisible = true; } else { - if (currentWeapon ACE_player == primaryWeapon ACE_player && count primaryWeaponItems ACE_player > 2) then { + if (currentWeapon ACE_player == primaryWeapon ACE_player) then { private _opticsName = (primaryWeaponItems ACE_player) select 2; private _opticType = getNumber(configFile >> "CfgWeapons" >> _opticsName >> "ItemInfo" >> "opticType"); _bulletTraceVisible = _opticType == 2;