ACE3/addons/atragmx/functions/fnc_update_muzzle_velocity_data.sqf
ulteq 3f4564605b ATragMX - Implemented missing features
* Muzzle Velocity vs. Temperature Interpolation
* C1 Ballistic Coefficient vs. Distance Interpolation
* Coriolis and Spin drift output
* Options menu
* Truing Drop
---------------------------------
* Overworked default gun profiles
---------------------------------
* Fixed the Cancel buttons on the gun-, atmosphere- and target columns.
* Fixed some muzzle velocity entries in the default gun list.
* Fixed divide by zero error in the target range estimator
2016-11-07 16:40:34 +01:00

29 lines
1.1 KiB
Plaintext

/*
* Author: Ruthberg
* Updates the muzzle velocity data fields
*
* Arguments:
* Nothing
*
* Return Value:
* Nothing
*
* Example:
* call ace_atragmx_fnc_update_muzzle_velocity_data
*
* Public: No
*/
#include "script_component.hpp"
if (GVAR(currentUnit) == 2) then {
// Temperatures
{ctrlSetText [_x, Str(Round((((GVAR(workingMemory) select 18) select _forEachIndex) select 0) * 10) / 10)]} forEach [160021, 160022, 160023, 160024, 160025, 160026, 160027];
// Muzzle velocities
{ctrlSetText [_x, Str(Round(((GVAR(workingMemory) select 18) select _forEachIndex) select 1))]} forEach [160031, 160032, 160033, 160034, 160035, 160036, 160037];
} else {
// Temperatures
{ctrlSetText [_x, Str(Round(((((GVAR(workingMemory) select 18) select _forEachIndex) select 0) * 1.8 + 32) * 10) / 10)]} forEach [160021, 160022, 160023, 160024, 160025, 160026, 160027];
// Muzzle velocities
{ctrlSetText [_x, Str(Round((((GVAR(workingMemory) select 18) select _forEachIndex) select 1) * 3.2808399))]} forEach [160031, 160032, 160033, 160034, 160035, 160036, 160037];
};