Skip to content

Commit

Permalink
Fix intergrated scopes (#4945)
Browse files Browse the repository at this point in the history
  • Loading branch information
PabstMirror authored and thojkooi committed Mar 8, 2017
1 parent 19af072 commit 110bce7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions addons/scopes/functions/fnc_inventoryCheck.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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];
Expand Down

0 comments on commit 110bce7

Please sign in to comment.