From 2950a4844753f0b0a21b605a0f83c4065f486e15 Mon Sep 17 00:00:00 2001 From: Josuan Albin Date: Tue, 3 Sep 2019 15:32:27 +0200 Subject: [PATCH] Fix statBarStatement still using AI values for firemodes --- .../functions/fnc_statBarStatement_accuracy.sqf | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/addons/arsenal/functions/fnc_statBarStatement_accuracy.sqf b/addons/arsenal/functions/fnc_statBarStatement_accuracy.sqf index fa8ff55c35..1cd3f149c3 100644 --- a/addons/arsenal/functions/fnc_statBarStatement_accuracy.sqf +++ b/addons/arsenal/functions/fnc_statBarStatement_accuracy.sqf @@ -18,18 +18,19 @@ params ["_stat", "_config", "_args"]; _args params ["_statMinMax", "_barLimits"]; -TRACE_4("statBarStatement_accuracy",_stat,_config,_statMinMax,_barLimits); private _fireModes = getArray (_config >> "modes"); private _dispersion = []; { - private _n = log (getNumber (_config >> _x >> "dispersion")); - if (!finite _n) then {_n = 0;}; - _dispersion pushBackUnique _n; + if (getNumber (_config >> _x >> "showToPlayer") != 0) then { + private _n = log (getNumber (_config >> _x >> "dispersion")); + + if (!finite _n) then {_n = 0;}; + _dispersion pushBackUnique _n; + }; } foreach _fireModes; _dispersion sort true; -TRACE_1("",_dispersion); linearConversion [_statMinMax select 0, _statMinMax select 1, _dispersion param [0, 0], _barLimits select 0, _barLimits select 1]