Skip to content

Commit

Permalink
Advanced Ballistics - Minor optimisation (acemod#10399)
Browse files Browse the repository at this point in the history
Update fnc_handleFired.sqf
  • Loading branch information
johnb432 authored Oct 15, 2024
1 parent 185ff5d commit 5403c7c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions addons/advanced_ballistics/functions/fnc_handleFired.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 5403c7c

Please sign in to comment.