XM157 - Fix spin drift offset when using advanced ballistics (#9392)

xm157 - Fix spin drift calc when using ab
This commit is contained in:
PabstMirror 2023-09-11 20:44:25 -05:00 committed by GitHub
parent 4ce6fcb3cc
commit 07ab8751a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -95,7 +95,7 @@ if (_useAB && {(_bulletPos select 1) > 0}) then {
}; };
private _spinDeflection = _twistDirection * 0.0254 * 1.25 * (_stabilityFactor + 1.2) * _TOF ^ 1.83; private _spinDeflection = _twistDirection * 0.0254 * 1.25 * (_stabilityFactor + 1.2) * _TOF ^ 1.83;
private _spinDrift = - atan(_spinDeflection / (_bulletPos select 1)); private _spinDrift = - atan(_spinDeflection / (_bulletPos select 1));
private _windage = _windage + _spinDrift; _windage = _windage + _spinDrift;
}; };
[17.453*_elevation, 17.453*_windage] // Convert to MRAD and return [17.453*_elevation, 17.453*_windage] // Convert to MRAD and return

View File

@ -22,7 +22,7 @@ if (isNil QGVAR(menu)) then {
private _arrayUp = { private _arrayUp = {
params ["", "_var", "_thing"]; params ["", "_var", "_thing"];
private _value = GVAR(data) getOrDefault [_var, 0]; private _value = GVAR(data) getOrDefault [_var, 0];
private _value = (_value + 1 + count _thing) % count _thing; _value = (_value + 1 + count _thing) % count _thing;
GVAR(data) set [_var, _value]; GVAR(data) set [_var, _value];
}; };
private _arrayDown = { private _arrayDown = {