mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Scopes - Fixed bugs in the zero angle calculation (#5742)
* Fixed typo in the module setting parsing (reference temperature was way off) * Fixed bug in the zero angle calculator (muzzle velocity was off in most cases)
This commit is contained in:
parent
6edfe4375b
commit
9ea1f6839f
@ -57,6 +57,11 @@ private _trueZero = if (!_advancedBallistics) then {
|
|||||||
_initSpeed = _initSpeed + _barrelVelocityShift;
|
_initSpeed = _initSpeed + _barrelVelocityShift;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (missionNamespace getVariable [QEGVAR(advanced_ballistics,ammoTemperatureEnabled), false]) then {
|
||||||
|
private _ammoTemperatureVelocityShift = ([_ammoTempMuzzleVelocityShifts, GVAR(zeroReferenceTemperature)] call EFUNC(advanced_ballistics,calculateAmmoTemperatureVelocityShift));
|
||||||
|
_initSpeed = _initSpeed + _ammoTemperatureVelocityShift;
|
||||||
|
};
|
||||||
|
|
||||||
_zeroAngle = "ace_advanced_ballistics" callExtension format ["zeroAngle:%1:%2:%3:%4:%5:%6:%7:%8:%9", _newZeroRange, _initSpeed, _boreHeight, GVAR(zeroReferenceTemperature), GVAR(zeroReferenceBarometricPressure), GVAR(zeroReferenceHumidity), _ballisticCoefficients select 0, _dragModel, _atmosphereModel];
|
_zeroAngle = "ace_advanced_ballistics" callExtension format ["zeroAngle:%1:%2:%3:%4:%5:%6:%7:%8:%9", _newZeroRange, _initSpeed, _boreHeight, GVAR(zeroReferenceTemperature), GVAR(zeroReferenceBarometricPressure), GVAR(zeroReferenceHumidity), _ballisticCoefficients select 0, _dragModel, _atmosphereModel];
|
||||||
(parseNumber _zeroAngle)
|
(parseNumber _zeroAngle)
|
||||||
};
|
};
|
||||||
|
@ -32,6 +32,6 @@ if !(_activated) exitWith {};
|
|||||||
[_logic, QGVAR(deduceBarometricPressureFromTerrainAltitude), "deduceBarometricPressureFromTerrainAltitude"] call EFUNC(common,readSettingFromModule);
|
[_logic, QGVAR(deduceBarometricPressureFromTerrainAltitude), "deduceBarometricPressureFromTerrainAltitude"] call EFUNC(common,readSettingFromModule);
|
||||||
|
|
||||||
GVAR(defaultZeroRange) = 0 max GVAR(defaultZeroRange) min 1000;
|
GVAR(defaultZeroRange) = 0 max GVAR(defaultZeroRange) min 1000;
|
||||||
GVAR(zeroReferenceTemperature) = -55 max GVAR(zeroReferenceTemperature) max 55;
|
GVAR(zeroReferenceTemperature) = -55 max GVAR(zeroReferenceTemperature) min 55;
|
||||||
GVAR(zeroReferenceBarometricPressure) = 0 max GVAR(zeroReferenceBarometricPressure) min 1013.25;
|
GVAR(zeroReferenceBarometricPressure) = 0 max GVAR(zeroReferenceBarometricPressure) min 1013.25;
|
||||||
GVAR(zeroReferenceHumidity) = 0 max GVAR(zeroReferenceHumidity) min 1.0;
|
GVAR(zeroReferenceHumidity) = 0 max GVAR(zeroReferenceHumidity) min 1.0;
|
||||||
|
Loading…
Reference in New Issue
Block a user