Scopes - Fixed MRAD conversion (#5651)

* Same issue as https://github.com/acemod/ACE3/pull/5640
This commit is contained in:
ulteq 2017-10-22 10:44:00 +02:00 committed by GitHub
parent 0aca46d7aa
commit 3484942680
3 changed files with 4 additions and 2 deletions

View File

@ -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"];

View File

@ -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];

View File

@ -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"