mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Removed duplicate ATragMX_ prefix
This commit is contained in:
parent
5dba9f7b3f
commit
15a594ccbc
@ -250,13 +250,13 @@ class ATragMX_Display
|
||||
w=0.03;
|
||||
h=0.03;
|
||||
colorBackground[]={0,0,0,0.0};
|
||||
action=QUOTE(((GVAR(ATragMX_currentGun) select GVAR(ATragMX_currentTarget)) + (count GVAR(ATragMX_gunList)) - 1) % (count GVAR(ATragMX_gunList)) call FUNC(change_gun));
|
||||
action=QUOTE(((GVAR(currentGun) select GVAR(currentTarget)) + (count GVAR(gunList)) - 1) % (count GVAR(gunList)) call FUNC(change_gun));
|
||||
};
|
||||
class BOTTOM: TOP
|
||||
{
|
||||
idc=-1;
|
||||
y=0.265*safezoneH+safezoneY+0.955;
|
||||
action=QUOTE(((GVAR(ATragMX_currentGun) select GVAR(ATragMX_currentTarget)) + (count GVAR(ATragMX_gunList)) + 1) % (count GVAR(ATragMX_gunList)) call FUNC(change_gun));
|
||||
action=QUOTE(((GVAR(currentGun) select GVAR(currentTarget)) + (count GVAR(gunList)) + 1) % (count GVAR(gunList)) call FUNC(change_gun));
|
||||
};
|
||||
class LEFT: ATragMX_RscButton
|
||||
{
|
||||
@ -266,13 +266,13 @@ class ATragMX_Display
|
||||
w=0.05;
|
||||
h=0.03;
|
||||
colorBackground[]={0,0,0,0};
|
||||
action=QUOTE(call FUNC(parse_input); GVAR(ATragMX_currentTarget) = (4 + GVAR(ATragMX_currentTarget) - 1) % 4; call FUNC(update_target_selection));
|
||||
action=QUOTE(call FUNC(parse_input); GVAR(currentTarget) = (4 + GVAR(currentTarget) - 1) % 4; call FUNC(update_target_selection));
|
||||
};
|
||||
class RIGHT: LEFT
|
||||
{
|
||||
idc=-1;
|
||||
x=0.55*safezoneW+safezoneX+0.2725;
|
||||
action=QUOTE(call FUNC(parse_input); GVAR(ATragMX_currentTarget) = (4 + GVAR(ATragMX_currentTarget) + 1) % 4; call FUNC(update_target_selection));
|
||||
action=QUOTE(call FUNC(parse_input); GVAR(currentTarget) = (4 + GVAR(currentTarget) + 1) % 4; call FUNC(update_target_selection));
|
||||
};
|
||||
class TOP_LEFT: ATragMX_RscButton
|
||||
{
|
||||
@ -311,21 +311,21 @@ class ATragMX_Display
|
||||
colorBackgroundDisabled[]={0,0,0,1};
|
||||
colorBackgroundActive[]={0,0,0,0};
|
||||
text="D";
|
||||
action=QUOTE(GVAR(ATragMX_currentUnit)=0; call FUNC(update_unit_selection));
|
||||
action=QUOTE(GVAR(currentUnit)=0; call FUNC(update_unit_selection));
|
||||
};
|
||||
class TEXT_E: TEXT_D
|
||||
{
|
||||
idc=601;
|
||||
x=0.550*safezoneW+safezoneX+0.3131;
|
||||
text="E";
|
||||
action=QUOTE(GVAR(ATragMX_currentUnit)=1; call FUNC(update_unit_selection));
|
||||
action=QUOTE(GVAR(currentUnit)=1; call FUNC(update_unit_selection));
|
||||
};
|
||||
class TEXT_M: TEXT_E
|
||||
{
|
||||
idc=602;
|
||||
x=0.550*safezoneW+safezoneX+0.3362;
|
||||
text="M";
|
||||
action=QUOTE(GVAR(ATragMX_currentUnit)=2; call FUNC(update_unit_selection));
|
||||
action=QUOTE(GVAR(currentUnit)=2; call FUNC(update_unit_selection));
|
||||
};
|
||||
class TEXT_RANGE_CARD: TEXT_D
|
||||
{
|
||||
@ -469,28 +469,28 @@ class ATragMX_Display
|
||||
colorBackgroundDisabled[]={0,0,0,1};
|
||||
colorBackgroundActive[]={0,0,0,0};
|
||||
text="A";
|
||||
action=QUOTE(call FUNC(parse_input); GVAR(ATragMX_currentTarget)=0; call FUNC(update_target_selection));
|
||||
action=QUOTE(call FUNC(parse_input); GVAR(currentTarget)=0; call FUNC(update_target_selection));
|
||||
};
|
||||
class TEXT_TARGET_B: TEXT_TARGET_A
|
||||
{
|
||||
idc=501;
|
||||
x=0.550*safezoneW+safezoneX+0.2281;
|
||||
text="B";
|
||||
action=QUOTE(call FUNC(parse_input); GVAR(ATragMX_currentTarget)=1; call FUNC(update_target_selection));
|
||||
action=QUOTE(call FUNC(parse_input); GVAR(currentTarget)=1; call FUNC(update_target_selection));
|
||||
};
|
||||
class TEXT_TARGET_C: TEXT_TARGET_B
|
||||
{
|
||||
idc=502;
|
||||
x=0.550*safezoneW+safezoneX+0.2512;
|
||||
text="C";
|
||||
action=QUOTE(call FUNC(parse_input); GVAR(ATragMX_currentTarget)=2; call FUNC(update_target_selection));
|
||||
action=QUOTE(call FUNC(parse_input); GVAR(currentTarget)=2; call FUNC(update_target_selection));
|
||||
};
|
||||
class TEXT_TARGET_D: TEXT_TARGET_B
|
||||
{
|
||||
idc=503;
|
||||
x=0.550*safezoneW+safezoneX+0.2743;
|
||||
text="D";
|
||||
action=QUOTE(call FUNC(parse_input); GVAR(ATragMX_currentTarget)=3; call FUNC(update_target_selection));
|
||||
action=QUOTE(call FUNC(parse_input); GVAR(currentTarget)=3; call FUNC(update_target_selection));
|
||||
};
|
||||
|
||||
class TEXT_TARGET: TEXT_GUN
|
||||
@ -848,7 +848,7 @@ class ATragMX_Display
|
||||
y=0.265*safezoneH+safezoneY+0.35;
|
||||
strings[]={"Height","Width"};
|
||||
values[]={1,0};
|
||||
onToolBoxSelChanged="GVAR(ATragMX_rangeAssistUseTargetHeight)=((_this select 1)==0)";
|
||||
onToolBoxSelChanged="GVAR(rangeAssistUseTargetHeight)=((_this select 1)==0)";
|
||||
};
|
||||
class TEXT_TARGET_RANGE_ASSIST_TARGET_SIZE: TEXT_TARGET_RANGE_ASSIST_MEASUREMENT_METHOD
|
||||
{
|
||||
@ -926,14 +926,14 @@ class ATragMX_Display
|
||||
w=0.07;
|
||||
x=0.550*safezoneW+safezoneX+0.32;
|
||||
text="cm";
|
||||
action=QUOTE(GVAR(ATragMX_rangeAssistTargetSizeUnit)=(GVAR(ATragMX_rangeAssistTargetSizeUnit)+1) % (count GVAR(GVAR(ATragMX_rangeAssistTargetSizeUnit)s)); ctrlSetText [7014, GVAR(GVAR(ATragMX_rangeAssistTargetSizeUnit)s) select GVAR(ATragMX_rangeAssistTargetSizeUnit)]);
|
||||
action=QUOTE(GVAR(rangeAssistTargetSizeUnit)=(GVAR(rangeAssistTargetSizeUnit)+1) % (count GVAR(GVAR(rangeAssistTargetSizeUnit)s)); ctrlSetText [7014, GVAR(GVAR(rangeAssistTargetSizeUnit)s) select GVAR(rangeAssistTargetSizeUnit)]);
|
||||
};
|
||||
class TEXT_TARGET_RANGE_ASSIST_IMAGE_SIZE_UNIT: TEXT_TARGET_RANGE_ASSIST_TARGET_SIZE_UNIT
|
||||
{
|
||||
idc=7015;
|
||||
y=0.265*safezoneH+safezoneY+0.45;
|
||||
text="MIL";
|
||||
action=QUOTE(GVAR(ATragMX_rangeAssistImageSizeUnit)=(GVAR(ATragMX_rangeAssistImageSizeUnit)+1) % (count GVAR(ATragMX_rangeAssistImageSizeUnits)); ctrlSetText [7015, GVAR(ATragMX_rangeAssistImageSizeUnits) select GVAR(ATragMX_rangeAssistImageSizeUnit)]);
|
||||
action=QUOTE(GVAR(rangeAssistImageSizeUnit)=(GVAR(rangeAssistImageSizeUnit)+1) % (count GVAR(rangeAssistImageSizeUnits)); ctrlSetText [7015, GVAR(rangeAssistImageSizeUnits) select GVAR(rangeAssistImageSizeUnit)]);
|
||||
};
|
||||
class TEXT_TARGET_RANGE_ASSIST_ESTIMATED_RANGE_UNIT: TEXT_TARGET_RANGE_ASSIST_ESTIMATED_RANGE
|
||||
{
|
||||
@ -1035,7 +1035,7 @@ class ATragMX_Display
|
||||
{
|
||||
idc=8009;
|
||||
text="MIL";
|
||||
action=QUOTE(GVAR(ATragMX_speedAssistNumTicksUnit)=(GVAR(ATragMX_speedAssistNumTicksUnit)+1) % (count GVAR(ATragMX_speedAssistNumTicksUnits)); ctrlSetText [8009, GVAR(ATragMX_speedAssistNumTicksUnits) select GVAR(ATragMX_speedAssistNumTicksUnit)]; call FUNC(calculate_target_speed_assist));
|
||||
action=QUOTE(GVAR(speedAssistNumTicksUnit)=(GVAR(speedAssistNumTicksUnit)+1) % (count GVAR(speedAssistNumTicksUnits)); ctrlSetText [8009, GVAR(speedAssistNumTicksUnits) select GVAR(speedAssistNumTicksUnit)]; call FUNC(calculate_target_speed_assist));
|
||||
};
|
||||
class TEXT_TARGET_SPEED_ASSIST_TIMER_START: TEXT_TARGET_RANGE_ASSIST_IMAGE_SIZE_UNIT
|
||||
{
|
||||
@ -1077,7 +1077,7 @@ class ATragMX_Display
|
||||
y=0.265*safezoneH+safezoneY+0.2;
|
||||
colorBackground[]={0,0,0,0};
|
||||
colorBackgroundActive[]={0,0,0,0};
|
||||
action=QUOTE(GVAR(ATragMX_speedAssistTimer=false));
|
||||
action=QUOTE(GVAR(speedAssistTimer=false));
|
||||
}
|
||||
class TEXT_TARGET_SPEED_ASSIST_TIME_OUTPUT: ATragMX_RscText
|
||||
{
|
||||
@ -1101,7 +1101,7 @@ class ATragMX_Display
|
||||
colorBackground[]={0.15,0.21,0.23,0.3};
|
||||
colorFocused[]={0.15,0.21,0.23,0.2};
|
||||
text="Stop";
|
||||
action=QUOTE(GVAR(ATragMX_speedAssistTimer=false));
|
||||
action=QUOTE(GVAR(speedAssistTimer=false));
|
||||
};
|
||||
|
||||
class TEXT_RANGE_CARD_SETUP_START_RANGE: TEXT_TARGET_RANGE_ASSIST_TARGET_SIZE
|
||||
|
@ -3,10 +3,10 @@
|
||||
//#include "initKeybinds.sqf"
|
||||
|
||||
if (count (profileNamespace getVariable ["ACE_ATragMX_gunList", []]) > 0) then {
|
||||
GVAR(ATragMX_gunList) = profileNamespace getVariable "ACE_ATragMX_gunList";
|
||||
GVAR(gunList) = profileNamespace getVariable "ACE_ATragMX_gunList";
|
||||
} else {
|
||||
// Profile Name, Muzzle Velocity, Zero Range, Scope Base Angle, AirFriction, Bore Height, Scope Unit, Elevation Scope Step, Windage Scope Step, Maximum Elevation, Dialed Elevation, Dialed Windage, Mass, Ammo Class Name, Magazine Class Name, BC, Drag Model, Atmosphere Model
|
||||
GVAR(ATragMX_gunList) = [["12.7x108mm" , 820, 500, 0.255, -0.0005600, 3.81, 0, 0.338, 0.338, 120, 0, 0, 48.28, "B_127x108_Ball" , "5Rnd_127x108_Mag" , 0.700, 1, "ASM" ],
|
||||
GVAR(gunList) = [["12.7x108mm" , 820, 500, 0.255, -0.0005600, 3.81, 0, 0.338, 0.338, 120, 0, 0, 48.28, "B_127x108_Ball" , "5Rnd_127x108_Mag" , 0.700, 1, "ASM" ],
|
||||
["12.7x99mm" , 880, 500, 0.202, -0.0005600, 3.81, 0, 0.338, 0.338, 120, 0, 0, 41.92, "B_127x99_Ball" , "5Rnd_mas_127x99_Stanag" , 0.670, 1, "ASM" ],
|
||||
["10.4x77mm" , 910, 500, 0.200, -0.0004800, 3.81, 0, 0.338, 0.338, 120, 0, 0, 27.15, "B_408_Ball" , "7Rnd_408_Mag" , 0.970, 1, "ASM" ],
|
||||
["7.62x51mm" , 850, 500, 0.280, -0.0010000, 3.81, 0, 0.338, 0.338, 120, 0, 0, 9.460, "B_762x51_Ball" , "20Rnd_762x51_Mag" , 0.393, 1, "ICAO"],
|
||||
@ -14,7 +14,7 @@ if (count (profileNamespace getVariable ["ACE_ATragMX_gunList", []]) > 0) then {
|
||||
["5.56x45mm" , 920, 500, 0.259, -0.0012000, 3.81, 0, 0.338, 0.338, 120, 0, 0, 4.000, "B_556x45_Ball" , "30Rnd_556x45_Stanag" , 0.304, 1, "ASM" ],
|
||||
["5.56x45mm Mk262" , 850, 500, 0.294, -0.0011250, 3.81, 0, 0.338, 0.338, 120, 0, 0, 4.990, "RH_556x45_Mk262" , "RH_30Rnd_556x45_Mk262" , 0.361, 1, "ASM" ]];
|
||||
|
||||
profileNamespace setVariable ["ACE_ATragMX_gunList", GVAR(ATragMX_gunList)];
|
||||
profileNamespace setVariable ["ACE_ATragMX_gunList", GVAR(gunList)];
|
||||
};
|
||||
|
||||
[] call FUNC(init);
|
||||
|
@ -6,9 +6,9 @@ _gunName = ctrlText 11001;
|
||||
if (_gunName != "") then {
|
||||
_gunProfileEntry = [_gunName, 850, 500, 0.280, -0.0010000, 3.81, 0, 0.338, 0.338, 120, 0, 0, 9.460, "", "", 0.393, 1, "ICAO"];
|
||||
|
||||
GVAR(ATragMX_gunList) = GVAR(ATragMX_gunList) + [_gunProfileEntry];
|
||||
GVAR(gunList) = GVAR(gunList) + [_gunProfileEntry];
|
||||
|
||||
lbAdd [6000, _gunProfileEntry select 0];
|
||||
|
||||
profileNamespace setVariable ["ACE_ATragMX_gunList", GVAR(ATragMX_gunList)];
|
||||
profileNamespace setVariable ["ACE_ATragMX_gunList", GVAR(gunList)];
|
||||
};
|
||||
|
@ -3,44 +3,44 @@
|
||||
[] call FUNC(parse_input);
|
||||
|
||||
private ["_scopeBaseAngle"];
|
||||
_scopeBaseAngle = ((GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) select 3);
|
||||
_scopeBaseAngle = ((GVAR(workingMemory) select GVAR(currentTarget)) select 3);
|
||||
|
||||
private ["_bulletMass", "_boreHeight", "_airFriction", "_muzzleVelocity", "_bc", "_dragModel", "_atmosphereModel"];
|
||||
_bulletMass = (GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) select 12;
|
||||
_boreHeight = (GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) select 5;
|
||||
_airFriction = (GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) select 4;
|
||||
_muzzleVelocity = (GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) select 1;
|
||||
_bc = (GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) select 15;
|
||||
_dragModel = (GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) select 16;
|
||||
_atmosphereModel = (GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) select 17;
|
||||
_bulletMass = (GVAR(workingMemory) select GVAR(currentTarget)) select 12;
|
||||
_boreHeight = (GVAR(workingMemory) select GVAR(currentTarget)) select 5;
|
||||
_airFriction = (GVAR(workingMemory) select GVAR(currentTarget)) select 4;
|
||||
_muzzleVelocity = (GVAR(workingMemory) select GVAR(currentTarget)) select 1;
|
||||
_bc = (GVAR(workingMemory) select GVAR(currentTarget)) select 15;
|
||||
_dragModel = (GVAR(workingMemory) select GVAR(currentTarget)) select 16;
|
||||
_atmosphereModel = (GVAR(workingMemory) select GVAR(currentTarget)) select 17;
|
||||
|
||||
private ["_temperature", "_barometricPressure", "_relativeHumidity"];
|
||||
_temperature = (GVAR(ATragMX_temperature) select GVAR(ATragMX_currentTarget));
|
||||
_barometricPressure = (GVAR(ATragMX_barometricPressure) select GVAR(ATragMX_currentTarget));
|
||||
_relativeHumidity = (GVAR(ATragMX_relativeHumidity) select GVAR(ATragMX_currentTarget));
|
||||
if (GVAR(ATragMX_currentUnit) == 1) then
|
||||
_temperature = (GVAR(temperature) select GVAR(currentTarget));
|
||||
_barometricPressure = (GVAR(barometricPressure) select GVAR(currentTarget));
|
||||
_relativeHumidity = (GVAR(relativeHumidity) select GVAR(currentTarget));
|
||||
if (GVAR(currentUnit) == 1) then
|
||||
{
|
||||
_temperature = (_temperature - 32) / 1.8;
|
||||
_barometricPressure = _barometricPressure * 33.8638866667;
|
||||
};
|
||||
|
||||
private ["_windSpeed", "_windDirection", "_inclinationAngle", "_targetSpeed", "_targetRange"];
|
||||
_windSpeed = (GVAR(ATragMX_windSpeed) select GVAR(ATragMX_currentTarget));
|
||||
_windDirection = (GVAR(ATragMX_windDirection) select GVAR(ATragMX_currentTarget));
|
||||
_inclinationAngle = (GVAR(ATragMX_inclinationAngle) select GVAR(ATragMX_currentTarget));
|
||||
_targetSpeed = (GVAR(ATragMX_targetSpeed) select GVAR(ATragMX_currentTarget));
|
||||
_targetRange = GVAR(ATragMX_rangeCardEndRange);
|
||||
if (GVAR(ATragMX_currentUnit) != 2) then
|
||||
_windSpeed = (GVAR(windSpeed) select GVAR(currentTarget));
|
||||
_windDirection = (GVAR(windDirection) select GVAR(currentTarget));
|
||||
_inclinationAngle = (GVAR(inclinationAngle) select GVAR(currentTarget));
|
||||
_targetSpeed = (GVAR(targetSpeed) select GVAR(currentTarget));
|
||||
_targetRange = GVAR(rangeCardEndRange);
|
||||
if (GVAR(currentUnit) != 2) then
|
||||
{
|
||||
_targetRange = _targetRange / 1.0936133;
|
||||
};
|
||||
if (GVAR(ATragMX_currentUnit) == 1) then
|
||||
if (GVAR(currentUnit) == 1) then
|
||||
{
|
||||
_windSpeed = _windSpeed / 2.23693629;
|
||||
_targetSpeed = _targetSpeed / 2.23693629;
|
||||
};
|
||||
|
||||
GVAR(ATragMX_rangeCardData) = [];
|
||||
GVAR(rangeCardData) = [];
|
||||
|
||||
private ["_result"];
|
||||
_result = [_scopeBaseAngle, _bulletMass, _boreHeight, _airFriction, _muzzleVelocity, _temperature, _barometricPressure, _relativeHumidity, 1000,
|
||||
|
@ -40,10 +40,10 @@ _n = 0;
|
||||
_range = 0;
|
||||
_rangeFactor = 1;
|
||||
if (_storeRangeCardData) then {
|
||||
if (GVAR(ATragMX_currentUnit) != 2) then {
|
||||
if (GVAR(currentUnit) != 2) then {
|
||||
_rangeFactor = 1.0936133;
|
||||
};
|
||||
GVAR(ATragMX_rangeCardData) = [];
|
||||
GVAR(rangeCardData) = [];
|
||||
};
|
||||
|
||||
private ["_wind"];
|
||||
@ -89,8 +89,8 @@ while {_TOF < 15 && (_bulletPos select 1) < _targetRange} do
|
||||
_TOF = _TOF + _deltaT;
|
||||
|
||||
if (_storeRangeCardData) then {
|
||||
_range = GVAR(ATragMX_rangeCardStartRange) + _n * GVAR(ATragMX_rangeCardIncrement);
|
||||
if ((_bulletPos select 1) * _rangeFactor >= _range && _range <= GVAR(ATragMX_rangeCardEndRange)) then {
|
||||
_range = GVAR(rangeCardStartRange) + _n * GVAR(rangeCardIncrement);
|
||||
if ((_bulletPos select 1) * _rangeFactor >= _range && _range <= GVAR(rangeCardEndRange)) then {
|
||||
if ((_bulletPos select 1) > 0) then {
|
||||
_elevation = - atan((_bulletPos select 2) / (_bulletPos select 1));
|
||||
_windage = - atan((_bulletPos select 0) / (_bulletPos select 1));
|
||||
@ -101,7 +101,7 @@ while {_TOF < 15 && (_bulletPos select 1) < _targetRange} do
|
||||
_kineticEnergy = 0.5 * (_bulletMass / 1000 * (_bulletSpeed ^ 2));
|
||||
_kineticEnergy = _kineticEnergy * 0.737562149;
|
||||
|
||||
GVAR(ATragMX_rangeCardData) set [_n, [_range, _elevation * 60, _windage * 60, _lead, _TOF, _bulletSpeed, _kineticEnergy]];
|
||||
GVAR(rangeCardData) set [_n, [_range, _elevation * 60, _windage * 60, _lead, _TOF, _bulletSpeed, _kineticEnergy]];
|
||||
_n = _n + 1;
|
||||
};
|
||||
};
|
||||
|
@ -4,11 +4,11 @@ private ["_targetSize", "_imageSize", "_angle", "_estRange"];
|
||||
|
||||
_angle = parseNumber(ctrlText 7012);
|
||||
_targetSize = parseNumber(ctrlText 7010);
|
||||
if (GVAR(ATragMX_rangeAssistUseTargetHeight)) then
|
||||
if (GVAR(rangeAssistUseTargetHeight)) then
|
||||
{
|
||||
_targetSize = _targetSize * cos(_angle);
|
||||
};
|
||||
switch (GVAR(ATragMX_rangeAssistTargetSizeUnit)) do
|
||||
switch (GVAR(rangeAssistTargetSizeUnit)) do
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
@ -24,7 +24,7 @@ switch (GVAR(ATragMX_rangeAssistTargetSizeUnit)) do
|
||||
};
|
||||
};
|
||||
_imageSize = parseNumber(ctrlText 7011);
|
||||
switch (GVAR(ATragMX_rangeAssistImageSizeUnit)) do
|
||||
switch (GVAR(rangeAssistImageSizeUnit)) do
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
@ -40,7 +40,7 @@ switch (GVAR(ATragMX_rangeAssistImageSizeUnit)) do
|
||||
};
|
||||
};
|
||||
_estRange = parseNumber(ctrlText 7013);
|
||||
if (GVAR(ATragMX_currentUnit) != 2) then
|
||||
if (GVAR(currentUnit) != 2) then
|
||||
{
|
||||
_estRange = _estRange / 1.0936133;
|
||||
};
|
||||
@ -51,12 +51,12 @@ switch (_this) do
|
||||
{
|
||||
_targetSize = tan(_imageSize) * _estRange;
|
||||
|
||||
if (GVAR(ATragMX_rangeAssistUseTargetHeight)) then
|
||||
if (GVAR(rangeAssistUseTargetHeight)) then
|
||||
{
|
||||
_targetSize = _targetSize / cos(_angle);
|
||||
};
|
||||
|
||||
switch (GVAR(ATragMX_rangeAssistTargetSizeUnit)) do
|
||||
switch (GVAR(rangeAssistTargetSizeUnit)) do
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
@ -78,7 +78,7 @@ switch (_this) do
|
||||
{
|
||||
_imageSize = atan(_targetSize / _estRange);
|
||||
|
||||
switch (GVAR(ATragMX_rangeAssistImageSizeUnit)) do
|
||||
switch (GVAR(rangeAssistImageSizeUnit)) do
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
|
@ -3,38 +3,38 @@
|
||||
[] call FUNC(parse_input);
|
||||
|
||||
private ["_scopeBaseAngle"];
|
||||
_scopeBaseAngle = ((GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) select 3);
|
||||
_scopeBaseAngle = ((GVAR(workingMemory) select GVAR(currentTarget)) select 3);
|
||||
|
||||
private ["_bulletMass", "_boreHeight", "_airFriction", "_muzzleVelocity", "_bc", "_dragModel", "_atmosphereModel"];
|
||||
_bulletMass = (GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) select 12;
|
||||
_boreHeight = (GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) select 5;
|
||||
_airFriction = (GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) select 4;
|
||||
_muzzleVelocity = (GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) select 1;
|
||||
_bc = (GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) select 15;
|
||||
_dragModel = (GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) select 16;
|
||||
_atmosphereModel = (GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) select 17;
|
||||
_bulletMass = (GVAR(workingMemory) select GVAR(currentTarget)) select 12;
|
||||
_boreHeight = (GVAR(workingMemory) select GVAR(currentTarget)) select 5;
|
||||
_airFriction = (GVAR(workingMemory) select GVAR(currentTarget)) select 4;
|
||||
_muzzleVelocity = (GVAR(workingMemory) select GVAR(currentTarget)) select 1;
|
||||
_bc = (GVAR(workingMemory) select GVAR(currentTarget)) select 15;
|
||||
_dragModel = (GVAR(workingMemory) select GVAR(currentTarget)) select 16;
|
||||
_atmosphereModel = (GVAR(workingMemory) select GVAR(currentTarget)) select 17;
|
||||
|
||||
private ["_temperature", "_barometricPressure", "_relativeHumidity"];
|
||||
_temperature = (GVAR(ATragMX_temperature) select GVAR(ATragMX_currentTarget));
|
||||
_barometricPressure = (GVAR(ATragMX_barometricPressure) select GVAR(ATragMX_currentTarget));
|
||||
_relativeHumidity = (GVAR(ATragMX_relativeHumidity) select GVAR(ATragMX_currentTarget));
|
||||
if (GVAR(ATragMX_currentUnit) == 1) then
|
||||
_temperature = (GVAR(temperature) select GVAR(currentTarget));
|
||||
_barometricPressure = (GVAR(barometricPressure) select GVAR(currentTarget));
|
||||
_relativeHumidity = (GVAR(relativeHumidity) select GVAR(currentTarget));
|
||||
if (GVAR(currentUnit) == 1) then
|
||||
{
|
||||
_temperature = (_temperature - 32) / 1.8;
|
||||
_barometricPressure = _barometricPressure * 33.8638866667;
|
||||
};
|
||||
|
||||
private ["_windSpeed", "_windDirection", "_inclinationAngle", "_targetSpeed", "_targetRange"];
|
||||
_windSpeed = (GVAR(ATragMX_windSpeed) select GVAR(ATragMX_currentTarget));
|
||||
_windDirection = (GVAR(ATragMX_windDirection) select GVAR(ATragMX_currentTarget));
|
||||
_inclinationAngle = (GVAR(ATragMX_inclinationAngle) select GVAR(ATragMX_currentTarget));
|
||||
_targetSpeed = (GVAR(ATragMX_targetSpeed) select GVAR(ATragMX_currentTarget));
|
||||
_targetRange = (GVAR(ATragMX_targetRange) select GVAR(ATragMX_currentTarget));
|
||||
if (GVAR(ATragMX_currentUnit) != 2) then
|
||||
_windSpeed = (GVAR(windSpeed) select GVAR(currentTarget));
|
||||
_windDirection = (GVAR(windDirection) select GVAR(currentTarget));
|
||||
_inclinationAngle = (GVAR(inclinationAngle) select GVAR(currentTarget));
|
||||
_targetSpeed = (GVAR(targetSpeed) select GVAR(currentTarget));
|
||||
_targetRange = (GVAR(targetRange) select GVAR(currentTarget));
|
||||
if (GVAR(currentUnit) != 2) then
|
||||
{
|
||||
_targetRange = _targetRange / 1.0936133;
|
||||
};
|
||||
if (GVAR(ATragMX_currentUnit) == 1) then
|
||||
if (GVAR(currentUnit) == 1) then
|
||||
{
|
||||
_windSpeed = _windSpeed / 2.23693629;
|
||||
_targetSpeed = _targetSpeed / 2.23693629;
|
||||
@ -43,10 +43,10 @@ if (GVAR(ATragMX_currentUnit) == 1) then
|
||||
_result = [_scopeBaseAngle, _bulletMass, _boreHeight, _airFriction, _muzzleVelocity, _temperature, _barometricPressure, _relativeHumidity, 1000,
|
||||
_windSpeed, _windDirection, _inclinationAngle, _targetSpeed, _targetRange, _bc, _dragModel, _atmosphereModel, false] call FUNC(calculate_solution);
|
||||
|
||||
GVAR(ATragMX_elevationOutput) set [GVAR(ATragMX_currentTarget), _result select 0];
|
||||
GVAR(ATragMX_windageOutput) set [GVAR(ATragMX_currentTarget), _result select 1];
|
||||
GVAR(ATragMX_leadOutput) set [GVAR(ATragMX_currentTarget), _result select 2];
|
||||
GVAR(ATragMX_tofOutput) set [GVAR(ATragMX_currentTarget), _result select 3];
|
||||
GVAR(ATragMX_velocityOutput) set [GVAR(ATragMX_currentTarget), _result select 4];
|
||||
GVAR(elevationOutput) set [GVAR(currentTarget), _result select 0];
|
||||
GVAR(windageOutput) set [GVAR(currentTarget), _result select 1];
|
||||
GVAR(leadOutput) set [GVAR(currentTarget), _result select 2];
|
||||
GVAR(tofOutput) set [GVAR(currentTarget), _result select 3];
|
||||
GVAR(velocityOutput) set [GVAR(currentTarget), _result select 4];
|
||||
|
||||
[] call FUNC(update_result);
|
||||
|
@ -7,12 +7,12 @@ _numTicks = parseNumber(ctrlText 8005);
|
||||
_timeSecs = parseNumber(ctrlText 8006);
|
||||
_estSpeed = 0;
|
||||
|
||||
if (GVAR(ATragMX_currentUnit) != 2) then
|
||||
if (GVAR(currentUnit) != 2) then
|
||||
{
|
||||
_targetRange = _targetRange / 1.0936133;
|
||||
};
|
||||
|
||||
switch (GVAR(ATragMX_rangeAssistImageSizeUnit)) do
|
||||
switch (GVAR(rangeAssistImageSizeUnit)) do
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
@ -33,7 +33,7 @@ if (_timeSecs > 0) then
|
||||
_estSpeed = tan(_numTicks) * _targetRange / _timeSecs;
|
||||
};
|
||||
|
||||
if (GVAR(ATragMX_currentUnit) == 1) then
|
||||
if (GVAR(currentUnit) == 1) then
|
||||
{
|
||||
_estSpeed = _estSpeed * 2.23693629;
|
||||
};
|
||||
|
@ -1,23 +1,23 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (_this < 0 || _this > (count GVAR(ATragMX_gunList)) - 1) exitWith {};
|
||||
if (_this < 0 || _this > (count GVAR(gunList)) - 1) exitWith {};
|
||||
|
||||
GVAR(ATragMX_workingMemory) set [GVAR(ATragMX_currentTarget), +(GVAR(ATragMX_gunList) select _this)];
|
||||
GVAR(ATragMX_currentGun) set [GVAR(ATragMX_currentTarget), _this];
|
||||
GVAR(workingMemory) set [GVAR(currentTarget), +(GVAR(gunList) select _this)];
|
||||
GVAR(currentGun) set [GVAR(currentTarget), _this];
|
||||
|
||||
lbSetCurSel [6000, (GVAR(ATragMX_currentGun) select GVAR(ATragMX_currentTarget))];
|
||||
lbSetCurSel [6000, (GVAR(currentGun) select GVAR(currentTarget))];
|
||||
|
||||
if ((GVAR(ATragMX_scopeUnits) select (GVAR(ATragMX_currentScopeUnit) select GVAR(ATragMX_currentTarget))) != "Clicks") then
|
||||
if ((GVAR(scopeUnits) select (GVAR(currentScopeUnit) select GVAR(currentTarget))) != "Clicks") then
|
||||
{
|
||||
GVAR(ATragMX_currentScopeUnit) set [GVAR(ATragMX_currentTarget), (GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) select 6];
|
||||
GVAR(currentScopeUnit) set [GVAR(currentTarget), (GVAR(workingMemory) select GVAR(currentTarget)) select 6];
|
||||
};
|
||||
|
||||
[] call FUNC(update_gun);
|
||||
|
||||
GVAR(ATragMX_elevationOutput) set [GVAR(ATragMX_currentTarget), 0];
|
||||
GVAR(ATragMX_windageOutput) set [GVAR(ATragMX_currentTarget), 0];
|
||||
GVAR(ATragMX_leadOutput) set [GVAR(ATragMX_currentTarget), 0];
|
||||
GVAR(ATragMX_tofOutput) set [GVAR(ATragMX_currentTarget), 0];
|
||||
GVAR(ATragMX_velocityOutput) set [GVAR(ATragMX_currentTarget), 0];
|
||||
GVAR(elevationOutput) set [GVAR(currentTarget), 0];
|
||||
GVAR(windageOutput) set [GVAR(currentTarget), 0];
|
||||
GVAR(leadOutput) set [GVAR(currentTarget), 0];
|
||||
GVAR(tofOutput) set [GVAR(currentTarget), 0];
|
||||
GVAR(velocityOutput) set [GVAR(currentTarget), 0];
|
||||
|
||||
[] call FUNC(update_result);
|
||||
|
@ -20,6 +20,6 @@ false execVM QUOTE(PATHTOF(functions\fnc_show_target_speed_assist_timer.sqf));
|
||||
|
||||
{
|
||||
lbAdd [6000, _x select 0];
|
||||
} forEach GVAR(ATragMX_gunList);
|
||||
} forEach GVAR(gunList);
|
||||
|
||||
true
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
GVAR(ATragMX_rangeCardCurrentColumn) = (GVAR(ATragMX_rangeCardCurrentColumn) + 1) % (count GVAR(ATragMX_rangeCardLastColumns));
|
||||
GVAR(rangeCardCurrentColumn) = (GVAR(rangeCardCurrentColumn) + 1) % (count GVAR(rangeCardLastColumns));
|
||||
|
||||
ctrlSetText [5006, (GVAR(ATragMX_rangeCardLastColumns) select GVAR(ATragMX_rangeCardCurrentColumn))];
|
||||
ctrlSetText [5006, (GVAR(rangeCardLastColumns) select GVAR(rangeCardCurrentColumn))];
|
||||
|
||||
[] call FUNC(update_range_card);
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
[] call FUNC(parse_input);
|
||||
|
||||
GVAR(ATragMX_currentScopeUnit) set [GVAR(ATragMX_currentTarget), ((GVAR(ATragMX_currentScopeUnit) select GVAR(ATragMX_currentTarget)) + 1) % (count GVAR(ATragMX_scopeUnits))];
|
||||
GVAR(currentScopeUnit) set [GVAR(currentTarget), ((GVAR(currentScopeUnit) select GVAR(currentTarget)) + 1) % (count GVAR(scopeUnits))];
|
||||
|
||||
[] call FUNC(update_scope_unit);
|
||||
[] call FUNC(update_result);
|
||||
|
@ -5,15 +5,15 @@ _index = lbCurSel 6000;
|
||||
|
||||
if (_index == -1) exitWith {};
|
||||
|
||||
for "_i" from 0 to (count GVAR(ATragMX_currentGun)) - 1 do {
|
||||
if ((GVAR(ATragMX_currentGun) select _i) > _index) then {
|
||||
GVAR(ATragMX_currentGun) set [_i, (GVAR(ATragMX_currentGun) select _i) - 1];
|
||||
for "_i" from 0 to (count GVAR(currentGun)) - 1 do {
|
||||
if ((GVAR(currentGun) select _i) > _index) then {
|
||||
GVAR(currentGun) set [_i, (GVAR(currentGun) select _i) - 1];
|
||||
};
|
||||
};
|
||||
|
||||
GVAR(ATragMX_gunList) set [_index, 0];
|
||||
GVAR(ATragMX_gunList) = GVAR(ATragMX_gunList) - [0];
|
||||
GVAR(gunList) set [_index, 0];
|
||||
GVAR(gunList) = GVAR(gunList) - [0];
|
||||
|
||||
lbDelete [6000, _index];
|
||||
|
||||
profileNamespace setVariable ["ACE_ATragMX_gunList", GVAR(ATragMX_gunList)];
|
||||
profileNamespace setVariable ["ACE_ATragMX_gunList", GVAR(gunList)];
|
||||
|
@ -3,44 +3,44 @@
|
||||
if (isNil QUOTE(EGVAR(advanced_ballistics,AdvancedBallistics))) then { EGVAR(advanced_ballistics,AdvancedBallistics) = false; };
|
||||
if (isNil QUOTE(EGVAR(advanced_ballistics,AdvancedAirDragEnabled))) then { EGVAR(advanced_ballistics,AdvancedAirDragEnabled) = false; };
|
||||
|
||||
GVAR(ATragMX_workingMemory) = [+(GVAR(ATragMX_gunList) select 0), +(GVAR(ATragMX_gunList) select 0), +(GVAR(ATragMX_gunList) select 0), +(GVAR(ATragMX_gunList) select 0)];
|
||||
GVAR(workingMemory) = [+(GVAR(gunList) select 0), +(GVAR(gunList) select 0), +(GVAR(gunList) select 0), +(GVAR(gunList) select 0)];
|
||||
|
||||
GVAR(ATragMX_scopeUnits) = ["MILs", "TMOA", "SMOA", "Clicks"];
|
||||
GVAR(scopeUnits) = ["MILs", "TMOA", "SMOA", "Clicks"];
|
||||
|
||||
GVAR(ATragMX_rangeCardStartRange) = 200;
|
||||
GVAR(ATragMX_rangeCardEndRange) = 2000;
|
||||
GVAR(ATragMX_rangeCardIncrement) = 50;
|
||||
GVAR(ATragMX_rangeCardLastColumns) = ["Lead", "RemV", "RemE", "TmFlt"];
|
||||
GVAR(ATragMX_rangeCardCurrentColumn) = 3;
|
||||
GVAR(ATragMX_rangeCardData) = [];
|
||||
GVAR(rangeCardStartRange) = 200;
|
||||
GVAR(rangeCardEndRange) = 2000;
|
||||
GVAR(rangeCardIncrement) = 50;
|
||||
GVAR(rangeCardLastColumns) = ["Lead", "RemV", "RemE", "TmFlt"];
|
||||
GVAR(rangeCardCurrentColumn) = 3;
|
||||
GVAR(rangeCardData) = [];
|
||||
|
||||
GVAR(GVAR(ATragMX_rangeAssistTargetSizeUnit)s) = ["in", "ft", "cm", "m"];
|
||||
GVAR(ATragMX_rangeAssistTargetSizeUnit) = 2;
|
||||
GVAR(ATragMX_rangeAssistImageSizeUnits) = ["MIL", "TMOA", "IOA"];
|
||||
GVAR(ATragMX_rangeAssistImageSizeUnit) = 0;
|
||||
GVAR(ATragMX_rangeAssistUseTargetHeight) = true;
|
||||
GVAR(GVAR(rangeAssistTargetSizeUnit)s) = ["in", "ft", "cm", "m"];
|
||||
GVAR(rangeAssistTargetSizeUnit) = 2;
|
||||
GVAR(rangeAssistImageSizeUnits) = ["MIL", "TMOA", "IOA"];
|
||||
GVAR(rangeAssistImageSizeUnit) = 0;
|
||||
GVAR(rangeAssistUseTargetHeight) = true;
|
||||
|
||||
GVAR(ATragMX_speedAssistNumTicksUnits) = ["MIL", "TMOA", "IOA"];
|
||||
GVAR(ATragMX_speedAssistNumTicksUnit) = 0;
|
||||
GVAR(ATragMX_speedAssistTimer) = true;
|
||||
GVAR(speedAssistNumTicksUnits) = ["MIL", "TMOA", "IOA"];
|
||||
GVAR(speedAssistNumTicksUnit) = 0;
|
||||
GVAR(speedAssistTimer) = true;
|
||||
|
||||
GVAR(ATragMX_currentUnit) = 2;
|
||||
GVAR(ATragMX_currentGun) = [0, 0, 0, 0];
|
||||
GVAR(ATragMX_currentTarget) = 0;
|
||||
GVAR(ATragMX_currentScopeUnit) = [0, 0, 0, 0];
|
||||
GVAR(currentUnit) = 2;
|
||||
GVAR(currentGun) = [0, 0, 0, 0];
|
||||
GVAR(currentTarget) = 0;
|
||||
GVAR(currentScopeUnit) = [0, 0, 0, 0];
|
||||
|
||||
GVAR(ATragMX_temperature) = [15, 15, 15, 15];
|
||||
GVAR(ATragMX_barometricPressure) = [1013.25, 1013.25, 1013.25, 1013.25];
|
||||
GVAR(ATragMX_relativeHumidity) = [0.5, 0.5, 0.5, 0.5];
|
||||
GVAR(temperature) = [15, 15, 15, 15];
|
||||
GVAR(barometricPressure) = [1013.25, 1013.25, 1013.25, 1013.25];
|
||||
GVAR(relativeHumidity) = [0.5, 0.5, 0.5, 0.5];
|
||||
|
||||
GVAR(ATragMX_windSpeed) = [0, 0, 0, 0];
|
||||
GVAR(ATragMX_windDirection) = [12, 12, 12, 12];
|
||||
GVAR(ATragMX_inclinationAngle) = [0, 0, 0, 0];
|
||||
GVAR(ATragMX_targetSpeed) = [0, 0, 0, 0];
|
||||
GVAR(ATragMX_targetRange) = [0, 0, 0, 0];
|
||||
GVAR(windSpeed) = [0, 0, 0, 0];
|
||||
GVAR(windDirection) = [12, 12, 12, 12];
|
||||
GVAR(inclinationAngle) = [0, 0, 0, 0];
|
||||
GVAR(targetSpeed) = [0, 0, 0, 0];
|
||||
GVAR(targetRange) = [0, 0, 0, 0];
|
||||
|
||||
GVAR(ATragMX_elevationOutput) = [0, 0, 0, 0];
|
||||
GVAR(ATragMX_windageOutput) = [0, 0, 0, 0];
|
||||
GVAR(ATragMX_leadOutput) = [0, 0, 0, 0];
|
||||
GVAR(ATragMX_tofOutput) = [0, 0, 0, 0];
|
||||
GVAR(ATragMX_velocityOutput) = [0, 0, 0, 0];
|
||||
GVAR(elevationOutput) = [0, 0, 0, 0];
|
||||
GVAR(windageOutput) = [0, 0, 0, 0];
|
||||
GVAR(leadOutput) = [0, 0, 0, 0];
|
||||
GVAR(tofOutput) = [0, 0, 0, 0];
|
||||
GVAR(velocityOutput) = [0, 0, 0, 0];
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
GVAR(ATragMX_temperature) set [GVAR(ATragMX_currentTarget), parseNumber(ctrlText 200)];
|
||||
GVAR(ATragMX_barometricPressure) set [GVAR(ATragMX_currentTarget), 0 max parseNumber(ctrlText 210)];
|
||||
GVAR(ATragMX_relativeHumidity) set [GVAR(ATragMX_currentTarget), (0 max parseNumber(ctrlText 220) min 100) / 100];
|
||||
GVAR(temperature) set [GVAR(currentTarget), parseNumber(ctrlText 200)];
|
||||
GVAR(barometricPressure) set [GVAR(currentTarget), 0 max parseNumber(ctrlText 210)];
|
||||
GVAR(relativeHumidity) set [GVAR(currentTarget), (0 max parseNumber(ctrlText 220) min 100) / 100];
|
||||
|
||||
GVAR(ATragMX_windSpeed) set [GVAR(ATragMX_currentTarget), 0 max abs(parseNumber(ctrlText 300)) min 50];
|
||||
GVAR(ATragMX_windDirection) set [GVAR(ATragMX_currentTarget), 1 max Round(parseNumber(ctrlText 310)) min 12];
|
||||
GVAR(ATragMX_inclinationAngle) set [GVAR(ATragMX_currentTarget), -60 max parseNumber(ctrlText 320) min 60];
|
||||
GVAR(ATragMX_targetSpeed) set [GVAR(ATragMX_currentTarget), 0 max abs(parseNumber(ctrlText 330)) min 50];
|
||||
GVAR(ATragMX_targetRange) set [GVAR(ATragMX_currentTarget), 0 max abs(parseNumber(ctrlText 340)) min 4000];
|
||||
GVAR(windSpeed) set [GVAR(currentTarget), 0 max abs(parseNumber(ctrlText 300)) min 50];
|
||||
GVAR(windDirection) set [GVAR(currentTarget), 1 max Round(parseNumber(ctrlText 310)) min 12];
|
||||
GVAR(inclinationAngle) set [GVAR(currentTarget), -60 max parseNumber(ctrlText 320) min 60];
|
||||
GVAR(targetSpeed) set [GVAR(currentTarget), 0 max abs(parseNumber(ctrlText 330)) min 50];
|
||||
GVAR(targetRange) set [GVAR(currentTarget), 0 max abs(parseNumber(ctrlText 340)) min 4000];
|
||||
|
||||
private ["_boreHeight", "_bulletMass", "_airFriction", "_muzzleVelocity"];
|
||||
_boreHeight = parseNumber(ctrlText 100);
|
||||
@ -19,7 +19,7 @@ if (EGVAR(advanced_ballistics,AdvancedBallistics) && EGVAR(advanced_ballistics,A
|
||||
_airFriction = parseNumber(ctrlText 120) / -1000;
|
||||
};
|
||||
_muzzleVelocity = parseNumber(ctrlText 130);
|
||||
if (GVAR(ATragMX_currentUnit) == 1) then
|
||||
if (GVAR(currentUnit) == 1) then
|
||||
{
|
||||
_boreHeight = _boreHeight * 2.54;
|
||||
_bulletMass = _bulletMass * 0.06479891;
|
||||
@ -29,20 +29,20 @@ _boreHeight = 0.1 max _boreHeight min 10;
|
||||
_bulletMass = 1 max _bulletMass min 100;
|
||||
_muzzleVelocity = 100 max _muzzleVelocity min 1400;
|
||||
|
||||
(GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) set [5, _boreHeight];
|
||||
(GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) set [12, _bulletMass];
|
||||
(GVAR(workingMemory) select GVAR(currentTarget)) set [5, _boreHeight];
|
||||
(GVAR(workingMemory) select GVAR(currentTarget)) set [12, _bulletMass];
|
||||
if (EGVAR(advanced_ballistics,AdvancedBallistics) && EGVAR(advanced_ballistics,AdvancedAirDragEnabled)) then {
|
||||
(GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) set [15, _airFriction];
|
||||
(GVAR(workingMemory) select GVAR(currentTarget)) set [15, _airFriction];
|
||||
} else {
|
||||
(GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) set [4, _airFriction];
|
||||
(GVAR(workingMemory) select GVAR(currentTarget)) set [4, _airFriction];
|
||||
};
|
||||
(GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) set [1, _muzzleVelocity];
|
||||
(GVAR(workingMemory) select GVAR(currentTarget)) set [1, _muzzleVelocity];
|
||||
|
||||
private ["_elevationCur", "_elevationCur", "_elevationScopeStep", "_windageScopeStep"];
|
||||
_elevationCur = parseNumber(ctrlText 402);
|
||||
_windageCur = parseNumber(ctrlText 412);
|
||||
|
||||
switch ((GVAR(ATragMX_currentScopeUnit) select GVAR(ATragMX_currentTarget))) do
|
||||
switch ((GVAR(currentScopeUnit) select GVAR(currentTarget))) do
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
@ -58,16 +58,16 @@ switch ((GVAR(ATragMX_currentScopeUnit) select GVAR(ATragMX_currentTarget))) do
|
||||
|
||||
case 3:
|
||||
{
|
||||
_elevationScopeStep = ((GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) select 7);
|
||||
_windageScopeStep = ((GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) select 8);
|
||||
_elevationScopeStep = ((GVAR(workingMemory) select GVAR(currentTarget)) select 7);
|
||||
_windageScopeStep = ((GVAR(workingMemory) select GVAR(currentTarget)) select 8);
|
||||
|
||||
_elevationCur = _elevationCur * _elevationScopeStep;
|
||||
_windageCur = _windageCur * _windageScopeStep;
|
||||
};
|
||||
};
|
||||
|
||||
(GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) set [10, _elevationCur];
|
||||
(GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) set [11, _windageCur];
|
||||
(GVAR(workingMemory) select GVAR(currentTarget)) set [10, _elevationCur];
|
||||
(GVAR(workingMemory) select GVAR(currentTarget)) set [11, _windageCur];
|
||||
|
||||
[] call FUNC(update_gun);
|
||||
[] call FUNC(update_atmosphere);
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
(GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) set [10, 0];
|
||||
(GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) set [11, 0];
|
||||
(GVAR(workingMemory) select GVAR(currentTarget)) set [10, 0];
|
||||
(GVAR(workingMemory) select GVAR(currentTarget)) set [11, 0];
|
||||
|
||||
[] call FUNC(update_result);
|
||||
|
@ -3,11 +3,11 @@
|
||||
private ["_index"];
|
||||
_index = 0 max (lbCurSel 6000);
|
||||
|
||||
GVAR(ATragMX_gunList) set [_index, +(GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget))];
|
||||
GVAR(gunList) set [_index, +(GVAR(workingMemory) select GVAR(currentTarget))];
|
||||
|
||||
lbClear 6000;
|
||||
{
|
||||
lbAdd [6000, _x select 0];
|
||||
} forEach GVAR(ATragMX_gunList);
|
||||
} forEach GVAR(gunList);
|
||||
|
||||
profileNamespace setVariable ["ACE_ATragMX_gunList", GVAR(ATragMX_gunList)];
|
||||
profileNamespace setVariable ["ACE_ATragMX_gunList", GVAR(gunList)];
|
||||
|
@ -1,21 +1,21 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
GVAR(ATragMX_COMPAT_LRF) = ["Rangefinder", "Laserdesignator"];
|
||||
GVAR(COMPAT_LRF) = ["Rangefinder", "Laserdesignator"];
|
||||
|
||||
private ["_fnc_atragmx"];
|
||||
|
||||
_fnc_atragmx = {
|
||||
private ["_target", "_position", "_range", "_inclinationAngle"];
|
||||
|
||||
if ((local ACE_player) && (currentWeapon ACE_player) in GVAR(ATragMX_COMPAT_LRF) && (!isNull (_this select 0))) then {
|
||||
if ((local ACE_player) && (currentWeapon ACE_player) in GVAR(COMPAT_LRF) && (!isNull (_this select 0))) then {
|
||||
_target = getPosATL (_this select 0);
|
||||
_position = getPosATL ACE_player;
|
||||
|
||||
_inclinationAngle = asin((ACE_player weaponDirection currentWeapon ACE_player) select 2);
|
||||
_range = _position distance _target;
|
||||
|
||||
GVAR(ATragMX_inclinationAngle) set [GVAR(ATragMX_currentTarget), _inclinationAngle];
|
||||
GVAR(ATragMX_targetRange) set [GVAR(ATragMX_currentTarget), _range];
|
||||
GVAR(inclinationAngle) set [GVAR(currentTarget), _inclinationAngle];
|
||||
GVAR(targetRange) set [GVAR(currentTarget), _range];
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -13,13 +13,13 @@ if !(ctrlVisible 9000) then
|
||||
|
||||
_startTime = time;
|
||||
|
||||
while {GVAR(ATragMX_speedAssistTimer)} do
|
||||
while {GVAR(speedAssistTimer)} do
|
||||
{
|
||||
sleep 0.1;
|
||||
ctrlSetText [9001, Str(Round((time - _startTime) * 10) / 10)];
|
||||
};
|
||||
|
||||
GVAR(ATragMX_speedAssistTimer) = true;
|
||||
GVAR(speedAssistTimer) = true;
|
||||
|
||||
ctrlSetText [8006, Str(Round((time - _startTime) * 10) / 10)];
|
||||
|
||||
|
@ -17,5 +17,5 @@ if (ctrlVisible 6000) then
|
||||
|
||||
ctrlSetFocus (_dsp displayCtrl 6002);
|
||||
|
||||
lbSetCurSel [6000, (GVAR(ATragMX_currentGun) select GVAR(ATragMX_currentTarget))];
|
||||
lbSetCurSel [6000, (GVAR(currentGun) select GVAR(currentTarget))];
|
||||
};
|
||||
|
@ -9,9 +9,9 @@ if (ctrlVisible 10000) then
|
||||
|
||||
if (_this == 1) then
|
||||
{
|
||||
GVAR(ATragMX_rangeCardStartRange) = 0 max Round(parseNumber(ctrlText 10003)) min 3000;
|
||||
GVAR(ATragMX_rangeCardEndRange) = 0 max Round(parseNumber(ctrlText 10004)) min 3000;
|
||||
GVAR(ATragMX_rangeCardIncrement) = 1 max Round(parseNumber(ctrlText 10005)) min 3000;
|
||||
GVAR(rangeCardStartRange) = 0 max Round(parseNumber(ctrlText 10003)) min 3000;
|
||||
GVAR(rangeCardEndRange) = 0 max Round(parseNumber(ctrlText 10004)) min 3000;
|
||||
GVAR(rangeCardIncrement) = 1 max Round(parseNumber(ctrlText 10005)) min 3000;
|
||||
|
||||
[] call FUNC(calculate_range_card);
|
||||
[] call FUNC(update_range_card);
|
||||
@ -23,7 +23,7 @@ if (ctrlVisible 10000) then
|
||||
|
||||
ctrlSetFocus (_dsp displayCtrl 10006);
|
||||
|
||||
ctrlSetText [10003, Str(Round(GVAR(ATragMX_rangeCardStartRange)))];
|
||||
ctrlSetText [10004, Str(Round(GVAR(ATragMX_rangeCardEndRange)))];
|
||||
ctrlSetText [10005, Str(Round(GVAR(ATragMX_rangeCardIncrement)))];
|
||||
ctrlSetText [10003, Str(Round(GVAR(rangeCardStartRange)))];
|
||||
ctrlSetText [10004, Str(Round(GVAR(rangeCardEndRange)))];
|
||||
ctrlSetText [10005, Str(Round(GVAR(rangeCardIncrement)))];
|
||||
};
|
||||
|
@ -22,7 +22,7 @@ if (ctrlVisible 7000) then
|
||||
ctrlSetText [7012, Str(parseNumber(ctrlText 320))];
|
||||
ctrlSetText [7013, Str(parseNumber(ctrlText 340))];
|
||||
|
||||
if (GVAR(ATragMX_currentUnit) != 2) then
|
||||
if (GVAR(currentUnit) != 2) then
|
||||
{
|
||||
ctrlSetText [7016, "Yards"];
|
||||
} else
|
||||
|
@ -19,9 +19,9 @@ if (ctrlVisible 8000) then
|
||||
|
||||
ctrlSetFocus (_dsp displayCtrl 8012);
|
||||
|
||||
ctrlSetText [8004, Str(Round((GVAR(ATragMX_targetRange) select GVAR(ATragMX_currentTarget))))];
|
||||
ctrlSetText [8004, Str(Round((GVAR(targetRange) select GVAR(currentTarget))))];
|
||||
|
||||
if (GVAR(ATragMX_currentUnit) != 2) then
|
||||
if (GVAR(currentUnit) != 2) then
|
||||
{
|
||||
ctrlSetText [8008, "Yards"];
|
||||
} else
|
||||
@ -29,7 +29,7 @@ if (ctrlVisible 8000) then
|
||||
ctrlSetText [8008, "Meters"];
|
||||
};
|
||||
|
||||
if (GVAR(ATragMX_currentUnit) != 1) then
|
||||
if (GVAR(currentUnit) != 1) then
|
||||
{
|
||||
ctrlSetText [8011, "m/s"];
|
||||
} else
|
||||
|
@ -1,9 +1,9 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
ctrlSetText [200, Str(Round((GVAR(ATragMX_temperature) select GVAR(ATragMX_currentTarget)) * 10) / 10)];
|
||||
if (GVAR(ATragMX_currentUnit) == 1) then {
|
||||
ctrlSetText [210, Str(Round((GVAR(ATragMX_barometricPressure) select GVAR(ATragMX_currentTarget)) * 100) / 100)];
|
||||
ctrlSetText [200, Str(Round((GVAR(temperature) select GVAR(currentTarget)) * 10) / 10)];
|
||||
if (GVAR(currentUnit) == 1) then {
|
||||
ctrlSetText [210, Str(Round((GVAR(barometricPressure) select GVAR(currentTarget)) * 100) / 100)];
|
||||
} else {
|
||||
ctrlSetText [210, Str(Round(GVAR(ATragMX_barometricPressure) select GVAR(ATragMX_currentTarget)))];
|
||||
ctrlSetText [210, Str(Round(GVAR(barometricPressure) select GVAR(currentTarget)))];
|
||||
};
|
||||
ctrlSetText [220, Str(Round((GVAR(ATragMX_relativeHumidity) select GVAR(ATragMX_currentTarget)) * 100 * 10) / 10)];
|
||||
ctrlSetText [220, Str(Round((GVAR(relativeHumidity) select GVAR(currentTarget)) * 100 * 10) / 10)];
|
||||
|
@ -1,38 +1,38 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
ctrlSetText [1000, (GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) select 0];
|
||||
if (GVAR(ATragMX_currentUnit) == 1) then
|
||||
ctrlSetText [1000, (GVAR(workingMemory) select GVAR(currentTarget)) select 0];
|
||||
if (GVAR(currentUnit) == 1) then
|
||||
{
|
||||
ctrlSetText [ 100, Str(Round(((GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) select 5) / 2.54 * 100) / 100)];
|
||||
ctrlSetText [ 100, Str(Round(((GVAR(workingMemory) select GVAR(currentTarget)) select 5) / 2.54 * 100) / 100)];
|
||||
} else
|
||||
{
|
||||
ctrlSetText [ 100, Str(Round(((GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) select 5) * 100) / 100)];
|
||||
ctrlSetText [ 100, Str(Round(((GVAR(workingMemory) select GVAR(currentTarget)) select 5) * 100) / 100)];
|
||||
};
|
||||
if (GVAR(ATragMX_currentUnit) == 1) then
|
||||
if (GVAR(currentUnit) == 1) then
|
||||
{
|
||||
ctrlSetText [ 110, Str(Round(((GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) select 12) * 15.4323584))];
|
||||
ctrlSetText [ 110, Str(Round(((GVAR(workingMemory) select GVAR(currentTarget)) select 12) * 15.4323584))];
|
||||
} else
|
||||
{
|
||||
ctrlSetText [ 110, Str(Round((GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) select 12))];
|
||||
ctrlSetText [ 110, Str(Round((GVAR(workingMemory) select GVAR(currentTarget)) select 12))];
|
||||
};
|
||||
if (EGVAR(advanced_ballistics,AdvancedBallistics) && EGVAR(advanced_ballistics,AdvancedAirDragEnabled)) then {
|
||||
ctrlSetText [ 120, Str(Round(((GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) select 15) * 1000) / 1000)];
|
||||
ctrlSetText [ 120, Str(Round(((GVAR(workingMemory) select GVAR(currentTarget)) select 15) * 1000) / 1000)];
|
||||
} else {
|
||||
ctrlSetText [ 120, Str(Round(((GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) select 4) * -1000 * 1000) / 1000)];
|
||||
ctrlSetText [ 120, Str(Round(((GVAR(workingMemory) select GVAR(currentTarget)) select 4) * -1000 * 1000) / 1000)];
|
||||
};
|
||||
if (GVAR(ATragMX_currentUnit) == 1) then
|
||||
if (GVAR(currentUnit) == 1) then
|
||||
{
|
||||
ctrlSetText [130, Str(Round(((GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) select 1) * 3.2808399))];
|
||||
ctrlSetText [130, Str(Round(((GVAR(workingMemory) select GVAR(currentTarget)) select 1) * 3.2808399))];
|
||||
} else
|
||||
{
|
||||
ctrlSetText [130, Str(Round((GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) select 1))];
|
||||
ctrlSetText [130, Str(Round((GVAR(workingMemory) select GVAR(currentTarget)) select 1))];
|
||||
};
|
||||
if (GVAR(ATragMX_currentUnit) == 2) then
|
||||
if (GVAR(currentUnit) == 2) then
|
||||
{
|
||||
ctrlSetText [140, Str(Round((GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) select 2))];
|
||||
ctrlSetText [140, Str(Round((GVAR(workingMemory) select GVAR(currentTarget)) select 2))];
|
||||
} else
|
||||
{
|
||||
ctrlSetText [140, Str(Round(((GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) select 2) * 1.0936133))];
|
||||
ctrlSetText [140, Str(Round(((GVAR(workingMemory) select GVAR(currentTarget)) select 2) * 1.0936133))];
|
||||
};
|
||||
|
||||
[] call FUNC(update_scope_unit);
|
||||
|
@ -3,9 +3,9 @@
|
||||
private ["_range", "_elevation", "_windage", "_lead", "_TOF", "_velocity", "_kineticEnergy", "_rangeOutput", "_elevationOutput", "_windageOutput", "_lastColumnOutput"];
|
||||
_lastColumnOutput = "";
|
||||
|
||||
ctrlSetText [5006, (GVAR(ATragMX_rangeCardLastColumns) select GVAR(ATragMX_rangeCardCurrentColumn))];
|
||||
ctrlSetText [5006, (GVAR(rangeCardLastColumns) select GVAR(rangeCardCurrentColumn))];
|
||||
|
||||
if (GVAR(ATragMX_currentUnit) != 2) then
|
||||
if (GVAR(currentUnit) != 2) then
|
||||
{
|
||||
ctrlSetText [5003, "Yards"];
|
||||
} else
|
||||
@ -24,7 +24,7 @@ lnbClear 5007;
|
||||
_velocity = _x select 5;
|
||||
_kineticEnergy = _x select 6;
|
||||
|
||||
switch ((GVAR(ATragMX_currentScopeUnit) select GVAR(ATragMX_currentTarget))) do
|
||||
switch ((GVAR(currentScopeUnit) select GVAR(currentTarget))) do
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
@ -40,8 +40,8 @@ lnbClear 5007;
|
||||
|
||||
case 3:
|
||||
{
|
||||
_elevationScopeStep = ((GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) select 7);
|
||||
_windageScopeStep = ((GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) select 8);
|
||||
_elevationScopeStep = ((GVAR(workingMemory) select GVAR(currentTarget)) select 7);
|
||||
_windageScopeStep = ((GVAR(workingMemory) select GVAR(currentTarget)) select 8);
|
||||
|
||||
_elevation = Round(_elevation / _elevationScopeStep);
|
||||
_windage = Round(_windage / _windageScopeStep);
|
||||
@ -57,12 +57,12 @@ lnbClear 5007;
|
||||
_rangeOutput = _rangeOutput + "*";
|
||||
};
|
||||
|
||||
if (GVAR(ATragMX_currentUnit) == 1) then
|
||||
if (GVAR(currentUnit) == 1) then
|
||||
{
|
||||
_velocity = _velocity * 3.2808399;
|
||||
};
|
||||
|
||||
switch (GVAR(ATragMX_rangeCardCurrentColumn)) do
|
||||
switch (GVAR(rangeCardCurrentColumn)) do
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
@ -86,4 +86,4 @@ lnbClear 5007;
|
||||
};
|
||||
|
||||
lnbAddRow [5007, [_rangeOutput, _elevationOutput, _windageOutput, _lastColumnOutput]];
|
||||
} forEach GVAR(ATragMX_rangeCardData);
|
||||
} forEach GVAR(rangeCardData);
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
(GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) set [10, (GVAR(ATragMX_elevationOutput) select GVAR(ATragMX_currentTarget))];
|
||||
(GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) set [11, (GVAR(ATragMX_windageOutput) select GVAR(ATragMX_currentTarget))];
|
||||
(GVAR(workingMemory) select GVAR(currentTarget)) set [10, (GVAR(elevationOutput) select GVAR(currentTarget))];
|
||||
(GVAR(workingMemory) select GVAR(currentTarget)) set [11, (GVAR(windageOutput) select GVAR(currentTarget))];
|
||||
|
||||
[] call FUNC(update_result);
|
||||
|
@ -1,18 +1,18 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_elevationAbs", "_elevationRel", "_elevationCur", "_windageAbs", "_windageRel", "_windageCur", "_lead", "_elevationScopeStep", "_windageScopeStep"];
|
||||
_elevationAbs = (GVAR(ATragMX_elevationOutput) select GVAR(ATragMX_currentTarget));
|
||||
_windageAbs = (GVAR(ATragMX_windageOutput) select GVAR(ATragMX_currentTarget));
|
||||
_elevationAbs = (GVAR(elevationOutput) select GVAR(currentTarget));
|
||||
_windageAbs = (GVAR(windageOutput) select GVAR(currentTarget));
|
||||
|
||||
_elevationCur = (GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) select 10;
|
||||
_windageCur = (GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) select 11;
|
||||
_elevationCur = (GVAR(workingMemory) select GVAR(currentTarget)) select 10;
|
||||
_windageCur = (GVAR(workingMemory) select GVAR(currentTarget)) select 11;
|
||||
|
||||
_elevationRel = _elevationAbs - _elevationCur;
|
||||
_windageRel = _windageAbs - _windageCur;
|
||||
|
||||
_lead = (GVAR(ATragMX_leadOutput) select GVAR(ATragMX_currentTarget));
|
||||
_lead = (GVAR(leadOutput) select GVAR(currentTarget));
|
||||
|
||||
switch ((GVAR(ATragMX_currentScopeUnit) select GVAR(ATragMX_currentTarget))) do
|
||||
switch ((GVAR(currentScopeUnit) select GVAR(currentTarget))) do
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
@ -40,8 +40,8 @@ switch ((GVAR(ATragMX_currentScopeUnit) select GVAR(ATragMX_currentTarget))) do
|
||||
|
||||
case 3:
|
||||
{
|
||||
_elevationScopeStep = ((GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) select 7);
|
||||
_windageScopeStep = ((GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) select 8);
|
||||
_elevationScopeStep = ((GVAR(workingMemory) select GVAR(currentTarget)) select 7);
|
||||
_windageScopeStep = ((GVAR(workingMemory) select GVAR(currentTarget)) select 8);
|
||||
|
||||
_elevationAbs = Round(_elevationAbs / _elevationScopeStep);
|
||||
_windageAbs = Round(_windageAbs / _windageScopeStep);
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
ctrlSetText [2000, GVAR(ATragMX_scopeUnits) select (GVAR(ATragMX_currentScopeUnit) select GVAR(ATragMX_currentTarget))];
|
||||
ctrlSetText [5000, GVAR(ATragMX_scopeUnits) select (GVAR(ATragMX_currentScopeUnit) select GVAR(ATragMX_currentTarget))];
|
||||
ctrlSetText [2000, GVAR(scopeUnits) select (GVAR(currentScopeUnit) select GVAR(currentTarget))];
|
||||
ctrlSetText [5000, GVAR(scopeUnits) select (GVAR(currentScopeUnit) select GVAR(currentTarget))];
|
||||
|
@ -1,22 +1,22 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (!isNil ("GVAR(ATragMX_windSpeed)")) then
|
||||
if (!isNil ("GVAR(windSpeed)")) then
|
||||
{
|
||||
ctrlSetText [300, Str(Round((GVAR(ATragMX_windSpeed) select GVAR(ATragMX_currentTarget)) * 100) / 100)];
|
||||
ctrlSetText [300, Str(Round((GVAR(windSpeed) select GVAR(currentTarget)) * 100) / 100)];
|
||||
};
|
||||
if (!isNil ("GVAR(ATragMX_windDirection)")) then
|
||||
if (!isNil ("GVAR(windDirection)")) then
|
||||
{
|
||||
ctrlSetText [310, Str(Round((GVAR(ATragMX_windDirection) select GVAR(ATragMX_currentTarget))))];
|
||||
ctrlSetText [310, Str(Round((GVAR(windDirection) select GVAR(currentTarget))))];
|
||||
};
|
||||
if (!isNil ("GVAR(ATragMX_inclinationAngle)")) then
|
||||
if (!isNil ("GVAR(inclinationAngle)")) then
|
||||
{
|
||||
ctrlSetText [320, Str(Round((GVAR(ATragMX_inclinationAngle) select GVAR(ATragMX_currentTarget))))];
|
||||
ctrlSetText [320, Str(Round((GVAR(inclinationAngle) select GVAR(currentTarget))))];
|
||||
};
|
||||
if (!isNil ("GVAR(ATragMX_targetSpeed)")) then
|
||||
if (!isNil ("GVAR(targetSpeed)")) then
|
||||
{
|
||||
ctrlSetText [330, Str(Round((GVAR(ATragMX_targetSpeed) select GVAR(ATragMX_currentTarget)) * 100) / 100)];
|
||||
ctrlSetText [330, Str(Round((GVAR(targetSpeed) select GVAR(currentTarget)) * 100) / 100)];
|
||||
};
|
||||
if (!isNil ("GVAR(ATragMX_targetRange)")) then
|
||||
if (!isNil ("GVAR(targetRange)")) then
|
||||
{
|
||||
ctrlSetText [340, Str(Round((GVAR(ATragMX_targetRange) select GVAR(ATragMX_currentTarget))))];
|
||||
ctrlSetText [340, Str(Round((GVAR(targetRange) select GVAR(currentTarget))))];
|
||||
};
|
||||
|
@ -7,7 +7,7 @@
|
||||
(_dsp displayCtrl 502) ctrlEnable true;
|
||||
(_dsp displayCtrl 503) ctrlEnable true;
|
||||
|
||||
(_dsp displayCtrl 500 + GVAR(ATragMX_currentTarget)) ctrlEnable false;
|
||||
(_dsp displayCtrl 500 + GVAR(currentTarget)) ctrlEnable false;
|
||||
|
||||
ctrlSetFocus (_dsp displayCtrl 3000);
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
(_dsp displayCtrl 601) ctrlEnable true;
|
||||
(_dsp displayCtrl 602) ctrlEnable true;
|
||||
|
||||
(_dsp displayCtrl 600 + GVAR(ATragMX_currentUnit)) ctrlEnable false;
|
||||
(_dsp displayCtrl 600 + GVAR(currentUnit)) ctrlEnable false;
|
||||
|
||||
[] call FUNC(update_gun);
|
||||
[] call FUNC(update_atmosphere);
|
||||
|
@ -1,29 +1,29 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_scopeBaseAngle"];
|
||||
_scopeBaseAngle = ((GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) select 3);
|
||||
_scopeBaseAngle = ((GVAR(workingMemory) select GVAR(currentTarget)) select 3);
|
||||
|
||||
private ["_bulletMass", "_boreHeight", "_airFriction", "_muzzleVelocity", "_bc", "_dragModel", "_atmosphereModel"];
|
||||
_bulletMass = (GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) select 12;
|
||||
_boreHeight = (GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) select 5;
|
||||
_airFriction = (GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) select 4;
|
||||
_muzzleVelocity = (GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) select 1;
|
||||
_bc = (GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) select 15;
|
||||
_dragModel = (GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) select 16;
|
||||
_atmosphereModel = (GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) select 17;
|
||||
_bulletMass = (GVAR(workingMemory) select GVAR(currentTarget)) select 12;
|
||||
_boreHeight = (GVAR(workingMemory) select GVAR(currentTarget)) select 5;
|
||||
_airFriction = (GVAR(workingMemory) select GVAR(currentTarget)) select 4;
|
||||
_muzzleVelocity = (GVAR(workingMemory) select GVAR(currentTarget)) select 1;
|
||||
_bc = (GVAR(workingMemory) select GVAR(currentTarget)) select 15;
|
||||
_dragModel = (GVAR(workingMemory) select GVAR(currentTarget)) select 16;
|
||||
_atmosphereModel = (GVAR(workingMemory) select GVAR(currentTarget)) select 17;
|
||||
|
||||
private ["_zeroRange"];
|
||||
_zeroRange = Round(parseNumber(ctrlText 140));
|
||||
if (GVAR(ATragMX_currentUnit) != 2) then
|
||||
if (GVAR(currentUnit) != 2) then
|
||||
{
|
||||
_zeroRange = _zeroRange / 1.0936133;
|
||||
};
|
||||
|
||||
private ["_temperature", "_barometricPressure", "_relativeHumidity"];
|
||||
_temperature = (GVAR(ATragMX_temperature) select GVAR(ATragMX_currentTarget));
|
||||
_barometricPressure = (GVAR(ATragMX_barometricPressure) select GVAR(ATragMX_currentTarget));
|
||||
_relativeHumidity = (GVAR(ATragMX_relativeHumidity) select GVAR(ATragMX_currentTarget));
|
||||
if (GVAR(ATragMX_currentUnit) == 1) then
|
||||
_temperature = (GVAR(temperature) select GVAR(currentTarget));
|
||||
_barometricPressure = (GVAR(barometricPressure) select GVAR(currentTarget));
|
||||
_relativeHumidity = (GVAR(relativeHumidity) select GVAR(currentTarget));
|
||||
if (GVAR(currentUnit) == 1) then
|
||||
{
|
||||
_temperature = (_temperature - 32) / 1.8;
|
||||
_barometricPressure = _barometricPressure * 33.8638866667;
|
||||
@ -32,5 +32,5 @@ if (GVAR(ATragMX_currentUnit) == 1) then
|
||||
private ["_result"];
|
||||
_result = [_scopeBaseAngle, _bulletMass, _boreHeight, _airFriction, _muzzleVelocity, _temperature, _barometricPressure, _relativeHumidity, 1000, 0, 0, 0, 0, _zeroRange, _bc, _dragModel, _atmosphereModel, false] call FUNC(calculate_solution);
|
||||
|
||||
(GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) set [2, _zeroRange];
|
||||
(GVAR(ATragMX_workingMemory) select GVAR(ATragMX_currentTarget)) set [3, _scopeBaseAngle + (_result select 0) / 60];
|
||||
(GVAR(workingMemory) select GVAR(currentTarget)) set [2, _zeroRange];
|
||||
(GVAR(workingMemory) select GVAR(currentTarget)) set [3, _scopeBaseAngle + (_result select 0) / 60];
|
||||
|
Loading…
Reference in New Issue
Block a user