mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Scopes - Allow 0.05 mrad increments (#5840)
* Scopes - Allow 0.05 mrad increments
This commit is contained in:
parent
c5e594ffb8
commit
24b58fbb21
@ -51,8 +51,8 @@ if (_majorStep) then {
|
||||
};
|
||||
};
|
||||
|
||||
_elevation = round(_elevation * 10) / 10;
|
||||
_windage = round(_windage * 10) / 10;
|
||||
_elevation = round(_elevation / MIN_INCREMENT) * MIN_INCREMENT;
|
||||
_windage = round(_windage / MIN_INCREMENT) * MIN_INCREMENT;
|
||||
|
||||
if ((_elevation + _zero) < _maxVertical select 0 or (_elevation + _zero) > _maxVertical select 1) exitWith {false};
|
||||
if (_windage < _maxHorizontal select 0 or _windage > _maxHorizontal select 1) exitWith {false};
|
||||
|
@ -27,7 +27,7 @@ private _adjustment = _unit getVariable [QGVAR(Adjustment), [[0, 0, 0], [0, 0, 0
|
||||
private _zeroing = _adjustment select _weaponIndex;
|
||||
_zeroing params ["_elevation", "_windage", "_zero"];
|
||||
|
||||
_zero = round((_zero + _elevation) * 10) / 10;
|
||||
_zero = round((_zero + _elevation) / MIN_INCREMENT) * MIN_INCREMENT;
|
||||
_elevation = 0;
|
||||
|
||||
private _opticsClass = ([_unit] call FUNC(getOptics)) select _weaponIndex;
|
||||
|
@ -27,7 +27,7 @@ private _adjustment = _unit getVariable [QGVAR(Adjustment), [[0, 0, 0], [0, 0, 0
|
||||
private _zeroing = _adjustment select _weaponIndex;
|
||||
_zeroing params ["_elevation", "_windage", "_zero"];
|
||||
|
||||
_elevation = round((_zero + _elevation) * 10) / 10;
|
||||
_elevation = round((_zero + _elevation) / MIN_INCREMENT) * MIN_INCREMENT;
|
||||
_zero = 0;
|
||||
|
||||
private _opticsClass = ([_unit] call FUNC(getOptics)) select _weaponIndex;
|
||||
|
@ -14,7 +14,9 @@
|
||||
#define MINOR_INCREMENT false
|
||||
#define MAJOR_INCREMENT true
|
||||
|
||||
#define DEFAULT_RAIL_BASE_ANGLE 0.0086
|
||||
#define MIN_INCREMENT 0.05 // mrad
|
||||
|
||||
#define DEFAULT_RAIL_BASE_ANGLE 0.0086 // deg
|
||||
|
||||
// #define DISABLE_DISPERSION
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user