mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Scopes - Fixed MRAD conversion (#5651)
* Same issue as https://github.com/acemod/ACE3/pull/5640
This commit is contained in:
parent
0aca46d7aa
commit
3484942680
@ -34,7 +34,7 @@ playSound selectRandom ["ACE_Scopes_Click_1", "ACE_Scopes_Click_2", "ACE_Scopes_
|
||||
// slightly rotate the player if looking through optic
|
||||
if (cameraView == "GUNNER") then {
|
||||
// Convert adjustmentDifference from mils to degrees
|
||||
_adjustmentDifference = _adjustmentDifference apply {_x * 0.05625};
|
||||
_adjustmentDifference = _adjustmentDifference apply {MRAD_TO_DEG(_x)};
|
||||
_adjustmentDifference params ["_elevationDifference", "_windageDifference"];
|
||||
private _pitchBankYaw = [_unit] call EFUNC(common,getPitchBankYaw);
|
||||
_pitchBankYaw params ["_pitch", "_bank", "_yaw"];
|
||||
|
@ -28,7 +28,7 @@ private _zeroing = +(_adjustment select _weaponIndex);
|
||||
TRACE_1("Adjusting With",_zeroing);
|
||||
|
||||
// Convert zeroing from mils to degrees
|
||||
_zeroing = _zeroing vectorMultiply 0.05625;
|
||||
_zeroing = _zeroing vectorMultiply MRAD_TO_DEG(1);
|
||||
|
||||
if (GVAR(correctZeroing)) then {
|
||||
private _advancedBallistics = missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false];
|
||||
|
@ -22,4 +22,6 @@
|
||||
#define DEBUG_SETTINGS DEBUG_SETTINGS_SCOPES
|
||||
#endif
|
||||
|
||||
#define MRAD_TO_DEG(d) (d / 17.45329252) // Conversion factor: 9 / (50 * PI)
|
||||
|
||||
#include "\z\ace\addons\main\script_macros.hpp"
|
||||
|
Loading…
Reference in New Issue
Block a user