ACE3/addons/atragmx/functions/fnc_calculate_range_card.sqf
ulteq 448dcddc55 ATragMX - cleanup and some fixes (#4714)
* ATragMX - Improved the default gun profiles
* Recalculated all muzzle velocities (based on 15 degrees Celsius)
* Recalculated all scope base angle (based on the new muzzle velocities)

* ATragMX - Removed lots of duplicate code
* Introduced dynamic simulation interval (based on muzzle velocity)

* ATragMX - Fixed simulation interval for the truing drop feature
2016-12-01 10:23:03 +01:00

31 lines
666 B
Plaintext

/*
* Author: Ruthberg
* Calculates the range card output based on the current data set
*
* Arguments:
* Nothing
*
* Return Value:
* Nothing
*
* Example:
* call ace_atragmx_fnc_calculate_range_card
*
* Public: No
*/
#include "script_component.hpp"
GVAR(rangeCardData) = [];
private _targetRange = GVAR(rangeCardEndRange);
if (GVAR(currentUnit) == 1) then {
_targetRange = _targetRange / 1.0936133;
};
private _solutionInput = +GVAR(targetSolutionInput);
_solutionInput set [ 8, round(_solutionInput select 4)];
_solutionInput set [13, _targetRange];
_solutionInput set [17, true];
private _result = _solutionInput call FUNC(calculate_solution);