mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fix 'ACE_ScopeZeroRange' setting being ignored when placed in weapon classes
* Only relevant for weapons with integrated scopes
This commit is contained in:
parent
1f364da0df
commit
273e603cad
@ -23,11 +23,14 @@ private _weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponI
|
||||
if (_weaponIndex < 0) exitWith { currentZeroing _unit };
|
||||
|
||||
private _optic = GVAR(Optics) select _weaponIndex;
|
||||
private _opticConfig = configFile >> "CfgWeapons" >> _optic;
|
||||
private _opticType = getNumber(_opticConfig >> "ItemInfo" >> "opticType");
|
||||
private _opticConfig = if (_optic != "") then {
|
||||
(configFile >> "CfgWeapons" >> _optic)
|
||||
} else {
|
||||
(configFile >> "CfgWeapons" >> (GVAR(Guns) select _weaponIndex))
|
||||
};
|
||||
|
||||
private _zeroRange = currentZeroing _unit;
|
||||
if (_opticType == 2 && {(GVAR(canAdjustElevation) select _weaponIndex) || GVAR(forceUseOfAdjustmentTurrets)}) then {
|
||||
if (GVAR(canAdjustElevation) select _weaponIndex) then {
|
||||
_zeroRange = GVAR(defaultZeroRange);
|
||||
};
|
||||
if (isNumber (_opticConfig >> "ACE_ScopeZeroRange")) then {
|
||||
|
Loading…
Reference in New Issue
Block a user