From f83f8dad0ee2b200ccfa372b8523a1b80901b3a3 Mon Sep 17 00:00:00 2001 From: ulteq Date: Wed, 29 Apr 2015 09:27:49 +0200 Subject: [PATCH] Fixes: https://github.com/acemod/ACE3/issues/904 --- addons/scopes/functions/fnc_adjustScope.sqf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/scopes/functions/fnc_adjustScope.sqf b/addons/scopes/functions/fnc_adjustScope.sqf index d13ff57ffc..31b85f309e 100644 --- a/addons/scopes/functions/fnc_adjustScope.sqf +++ b/addons/scopes/functions/fnc_adjustScope.sqf @@ -17,6 +17,7 @@ PARAMS_3(_unit,_turretAndDirection,_majorStep); if (!(_unit isKindOf "Man")) exitWith {false}; +if (currentMuzzle _unit != currentWeapon _unit) exitWith {false}; private ["_weaponIndex", "_zeroing", "_optic", "_increment", "_maxVertical", "_maxHorizontal", "_elevation", "_windage", "_zero", "_adjustment"]; @@ -37,7 +38,7 @@ _increment = getNumber (configFile >> "CfgWeapons" >> _optic >> "ACE_ScopeAdjust _maxVertical = getArray (configFile >> "CfgWeapons" >> _optic >> "ACE_ScopeAdjust_Vertical"); _maxHorizontal = getArray (configFile >> "CfgWeapons" >> _optic >> "ACE_ScopeAdjust_Horizontal"); -if ((count _maxHorizontal < 2) or (count _maxVertical < 2)) exitWith {false}; +if ((_increment == 0) or (count _maxHorizontal < 2) or (count _maxVertical < 2)) exitWith {false}; _zeroing = _adjustment select _weaponIndex; _elevation = _zeroing select 0;