From 110bce763f11a444727ce8433b549f913caa6a5b Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Wed, 8 Mar 2017 12:31:26 -0600 Subject: [PATCH] Fix intergrated scopes (#4945) --- addons/scopes/functions/fnc_inventoryCheck.sqf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/scopes/functions/fnc_inventoryCheck.sqf b/addons/scopes/functions/fnc_inventoryCheck.sqf index 2af9c56ec03..817d301221c 100644 --- a/addons/scopes/functions/fnc_inventoryCheck.sqf +++ b/addons/scopes/functions/fnc_inventoryCheck.sqf @@ -74,6 +74,7 @@ private _newGuns = [primaryWeapon _player, secondaryWeapon _player, handgunWeapo if ((_newOptics select _x) == "") then { // Check if the weapon comes with an integrated optic + private _weaponConfig = configFile >> "CfgWeapons" >> (_newGuns select _x); private _verticalIncrement = 0; if (isNumber (_weaponConfig >> "ACE_ScopeAdjust_VerticalIncrement")) then { _verticalIncrement = getNumber (_weaponConfig >> "ACE_ScopeAdjust_VerticalIncrement"); @@ -90,6 +91,7 @@ private _newGuns = [primaryWeapon _player, secondaryWeapon _player, handgunWeapo if (isArray (_weaponConfig >> "ACE_ScopeAdjust_Horizontal")) then { _maxHorizontal = getArray (_weaponConfig >> "ACE_ScopeAdjust_Horizontal"); }; + TRACE_5("",_newGuns select _x,_verticalIncrement,_horizontalIncrement,_maxVertical,_maxHorizontal); (GVAR(scopeAdjust) select _x) set [0, _maxVertical]; (GVAR(scopeAdjust) select _x) set [1, _verticalIncrement]; (GVAR(scopeAdjust) select _x) set [2, _maxHorizontal];