From 20b45e10a4fd5cfe1b92417d59f85213134ff746 Mon Sep 17 00:00:00 2001 From: Michael Braun Date: Sun, 23 Aug 2015 17:53:33 +0200 Subject: [PATCH] Fixed issue with selecting the wrong value, when perfect barrel length match occured. --- .../functions/fnc_calculateBarrelLengthVelocityShift.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/advanced_ballistics/functions/fnc_calculateBarrelLengthVelocityShift.sqf b/addons/advanced_ballistics/functions/fnc_calculateBarrelLengthVelocityShift.sqf index 9ea45ea525..b1d991e467 100644 --- a/addons/advanced_ballistics/functions/fnc_calculateBarrelLengthVelocityShift.sqf +++ b/addons/advanced_ballistics/functions/fnc_calculateBarrelLengthVelocityShift.sqf @@ -35,7 +35,7 @@ if (_muzzleVelocityTableCount == 1) exitWith { (_muzzleVelocityTable select 0) - // If we have the precise barrel length value, return result immediately if (_barrelLength in _barrelLengthTable) exitWith { - _muzzleVelocityTable select (_barrelLengthTable find _barrelLength) - _muzzleVelocity + (_muzzleVelocityTable select (_barrelLengthTable find _barrelLength)) - _muzzleVelocity }; // Limit values to lower and upper bound of data we have available