Merge remote-tracking branch 'origin/master' into localMedicalGarbage

This commit is contained in:
jaynus 2015-04-18 11:12:22 -07:00
commit c438d9e790
279 changed files with 3021 additions and 2296 deletions

View File

@ -40,7 +40,7 @@ If you installed ACE3, but have trouble understanding how it all works, or where
#### Contributing
If you want to help put with the ongoing development, you can do so by looking for possible bugs or by contributing new features. To contribute something to ACE, simply fork this repository and submit your pull requests for review by other collaborators. In the process, please add yourself to the author array of any .pbo you will be editing and the AUTHORS.txt file; including a valid email address.
To report a bug, propose a feature, or suggest a change to the existing one — please, use our [Issue Tracker](https://github.com/acemod/ACE3/issues).
To report a bug, propose a feature, or suggest a change to the existing one — please, use our [Issue Tracker](https://github.com/acemod/ACE3/issues). See [this link](http://ace3mod.com/wiki/user/how-to-report-an-issue.html) for details.
#### Testing & Building
If you want to help us test the latest development changes, feel free to download our master branch, using either git — if familiar with the process — or directly, by following [this link](https://github.com/acemod/ACE3/archive/master.zip).

View File

@ -2,7 +2,7 @@
class CfgAmmo {
class BulletBase;
class B_20mm : BulletBase {
hit = 80;
hit = 80;
indirectHit = 12;
indirectHitRange = 2; //2;
caliber = 1.4;
@ -13,7 +13,7 @@ class CfgAmmo {
tracerEndTime = 3.5;
CraterEffects = "ExploAmmoCrater";
explosionEffects = "ExploAmmoExplosion";
explosionEffects = "ExploAmmoExplosion";
model = "\A3\Weapons_f\Data\bullettracer\tracer_red";
};
class ACE_20mm_HE : B_20mm {};
@ -23,7 +23,7 @@ class CfgAmmo {
indirectHitRange = 0.3; //2;
explosive = 0;
CraterEffects = "";
explosionEffects = "";
explosionEffects = "";
};
// adjust minigun caliber and deflection to other ammo

View File

@ -907,7 +907,7 @@ class Heli_Attack_01_base_F: Helicopter_Base_F {
thermalMode[] = {0,1};
gunnerOpticsColor[] = {0,0,0,1};
directionStabilized = 1;
horizontallyStabilized = 1;
horizontallyStabilized = 1;
gunnerOpticsModel = "\A3\Weapons_F_Beta\Reticle\Heli_Attack_01_Optics_Gunner_wide_F";
};
class Medium: Wide
@ -918,7 +918,7 @@ class Heli_Attack_01_base_F: Helicopter_Base_F {
maxFov = 0.093;
gunnerOpticsColor[] = {0,0,0,1};
directionStabilized = 1;
horizontallyStabilized = 1;
horizontallyStabilized = 1;
gunnerOpticsModel = "\A3\Weapons_F_Beta\Reticle\Heli_Attack_01_Optics_Gunner_medium_F";
};
class Narrow: Wide
@ -929,7 +929,7 @@ class Heli_Attack_01_base_F: Helicopter_Base_F {
maxFov = 0.029;
gunnerOpticsColor[] = {0,0,0,1};
directionStabilized = 1;
horizontallyStabilized = 1;
horizontallyStabilized = 1;
gunnerOpticsModel = "\A3\Weapons_F_Beta\Reticle\Heli_Attack_01_Optics_Gunner_narrow_F";
};
@ -941,7 +941,7 @@ class Heli_Attack_01_base_F: Helicopter_Base_F {
maxFov = 0.01;
gunnerOpticsColor[] = {0,0,0,1};
directionStabilized = 1;
horizontallyStabilized = 1;
horizontallyStabilized = 1;
gunnerOpticsModel = "\A3\Weapons_F_Beta\Reticle\Heli_Attack_01_Optics_Gunner_narrow_F";
};

View File

@ -230,12 +230,12 @@ class ATragMX_Display {
w=0.03;
h=0.03;
colorBackground[]={0,0,0,0.0};
action=QUOTE((GVAR(currentGun) + (count GVAR(gunList)) - 1) % (count GVAR(gunList)) call FUNC(change_gun));
action=QUOTE(-1 call FUNC(cycle_gun_list));
};
class BOTTOM: TOP {
idc=-1;
y=0.265*safezoneH+safezoneY+0.955;
action=QUOTE((GVAR(currentGun) + (count GVAR(gunList)) + 1) % (count GVAR(gunList)) call FUNC(change_gun));
action=QUOTE(+1 call FUNC(cycle_gun_list));
};
class LEFT: ATragMX_RscButton {
idc=-1;
@ -316,6 +316,7 @@ class ATragMX_Display {
colorBackground[]={0.15,0.21,0.23,0.3};
colorFocused[]={0.15,0.21,0.23,0.2};
text="Gun";
action=QUOTE(call FUNC(toggle_gun_ammo_data));
};
class TEXT_BORE_HEIGHT: TEXT_GUN_PROFILE {
idc=10;
@ -323,12 +324,12 @@ class ATragMX_Display {
y=0.265*safezoneH+safezoneY+0.285;
text="BH";
};
class TEXT_BORE_HEIGHT_INPUT: ATragMX_RscEdit {
class TEXT_BORE_HEIGHT_OUTPUT: TEXT_BORE_HEIGHT {
idc=100;
style=ST_RIGHT;
w=0.058;
x=0.550*safezoneW+safezoneX+0.145;
y=0.265*safezoneH+safezoneY+0.285;
onKeyUp=QUOTE(if (_this select 1 == 28) then {call FUNC(calculate_target_solution)});
};
class TEXT_BULLET_MASS: TEXT_BORE_HEIGHT {
idc=11;
@ -336,7 +337,7 @@ class ATragMX_Display {
y=0.265*safezoneH+safezoneY+0.320;
text="BW";
};
class TEXT_BULLET_MASS_INPUT: TEXT_BORE_HEIGHT_INPUT {
class TEXT_BULLET_MASS_OUTPUT: TEXT_BORE_HEIGHT_OUTPUT {
idc=110;
y=0.265*safezoneH+safezoneY+0.320;
};
@ -345,7 +346,7 @@ class ATragMX_Display {
y=0.265*safezoneH+safezoneY+0.355;
text="C1";
};
class TEXT_AIR_FRICTION_INPUT: TEXT_BORE_HEIGHT_INPUT {
class TEXT_AIR_FRICTION_OUTPUT: TEXT_BORE_HEIGHT_OUTPUT {
idc=120;
y=0.265*safezoneH+safezoneY+0.355;
};
@ -359,7 +360,7 @@ class ATragMX_Display {
colorFocused[]={0.15,0.21,0.23,0.2};
text="MV";
};
class TEXT_MUZZLE_VELOCITY_INPUT: TEXT_BORE_HEIGHT_INPUT {
class TEXT_MUZZLE_VELOCITY_OUTPUT: TEXT_BORE_HEIGHT_OUTPUT {
idc=130;
y=0.265*safezoneH+safezoneY+0.390;
};
@ -368,35 +369,35 @@ class ATragMX_Display {
y=0.265*safezoneH+safezoneY+0.425;
text="ZR";
};
class TEXT_ZERO_RANGE_INPUT: TEXT_BORE_HEIGHT_INPUT {
class TEXT_ZERO_RANGE_OUTPUT: TEXT_BORE_HEIGHT_OUTPUT {
idc=140;
y=0.265*safezoneH+safezoneY+0.425;
onKeyUp=QUOTE(if (_this select 1 == 28) then {call FUNC(update_zero_range)});
};
class TEXT_ATMOSPHERE: TEXT_GUN {
idc=4001;
x=0.550*safezoneW+safezoneX+0.205;
text="Atmsphr";
action=QUOTE(0 call FUNC(toggle_atmo_env_data));
};
class TEXT_TEMPERATURE: TEXT_BULLET_MASS {
idc=20;
x=0.550*safezoneW+safezoneX+0.20;
text="Tmp";
};
class TEXT_TEMPERATURE_INPUT: ATragMX_RscEdit {
class TEXT_TEMPERATURE_OUTPUT: TEXT_TEMPERATURE {
idc=200;
style=ST_RIGHT;
w=0.050;
x=0.550*safezoneW+safezoneX+0.245;
y=0.265*safezoneH+safezoneY+0.320;
text="";
onKeyUp=QUOTE(if (_this select 1 == 28) then {call FUNC(calculate_target_solution)});
};
class TEXT_BAROMETRIC_PRESSURE: TEXT_AIR_FRICTION {
idc=21;
x=0.550*safezoneW+safezoneX+0.20;
text="BP";
};
class TEXT_BAROMETRIC_PRESSURE_INPUT: TEXT_TEMPERATURE_INPUT {
class TEXT_BAROMETRIC_PRESSURE_OUTPUT: TEXT_TEMPERATURE_OUTPUT {
idc=210;
y=0.265*safezoneH+safezoneY+0.355;
};
@ -406,10 +407,19 @@ class ATragMX_Display {
y=0.265*safezoneH+safezoneY+0.390;
text="RH";
};
class TEXT_RELATIVE_HUMIDITY_INPUT: TEXT_TEMPERATURE_INPUT {
class TEXT_RELATIVE_HUMIDITY_OUTPUT: TEXT_TEMPERATURE_OUTPUT {
idc=220;
y=0.265*safezoneH+safezoneY+0.390;
};
class TEXT_ALTITUDE: TEXT_BORE_HEIGHT {
idc=23;
x=0.550*safezoneW+safezoneX+0.20;
text="Alt";
};
class TEXT_ALTITUDE_OUTPUT: TEXT_TEMPERATURE_OUTPUT {
idc=230;
y=0.265*safezoneH+safezoneY+0.285;
};
class TEXT_TARGET_A: ATragMX_RscButton {
idc=500;
w=0.0231;
@ -445,18 +455,18 @@ class ATragMX_Display {
idc=4002;
x=0.550*safezoneW+safezoneX+0.3;
text="Target";
action=QUOTE(0 call FUNC(toggle_target_data));
};
class TEXT_WIND_SPEED: TEXT_BORE_HEIGHT {
idc=30;
x=0.550*safezoneW+safezoneX+0.3;
text="WS";
};
class TEXT_WIND_SPEED_INPUT: ATragMX_RscEdit {
class TEXT_WIND_SPEED_OUTPUT: TEXT_BORE_HEIGHT_OUTPUT {
idc=300;
w=0.058;
x=0.550*safezoneW+safezoneX+0.335;
y=0.265*safezoneH+safezoneY+0.285;
onKeyUp=QUOTE(if (_this select 1 == 28) then {call FUNC(calculate_target_solution)});
text="0";
};
class TEXT_WIND_DIRECTION: TEXT_BULLET_MASS {
@ -464,7 +474,7 @@ class ATragMX_Display {
x=0.550*safezoneW+safezoneX+0.3;
text="WD";
};
class TEXT_WIND_DIRECTION_INPUT: TEXT_WIND_SPEED_INPUT {
class TEXT_WIND_DIRECTION_OUTPUT: TEXT_WIND_SPEED_OUTPUT {
idc=310;
y=0.265*safezoneH+safezoneY+0.32;
};
@ -473,7 +483,7 @@ class ATragMX_Display {
x=0.550*safezoneW+safezoneX+0.3;
text="IA";
};
class TEXT_INCLINATION_ANGLE_INPUT: TEXT_WIND_SPEED_INPUT {
class TEXT_INCLINATION_ANGLE_OUTPUT: TEXT_WIND_SPEED_OUTPUT {
idc=320;
y=0.265*safezoneH+safezoneY+0.355;
};
@ -481,9 +491,9 @@ class ATragMX_Display {
idc=33;
x=0.550*safezoneW+safezoneX+0.3;
text="TS";
action=QUOTE(call FUNC(toggle_target_speed_assist));
action=QUOTE(0 call FUNC(toggle_target_speed_assist));
};
class TEXT_TARGET_SPEED_INPUT: TEXT_WIND_SPEED_INPUT {
class TEXT_TARGET_SPEED_OUTPUT: TEXT_WIND_SPEED_OUTPUT {
idc=330;
y=0.265*safezoneH+safezoneY+0.39;
};
@ -493,7 +503,7 @@ class ATragMX_Display {
text="TR";
action=QUOTE(0 call FUNC(toggle_target_range_assist));
};
class TEXT_TARGET_RANGE_INPUT: TEXT_WIND_SPEED_INPUT {
class TEXT_TARGET_RANGE_INPUT: TEXT_WIND_SPEED_OUTPUT {
idc=340;
y=0.265*safezoneH+safezoneY+0.425;
};
@ -563,6 +573,7 @@ class ATragMX_Display {
x=0.550*safezoneW+safezoneX+0.11;
y=0.265*safezoneH+safezoneY+0.57;
text="Lead";
action=QUOTE(GVAR(showWind2) = !GVAR(showWind2); call FUNC(update_result); call FUNC(update_target));
};
class TEXT_LEAD_OUTPUT: TEXT_ELEVATION_OUTPUT_ABSOLUTE {
idc=420;
@ -814,13 +825,13 @@ class ATragMX_Display {
w=0.07;
x=0.550*safezoneW+safezoneX+0.32;
text="cm";
action=QUOTE(GVAR(rangeAssistTargetSizeUnit)=(GVAR(rangeAssistTargetSizeUnit)+1) % (count GVAR(GVAR(rangeAssistTargetSizeUnit)s)); ctrlSetText [7014, GVAR(GVAR(rangeAssistTargetSizeUnit)s) select GVAR(rangeAssistTargetSizeUnit)]);
action=QUOTE(call FUNC(cycle_target_size_units));
};
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(rangeAssistImageSizeUnit)=(GVAR(rangeAssistImageSizeUnit)+1) % (count GVAR(rangeAssistImageSizeUnits)); ctrlSetText [7015, GVAR(rangeAssistImageSizeUnits) select GVAR(rangeAssistImageSizeUnit)]);
action=QUOTE(call FUNC(cycle_image_size_units));
};
class TEXT_TARGET_RANGE_ASSIST_ESTIMATED_RANGE_UNIT: TEXT_TARGET_RANGE_ASSIST_ESTIMATED_RANGE {
idc=7016;
@ -861,22 +872,22 @@ class ATragMX_Display {
class TEXT_TARGET_SPEED_ASSIST_TARGET_RANGE: TEXT_TARGET_RANGE_ASSIST_TARGET_SIZE {
idc=8000;
x=0.550*safezoneW+safezoneX+0.12;
x=0.550*safezoneW+safezoneX+0.13;
text="Target Range";
};
class TEXT_TARGET_SPEED_ASSIST_NUM_TICKS: TEXT_TARGET_RANGE_ASSIST_IMAGE_SIZE {
idc=8001;
x=0.550*safezoneW+safezoneX+0.12;
x=0.550*safezoneW+safezoneX+0.13;
text="Num Ticks";
};
class TEXT_TARGET_SPEED_ASSIST_TIME: TEXT_TARGET_RANGE_ASSIST_ANGLE {
idc=8002;
x=0.550*safezoneW+safezoneX+0.12;
x=0.550*safezoneW+safezoneX+0.13;
text="Time (secs)";
};
class TEXT_TARGET_SPEED_ASSIST_TARGET_ESTIMATED_SPEED: TEXT_TARGET_RANGE_ASSIST_ESTIMATED_RANGE {
idc=8003;
x=0.550*safezoneW+safezoneX+0.12;
x=0.550*safezoneW+safezoneX+0.13;
text="Est Speed";
};
class TEXT_TARGET_SPEED_ASSIST_TARGET_RANGE_INPUT: TEXT_TARGET_RANGE_ASSIST_TARGET_SIZE_INPUT {
@ -907,7 +918,7 @@ class ATragMX_Display {
class TEXT_TARGET_SPEED_ASSIST_NUM_TICKS_UNIT: TEXT_TARGET_RANGE_ASSIST_IMAGE_SIZE_UNIT {
idc=8009;
text="MIL";
action=QUOTE(GVAR(speedAssistNumTicksUnit)=(GVAR(speedAssistNumTicksUnit)+1) % (count GVAR(speedAssistNumTicksUnits)); ctrlSetText [8009, GVAR(speedAssistNumTicksUnits) select GVAR(speedAssistNumTicksUnit)]; call FUNC(calculate_target_speed_assist));
action=QUOTE(call FUNC(cycle_num_ticks_units));
};
class TEXT_TARGET_SPEED_ASSIST_TIMER_START: TEXT_TARGET_RANGE_ASSIST_IMAGE_SIZE_UNIT {
idc=8010;
@ -1046,5 +1057,298 @@ class ATragMX_Display {
text="Cancel";
action=QUOTE(false call FUNC(show_add_new_gun); true call FUNC(show_gun_list));
};
class TEXT_GUN_AMMO_DATA_BORE_HEIGHT: TEXT_BORE_HEIGHT {
idc=12000;
w=0.22;
y=0.265*safezoneH+safezoneY+0.28;
text="Bore (cm)";
};
class TEXT_GUN_AMMO_DATA_BORE_HEIGHT_INPUT: ATragMX_RscEdit {
idc=120000;
w=0.06;
x=0.550*safezoneW+safezoneX+0.335;
y=0.265*safezoneH+safezoneY+0.28;
};
class TEXT_GUN_AMMO_DATA_BULLET_MASS: TEXT_GUN_AMMO_DATA_BORE_HEIGHT {
idc=12001;
y=0.265*safezoneH+safezoneY+0.320;
text="Bullet Weight (grams)";
};
class TEXT_GUN_AMMO_DATA_BULLET_MASS_INPUT: TEXT_GUN_AMMO_DATA_BORE_HEIGHT_INPUT {
idc=120010;
y=0.265*safezoneH+safezoneY+0.320;
};
class TEXT_GUN_AMMO_DATA_BULLET_DIAMETER: TEXT_GUN_AMMO_DATA_BORE_HEIGHT {
idc=12002;
y=0.265*safezoneH+safezoneY+0.360;
text="Bullet Diam (cm)";
};
class TEXT_GUN_AMMO_DATA_BULLET_DIAMETER_INPUT: TEXT_GUN_AMMO_DATA_BORE_HEIGHT_INPUT {
idc=120020;
y=0.265*safezoneH+safezoneY+0.360;
};
class TEXT_GUN_AMMO_DATA_AIR_FRICTION: TEXT_GUN_AMMO_DATA_BORE_HEIGHT {
idc=12003;
y=0.265*safezoneH+safezoneY+0.400;
text="C1 Coefficient";
};
class TEXT_GUN_AMMO_DATA_AIR_FRICTION_INPUT: TEXT_GUN_AMMO_DATA_BORE_HEIGHT_INPUT {
idc=120030;
y=0.265*safezoneH+safezoneY+0.400;
};
class TEXT_GUN_AMMO_DATA_RIFLE_TWIST: TEXT_GUN_AMMO_DATA_BORE_HEIGHT {
idc=12004;
y=0.265*safezoneH+safezoneY+0.440;
text="Rifle Twist (cm/trn)";
};
class TEXT_GUN_AMMO_DATA_RIFLE_TWIST_INPUT: TEXT_GUN_AMMO_DATA_BORE_HEIGHT_INPUT {
idc=120040;
y=0.265*safezoneH+safezoneY+0.440;
};
class TEXT_GUN_AMMO_DATA_MUZZLE_VELOCITY: TEXT_GUN_AMMO_DATA_BORE_HEIGHT {
idc=12005;
y=0.265*safezoneH+safezoneY+0.480;
text="Muzzle Velocity (m/s)";
};
class TEXT_GUN_AMMO_DATA_MUZZLE_VELOCITY_INPUT: TEXT_GUN_AMMO_DATA_BORE_HEIGHT_INPUT {
idc=120050;
y=0.265*safezoneH+safezoneY+0.480;
};
class TEXT_GUN_AMMO_DATA_ZERO_RANGE: TEXT_GUN_AMMO_DATA_BORE_HEIGHT {
idc=12006;
y=0.265*safezoneH+safezoneY+0.520;
text="Zero Range (meters)";
};
class TEXT_GUN_AMMO_DATA_ZERO_RANGE_INPUT: TEXT_GUN_AMMO_DATA_BORE_HEIGHT_INPUT {
idc=120060;
y=0.265*safezoneH+safezoneY+0.520;
};
class TEXT_GUN_AMMO_DATA_DONE: TEXT_TARGET_SPEED_ASSIST_DONE {
idc=12008;
action=QUOTE(1 call FUNC(toggle_gun_ammo_data));
};
class TEXT_GUN_AMMO_DATA_CANCEL: TEXT_TARGET_SPEED_ASSIST_CANCEL {
idc=12009;
action=QUOTE(0 call FUNC(toggle_gun_ammo_data));
};
class TEXT_GUN_AMMO_DATA_PREV: TEXT_TARGET_SPEED_ASSIST_PREV {
idc=12010;
};
class TEXT_GUN_AMMO_DATA_NEXT: TEXT_TARGET_SPEED_ASSIST_NEXT {
idc=12011;
};
class TEXT_ATMO_ENV_DATA_DEFAULT: TEXT_LEAD {
idc=13000;
w=0.08;
x=0.550*safezoneW+safezoneX+0.15;
y=0.265*safezoneH+safezoneY+0.320;
text="Default";
action=QUOTE(call FUNC(restore_atmo_default));
};
class TEXT_ATMO_ENV_DATA_AT: TEXT_TARGET_A {
idc=13001;
w=0.04;
x=0.550*safezoneW+safezoneX+0.24;
y=0.265*safezoneH+safezoneY+0.320;
text="AT";
action=QUOTE(GVAR(atmosphereModeTBH) = false; call FUNC(update_atmo_selection));
};
class TEXT_ATMO_ENV_DATA_TBH: TEXT_ATMO_ENV_DATA_AT {
idc=13002;
x=0.550*safezoneW+safezoneX+0.28;
text="TBH";
action=QUOTE(GVAR(atmosphereModeTBH) = true; call FUNC(update_atmo_selection));
};
class TEXT_ATMO_ENV_DATA_ALTITUDE: TEXT_GUN_AMMO_DATA_BORE_HEIGHT {
idc=13003;
x=0.550*safezoneW+safezoneX+0.115;
y=0.265*safezoneH+safezoneY+0.400;
text="Altitude (ft)";
};
class TEXT_ATMO_ENV_DATA_ALTITUDE_INPUT: TEXT_GUN_AMMO_DATA_BORE_HEIGHT_INPUT {
idc=130030;
x=0.550*safezoneW+safezoneX+0.330;
y=0.265*safezoneH+safezoneY+0.400;
};
class TEXT_ATMO_ENV_DATA_TEMPERATURE: TEXT_ATMO_ENV_DATA_ALTITUDE {
idc=13004;
y=0.265*safezoneH+safezoneY+0.440;
text="temperature (F)";
};
class TEXT_ATMO_ENV_DATA_TEMPERATURE_INPUT: TEXT_ATMO_ENV_DATA_ALTITUDE_INPUT {
idc=130040;
y=0.265*safezoneH+safezoneY+0.440;
};
class TEXT_ATMO_ENV_DATA_BAROMETRIC_PRESSURE: TEXT_ATMO_ENV_DATA_ALTITUDE {
idc=13005;
y=0.265*safezoneH+safezoneY+0.480;
text="Barom Pres (in.merc.)";
};
class TEXT_ATMO_ENV_DATA_BAROMETRIC_PRESSURE_INPUT: TEXT_ATMO_ENV_DATA_ALTITUDE_INPUT {
idc=130050;
y=0.265*safezoneH+safezoneY+0.480;
};
class TEXT_ATMO_ENV_DATA_RELATIVE_HUMIDITY: TEXT_ATMO_ENV_DATA_ALTITUDE {
idc=13006;
y=0.265*safezoneH+safezoneY+0.520;
text="Relative Humidity (%)";
};
class TEXT_ATMO_ENV_DATA_RELATIVE_HUMIDITY_INPUT: TEXT_ATMO_ENV_DATA_ALTITUDE_INPUT {
idc=130060;
y=0.265*safezoneH+safezoneY+0.520;
};
class TEXT_ATMO_ENV_DATA_DONE: TEXT_TARGET_SPEED_ASSIST_DONE {
idc=13007;
action=QUOTE(1 call FUNC(toggle_atmo_env_data));
};
class TEXT_ATMO_ENV_DATA_CANCEL: TEXT_TARGET_SPEED_ASSIST_CANCEL {
idc=13008;
action=QUOTE(0 call FUNC(toggle_atmo_env_data));
};
class TEXT_ATMO_ENV_DATA_PREV: TEXT_TARGET_SPEED_ASSIST_PREV {
idc=13009;
};
class TEXT_ATMO_ENV_DATA_NEXT: TEXT_TARGET_SPEED_ASSIST_NEXT {
idc=13010;
};
class TEXT_ATMO_ENV_DATA_CALC_METHOD: TEXT_GUN_AMMO_DATA_BORE_HEIGHT {
idc=13011;
x=0.550*safezoneW+safezoneX+0.24;
y=0.265*safezoneH+safezoneY+0.29;
text="Calc Method";
};
class TEXT_TARGET_DATA_LATITUDE: TEXT_BORE_HEIGHT {
idc=14000;
w=0.22;
y=0.265*safezoneH+safezoneY+0.28;
text="Latitude";
};
class TEXT_TARGET_DATA_LATITUDE_INPUT: ATragMX_RscEdit {
idc=140000;
w=0.06;
x=0.550*safezoneW+safezoneX+0.335;
y=0.265*safezoneH+safezoneY+0.28;
};
class TEXT_TARGET_DATA_DIR_OF_FIRE: TEXT_TARGET_DATA_LATITUDE {
idc=14001;
y=0.265*safezoneH+safezoneY+0.320;
text="Dir of Fire (deg from N)";
};
class TEXT_TARGET_DATA_DIR_OF_FIRE_INPUT: TEXT_TARGET_DATA_LATITUDE_INPUT {
idc=140010;
y=0.265*safezoneH+safezoneY+0.320;
};
class TEXT_TARGET_DATA_WIND_SPEED: TEXT_TARGET_DATA_LATITUDE {
idc=14002;
w=1.2;
y=0.265*safezoneH+safezoneY+0.360;
text="Wind Speed (m/s)";
};
class TEXT_TARGET_DATA_WIND_SPEED_1: TEXT_TARGET_DATA_LATITUDE {
idc=141020;
colorText[]={0,0,0,0.6};
w=0.05;
h=0.03;
sizeEx=0.025;
x=0.550*safezoneW+safezoneX+0.270;
y=0.265*safezoneH+safezoneY+0.357;
text="1";
};
class TEXT_TARGET_DATA_WIND_SPEED_INPUT_1: TEXT_TARGET_DATA_LATITUDE_INPUT {
idc=140020;
w=0.045;
x=0.550*safezoneW+safezoneX+0.290;
y=0.265*safezoneH+safezoneY+0.360;
};
class TEXT_TARGET_DATA_WIND_SPEED_2: TEXT_TARGET_DATA_WIND_SPEED_1 {
idc=141021;
x=0.550*safezoneW+safezoneX+0.330;
text="2";
};
class TEXT_TARGET_DATA_WIND_SPEED_INPUT_2: TEXT_TARGET_DATA_LATITUDE_INPUT {
idc=140021;
w=0.045;
x=0.550*safezoneW+safezoneX+0.350;
y=0.265*safezoneH+safezoneY+0.360;
};
class TEXT_TARGET_DATA_WIND_DIRECTION: TEXT_TARGET_DATA_LATITUDE {
idc=14003;
y=0.265*safezoneH+safezoneY+0.400;
text="Wind Direction (clock)";
};
class TEXT_TARGET_DATA_WIND_DIRECTION_INPUT: TEXT_TARGET_DATA_LATITUDE_INPUT {
idc=140030;
y=0.265*safezoneH+safezoneY+0.400;
};
class TEXT_TARGET_DATA_INCLINATION_ANGLE: TEXT_TARGET_DATA_LATITUDE {
idc=14004;
w=1.2;
y=0.265*safezoneH+safezoneY+0.440;
text="Inclination Angle";
};
class TEXT_TARGET_DATA_INCLINATION_ANGLE_COSINE: TEXT_TARGET_DATA_LATITUDE {
idc=141041;
colorText[]={0,0,0,0.6};
w=0.05;
h=0.03;
sizeEx=0.025;
x=0.550*safezoneW+safezoneX+0.270;
y=0.265*safezoneH+safezoneY+0.437;
text="c";
};
class TEXT_TARGET_DATA_INCLINATION_ANGLE_INPUT_COSINE: TEXT_TARGET_DATA_LATITUDE_INPUT {
idc=140041;
w=0.045;
x=0.550*safezoneW+safezoneX+0.290;
y=0.265*safezoneH+safezoneY+0.440;
onKeyUp=QUOTE(if (_this select 1 == 28) then {0 call FUNC(update_inclination_angle)});
};
class TEXT_TARGET_DATA_INCLINATION_ANGLE_DEGREE: TEXT_TARGET_DATA_INCLINATION_ANGLE_COSINE {
idc=141040;
x=0.550*safezoneW+safezoneX+0.330;
text="d";
};
class TEXT_TARGET_DATA_INCLINATION_ANGLE_INPUT_DEGREE: TEXT_TARGET_DATA_LATITUDE_INPUT {
idc=140040;
w=0.045;
x=0.550*safezoneW+safezoneX+0.350;
y=0.265*safezoneH+safezoneY+0.440;
onKeyUp=QUOTE(if (_this select 1 == 28) then {1 call FUNC(update_inclination_angle)});
};
class TEXT_TARGET_DATA_TARGET_SPEED: TEXT_TARGET_DATA_LATITUDE {
idc=14005;
y=0.265*safezoneH+safezoneY+0.480;
text="Target Speed (m/s)";
};
class TEXT_TARGET_DATA_TARGET_SPEED_INPUT: TEXT_TARGET_DATA_LATITUDE_INPUT {
idc=140050;
y=0.265*safezoneH+safezoneY+0.480;
};
class TEXT_TARGET_DATA_TARGET_RANGE: TEXT_TARGET_DATA_LATITUDE {
idc=14006;
y=0.265*safezoneH+safezoneY+0.520;
text="Target Range (meters)";
};
class TEXT_TARGET_DATA_TARGET_RANGE_INPUT: TEXT_TARGET_DATA_LATITUDE_INPUT {
idc=140060;
y=0.265*safezoneH+safezoneY+0.520;
};
class TEXT_TARGET_DATA_DONE: TEXT_TARGET_SPEED_ASSIST_DONE {
idc=14008;
action=QUOTE(1 call FUNC(toggle_target_data));
};
class TEXT_TARGET_DATA_CANCEL: TEXT_TARGET_SPEED_ASSIST_CANCEL {
idc=14009;
action=QUOTE(0 call FUNC(toggle_target_data));
};
class TEXT_TARGET_DATA_PREV: TEXT_TARGET_SPEED_ASSIST_PREV {
idc=14010;
};
class TEXT_TARGET_DATA_NEXT: TEXT_TARGET_SPEED_ASSIST_NEXT {
idc=14011;
};
};
};

View File

@ -2,46 +2,48 @@
#include "initKeybinds.sqf"
if (count (profileNamespace getVariable ["ACE_ATragMX_gunList", []]) > 0) then {
if ((profileNamespace getVariable ["ACE_ATragMX_profileNamespaceVersion", 0]) == ATRAGMX_PROFILE_NAMESPACE_VERSION && count (profileNamespace getVariable ["ACE_ATragMX_gunList", []]) > 0) then {
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(gunList) = [["12.7x108mm" , 820, 100, 0.0659, -0.0008600, 3.81, 0, 0.338, 0.338, 120, 0, 0, 48.28, "B_127x108_Ball" , "5Rnd_127x108_Mag" , 0.630, 1, "ASM" ],
// 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, Bullet Diameter, Rifle Twist, BC, Drag Model, Atmosphere Model
GVAR(gunList) = [["12.7x108mm" , 820, 100, 0.0659, -0.0008600, 3.81, 0, 0.338, 0.338, 120, 0, 0, 48.28, 12.7, 38.10, 0.630, 1, "ASM" ],
["12.7x99mm AMAX" , 860, 100, 0.0612, -0.0008600, 3.81, 0, 0.338, 0.338, 120, 0, 0, 48.60, "B_127x99_Ball" , "5Rnd_mas_127x99_Stanag" , 1.050, 1, "ASM" ],
["12.7x99mm" , 853, 100, 0.0623, -0.0008600, 3.81, 0, 0.338, 0.338, 120, 0, 0, 41.92, "B_127x99_Ball" , "5Rnd_mas_127x99_Stanag" , 0.670, 1, "ASM" ],
["12.7x99mm AMAX" , 860, 100, 0.0612, -0.0008600, 3.81, 0, 0.338, 0.338, 120, 0, 0, 48.60, 12.7, 38.10, 1.050, 1, "ASM" ],
["12.7x99mm" , 853, 100, 0.0623, -0.0008600, 3.81, 0, 0.338, 0.338, 120, 0, 0, 41.92, 12.7, 38.10, 0.670, 1, "ASM" ],
["12.7x54mm" , 300, 100, 0.3394, -0.0014000, 3.81, 0, 0.338, 0.338, 120, 0, 0, 48.60, "B_127x54_Ball" , "10Rnd_127x54_Mag" , 1.050, 1, "ASM" ],
["12.7x54mm" , 300, 100, 0.3394, -0.0014000, 3.81, 0, 0.338, 0.338, 120, 0, 0, 48.60, 12.7, 24.13, 1.050, 1, "ASM" ],
[".408 Chey Tac" , 910, 100, 0.0569, -0.0004800, 3.81, 0, 0.338, 0.338, 120, 0, 0, 27.15, "B_408_Ball" , "7Rnd_408_Mag" , 0.970, 1, "ASM" ],
[".408 Chey Tac" , 910, 100, 0.0569, -0.0004800, 3.81, 0, 0.338, 0.338, 120, 0, 0, 27.15, 10.4, 33.02, 0.970, 1, "ASM" ],
["9.3×64mm" , 870, 100, 0.0619, -0.0007500, 3.81, 0, 0.338, 0.338, 120, 0, 0, 14.90, "B_93x64_Ball" , "10Rnd_93x64_DMR_05_Mag" , 0.368, 1, "ASM" ],
["9.3×64mm" , 870, 100, 0.0619, -0.0007500, 3.81, 0, 0.338, 0.338, 120, 0, 0, 14.90, 9.30, 35.56, 0.368, 1, "ASM" ],
[".338LM 250gr" , 880, 100, 0.0598, -0.0006060, 3.81, 0, 0.338, 0.338, 120, 0, 0, 16.20, "B_338_Ball" , "10Rnd_338_Mag" , 0.322, 7, "ICAO"],
[".338LM 300gr" , 800, 100, 0.0677, -0.0005350, 3.81, 0, 0.338, 0.338, 120, 0, 0, 19.44, "ACE_338_Ball" , "ACE_10Rnd_338_300gr_HPBT_Mag" , 0.381, 7, "ICAO"],
[".338LM API526" , 880, 100, 0.0601, -0.0006730, 3.81, 0, 0.338, 0.338, 120, 0, 0, 16.39, "ACE_338_Ball_API526" , "ACE_10Rnd_338_API526_Mag" , 0.290, 7, "ICAO"],
[".338LM 250gr" , 880, 100, 0.0598, -0.0006060, 3.81, 0, 0.338, 0.338, 120, 0, 0, 16.20, 8.58, 25.40, 0.322, 7, "ICAO"],
[".338LM 300gr" , 800, 100, 0.0677, -0.0005350, 3.81, 0, 0.338, 0.338, 120, 0, 0, 19.44, 8.58, 25.40, 0.381, 7, "ICAO"],
[".338LM API526" , 880, 100, 0.0601, -0.0006730, 3.81, 0, 0.338, 0.338, 120, 0, 0, 16.39, 8.58, 25.40, 0.290, 7, "ICAO"],
[".300WM Mk248 Mod 0", 900, 100, 0.0584, -0.0008300, 3.81, 0, 0.338, 0.338, 120, 0, 0, 13.31, "ACE_762x67_Ball_Mk248_Mod_0" , "ACE_20Rnd_762x67_Mk248_Mod_0_Mag" , 0.268, 7, "ICAO"],
[".300WM Mk248 Mod 1", 867, 100, 0.0611, -0.0008150, 3.81, 0, 0.338, 0.338, 120, 0, 0, 14.26, "ACE_762x67_Ball_Mk248_Mod_1" , "ACE_20Rnd_762x67_Mk248_Mod_1_Mag" , 0.310, 7, "ICAO"],
[".300WM Berger OTM" , 853, 100, 0.0622, -0.0007600, 3.81, 0, 0.338, 0.338, 120, 0, 0, 14.90, "ACE_762x67_Ball_Berger_Hybrid_OTM", "ACE_20Rnd_762x67_Berger_Hybrid_OTM_Mag", 0.368, 7, "ICAO"],
[".300WM Mk248 Mod 0", 900, 100, 0.0584, -0.0008300, 3.81, 0, 0.338, 0.338, 120, 0, 0, 13.31, 7.80, 25.40, 0.268, 7, "ICAO"],
[".300WM Mk248 Mod 1", 867, 100, 0.0611, -0.0008150, 3.81, 0, 0.338, 0.338, 120, 0, 0, 14.26, 7.80, 25.40, 0.310, 7, "ICAO"],
[".300WM Berger OTM" , 853, 100, 0.0622, -0.0007600, 3.81, 0, 0.338, 0.338, 120, 0, 0, 14.90, 7.80, 25.40, 0.368, 7, "ICAO"],
["7.62x54mmR" , 800, 100, 0.0692, -0.0010230, 3.81, 0, 0.338, 0.338, 120, 0, 0, 9.849, "B_762x54_Ball" , "10Rnd_762x54_Mag" , 0.400, 1, "ICAO"],
["7.62x54mmR" , 800, 100, 0.0692, -0.0010230, 3.81, 0, 0.338, 0.338, 120, 0, 0, 9.849, 7.92, 24.13, 0.400, 1, "ICAO"],
["7.62x51mm M80" , 810, 100, 0.0679, -0.0010350, 3.81, 0, 0.338, 0.338, 120, 0, 0, 9.525, "B_762x51_Ball" , "20Rnd_762x51_Mag" , 0.200, 7, "ICAO"],
["7.62x51mm M118LR" , 820, 100, 0.0662, -0.0008525, 3.81, 0, 0.338, 0.338, 120, 0, 0, 11.34, "ACE_762x51_Ball_M118LR" , "ACE_20Rnd_762x51_M118LR_Mag" , 0.243, 7, "ICAO"],
["7.62x51mm Mk319" , 820, 100, 0.0670, -0.0010300, 3.81, 0, 0.338, 0.338, 120, 0, 0, 8.424, "ACE_762x51_Ball_Mk319_Mod_0" , "ACE_20Rnd_762x51_Mk319_Mod_0_Mag" , 0.377, 1, "ICAO"],
["7.62x51mm Subsonic", 320, 100, 0.3060, -0.0004910, 3.81, 0, 0.338, 0.338, 120, 0, 0, 12.96, "ACE_762x51_Ball_Subsonic" , "ACE_20Rnd_762x51_Mag_SD" , 0.235, 7, "ICAO"],
["7.62x51mm M80" , 810, 100, 0.0679, -0.0010350, 3.81, 0, 0.338, 0.338, 120, 0, 0, 9.525, 7.82, 25.40, 0.200, 7, "ICAO"],
["7.62x51mm M118LR" , 820, 100, 0.0662, -0.0008525, 3.81, 0, 0.338, 0.338, 120, 0, 0, 11.34, 7.82, 25.40, 0.243, 7, "ICAO"],
["7.62x51mm Mk319" , 820, 100, 0.0670, -0.0010300, 3.81, 0, 0.338, 0.338, 120, 0, 0, 8.424, 7.82, 25.40, 0.377, 1, "ICAO"],
["7.62x51mm Subsonic", 320, 100, 0.3060, -0.0004910, 3.81, 0, 0.338, 0.338, 120, 0, 0, 12.96, 7.82, 25.40, 0.235, 7, "ICAO"],
["6.5x39mm" , 800, 100, 0.0683, -0.0007850, 3.81, 0, 0.338, 0.338, 120, 0, 0, 7.970, "B_65x39_Caseless" , "30Rnd_65x39_caseless_mag" , 0.263, 7, "ICAO"],
["6.5x47mm Lapua" , 800, 100, 0.0682, -0.0007710, 3.81, 0, 0.338, 0.338, 120, 0, 0, 9.007, "ACE_65x47_Ball_Scenar" , "ACE_30Rnd_65x47_Scenar_mag" , 0.290, 7, "ICAO"],
["6.5x39mm" , 800, 100, 0.0683, -0.0007850, 3.81, 0, 0.338, 0.338, 120, 0, 0, 7.970, 6.71, 22.86, 0.263, 7, "ICAO"],
["6.5x47mm Lapua" , 800, 100, 0.0682, -0.0007710, 3.81, 0, 0.338, 0.338, 120, 0, 0, 9.007, 6.71, 22.86, 0.290, 7, "ICAO"],
["5.56x45mm M855" , 870, 100, 0.0626, -0.0012650, 3.81, 0, 0.338, 0.338, 120, 0, 0, 4.018, "B_556x45_Ball" , "30Rnd_556x45_Stanag" , 0.151, 7, "ASM" ],
["5.56x45mm Mk262" , 820, 100, 0.0671, -0.0011250, 3.81, 0, 0.338, 0.338, 120, 0, 0, 4.990, "ACE_556x45_Ball_Mk262" , "ACE_30Rnd_556x45_Stanag_Mk262_mag" , 0.361, 1, "ASM" ],
["5.56x45mm Mk318" , 880, 100, 0.0616, -0.0011200, 3.81, 0, 0.338, 0.338, 120, 0, 0, 4.018, "ACE_556x45_Ball_Mk318" , "ACE_30Rnd_556x45_Stanag_Mk318_mag" , 0.307, 1, "ASM" ]];
["5.56x45mm M855" , 870, 100, 0.0626, -0.0012650, 3.81, 0, 0.338, 0.338, 120, 0, 0, 4.018, 5.70, 17.78, 0.151, 7, "ASM" ],
["5.56x45mm Mk262" , 820, 100, 0.0671, -0.0011250, 3.81, 0, 0.338, 0.338, 120, 0, 0, 4.990, 5.70, 17.78, 0.361, 1, "ASM" ],
["5.56x45mm Mk318" , 880, 100, 0.0616, -0.0011200, 3.81, 0, 0.338, 0.338, 120, 0, 0, 4.018, 5.70, 17.78, 0.307, 1, "ASM" ]];
[] call FUNC(clear_user_data);
profileNamespace setVariable ["ACE_ATragMX_gunList", GVAR(gunList)];
};
[] call FUNC(init);
[] call FUNC(restore_user_data);
["RangerfinderData", {_this call FUNC(sord)}] call EFUNC(common,addEventHandler);

View File

@ -12,36 +12,55 @@ PREP(calculate_target_speed_assist);
PREP(can_show);
PREP(change_gun);
PREP(change_target_slot);
PREP(clear_user_data);
PREP(create_dialog);
PREP(cycle_gun_list);
PREP(cycle_image_size_units);
PREP(cycle_num_ticks_units);
PREP(cycle_range_card_columns);
PREP(cycle_scope_unit);
PREP(cycle_target_size_units);
PREP(delete_gun);
PREP(init);
PREP(parse_input);
PREP(reset_relative_click_memory);
PREP(restore_atmo_default);
PREP(restore_user_data);
PREP(save_gun);
PREP(show_add_new_gun);
PREP(show_atmo_env_data);
PREP(show_gun_ammo_data);
PREP(show_gun_list);
PREP(show_main_page);
PREP(show_range_card);
PREP(show_range_card_setup);
PREP(show_target_data);
PREP(show_target_range_assist);
PREP(show_target_speed_assist);
PREP(show_target_speed_assist_timer);
PREP(sord);
PREP(store_user_data);
PREP(target_speed_assist_timer);
PREP(toggle_atmo_env_data);
PREP(toggle_gun_ammo_data);
PREP(toggle_gun_list);
PREP(toggle_range_card);
PREP(toggle_range_card_setup);
PREP(toggle_target_data);
PREP(toggle_target_range_assist);
PREP(toggle_target_speed_assist);
PREP(update_atmosphere);
PREP(update_atmo_env_data);
PREP(update_atmo_selection);
PREP(update_gun);
PREP(update_gun_ammo_data);
PREP(update_inclination_angle);
PREP(update_range_card);
PREP(update_relative_click_memory);
PREP(update_result);
PREP(update_scope_unit);
PREP(update_target);
PREP(update_target_data);
PREP(update_target_selection);
PREP(update_unit_selection);
PREP(update_zero_range);

View File

@ -20,43 +20,61 @@
private ["_scopeBaseAngle"];
_scopeBaseAngle = (GVAR(workingMemory) select 3);
private ["_bulletMass", "_boreHeight", "_airFriction", "_muzzleVelocity", "_bc", "_dragModel", "_atmosphereModel"];
private ["_bulletMass", "_bulletDiameter", "_boreHeight", "_airFriction", "_barrelTwist", "_muzzleVelocity", "_bc", "_dragModel", "_atmosphereModel", "_twistDirection"];
_bulletMass = GVAR(workingMemory) select 12;
_bulletDiameter = GVAR(workingMemory) select 13;
_boreHeight = GVAR(workingMemory) select 5;
_airFriction = GVAR(workingMemory) select 4;
_barrelTwist = GVAR(workingMemory) select 14;
_muzzleVelocity = GVAR(workingMemory) select 1;
_bc = GVAR(workingMemory) select 15;
_dragModel = GVAR(workingMemory) select 16;
_atmosphereModel = GVAR(workingMemory) select 17;
private ["_temperature", "_barometricPressure", "_relativeHumidity"];
_twistDirection = 0;
if (_barrelTwist > 0) then {
_twistDirection = 1;
} else {
if (_barrelTwist < 0) then {
_twistDirection = -1;
};
};
_barrelTwist = abs(_barrelTwist);
private ["_altitude", "_temperature", "_barometricPressure", "_relativeHumidity"];
_altitude = GVAR(altitude);
_temperature = GVAR(temperature);
_barometricPressure = GVAR(barometricPressure);
_relativeHumidity = GVAR(relativeHumidity);
if (GVAR(currentUnit) == 1) then
{
_temperature = (_temperature - 32) / 1.8;
_barometricPressure = _barometricPressure * 33.8638866667;
if (!GVAR(atmosphereModeTBH)) then {
_barometricPressure = 1013.25 * exp(-(_altitude) / 7990);
_relativeHumidity = 50;
};
private ["_windSpeed", "_windDirection", "_inclinationAngle", "_targetSpeed", "_targetRange"];
_windSpeed = (GVAR(windSpeed) select GVAR(currentTarget));
private ["_bulletLength", "_stabilityFactor"];
_bulletLength = 1.8;
_stabilityFactor = 1.5;
if ((missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) && (missionNamespace getVariable [QEGVAR(advanced_ballistics,SpinDriftEnabled), false])) then {
if (_bulletDiameter > 0 && _bulletLength > 0 && _bulletMass > 0 && _barrelTwist > 0) then {
_stabilityFactor = [_bulletDiameter / 10 / 2.54, _bulletLength, _bulletMass * 15.4323584, _barrelTwist / 2.54, _muzzleVelocity, _temperature, _barometricPressure] call EFUNC(advanced_ballistics,calculateStabilityFactor);
};
};
private ["_latitude", "_directionOfFire", "_windSpeed1", "_windSpeed2", "_windDirection", "_inclinationAngle", "_targetSpeed", "_targetRange"];
_latitude = GVAR(latitude) select GVAR(currentTarget);
_directionOfFire = GVAR(directionOfFire) select GVAR(currentTarget);
_windSpeed1 = (GVAR(windSpeed1) select GVAR(currentTarget));
_windSpeed2 = (GVAR(windSpeed2) 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
{
if (GVAR(currentUnit) == 1) then {
_targetRange = _targetRange / 1.0936133;
};
if (GVAR(currentUnit) == 1) then
{
_windSpeed = _windSpeed / 2.23693629;
_targetSpeed = _targetSpeed / 2.23693629;
};
GVAR(rangeCardData) = [];
private ["_result"];
_result = [_scopeBaseAngle, _bulletMass, _boreHeight, _airFriction, _muzzleVelocity, _temperature, _barometricPressure, _relativeHumidity, 1000,
_windSpeed, _windDirection, _inclinationAngle, _targetSpeed, _targetRange, _bc, _dragModel, _atmosphereModel, true] call FUNC(calculate_solution);
[_windSpeed1, _windSpeed2], _windDirection, _inclinationAngle, _targetSpeed, _targetRange, _bc, _dragModel, _atmosphereModel, true, _stabilityFactor, _twistDirection, _latitude] call FUNC(calculate_solution);

View File

@ -35,6 +35,6 @@ _barometricPressure = 1013.25;
_relativeHumidity = 0;
private ["_result"];
_result = [_scopeBaseAngle, _bulletMass, _boreHeight, _airFriction, _muzzleVelocity, _temperature, _barometricPressure, _relativeHumidity, 1000, 0, 0, 0, 0, _zeroRange, _airFriction, 1, "ICAO", false] call FUNC(calculate_solution);
_result = [_scopeBaseAngle, _bulletMass, _boreHeight, _airFriction, _muzzleVelocity, _temperature, _barometricPressure, _relativeHumidity, 1000, [0, 0], 0, 0, 0, _zeroRange, _airFriction, 1, "ICAO", false, 1.5, 0, 0] call FUNC(calculate_solution);
_scopeBaseAngle + (_result select 0) / 60

View File

@ -12,7 +12,7 @@
* 6: barometric pressure <NUMBER>
* 7: relative humidity <NUMBER>
* 8: simulation steps <NUMBER>
* 9: wind speed <NUMBER>
* 9: wind speed <ARRAY>
* 10: wind direction <NUMBER>
* 11: inclination angle <NUMBER>
* 12: target speed <NUMBER>
@ -21,14 +21,20 @@
* 15: drag model <NUMBER>
* 16: atmosphere model <STRING>
* 17: Store range card data? <BOOL>
* 18: Stability factor <NUMBER>
* 19: Twist Direction <NUMBER>
* 20: Latitude <NUMBER>
*
* Return Value:
* 0: Elevation <NUMBER>
* 1: Windage <NUMBER>
* 2: Lead <NUMBER>
* 3: Time of fligth <NUMBER>
* 4: Remaining velocity <NUMBER>
* 4: Remaining kinetic energy <NUMBER>
* 0: Elevation (MOA) <NUMBER>
* 1: Windage (MOA) <ARRAY>
* 2: Lead (MOA) <NUMBER>
* 3: Time of fligth (SECONDS) <NUMBER>
* 4: Remaining velocity (m/s) <NUMBER>
* 5: Remaining kinetic energy (ft·lb) <NUMBER>
* 6: Vertical coriolis drift (MOA) <NUMBER>
* 7: Horizontal coriolis drift (MOA) <NUMBER>
* 8: Spin drift (MOA) <NUMBER>
*
* Example:
* call ace_atragmx_calculate_target_range_assist
@ -37,7 +43,7 @@
*/
#include "script_component.hpp"
private ["_scopeBaseAngle", "_bulletMass", "_boreHeight", "_airFriction", "_muzzleVelocity", "_temperature", "_barometricPressure", "_relativeHumidity", "_simSteps", "_windSpeed", "_windDirection", "_inclinationAngle", "_targetSpeed", "_targetRange", "_bc", "_dragModel", "_atmosphereModel", "_storeRangeCardData"];
private ["_scopeBaseAngle", "_bulletMass", "_boreHeight", "_airFriction", "_muzzleVelocity", "_temperature", "_barometricPressure", "_relativeHumidity", "_simSteps", "_windSpeed1", "_windSpeed2", "_windDirection", "_inclinationAngle", "_targetSpeed", "_targetRange", "_bc", "_dragModel", "_atmosphereModel", "_storeRangeCardData", "_stabilityFactor", "_twistDirection", "_latitude"];
_scopeBaseAngle = _this select 0;
_bulletMass = _this select 1;
_boreHeight = _this select 2;
@ -47,7 +53,8 @@ _temperature = _this select 5;
_barometricPressure = _this select 6;
_relativeHumidity = _this select 7;
_simSteps = _this select 8;
_windSpeed = _this select 9;
_windSpeed1 = (_this select 9) select 0;
_windSpeed2 = (_this select 9) select 1;
_windDirection = _this select 10;
_inclinationAngle = _this select 11;
_targetSpeed = _this select 12;
@ -56,6 +63,9 @@ _bc = _this select 14;
_dragModel = _this select 15;
_atmosphereModel = _this select 16;
_storeRangeCardData = _this select 17;
_stabilityFactor = _this select 18;
_twistDirection = _this select 19;
_latitude = _this select 20;
private ["_bulletPos", "_bulletVelocity", "_bulletAccel", "_bulletSpeed", "_gravity", "_deltaT"];
_bulletPos = [0, 0, 0];
@ -65,31 +75,45 @@ _bulletSpeed = 0;
_gravity = [0, sin(_scopeBaseAngle + _inclinationAngle) * -9.80665, cos(_scopeBaseAngle + _inclinationAngle) * -9.80665];
_deltaT = 1 / _simSteps;
private ["_elevation", "_windage", "_lead", "_TOF", "_trueVelocity", "_trueSpeed", "_kineticEnergy"];
private ["_elevation", "_windage1", "_windage2", "_lead", "_TOF", "_trueVelocity", "_trueSpeed", "_kineticEnergy", "_verticalCoriolis", "_verticalDeflection", "_horizontalCoriolis", "_horizontalDeflection", "_spinDrift", "_spinDeflection"];
_elevation = 0;
_windage = 0;
_windage1 = 0;
_windage2 = 0;
_lead = 0;
_TOF = 0;
_trueVelocity = [0, 0, 0];
_trueSpeed = 0;
_verticalCoriolis = 0;
_verticalDeflection = 0;
_horizontalCoriolis = 0;
_horizontalDeflection = 0;
_spinDrift = 0;
_spinDeflection = 0;
private ["_n", "_range", "_rangeFactor"];
_n = 0;
_range = 0;
_rangeFactor = 1;
if (_storeRangeCardData) then {
if (GVAR(currentUnit) != 2) then {
if (GVAR(currentUnit) == 1) then {
_rangeFactor = 1.0936133;
};
GVAR(rangeCardData) = [];
};
private ["_wind"];
_wind = [cos(270 - _windDirection * 30) * _windSpeed, sin(270 - _windDirection * 30) * _windSpeed, 0];
private ["_wind1", "_wind2", "_windDrift"];
_wind1 = [cos(270 - _windDirection * 30) * _windSpeed1, sin(270 - _windDirection * 30) * _windSpeed1, 0];
_wind2 = [cos(270 - _windDirection * 30) * _windSpeed2, sin(270 - _windDirection * 30) * _windSpeed2, 0];
_windDrift = 0;
if ((missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) && (missionNamespace getVariable [QEGVAR(advanced_ballistics,AdvancedAirDragEnabled), false])) then {
_bc = [_bc, _temperature, _barometricPressure, _relativeHumidity, _atmosphereModel] call EFUNC(advanced_ballistics,calculateAtmosphericCorrection);
};
private ["_speedTotal", "_stepsTotal", "_speedAverage"];
_speedTotal = 0;
_stepsTotal = 0;
_speedAverage = 0;
_TOF = 0;
_bulletPos set [0, 0];
@ -103,7 +127,11 @@ _bulletVelocity set [2, Sin(_scopeBaseAngle) * _muzzleVelocity];
while {_TOF < 15 && (_bulletPos select 1) < _targetRange} do {
_bulletSpeed = vectorMagnitude _bulletVelocity;
_trueVelocity = _bulletVelocity vectorDiff _wind;
_speedTotal = _speedTotal + _bulletSpeed;
_stepsTotal = _stepsTotal + 1;
_speedAverage = (_speedTotal / _stepsTotal);
_trueVelocity = _bulletVelocity vectorDiff _wind1;
_trueSpeed = vectorMagnitude _trueVelocity;
if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then {
@ -132,7 +160,9 @@ while {_TOF < 15 && (_bulletPos select 1) < _targetRange} do {
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));
_windage1 = - atan((_bulletPos select 0) / (_bulletPos select 1));
_windDrift = (_wind2 select 0) * (_TOF - (_range / _rangeFactor) / _muzzleVelocity);
_windage2 = - atan(_windDrift / (_bulletPos select 1));
};
if (_range != 0) then {
_lead = (_targetSpeed * _TOF) / (Tan(3.38 / 60) * _range);
@ -140,7 +170,24 @@ while {_TOF < 15 && (_bulletPos select 1) < _targetRange} do {
_kineticEnergy = 0.5 * (_bulletMass / 1000 * (_bulletSpeed ^ 2));
_kineticEnergy = _kineticEnergy * 0.737562149;
GVAR(rangeCardData) set [_n, [_range, _elevation * 60, _windage * 60, _lead, _TOF, _bulletSpeed, _kineticEnergy]];
if ((missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) && (missionNamespace getVariable [QEGVAR(advanced_ballistics,CoriolisEnabled), false])) then {
if ((_bulletPos select 1) > 0) then {
_horizontalDeflection = 0.0000729 * ((_bulletPos select 1) ^ 2) * sin(_latitude) / _speedAverage;
_horizontalCoriolis = - atan(_horizontalDeflection / (_bulletPos select 1));
_windage1 = _windage1 + _horizontalCoriolis;
_windage2 = _windage2 + _horizontalCoriolis;
};
};
if ((missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) && (missionNamespace getVariable [QEGVAR(advanced_ballistics,SpinDriftEnabled), false])) then {
if ((_bulletPos select 1) > 0) then {
_spinDeflection = _twistDirection * 0.0254 * 1.25 * (_stabilityFactor + 1.2) * _TOF ^ 1.83;
_spinDrift = - atan(_spinDeflection / (_bulletPos select 1));
_windage1 = _windage1 + _spinDrift;
_windage2 = _windage2 + _spinDrift;
};
};
GVAR(rangeCardData) set [_n, [_range, _elevation * 60, [_windage1 * 60, _windage2 * 60], _lead, _TOF, _bulletSpeed, _kineticEnergy]];
_n = _n + 1;
};
};
@ -148,7 +195,9 @@ while {_TOF < 15 && (_bulletPos select 1) < _targetRange} do {
if ((_bulletPos select 1) > 0) then {
_elevation = - atan((_bulletPos select 2) / (_bulletPos select 1));
_windage = - atan((_bulletPos select 0) / (_bulletPos select 1));
_windage1 = - atan((_bulletPos select 0) / (_bulletPos select 1));
_windDrift = (_wind2 select 0) * (_TOF - _targetRange / _muzzleVelocity);
_windage2 = - atan(_windDrift / (_bulletPos select 1));
};
if (_targetRange != 0) then {
@ -158,4 +207,21 @@ if (_targetRange != 0) then {
_kineticEnergy = 0.5 * (_bulletMass / 1000 * (_bulletSpeed ^ 2));
_kineticEnergy = _kineticEnergy * 0.737562149;
[_elevation * 60, _windage * 60, _lead, _TOF, _bulletSpeed, _kineticEnergy]
if ((missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) && (missionNamespace getVariable [QEGVAR(advanced_ballistics,CoriolisEnabled), false])) then {
if ((_bulletPos select 1) > 0) then {
_horizontalDeflection = 0.0000729 * ((_bulletPos select 1) ^ 2) * sin(_latitude) / _speedAverage;
_horizontalCoriolis = - atan(_horizontalDeflection / (_bulletPos select 1));
_windage1 = _windage1 + _horizontalCoriolis;
_windage2 = _windage2 + _horizontalCoriolis;
};
};
if ((missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) && (missionNamespace getVariable [QEGVAR(advanced_ballistics,SpinDriftEnabled), false])) then {
if ((_bulletPos select 1) > 0) then {
_spinDeflection = _twistDirection * 0.0254 * 1.25 * (_stabilityFactor + 1.2) * _TOF ^ 1.83;
_spinDrift = - atan(_spinDeflection / (_bulletPos select 1));
_windage1 = _windage1 + _spinDrift;
_windage2 = _windage2 + _spinDrift;
};
};
[_elevation * 60, [_windage1 * 60, _windage2 * 60], _lead, _TOF, _bulletSpeed, _kineticEnergy, _verticalCoriolis * 60, _horizontalCoriolis * 60, _spinDrift * 60]

View File

@ -46,7 +46,7 @@ switch (GVAR(rangeAssistImageSizeUnit)) do {
};
};
_estRange = parseNumber(ctrlText 7013);
if (GVAR(currentUnit) != 2) then {
if (GVAR(currentUnit) == 1) then {
_estRange = _estRange / 1.0936133;
};

View File

@ -20,47 +20,63 @@
private ["_scopeBaseAngle"];
_scopeBaseAngle = (GVAR(workingMemory) select 3);
private ["_bulletMass", "_boreHeight", "_airFriction", "_muzzleVelocity", "_bc", "_dragModel", "_atmosphereModel"];
private ["_bulletMass", "_bulletDiameter", "_boreHeight", "_airFriction", "_barrelTwist", "_muzzleVelocity", "_bc", "_dragModel", "_atmosphereModel", "_twistDirection"];
_bulletMass = GVAR(workingMemory) select 12;
_bulletDiameter = GVAR(workingMemory) select 13;
_boreHeight = GVAR(workingMemory) select 5;
_airFriction = GVAR(workingMemory) select 4;
_barrelTwist = GVAR(workingMemory) select 14;
_muzzleVelocity = GVAR(workingMemory) select 1;
_bc = GVAR(workingMemory) select 15;
_dragModel = GVAR(workingMemory) select 16;
_atmosphereModel = GVAR(workingMemory) select 17;
private ["_temperature", "_barometricPressure", "_relativeHumidity"];
_twistDirection = 0;
if (_barrelTwist > 0) then {
_twistDirection = 1;
} else {
if (_barrelTwist < 0) then {
_twistDirection = -1;
};
};
_barrelTwist = abs(_barrelTwist);
private ["_altitude", "_temperature", "_barometricPressure", "_relativeHumidity"];
_altitude = GVAR(altitude);
_temperature = GVAR(temperature);
_barometricPressure = GVAR(barometricPressure);
_relativeHumidity = GVAR(relativeHumidity);
if (GVAR(currentUnit) == 1) then
{
_temperature = (_temperature - 32) / 1.8;
_barometricPressure = _barometricPressure * 33.8638866667;
if (!GVAR(atmosphereModeTBH)) then {
_barometricPressure = 1013.25 * exp(-(_altitude) / 7990);
_relativeHumidity = 50;
};
private ["_windSpeed", "_windDirection", "_inclinationAngle", "_targetSpeed", "_targetRange"];
_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(currentUnit) == 1) then
{
_windSpeed = _windSpeed / 2.23693629;
_targetSpeed = _targetSpeed / 2.23693629;
private ["_bulletLength", "_stabilityFactor"];
_bulletLength = 1.8;
_stabilityFactor = 1.5;
if ((missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) && (missionNamespace getVariable [QEGVAR(advanced_ballistics,SpinDriftEnabled), false])) then {
if (_bulletDiameter > 0 && _bulletLength > 0 && _bulletMass > 0 && _barrelTwist > 0) then {
_stabilityFactor = [_bulletDiameter / 10 / 2.54, _bulletLength, _bulletMass * 15.4323584, _barrelTwist / 2.54, _muzzleVelocity, _temperature, _barometricPressure] call EFUNC(advanced_ballistics,calculateStabilityFactor);
};
};
private ["_latitude", "_directionOfFire", "_windSpeed1", "_windSpeed2", "_windDirection", "_inclinationAngle", "_targetSpeed", "_targetRange"];
_latitude = GVAR(latitude) select GVAR(currentTarget);
_directionOfFire = GVAR(directionOfFire) select GVAR(currentTarget);
_windSpeed1 = GVAR(windSpeed1) select GVAR(currentTarget);
_windSpeed2 = GVAR(windSpeed2) 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);
private ["_result"];
_result = [_scopeBaseAngle, _bulletMass, _boreHeight, _airFriction, _muzzleVelocity, _temperature, _barometricPressure, _relativeHumidity, 1000,
_windSpeed, _windDirection, _inclinationAngle, _targetSpeed, _targetRange, _bc, _dragModel, _atmosphereModel, false] call FUNC(calculate_solution);
[_windSpeed1, _windSpeed2], _windDirection, _inclinationAngle, _targetSpeed, _targetRange, _bc, _dragModel, _atmosphereModel, false, _stabilityFactor, _twistDirection, _latitude] call FUNC(calculate_solution);
GVAR(elevationOutput) set [GVAR(currentTarget), _result select 0];
GVAR(windageOutput) set [GVAR(currentTarget), _result select 1];
GVAR(windage1Output) set [GVAR(currentTarget), (_result select 1) select 0];
GVAR(windage2Output) set [GVAR(currentTarget), (_result select 1) 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];

View File

@ -22,34 +22,27 @@ _numTicks = parseNumber(ctrlText 8005);
_timeSecs = parseNumber(ctrlText 8006);
_estSpeed = 0;
if (GVAR(currentUnit) != 2) then
{
if (GVAR(currentUnit) == 1) then {
_targetRange = _targetRange / 1.0936133;
};
switch (GVAR(rangeAssistImageSizeUnit)) do
{
case 0:
{
switch (GVAR(rangeAssistImageSizeUnit)) do {
case 0: {
_numTicks = _numTicks / 6400 * 360;
};
case 1:
{
case 1: {
_numTicks = _numTicks / 60;
};
case 2:
{
case 2: {
_numTicks = _numTicks / 60 / 1.047;
};
};
if (_timeSecs > 0) then
{
if (_timeSecs > 0) then {
_estSpeed = tan(_numTicks) * _targetRange / _timeSecs;
};
if (GVAR(currentUnit) == 1) then
{
if (GVAR(currentUnit) != 2) then {
_estSpeed = _estSpeed * 2.23693629;
};

View File

@ -4,6 +4,7 @@
*
* Arguments:
* gunID <number>
* update solution <BOOL>
*
* Return Value:
* Nothing
@ -15,24 +16,31 @@
*/
#include "script_component.hpp"
if (_this < 0 || _this > (count GVAR(gunList)) - 1) exitWith {};
private ["_gunID", "_updateSolution"];
_gunID = _this select 0;
_updateSolution = _this select 1;
GVAR(workingMemory) = +(GVAR(gunList) select _this);
GVAR(currentGun) = _this;
if (_gunID < 0 || _gunID > (count GVAR(gunList)) - 1) exitWith {};
GVAR(workingMemory) = +(GVAR(gunList) select _gunID);
GVAR(currentGun) = _gunID;
lbSetCurSel [6000, GVAR(currentGun)];
if ((GVAR(scopeUnits) select GVAR(currentScopeUnit)) != "Clicks") then
{
if ((GVAR(scopeUnits) select GVAR(currentScopeUnit)) != "Clicks") then {
GVAR(currentScopeUnit) = GVAR(workingMemory) select 6;
};
[] call FUNC(update_gun);
[] call FUNC(update_gun_ammo_data);
GVAR(elevationOutput) set [GVAR(currentTarget), 0];
GVAR(windageOutput) set [GVAR(currentTarget), 0];
GVAR(windage1Output) set [GVAR(currentTarget), 0];
GVAR(windage2Output) set [GVAR(currentTarget), 0];
GVAR(leadOutput) set [GVAR(currentTarget), 0];
GVAR(tofOutput) set [GVAR(currentTarget), 0];
GVAR(velocityOutput) set [GVAR(currentTarget), 0];
[] call FUNC(calculate_target_solution);
if (_updateSolution) then {
[] call FUNC(calculate_target_solution);
};

View File

@ -23,4 +23,4 @@ call FUNC(parse_input);
GVAR(currentTarget) = _target;
call FUNC(update_target_selection);
call FUNC(calculate_target_solution);
[] call FUNC(calculate_target_solution);

View File

@ -0,0 +1,39 @@
/*
* Author: Ruthberg
* Removes all user data from the profileNamespace
*
* Arguments:
* Nothing
*
* Return Value:
* Nothing
*
* Example:
* call ace_atragmx_fnc_clear_user_data
*
* Public: No
*/
#include "script_component.hpp"
profileNamespace setVariable ["ACE_ATragMX_gunList", nil];
profileNamespace setVariable ["ACE_ATragMX_currentUnit", nil];
profileNamespace setVariable ["ACE_ATragMX_currentGun", nil];
profileNamespace setVariable ["ACE_ATragMX_currentTarget", nil];
profileNamespace setVariable ["ACE_ATragMX_currentScopeUnit", nil];
profileNamespace setVariable ["ACE_ATragMX_atmosphereModeTBH", nil];
profileNamespace setVariable ["ACE_ATragMX_altitude", nil];
profileNamespace setVariable ["ACE_ATragMX_temperature", nil];
profileNamespace setVariable ["ACE_ATragMX_barometricPressure", nil];
profileNamespace setVariable ["ACE_ATragMX_relativeHumidity", nil];
profileNamespace setVariable ["ACE_ATragMX_showWind2", nil];
profileNamespace setVariable ["latitude", nil];
profileNamespace setVariable ["directionOfFire", nil];
profileNamespace setVariable ["ACE_ATragMX_windSpeed1", nil];
profileNamespace setVariable ["ACE_ATragMX_windSpeed2", nil];
profileNamespace setVariable ["ACE_ATragMX_windDirection", nil];
profileNamespace setVariable ["ACE_ATragMX_inclinationAngle", nil];
profileNamespace setVariable ["ACE_ATragMX_targetSpeed", nil];
profileNamespace setVariable ["ACE_ATragMX_targetRange", nil];

View File

@ -26,13 +26,16 @@ call FUNC(update_target_selection);
GVAR(showMainPage) call FUNC(show_main_page);
GVAR(showAddNewGun) call FUNC(show_add_new_gun);
GVAR(showAtmoEnvData) call FUNC(show_atmo_env_data);
GVAR(showGunAmmoData) call FUNC(show_gun_ammo_data);
GVAR(showGunList) call FUNC(show_gun_list);
GVAR(showRangeCard) call FUNC(show_range_card);
if (GVAR(showRangeCard)) then {
ctrlSetFocus (__DSP displayCtrl 5001);
ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 5001);
[] call FUNC(update_range_card);
};
GVAR(showRangeCardSetup) call FUNC(show_range_card_setup);
GVAR(showTargetData) call FUNC(show_target_data);
GVAR(showTargetRangeAssist) call FUNC(show_target_range_assist);
GVAR(showTargetSpeedAssist) call FUNC(show_target_speed_assist);
GVAR(showTargetSpeedAssistTimer) call FUNC(show_target_speed_assist_timer);

View File

@ -0,0 +1,18 @@
/*
* Author: Ruthberg
* Cycles through the gun list
*
* Arguments:
* step <NUMBER>
*
* Return Value:
* Nothing
*
* Example:
* call ace_atragmx_cycle_scope_unit
*
* Public: No
*/
#include "script_component.hpp"
[(GVAR(currentGun) + (count GVAR(gunList)) + _this) % (count GVAR(gunList)), true] call FUNC(change_gun);

View File

@ -0,0 +1,19 @@
/*
* Author: Ruthberg
* Cycles through the image size units
*
* Arguments:
* step <NUMBER>
*
* Return Value:
* Nothing
*
* Example:
* call ace_atragmx_cycle_image_size_units
*
* Public: No
*/
#include "script_component.hpp"
GVAR(rangeAssistImageSizeUnit) = (GVAR(rangeAssistImageSizeUnit) + 1) % (count GVAR(rangeAssistImageSizeUnits));
ctrlSetText [7015, GVAR(rangeAssistImageSizeUnits) select GVAR(rangeAssistImageSizeUnit)];

View File

@ -0,0 +1,20 @@
/*
* Author: Ruthberg
* Cycles through the num ticks units
*
* Arguments:
* step <NUMBER>
*
* Return Value:
* Nothing
*
* Example:
* call ace_atragmx_cycle_num_ticks_units
*
* Public: No
*/
#include "script_component.hpp"
GVAR(speedAssistNumTicksUnit) = (GVAR(speedAssistNumTicksUnit) + 1) % (count GVAR(speedAssistNumTicksUnits));
ctrlSetText [8009, GVAR(speedAssistNumTicksUnits) select GVAR(speedAssistNumTicksUnit)];
call FUNC(calculate_target_speed_assist);

View File

@ -0,0 +1,19 @@
/*
* Author: Ruthberg
* Cycles through the target size units
*
* Arguments:
* step <NUMBER>
*
* Return Value:
* Nothing
*
* Example:
* call ace_atragmx_cycle_target_size_units
*
* Public: No
*/
#include "script_component.hpp"
GVAR(rangeAssistTargetSizeUnit) = (GVAR(rangeAssistTargetSizeUnit) + 1) % (count GVAR(rangeAssistTargetSizeUnits));
ctrlSetText [7014, GVAR(rangeAssistTargetSizeUnits) select GVAR(rangeAssistTargetSizeUnit)];

View File

@ -20,10 +20,8 @@ _index = lbCurSel 6000;
if (_index == -1) exitWith {};
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];
};
if (GVAR(currentGun) > _index) then {
GVAR(currentGun) = GVAR(currentGun) - 1;
};
GVAR(gunList) set [_index, 0];

View File

@ -9,7 +9,7 @@
* Nothing
*
* Example:
* call ace_atragmx_init
* call ace_atragmx_fnc_init
*
* Public: No
*/
@ -26,7 +26,7 @@ GVAR(rangeCardLastColumns) = ["Lead", "RemV", "RemE", "TmFlt"];
GVAR(rangeCardCurrentColumn) = 3;
GVAR(rangeCardData) = [];
GVAR(GVAR(rangeAssistTargetSizeUnit)s) = ["in", "ft", "cm", "m"];
GVAR(rangeAssistTargetSizeUnits) = ["in", "ft", "cm", "m"];
GVAR(rangeAssistTargetSizeUnit) = 2;
GVAR(rangeAssistImageSizeUnits) = ["MIL", "TMOA", "IOA"];
GVAR(rangeAssistImageSizeUnit) = 0;
@ -41,28 +41,37 @@ GVAR(currentGun) = 0;
GVAR(currentTarget) = 0;
GVAR(currentScopeUnit) = 0;
GVAR(atmosphereModeTBH) = true;
GVAR(altitude) = 0;
GVAR(temperature) = 15;
GVAR(barometricPressure) = 1013.25;
GVAR(relativeHumidity) = 0.5;
GVAR(windSpeed) = [0, 0, 0, 0];
GVAR(latitude) = [38, 38, 38, 38];
GVAR(directionOfFire) = [0, 0, 0, 0];
GVAR(windSpeed1) = [0, 0, 0, 0];
GVAR(windSpeed2) = [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(showWind2) = false;
GVAR(elevationOutput) = [0, 0, 0, 0];
GVAR(windageOutput) = [0, 0, 0, 0];
GVAR(windage1Output) = [0, 0, 0, 0];
GVAR(windage2Output) = [0, 0, 0, 0];
GVAR(leadOutput) = [0, 0, 0, 0];
GVAR(tofOutput) = [0, 0, 0, 0];
GVAR(velocityOutput) = [0, 0, 0, 0];
GVAR(showMainPage) = true;
GVAR(showAddNewGun) = false;
GVAR(showAtmoEnvData) = false;
GVAR(showGunAmmoData) = false;
GVAR(showGunList) = false;
GVAR(showRangeCard) = false;
GVAR(showRangeCardSetup) = false;
GVAR(showTargetData) = false;
GVAR(showTargetRangeAssist) = false;
GVAR(showTargetSpeedAssist) = false;
GVAR(showTargetSpeedAssistTimer) = false;

View File

@ -15,64 +15,95 @@
*/
#include "script_component.hpp"
GVAR(temperature) = parseNumber(ctrlText 200);
GVAR(barometricPressure) = 0 max parseNumber(ctrlText 210);
GVAR(relativeHumidity) = (0 max parseNumber(ctrlText 220) min 100) / 100;
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);
_bulletMass = parseNumber(ctrlText 110);
if ((missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) && (missionNamespace getVariable [QEGVAR(advanced_ballistics,AdvancedAirDragEnabled), false])) then {
_airFriction = 0.1 max parseNumber(ctrlText 120) min 2;
} else {
_airFriction = parseNumber(ctrlText 120) / -1000;
GVAR(altitude) = -1000 max parseNumber(ctrlText 130030) min 20000;
GVAR(temperature) = -50 max parseNumber(ctrlText 130040) min 160;
GVAR(barometricPressure) = 0 max parseNumber(ctrlText 130050) min 1350;
GVAR(relativeHumidity) = (0 max parseNumber(ctrlText 130060) min 100) / 100;
if (GVAR(currentUnit) == 1) then {
GVAR(altitude) = GVAR(altitude) * 0.3048;
GVAR(temperature) = (GVAR(temperature) - 32) / 1.8;
GVAR(barometricPressure) = GVAR(barometricPressure) * 33.86389;
};
_muzzleVelocity = parseNumber(ctrlText 130);
if (GVAR(currentUnit) == 1) then
{
private ["_inclinationAngleCosine", "_inclinationAngleDegree"];
GVAR(latitude) set [GVAR(currentTarget), -90 max Round(parseNumber(ctrlText 140000)) min 90];
GVAR(directionOfFire) set [GVAR(currentTarget), 0 max abs(Round(parseNumber(ctrlText 140010))) min 359];
GVAR(windSpeed1) set [GVAR(currentTarget), 0 max abs(parseNumber(ctrlText 140020)) min 50];
GVAR(windSpeed2) set [GVAR(currentTarget), 0 max abs(parseNumber(ctrlText 140021)) min 50];
GVAR(windDirection) set [GVAR(currentTarget), 1 max Round(parseNumber(ctrlText 140030)) min 12];
_inclinationAngleCosine = 0.5 max parseNumber(ctrlText 140041) min 1;
_inclinationAngleDegree = -60 max parseNumber(ctrlText 140040) min 60;
if (_inclinationAngleDegree != GVAR(inclinationAngle) select GVAR(currentTarget)) then {
GVAR(inclinationAngle) set [GVAR(currentTarget), _inclinationAngleDegree];
} else {
if (_inclinationAngleCosine != Round(cos(GVAR(inclinationAngle) select GVAR(currentTarget)) * 100) / 100) then {
GVAR(inclinationAngle) set [GVAR(currentTarget), acos(_inclinationAngleCosine)];
};
};
GVAR(targetSpeed) set [GVAR(currentTarget), -50 max abs(parseNumber(ctrlText 140050)) min 50];
GVAR(targetRange) set [GVAR(currentTarget), 0 max abs(parseNumber(ctrlText 140060)) min 4000];
if (GVAR(currentUnit) != 2) then {
GVAR(windSpeed1) set [GVAR(currentTarget), (GVAR(windSpeed1) select GVAR(currentTarget)) * 0.44704];
GVAR(windSpeed2) set [GVAR(currentTarget), (GVAR(windSpeed2) select GVAR(currentTarget)) * 0.44704];
GVAR(targetSpeed) set [GVAR(currentTarget), (GVAR(targetSpeed) select GVAR(currentTarget)) * 0.44704];
};
if (GVAR(currentUnit) == 1) then {
GVAR(targetRange) set [GVAR(currentTarget), (GVAR(targetRange) select GVAR(currentTarget)) * 0.9144];
};
private ["_boreHeight", "_bulletMass", "_bulletDiameter", "_airFriction", "_rifleTwist", "_muzzleVelocity", "_zeroRange"];
_boreHeight = parseNumber(ctrlText 120000);
_bulletMass = parseNumber(ctrlText 120010);
_bulletDiameter = parseNumber(ctrlText 120020);
if ((missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) && (missionNamespace getVariable [QEGVAR(advanced_ballistics,AdvancedAirDragEnabled), false])) then {
_airFriction = 0.1 max parseNumber(ctrlText 120030) min 2;
} else {
_airFriction = parseNumber(ctrlText 120030) / -1000;
};
_rifleTwist = parseNumber(ctrlText 120040);
_muzzleVelocity = parseNumber(ctrlText 120050);
_zeroRange = parseNumber (ctrlText 120060);
if (GVAR(currentUnit) != 2) then {
_boreHeight = _boreHeight * 2.54;
_bulletMass = _bulletMass * 0.06479891;
_bulletDiameter = _bulletDiameter * 10 * 2.54;
_rifleTwist = _rifleTwist * 2.54;
_muzzleVelocity = _muzzleVelocity / 3.2808399;
};
if (GVAR(currentUnit) == 1) then {
_zeroRange = _zeroRange / 1.0936133;
};
_boreHeight = 0.1 max _boreHeight min 10;
_bulletMass = 1 max _bulletMass min 100;
_bulletDiameter = 1 max _bulletDiameter min 25;
_muzzleVelocity = 100 max _muzzleVelocity min 1400;
_zeroRange = 0 max _zeroRange min 1000;
GVAR(workingMemory) set [5, _boreHeight];
GVAR(workingMemory) set [12, _bulletMass];
GVAR(workingMemory) set [13, _bulletDiameter];
GVAR(workingMemory) set [14, _rifleTwist];
if ((missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) && (missionNamespace getVariable [QEGVAR(advanced_ballistics,AdvancedAirDragEnabled), false])) then {
GVAR(workingMemory) set [15, _airFriction];
} else {
GVAR(workingMemory) set [4, _airFriction];
};
GVAR(workingMemory) set [1, _muzzleVelocity];
GVAR(workingMemory) set [2, _zeroRange];
private ["_elevationCur", "_windageCur", "_elevationScopeStep", "_windageScopeStep"];
_elevationCur = parseNumber(ctrlText 402);
_windageCur = parseNumber(ctrlText 412);
switch (GVAR(currentScopeUnit)) do
{
case 0:
{
switch (GVAR(currentScopeUnit)) do {
case 0: {
_elevationCur = _elevationCur * 3.38;
_windageCur = _windageCur * 3.38;
};
case 2:
{
case 2: {
_elevationCur = _elevationCur / 1.047;
_windageCur = _windageCur / 1.047;
};
case 3:
{
case 3: {
_elevationScopeStep = (GVAR(workingMemory) select 7);
_windageScopeStep = (GVAR(workingMemory) select 8);
@ -85,5 +116,10 @@ GVAR(workingMemory) set [10, _elevationCur];
GVAR(workingMemory) set [11, _windageCur];
[] call FUNC(update_gun);
[] call FUNC(update_gun_ammo_data);
[] call FUNC(update_atmosphere);
[] call FUNC(update_atmo_env_data);
[] call FUNC(update_target);
[] call FUNC(update_target_data);
[] call FUNC(store_user_data);

View File

@ -0,0 +1,25 @@
/*
* Author: Ruthberg
* Restores the atmospheric data defaults
*
* Arguments:
* Nothing
*
* Return Value:
* Nothing
*
* Example:
* call ace_atragmx_fnc_restore_atmo_default
*
* Public: No
*/
#include "script_component.hpp"
GVAR(atmosphereModeTBH) = true;
GVAR(altitude) = 0;
GVAR(temperature) = 15;
GVAR(barometricPressure) = 1013.25;
GVAR(relativeHumidity) = 0.5;
[] call FUNC(update_atmo_selection);
[] call FUNC(update_atmosphere);

View File

@ -0,0 +1,37 @@
/*
* Author: Ruthberg
* Reads user data from profileNamespace
*
* Arguments:
* Nothing
*
* Return Value:
* Nothing
*
* Example:
* call ace_atragmx_fnc_restore_user_data
*
* Public: No
*/
#include "script_component.hpp"
GVAR(currentUnit) = 0 max (profileNamespace getVariable ["ACE_ATragMX_currentUnit", 2]) min 2;
[profileNamespace getVariable ["ACE_ATragMX_currentGun", 0], false] call FUNC(change_gun);
GVAR(currentTarget) = 0 max (profileNamespace getVariable ["ACE_ATragMX_currentTarget", 0]) min 3;
GVAR(currentScopeUnit) = 0 max (profileNamespace getVariable ["ACE_ATragMX_currentScopeUnit", 0]) min 3;
GVAR(atmosphereModeTBH) = profileNamespace getVariable ["ACE_ATragMX_atmosphereModeTBH", true];
GVAR(altitude) = -1000 max (profileNamespace getVariable ["ACE_ATragMX_altitude", 0]) min 20000;
GVAR(temperature) = -50 max (profileNamespace getVariable ["ACE_ATragMX_temperature", 15]) min 160;
GVAR(barometricPressure) = 340 max (profileNamespace getVariable ["ACE_ATragMX_barometricPressure", 1013.25]) min 1350;
GVAR(relativeHumidity) = 0 max (profileNamespace getVariable ["ACE_ATragMX_relativeHumidity", 0.5]) min 1;
GVAR(showWind2) = profileNamespace getVariable ["ACE_ATragMX_showWind2", false];
GVAR(latitude) = profileNamespace getVariable ["ACE_ATragMX_latitude", [38, 38, 38, 38]];
GVAR(directionOfFire) = profileNamespace getVariable ["ACE_ATragMX_directionOfFire", [0, 0, 0, 0]];
GVAR(windSpeed1) = profileNamespace getVariable ["ACE_ATragMX_windSpeed1", [0, 0, 0, 0]];
GVAR(windSpeed2) = profileNamespace getVariable ["ACE_ATragMX_windSpeed2", [0, 0, 0, 0]];
GVAR(windDirection) = profileNamespace getVariable ["ACE_ATragMX_windDirection", [12, 12, 12, 12]];
GVAR(inclinationAngle) = profileNamespace getVariable ["ACE_ATragMX_inclinationAngle", [0, 0, 0, 0]];
GVAR(targetSpeed) = profileNamespace getVariable ["ACE_ATragMX_targetSpeed", [0, 0, 0, 0]];
GVAR(targetRange) = profileNamespace getVariable ["ACE_ATragMX_targetRange", [0, 0, 0, 0]];

View File

@ -0,0 +1,25 @@
/*
* Author: Ruthberg
* Shows/Hides the atmosphere and environmental data controls
*
* Arguments:
* visible - <BOOL>
*
* Return Value:
* Nothing
*
* Example:
* false call ace_atragmx_fnc_show_atmo_env_data
*
* Public: No
*/
#include "script_component.hpp"
GVAR(showAtmoEnvData) = _this;
{ctrlShow [_x, _this]} forEach [13000, 13001, 13002, 13003, 130030, 13004, 130040, 13005, 130050, 13006, 130060, 13007, 13008, 13009, 13010, 13011];
if (_this) then {
[] call FUNC(update_atmo_selection);
[] call FUNC(update_atmo_env_data);
};

View File

@ -0,0 +1,24 @@
/*
* Author: Ruthberg
* Shows/Hides the gun ammo data controls
*
* Arguments:
* visible - <BOOL>
*
* Return Value:
* Nothing
*
* Example:
* false call ace_atragmx_fnc_show_gun_ammo_data
*
* Public: No
*/
#include "script_component.hpp"
GVAR(showGunAmmoData) = _this;
{ctrlShow [_x, _this]} forEach [12000, 120000, 12001, 120010, 12002, 120020, 12003, 120030, 12004, 120040, 12005, 120050, 12006, 120060, 12007, 12008, 12009, 12010, 12011];
if (_this) then {
[] call FUNC(update_gun_ammo_data);
};

View File

@ -20,7 +20,7 @@ GVAR(showGunList) = _this;
{ctrlShow [_x, _this]} forEach [6000, 6001, 6002, 6003, 6004, 6005, 6006, 6007];
if (_this) then {
ctrlSetFocus (__DSP displayCtrl 6002);
ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 6002);
lbSetCurSel [6000, GVAR(currentGun)];
};

View File

@ -17,5 +17,13 @@
GVAR(showMainPage) = _this;
{ctrlShow [_x, _this]} forEach [10, 100, 11, 110, 12, 120, 13, 130, 14, 140, 20, 200, 21, 210, 22, 220, 30, 300, 31, 310, 32, 320, 33, 330, 34, 340, 40, 400, 401, 402, 403, 41, 410, 411, 412, 42, 420,
{ctrlShow [_x, _this]} forEach [10, 100, 11, 110, 12, 120, 13, 130, 14, 140, 20, 200, 21, 210, 22, 220, 23, 230, 30, 300, 31, 310, 32, 320, 33, 330, 34, 340, 40, 400, 401, 402, 403, 41, 410, 411, 412, 42, 420,
500, 501, 502, 503, 600, 601, 602, 603, 1000, 2000, 3000, 4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008];
if (_this) then {
if (GVAR(atmosphereModeTBH)) then {
{ctrlShow [_x, false]} forEach [23, 230];
} else {
{ctrlShow [_x, false]} forEach [21, 210, 22, 220];
};
};

View File

@ -20,7 +20,7 @@ GVAR(showRangeCardSetup) = _this;
{ctrlShow [_x, _this]} forEach [10000, 10001, 10002, 10003, 10004, 10005, 10006, 10007, 10008, 10009];
if (_this) then {
ctrlSetFocus (__DSP displayCtrl 10006);
ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 10006);
ctrlSetText [10003, Str(Round(GVAR(rangeCardStartRange)))];
ctrlSetText [10004, Str(Round(GVAR(rangeCardEndRange)))];

View File

@ -0,0 +1,24 @@
/*
* Author: Ruthberg
* Shows/Hides the target data controls
*
* Arguments:
* visible - <BOOL>
*
* Return Value:
* Nothing
*
* Example:
* false call ace_atragmx_fnc_show_target_data
*
* Public: No
*/
#include "script_component.hpp"
GVAR(showTargetData) = _this;
{ctrlShow [_x, _this]} forEach [14000, 140000, 14001, 140010, 14002, 141020, 140020, 141021, 140021, 14003, 140030, 14004, 140040, 141040, 141041, 140041, 14005, 140050, 14006, 140060, 14007, 14008, 14009, 14010, 14011];
if (_this) then {
[] call FUNC(update_target_data);
};

View File

@ -20,16 +20,14 @@ GVAR(showTargetRangeAssist) = _this;
{ctrlShow [_x, _this]} forEach [7000, 7001, 7002, 7003, 7004, 7005, 7006, 7007, 7008, 7009, 7010, 7011, 7012, 7013, 7014, 7015, 7016, 7017, 7018, 7019, 7020];
if (_this) then {
ctrlSetFocus (__DSP displayCtrl 7018);
ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 7018);
ctrlSetText [7012, Str(parseNumber(ctrlText 320))];
ctrlSetText [7013, Str(parseNumber(ctrlText 340))];
if (GVAR(currentUnit) != 2) then
{
if (GVAR(currentUnit) == 1) then {
ctrlSetText [7016, "Yards"];
} else
{
} else {
ctrlSetText [7016, "Meters"];
};
};

View File

@ -20,23 +20,19 @@ GVAR(showTargetSpeedAssist) = _this;
{ctrlShow [_x, _this]} forEach [8000, 8001, 8002, 8003, 8004, 8005, 8006, 8007, 8008, 8009, 8010, 8011, 8012, 8013, 8014, 8015];
if (_this) then {
ctrlSetFocus (__DSP displayCtrl 8012);
ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 8012);
ctrlSetText [8004, Str(Round((GVAR(targetRange) select GVAR(currentTarget))))];
if (GVAR(currentUnit) != 2) then
{
if (GVAR(currentUnit) == 1) then {
ctrlSetText [8008, "Yards"];
} else
{
} else {
ctrlSetText [8008, "Meters"];
};
if (GVAR(currentUnit) != 1) then
{
if (GVAR(currentUnit) == 2) then {
ctrlSetText [8011, "m/s"];
} else
{
} else {
ctrlSetText [8011, "mph"];
};
};

View File

@ -0,0 +1,39 @@
/*
* Author: Ruthberg
* Saves user data into profileNamespace
*
* Arguments:
* Nothing
*
* Return Value:
* Nothing
*
* Example:
* call ace_atragmx_fnc_store_user_data
*
* Public: No
*/
#include "script_component.hpp"
profileNamespace setVariable ["ACE_ATragMX_profileNamespaceVersion", ATRAGMX_PROFILE_NAMESPACE_VERSION];
profileNamespace setVariable ["ACE_ATragMX_currentUnit", GVAR(currentUnit)];
profileNamespace setVariable ["ACE_ATragMX_currentGun", GVAR(currentGun)];
profileNamespace setVariable ["ACE_ATragMX_currentTarget", GVAR(currentTarget)];
profileNamespace setVariable ["ACE_ATragMX_currentScopeUnit", GVAR(currentScopeUnit)];
profileNamespace setVariable ["ACE_ATragMX_atmosphereModeTBH", GVAR(atmosphereModeTBH)];
profileNamespace setVariable ["ACE_ATragMX_altitude", GVAR(altitude)];
profileNamespace setVariable ["ACE_ATragMX_temperature", GVAR(temperature)];
profileNamespace setVariable ["ACE_ATragMX_barometricPressure", GVAR(barometricPressure)];
profileNamespace setVariable ["ACE_ATragMX_relativeHumidity", GVAR(relativeHumidity)];
profileNamespace setVariable ["ACE_ATragMX_showWind2", GVAR(showWind2)];
profileNamespace setVariable ["latitude", GVAR(latitude)];
profileNamespace setVariable ["directionOfFire", GVAR(directionOfFire)];
profileNamespace setVariable ["ACE_ATragMX_windSpeed1", GVAR(windSpeed1)];
profileNamespace setVariable ["ACE_ATragMX_windSpeed2", GVAR(windSpeed2)];
profileNamespace setVariable ["ACE_ATragMX_windDirection", GVAR(windDirection)];
profileNamespace setVariable ["ACE_ATragMX_inclinationAngle", GVAR(inclinationAngle)];
profileNamespace setVariable ["ACE_ATragMX_targetSpeed", GVAR(targetSpeed)];
profileNamespace setVariable ["ACE_ATragMX_targetRange", GVAR(targetRange)];

View File

@ -20,7 +20,7 @@ if !(ctrlVisible 9000) then {
false call FUNC(show_target_speed_assist);
true call FUNC(show_target_speed_assist_timer);
ctrlSetFocus (__DSP displayCtrl 9002);
ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 9002);
[{
private ["_args", "_startTime"];

View File

@ -0,0 +1,28 @@
/*
* Author: Ruthberg
* Toggles the atmospheric data screen on/off
*
* Arguments:
* Apply new data? <NUMBER>
*
* Return Value:
* Nothing
*
* Example:
* 1 call ace_atragmx_fnc_toggle_atmo_env_data
*
* Public: No
*/
#include "script_component.hpp"
if (ctrlVisible 13000) then {
false call FUNC(show_atmo_env_data);
true call FUNC(show_main_page);
if (_this == 1) then {
call FUNC(calculate_target_solution);
};
} else {
true call FUNC(show_atmo_env_data);
false call FUNC(show_main_page);
};

View File

@ -0,0 +1,29 @@
/*
* Author: Ruthberg
* Toggles the gun ammo data screen on/off
*
* Arguments:
* Apply new data? <NUMBER>
*
* Return Value:
* Nothing
*
* Example:
* 1 call ace_atragmx_fnc_toggle_gun_ammo_data
*
* Public: No
*/
#include "script_component.hpp"
if (ctrlVisible 12000) then {
false call FUNC(show_gun_ammo_data);
true call FUNC(show_main_page);
if (_this == 1) then {
call FUNC(update_zero_range);
call FUNC(calculate_target_solution);
};
} else {
true call FUNC(show_gun_ammo_data);
false call FUNC(show_main_page);
};

View File

@ -3,28 +3,26 @@
* Toggles the gun list screen on/off
*
* Arguments:
* Nothing
* change gun? <BOOL>
*
* Return Value:
* Nothing
*
* Example:
* call ace_atragmx_fnc_toggle_gun_list
* false call ace_atragmx_fnc_toggle_gun_list
*
* Public: No
*/
#include "script_component.hpp"
if (ctrlVisible 6000) then
{
if (ctrlVisible 6000) then {
false call FUNC(show_gun_list);
true call FUNC(show_main_page);
if (_this) then {
(lbCurSel 6000) call FUNC(change_gun);
[lbCurSel 6000, true] call FUNC(change_gun);
};
} else
{
} else {
false call FUNC(show_main_page);
true call FUNC(show_gun_list);
};

View File

@ -15,16 +15,14 @@
*/
#include "script_component.hpp"
if (ctrlVisible 5006) then
{
if (ctrlVisible 5006) then {
false call FUNC(show_range_card);
true call FUNC(show_main_page);
} else
{
} else {
false call FUNC(show_main_page);
true call FUNC(show_range_card);
ctrlSetFocus (__DSP displayCtrl 5001);
ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 5001);
[] call FUNC(calculate_range_card);
[] call FUNC(update_range_card);

View File

@ -3,25 +3,23 @@
* Toggles the range card setup screen on/off
*
* Arguments:
* Apply new range card settings <BOOL>
* Apply new range card settings <NUMBER>
*
* Return Value:
* Nothing
*
* Example:
* call ace_atragmx_fnc_toggle_range_card_setup
* 1 call ace_atragmx_fnc_toggle_range_card_setup
*
* Public: No
*/
#include "script_component.hpp"
if (ctrlVisible 10000) then
{
if (ctrlVisible 10000) then {
false call FUNC(show_range_card_setup);
true call FUNC(show_range_card);
if (_this == 1) then
{
if (_this == 1) then {
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;
@ -29,8 +27,7 @@ if (ctrlVisible 10000) then
[] call FUNC(calculate_range_card);
[] call FUNC(update_range_card);
};
} else
{
} else {
false call FUNC(show_range_card);
true call FUNC(show_range_card_setup);
};

View File

@ -0,0 +1,28 @@
/*
* Author: Ruthberg
* Toggles the target data screen on/off
*
* Arguments:
* Apply new data? <NUMBER>
*
* Return Value:
* Nothing
*
* Example:
* 1 call ace_atragmx_fnc_toggle_target_data
*
* Public: No
*/
#include "script_component.hpp"
if (ctrlVisible 14000) then {
false call FUNC(show_target_data);
true call FUNC(show_main_page);
if (_this == 1) then {
call FUNC(calculate_target_solution);
};
} else {
true call FUNC(show_target_data);
false call FUNC(show_main_page);
};

View File

@ -3,30 +3,30 @@
* Toggles the target range assist screen on/off
*
* Arguments:
* Nothing
* update range? <NUMBER>
*
* Return Value:
* Nothing
*
* Example:
* call ace_atragmx_fnc_toggle_target_range_assist
* 1 call ace_atragmx_fnc_toggle_target_range_assist
*
* Public: No
*/
#include "script_component.hpp"
if (ctrlVisible 7000) then
{
if (ctrlVisible 7000) then {
false call FUNC(show_target_range_assist);
true call FUNC(show_main_page);
if (_this == 1) then
{
if (_this == 1) then {
ctrlSetText [320, Str(parseNumber(ctrlText 7012))];
ctrlSetText [140040, Str(parseNumber(ctrlText 7012))];
ctrlSetText [340, Str(parseNumber(ctrlText 7013))];
ctrlSetText [140060, Str(parseNumber(ctrlText 7013))];
[] call FUNC(calculate_target_solution);
};
} else
{
} else {
false call FUNC(show_main_page);
true call FUNC(show_target_range_assist);
};

View File

@ -3,30 +3,33 @@
* Toggles the target speed assist screen on/off
*
* Arguments:
* Nothing
* update speed? <NUMBER>
*
* Return Value:
* Nothing
*
* Example:
* call ace_atragmx_fnc_toggle_target_speed_assist
* 1 call ace_atragmx_fnc_toggle_target_speed_assist
*
* Public: No
*/
#include "script_component.hpp"
if (ctrlVisible 8000) then
{
if (ctrlVisible 8000) then {
false call FUNC(show_target_speed_assist);
true call FUNC(show_main_page);
if (_this == 1) then
{
if (_this == 1) then {
[] call FUNC(calculate_target_speed_assist);
ctrlSetText [330, Str(parseNumber(ctrlText 8007))];
private ["_targetSpeed"];
_targetSpeed = parseNumber(ctrlText 8007);
if (_targetSpeed != 0) then {
ctrlSetText [330, Str(_targetSpeed)];
ctrlSetText [140050, Str(_targetSpeed)];
[] call FUNC(calculate_target_solution);
};
};
} else
{
} else {
false call FUNC(show_main_page);
true call FUNC(show_target_speed_assist);
};

View File

@ -0,0 +1,45 @@
/*
* Author: Ruthberg
* Updates the atmospheric data fields
*
* Arguments:
* Nothing
*
* Return Value:
* Nothing
*
* Example:
* call ace_atragmx_fnc_update_atmo_env_data
*
* Public: No
*/
#include "script_component.hpp"
ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 13007);
if (GVAR(currentUnit) != 1) then {
ctrlSetText [130040, Str(Round(GVAR(temperature) * 10) / 10)];
} else {
ctrlSetText [130040, Str(Round((GVAR(temperature) * 1.8 + 32) * 10) / 10)];
};
if (GVAR(currentUnit) != 1) then {
ctrlSetText [130050, Str(Round(GVAR(barometricPressure)))];
} else {
ctrlSetText [130050, Str(Round(GVAR(barometricPressure) / 33.8638866667 * 100) / 100)];
};
ctrlSetText [130060, Str(Round(GVAR(relativeHumidity) * 100 * 10) / 10)];
if (GVAR(currentUnit) != 1) then {
ctrlSetText [130030, Str(Round(GVAR(altitude)))];
} else {
ctrlSetText [130030, Str(Round(GVAR(altitude) * 3.2808399))];
};
if (GVAR(currentUnit) == 2) then {
ctrlSetText [13003, "Altitude (m)"];
ctrlSetText [13004, "temperature (C)"];
ctrlSetText [13005, "Barom Pres (milibars)"];
} else {
ctrlSetText [13003, "Altitude (ft)"];
ctrlSetText [13004, "temperature (F)"];
ctrlSetText [13005, "Barom Pres (in.merc.)"];
};

View File

@ -0,0 +1,31 @@
/*
* Author: Ruthberg
* Updates the atmospheric data input method
*
* Arguments:
* Nothing
*
* Return Value:
* Nothing
*
* Example:
* call ace_atragmx_fnc_update_atmo_selection
*
* Public: No
*/
#include "script_component.hpp"
((uiNamespace getVariable "ATragMX_Display") displayCtrl 13001) ctrlEnable true;
((uiNamespace getVariable "ATragMX_Display") displayCtrl 13002) ctrlEnable true;
if (GVAR(atmosphereModeTBH)) then {
((uiNamespace getVariable "ATragMX_Display") displayCtrl 13002) ctrlEnable false;
{ctrlShow [_x, false]} forEach [13003, 130030];
{ctrlShow [_x, true]} forEach [13005, 130050, 13006, 130060];
} else {
((uiNamespace getVariable "ATragMX_Display") displayCtrl 13001) ctrlEnable false;
{ctrlShow [_x, false]} forEach [13005, 130050, 13006, 130060];
{ctrlShow [_x, true]} forEach [13003, 130030];
};
[] call FUNC(update_atmo_env_data);

View File

@ -15,10 +15,19 @@
*/
#include "script_component.hpp"
ctrlSetText [200, Str(Round(GVAR(temperature) * 10) / 10)];
if (GVAR(currentUnit) == 1) then {
ctrlSetText [210, Str(Round(GVAR(barometricPressure) * 100) / 100)];
if (GVAR(currentUnit) != 1) then {
ctrlSetText [200, Str(Round(GVAR(temperature) * 10) / 10)];
} else {
ctrlSetText [200, Str(Round((GVAR(temperature) * 1.8 + 32) * 10) / 10)];
};
if (GVAR(currentUnit) != 1) then {
ctrlSetText [210, Str(Round(GVAR(barometricPressure)))];
} else {
ctrlSetText [210, Str(Round(GVAR(barometricPressure) / 33.8638866667 * 100) / 100)];
};
ctrlSetText [220, Str(Round(GVAR(relativeHumidity) * 100 * 10) / 10)];
if (GVAR(currentUnit) != 1) then {
ctrlSetText [230, Str(Round(GVAR(altitude)))];
} else {
ctrlSetText [230, Str(Round(GVAR(altitude) * 3.2808399))];
};

View File

@ -16,37 +16,29 @@
#include "script_component.hpp"
ctrlSetText [1000, GVAR(workingMemory) select 0];
if (GVAR(currentUnit) == 1) then
{
ctrlSetText [ 100, Str(Round((GVAR(workingMemory) select 5) / 2.54 * 100) / 100)];
} else
{
ctrlSetText [ 100, Str(Round((GVAR(workingMemory) select 5) * 100) / 100)];
if (GVAR(currentUnit) != 2) then {
ctrlSetText [100, Str(Round((GVAR(workingMemory) select 5) / 2.54 * 100) / 100)];
} else {
ctrlSetText [100, Str(Round((GVAR(workingMemory) select 5) * 100) / 100)];
};
if (GVAR(currentUnit) == 1) then
{
ctrlSetText [ 110, Str(Round((GVAR(workingMemory) select 12) * 15.4323584))];
} else
{
ctrlSetText [ 110, Str(Round(GVAR(workingMemory) select 12))];
if (GVAR(currentUnit) != 2) then {
ctrlSetText [110, Str(Round((GVAR(workingMemory) select 12) * 15.4323584))];
} else {
ctrlSetText [110, Str(Round(GVAR(workingMemory) select 12))];
};
if ((missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) && (missionNamespace getVariable [QEGVAR(advanced_ballistics,AdvancedAirDragEnabled), false])) then {
ctrlSetText [ 120, Str(Round((GVAR(workingMemory) select 15) * 1000) / 1000)];
ctrlSetText [120, Str(Round((GVAR(workingMemory) select 15) * 1000) / 1000)];
} else {
ctrlSetText [ 120, Str(Round((GVAR(workingMemory) select 4) * -1000 * 1000) / 1000)];
ctrlSetText [120, Str(Round((GVAR(workingMemory) select 4) * -1000 * 1000) / 1000)];
};
if (GVAR(currentUnit) == 1) then
{
if (GVAR(currentUnit) != 2) then {
ctrlSetText [130, Str(Round((GVAR(workingMemory) select 1) * 3.2808399))];
} else
{
} else {
ctrlSetText [130, Str(Round(GVAR(workingMemory) select 1))];
};
if (GVAR(currentUnit) == 2) then
{
if (GVAR(currentUnit) != 1) then {
ctrlSetText [140, Str(Round(GVAR(workingMemory) select 2))];
} else
{
} else {
ctrlSetText [140, Str(Round((GVAR(workingMemory) select 2) * 1.0936133))];
};

View File

@ -0,0 +1,74 @@
/*
* Author: Ruthberg
* Updates the gun ammo data fields
*
* Arguments:
* Nothing
*
* Return Value:
* Nothing
*
* Example:
* call ace_atragmx_fnc_update_gun_ammo_data
*
* Public: No
*/
#include "script_component.hpp"
ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 12008);
if (GVAR(currentUnit) != 2) then {
ctrlSetText [120000, Str(Round((GVAR(workingMemory) select 5) / 2.54 * 100) / 100)];
} else {
ctrlSetText [120000, Str(Round((GVAR(workingMemory) select 5) * 100) / 100)];
};
if (GVAR(currentUnit) != 2) then {
ctrlSetText [120010, Str(Round((GVAR(workingMemory) select 12) * 15.4323584))];
} else {
ctrlSetText [120010, Str(Round(GVAR(workingMemory) select 12))];
};
if (GVAR(currentUnit) != 2) then {
ctrlSetText [120020, Str(Round((GVAR(workingMemory) select 13) / 10 / 2.54 * 1000) / 1000)];
} else {
ctrlSetText [120020, Str(Round((GVAR(workingMemory) select 13) * 1000) / 1000)];
};
if ((missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) && (missionNamespace getVariable [QEGVAR(advanced_ballistics,AdvancedAirDragEnabled), false])) then {
ctrlSetText [120030, Str(Round((GVAR(workingMemory) select 15) * 1000) / 1000)];
} else {
ctrlSetText [120030, Str(Round((GVAR(workingMemory) select 4) * -1000 * 1000) / 1000)];
};
if (GVAR(currentUnit) != 2) then {
ctrlSetText [120040, Str(Round((GVAR(workingMemory) select 14) / 2.54 * 10) / 10)];
} else {
ctrlSetText [120040, Str(Round((GVAR(workingMemory) select 14) * 100) / 100)];
};
if (GVAR(currentUnit) != 2) then {
ctrlSetText [120050, Str(Round((GVAR(workingMemory) select 1) * 3.2808399))];
} else {
ctrlSetText [120050, Str(Round(GVAR(workingMemory) select 1))];
};
if (GVAR(currentUnit) == 2) then {
ctrlSetText [120060, Str(Round(GVAR(workingMemory) select 2))];
} else {
ctrlSetText [120060, Str(Round((GVAR(workingMemory) select 2) * 1.0936133))];
};
if (GVAR(currentUnit) == 2) then {
ctrlSetText [12000, "Bore (cm)"];
ctrlSetText [12001, "Bullet Weight (grams)"];
ctrlSetText [12002, "Bullet Diam (cm)"];
ctrlSetText [12004, "Rifle Twist (cm/trn)"];
ctrlSetText [12005, "Muzzle Velocity (m/s)"];
} else {
ctrlSetText [12000, "Bore (inches)"];
ctrlSetText [12001, "Bullet Weight (grains)"];
ctrlSetText [12002, "Bullet Diam (inches)"];
ctrlSetText [12004, "Rifle Twist (inches/trn)"];
ctrlSetText [12005, "Muzzle Velocity (feet/sec)"];
};
if (GVAR(currentUnit) == 1) then {
ctrlSetText [12006, "Zero Range (yards)"];
} else {
ctrlSetText [12006, "Zero Range (meters)"];
};

View File

@ -0,0 +1,26 @@
/*
* Author: Ruthberg
* Updates the inclination angle input fields
*
* Arguments:
* Reference input field ID <NUMBER>
*
* Return Value:
* Nothing
*
* Example:
* 0 call ace_atragmx_fnc_update_inclination_angle
*
* Public: No
*/
#include "script_component.hpp"
private ["_inclinationAngleCosine", "_inclinationAngleDegree"];
_inclinationAngleCosine = 0.5 max parseNumber(ctrlText 140041) min 1;
_inclinationAngleDegree = -60 max parseNumber(ctrlText 140040) min 60;
if (_this == 0) then {
ctrlSetText [140040, Str(round(acos(_inclinationAngleCosine)))];
} else {
ctrlSetText [140041, Str(round(cos(_inclinationAngleDegree) * 100) / 100)];
};

View File

@ -15,16 +15,18 @@
*/
#include "script_component.hpp"
private ["_range", "_elevation", "_windage", "_elevationScopeStep", "_windageScopeStep", "_lead", "_TOF", "_velocity", "_kineticEnergy", "_rangeOutput", "_elevationOutput", "_windageOutput", "_lastColumnOutput"];
private ["_range", "_elevation", "_windage1", "_windage2", "_elevationScopeStep", "_windageScopeStep", "_lead", "_TOF", "_velocity", "_kineticEnergy", "_rangeOutput", "_elevationOutput", "_windageOutput", "_lastColumnOutput"];
_lastColumnOutput = "";
ctrlSetText [5006, (GVAR(rangeCardLastColumns) select GVAR(rangeCardCurrentColumn))];
if (GVAR(showWind2) && GVAR(rangeCardCurrentColumn) == 0) then {
ctrlSetText [5006, "Wind2"];
} else {
ctrlSetText [5006, (GVAR(rangeCardLastColumns) select GVAR(rangeCardCurrentColumn))];
};
if (GVAR(currentUnit) != 2) then
{
if (GVAR(currentUnit) == 1) then {
ctrlSetText [5003, "Yards"];
} else
{
} else {
ctrlSetText [5003, "Meters"];
};
@ -33,69 +35,61 @@ lnbClear 5007;
{
_range = _x select 0;
_elevation = _x select 1;
_windage = _x select 2;
_windage1 = (_x select 2) select 0;
_windage2 = (_x select 2) select 1;
_lead = _x select 3;
_TOF = _x select 4;
_velocity = _x select 5;
_kineticEnergy = _x select 6;
switch (GVAR(currentScopeUnit)) do
{
case 0:
{
switch (GVAR(currentScopeUnit)) do {
case 0: {
_elevation = _elevation / 3.38;
_windage = _windage / 3.38;
_windage1 = _windage1 / 3.38;
_windage2 = _windage2 / 3.38;
};
case 2:
{
case 2: {
_elevation = _elevation * 1.047;
_windage = _windage * 1.047;
_windage1 = _windage1 * 1.047;
_windage2 = _windage2 * 1.047;
};
case 3:
{
case 3: {
_elevationScopeStep = (GVAR(workingMemory) select 7);
_windageScopeStep = (GVAR(workingMemory) select 8);
_elevation = Round(_elevation / _elevationScopeStep);
_windage = Round(_windage / _windageScopeStep);
_windage1 = Round(_windage1 / _windageScopeStep);
_windage2 = Round(_windage2 / _windageScopeStep);
};
};
_elevationOutput = Str(Round(_elevation * 100) / 100);
_windageOutput = Str(Round(_windage * 100) / 100);
_windageOutput = Str(Round(_windage1 * 100) / 100);
_rangeOutput = Str(_range);
if (_velocity < 340.29) then
{
if (_velocity < 340.29) then {
_rangeOutput = _rangeOutput + "*";
};
if (GVAR(currentUnit) == 1) then
{
if (GVAR(currentUnit) == 1) then {
_velocity = _velocity * 3.2808399;
};
switch (GVAR(rangeCardCurrentColumn)) do
{
case 0:
{
_lastColumnOutput = Str(Round(_lead * 100) / 100);
switch (GVAR(rangeCardCurrentColumn)) do {
case 0: {
if (GVAR(showWind2)) then {
_lastColumnOutput = Str(Round(_windage2 * 100) / 100);
} else {
_lastColumnOutput = Str(Round(_lead * 100) / 100);
};
};
case 1:
{
case 1: {
_lastColumnOutput = Str(Round(_velocity));
};
case 2:
{
case 2: {
_lastColumnOutput = Str(Round(_kineticEnergy));
};
case 3:
{
case 3: {
_lastColumnOutput = Str(Round(_TOF * 100) / 100);
}
};

View File

@ -16,6 +16,6 @@
#include "script_component.hpp"
GVAR(workingMemory) set [10, (GVAR(elevationOutput) select GVAR(currentTarget))];
GVAR(workingMemory) set [11, (GVAR(windageOutput) select GVAR(currentTarget))];
GVAR(workingMemory) set [11, (GVAR(windage1Output) select GVAR(currentTarget))];
[] call FUNC(update_result);

View File

@ -15,9 +15,11 @@
*/
#include "script_component.hpp"
private ["_elevationAbs", "_elevationRel", "_elevationCur", "_windageAbs", "_windageRel", "_windageCur", "_lead", "_elevationScopeStep", "_windageScopeStep"];
_elevationAbs = (GVAR(elevationOutput) select GVAR(currentTarget));
_windageAbs = (GVAR(windageOutput) select GVAR(currentTarget));
private ["_elevationAbs", "_elevationRel", "_elevationCur", "_windageAbs", "_wind2", "_windageRel", "_windageCur", "_lead", "_elevationScopeStep", "_windageScopeStep"];
_elevationAbs = GVAR(elevationOutput) select GVAR(currentTarget);
_windageAbs = GVAR(windage1Output) select GVAR(currentTarget);
_wind2 = GVAR(windage2Output) select GVAR(currentTarget);
_elevationCur = GVAR(workingMemory) select 10;
_windageCur = GVAR(workingMemory) select 11;
@ -25,42 +27,42 @@ _windageCur = GVAR(workingMemory) select 11;
_elevationRel = _elevationAbs - _elevationCur;
_windageRel = _windageAbs - _windageCur;
_lead = (GVAR(leadOutput) select GVAR(currentTarget));
_lead = GVAR(leadOutput) select GVAR(currentTarget);
switch (GVAR(currentScopeUnit)) do
{
case 0:
{
switch (GVAR(currentScopeUnit)) do {
case 0: {
_elevationAbs = _elevationAbs / 3.38;
_windageAbs = _windageAbs / 3.38;
_wind2 = _wind2 / 3.38;
_elevationRel = _elevationRel / 3.38;
_windageRel = _windageRel / 3.38;
_elevationCur = _elevationCur / 3.38;
_windageCur = _windageCur / 3.38;
};
case 2:
{
case 2: {
_elevationAbs = _elevationAbs * 1.047;
_windageAbs = _windageAbs * 1.047;
_wind2 = _wind2 / 1.047;
_elevationRel = _elevationRel * 1.047;
_windageRel = _windageRel * 1.047;
_elevationCur = _elevationCur * 1.047;
_windageCur = _windageCur * 1.047;
};
case 3:
{
case 3: {
_elevationScopeStep = (GVAR(workingMemory) select 7);
_windageScopeStep = (GVAR(workingMemory) select 8);
_elevationAbs = Round(_elevationAbs / _elevationScopeStep);
_windageAbs = Round(_windageAbs / _windageScopeStep);
_wind2 = Round(_wind2 / _windageScopeStep);
_elevationRel = Round(_elevationRel / _elevationScopeStep);
_windageRel = Round(_windageRel / _windageScopeStep);
@ -69,6 +71,12 @@ switch (GVAR(currentScopeUnit)) do
};
};
if (GVAR(showWind2)) then {
ctrlSetText [42, "Wind2"];
} else {
ctrlSetText [42, "Lead"];
};
ctrlSetText [400, Str(Round(_elevationAbs * 100) / 100)];
ctrlSetText [401, Str(Round(_elevationRel * 100) / 100)];
ctrlSetText [402, Str(Round(_elevationCur * 100) / 100)];
@ -77,4 +85,8 @@ ctrlSetText [410, Str(Round(_windageAbs * 100) / 100)];
ctrlSetText [411, Str(Round(_windageRel * 100) / 100)];
ctrlSetText [412, Str(Round(_windageCur * 100) / 100)];
ctrlSetText [420, Str(Round(_lead * 100) / 100)];
if (GVAR(showWind2)) then {
ctrlSetText [420, Str(Round(_wind2 * 100) / 100)];
} else {
ctrlSetText [420, Str(Round(_lead * 100) / 100)];
};

View File

@ -15,23 +15,28 @@
*/
#include "script_component.hpp"
if (!isNil QGVAR(windSpeed)) then
{
ctrlSetText [300, Str(Round((GVAR(windSpeed) select GVAR(currentTarget)) * 100) / 100)];
if (GVAR(showWind2)) then {
if (GVAR(currentUnit) != 2) then {
ctrlSetText [300, format["%1/%2", Round((GVAR(windSpeed1) select GVAR(currentTarget)) * 2.23693629), Round((GVAR(windSpeed2) select GVAR(currentTarget)) * 2.23693629)]];
} else {
ctrlSetText [300, format["%1/%2", Round(GVAR(windSpeed1) select GVAR(currentTarget)), Round(GVAR(windSpeed2) select GVAR(currentTarget))]];
};
} else {
if (GVAR(currentUnit) != 2) then {
ctrlSetText [300, Str(Round((GVAR(windSpeed1) select GVAR(currentTarget)) * 2.23693629 * 100) / 100)];
} else {
ctrlSetText [300, Str(Round((GVAR(windSpeed1) select GVAR(currentTarget)) * 100) / 100)];
};
};
if (!isNil QGVAR(windDirection)) then
{
ctrlSetText [310, Str(Round((GVAR(windDirection) select GVAR(currentTarget))))];
};
if (!isNil QGVAR(inclinationAngle)) then
{
ctrlSetText [320, Str(Round((GVAR(inclinationAngle) select GVAR(currentTarget))))];
};
if (!isNil QGVAR(targetSpeed)) then
{
ctrlSetText [310, Str(Round((GVAR(windDirection) select GVAR(currentTarget))))];
ctrlSetText [320, Str(Round((GVAR(inclinationAngle) select GVAR(currentTarget))))];
if (GVAR(currentUnit) != 2) then {
ctrlSetText [330, Str(Round((GVAR(targetSpeed) select GVAR(currentTarget)) * 2.23693629 * 100) / 100)];
} else {
ctrlSetText [330, Str(Round((GVAR(targetSpeed) select GVAR(currentTarget)) * 100) / 100)];
};
if (!isNil QGVAR(targetRange)) then
{
if (GVAR(currentUnit) == 1) then {
ctrlSetText [340, Str(Round((GVAR(targetRange) select GVAR(currentTarget)) * 1.0936133))];
} else {
ctrlSetText [340, Str(Round((GVAR(targetRange) select GVAR(currentTarget))))];
};

View File

@ -0,0 +1,53 @@
/*
* Author: Ruthberg
* Updates all target column input fields
*
* Arguments:
* Nothing
*
* Return Value:
* Nothing
*
* Example:
* call ace_atragmx_fnc_update_target
*
* Public: No
*/
#include "script_component.hpp"
ctrlSetText [140000, Str(Round((GVAR(latitude) select GVAR(currentTarget)) * 100) / 100)];
ctrlSetText [140010, Str(Round((GVAR(directionOfFire) select GVAR(currentTarget)) * 100) / 100)];
if (GVAR(currentUnit) != 2) then {
ctrlSetText [140020, Str(Round((GVAR(windSpeed1) select GVAR(currentTarget)) * 2.23693629 * 100) / 100)];
ctrlSetText [140021, Str(Round((GVAR(windSpeed2) select GVAR(currentTarget)) * 2.23693629 * 100) / 100)];
} else {
ctrlSetText [140020, Str(Round((GVAR(windSpeed1) select GVAR(currentTarget)) * 100) / 100)];
ctrlSetText [140021, Str(Round((GVAR(windSpeed2) select GVAR(currentTarget)) * 100) / 100)];
};
ctrlSetText [140030, Str(Round((GVAR(windDirection) select GVAR(currentTarget))))];
ctrlSetText [140040, Str(Round((GVAR(inclinationAngle) select GVAR(currentTarget))))];
ctrlSetText [140041, Str(Round(cos(GVAR(inclinationAngle) select GVAR(currentTarget)) * 100) / 100)];
if (GVAR(currentUnit) != 2) then {
ctrlSetText [140050, Str(Round((GVAR(targetSpeed) select GVAR(currentTarget)) * 2.23693629 * 100) / 100)];
} else {
ctrlSetText [140050, Str(Round((GVAR(targetSpeed) select GVAR(currentTarget)) * 100) / 100)];
};
if (GVAR(currentUnit) == 1) then {
ctrlSetText [140060, Str(Round((GVAR(targetRange) select GVAR(currentTarget)) * 1.0936133))];
} else {
ctrlSetText [140060, Str(Round((GVAR(targetRange) select GVAR(currentTarget))))];
};
if (GVAR(currentUnit) == 2) then {
ctrlSetText [14002, "Wind Speed (m/s)"];
ctrlSetText [14005, "Target Speed (m/s)"];
} else {
ctrlSetText [14002, "Wind Speed (mph)"];
ctrlSetText [14005, "Target Speed (mph)"];
};
if (GVAR(currentUnit) == 1) then {
ctrlSetText [14006, "Target Range (yards)"];
} else {
ctrlSetText [14006, "Target Range (meters)"];
};

View File

@ -15,13 +15,13 @@
*/
#include "script_component.hpp"
(__DSP displayCtrl 500) ctrlEnable true;
(__DSP displayCtrl 501) ctrlEnable true;
(__DSP displayCtrl 502) ctrlEnable true;
(__DSP displayCtrl 503) ctrlEnable true;
((uiNamespace getVariable "ATragMX_Display") displayCtrl 500) ctrlEnable true;
((uiNamespace getVariable "ATragMX_Display") displayCtrl 501) ctrlEnable true;
((uiNamespace getVariable "ATragMX_Display") displayCtrl 502) ctrlEnable true;
((uiNamespace getVariable "ATragMX_Display") displayCtrl 503) ctrlEnable true;
(__DSP displayCtrl 500 + GVAR(currentTarget)) ctrlEnable false;
((uiNamespace getVariable "ATragMX_Display") displayCtrl 500 + GVAR(currentTarget)) ctrlEnable false;
ctrlSetFocus (__DSP displayCtrl 3000);
ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 3000);
[] call FUNC(update_unit_selection);

View File

@ -15,13 +15,17 @@
*/
#include "script_component.hpp"
(__DSP displayCtrl 600) ctrlEnable true;
(__DSP displayCtrl 601) ctrlEnable true;
(__DSP displayCtrl 602) ctrlEnable true;
((uiNamespace getVariable "ATragMX_Display") displayCtrl 600) ctrlEnable true;
((uiNamespace getVariable "ATragMX_Display") displayCtrl 601) ctrlEnable true;
((uiNamespace getVariable "ATragMX_Display") displayCtrl 602) ctrlEnable true;
(__DSP displayCtrl 600 + GVAR(currentUnit)) ctrlEnable false;
((uiNamespace getVariable "ATragMX_Display") displayCtrl 600 + GVAR(currentUnit)) ctrlEnable false;
[] call FUNC(update_gun);
[] call FUNC(update_gun_ammo_data);
[] call FUNC(update_atmosphere);
[] call FUNC(update_atmo_env_data);
[] call FUNC(update_target);
[] call FUNC(update_target_data);
[] call FUNC(update_result);

View File

@ -28,9 +28,8 @@ _dragModel = GVAR(workingMemory) select 16;
_atmosphereModel = GVAR(workingMemory) select 17;
private ["_zeroRange"];
_zeroRange = Round(parseNumber(ctrlText 140));
if (GVAR(currentUnit) != 2) then
{
_zeroRange = Round(parseNumber(ctrlText 120060));
if (GVAR(currentUnit) == 1) then {
_zeroRange = _zeroRange / 1.0936133;
};
if (_zeroRange < 10) exitWith {
@ -38,18 +37,14 @@ if (_zeroRange < 10) exitWith {
GVAR(workingMemory) set [3, 0];
};
private ["_temperature", "_barometricPressure", "_relativeHumidity"];
private ["_altitude", "_temperature", "_barometricPressure", "_relativeHumidity"];
_altitude = GVAR(altitude);
_temperature = GVAR(temperature);
_barometricPressure = GVAR(barometricPressure);
_relativeHumidity = GVAR(relativeHumidity);
if (GVAR(currentUnit) == 1) then
{
_temperature = (_temperature - 32) / 1.8;
_barometricPressure = _barometricPressure * 33.8638866667;
};
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);
_result = [_scopeBaseAngle, _bulletMass, _boreHeight, _airFriction, _muzzleVelocity, _temperature, _barometricPressure, _relativeHumidity, 1000, [0, 0], 0, 0, 0, _zeroRange, _bc, _dragModel, _atmosphereModel, false, 1.5, 0, 0] call FUNC(calculate_solution);
GVAR(workingMemory) set [2, _zeroRange];
GVAR(workingMemory) set [3, _scopeBaseAngle + (_result select 0) / 60];

View File

@ -11,4 +11,4 @@
#include "\z\ace\addons\main\script_macros.hpp"
#define __DSP (uiNamespace getVariable "ATragMX_Display")
#define ATRAGMX_PROFILE_NAMESPACE_VERSION 1.0

View File

@ -62,6 +62,7 @@ if (_unit == _attachToVehicle) then { //Self Attachment
_actionID = _unit addAction [format ["<t color='#FF0000'>%1</t>", localize "STR_ACE_Attach_CancelAction"], {GVAR(placeAction) = 0}];
[{
private "_startingPosition";
PARAMS_2(_args,_pfID);
EXPLODE_7_PVT(_args,_unit,_attachToVehicle,_itemClassname,_itemVehClass,_tempObject,_onAtachText,_actionID);

View File

@ -19,7 +19,7 @@
PARAMS_3(_attachToVehicle,_player,_args);
private ["_itemName", "_attachLimit", "_attachedObjects"];
private ["_itemName", "_attachLimit", "_attachedObjects","_playerPos"];
_itemName = [_args, 0, ""] call CBA_fnc_defaultParam;
_attachLimit = [6, 1] select (_player == _attachToVehicle);

View File

@ -18,7 +18,7 @@
PARAMS_2(_attachToVehicle,_unit);
private ["_attachedObjects", "_attachedItems"];
private ["_attachedObjects", "_attachedItems", "_itemDisplayName"];
_attachedObjects = _attachToVehicle getVariable [QGVAR(Objects), []];
_attachedItems = _attachToVehicle getVariable [QGVAR(ItemNames), []];

View File

@ -17,6 +17,7 @@
*/
#include "script_component.hpp"
private ["_listed", "_actions", "_item", "_displayName", "_picture", "_action"];
PARAMS_2(_target,_player);
_listed = [];

View File

@ -13,11 +13,7 @@
*/
#include "script_component.hpp"
private ["_unit", "_target"];
_unit = _this select 0;
_target = _this select 1;
_backpack = _this select 2;
PARAMS_3(_unit,_target,_backpack);
// do cam shake if the target is the player
if ([_target] call EFUNC(common,isPlayer)) then {

View File

@ -805,31 +805,37 @@
<English>7.62mm 10Rnd Mag (Mk319 Mod 0)</English>
<Polish>Magazynek 7,62mm 10rd (Mk319 Mod 0)</Polish>
<French>7.62mm 10Cps (Mk319 Mod 0)</French>
<Spanish>Cargador de 10 balas de 7.62mm (Mk319 Mod 0)</Spanish>
</Key>
<Key ID="STR_ACE_10Rnd_762x51_Mk319_Mod_0_Mag_NameShort">
<English>7.62mm Mk319</English>
<Polish>7,62mm Mk319</Polish>
<French>7.62mm Mk319</French>
<Spanish>7.62mm Mk319</Spanish>
</Key>
<Key ID="STR_ACE_10Rnd_762x51_Mk319_Mod_0_Mag_Description">
<English>Caliber: 7.62x51 mm NATO (Mk319 Mod 0)&lt;br /&gt;Rounds: 10</English>
<Polish>Kaliber: 7,62x51 mm NATO (Mk319 Mod 0)&lt;br /&gt;Pociski: 10</Polish>
<French>Calibre: 7.62x51 mm NATO (Mk319 Mod 0)&lt;br /&gt;Cartouches: 10</French>
<Spanish>Calibre: 7.62x51 mm NATO (Mk319 Mod 0)&lt;br /&gt;Balas: 10</Spanish>
</Key>
<Key ID="STR_ACE_20Rnd_762x51_Mk319_Mod_0_Mag_Name">
<English>7.62mm 20Rnd Mag (Mk319 Mod 0)</English>
<Polish>Magazynek 7,62mm 20rd (Mk319 Mod 0)</Polish>
<French>7.62mm 20Cps (Mk319 Mod 0)</French>
<Spanish>Cargador de 20 balas de 7.62mm (Mk319 Mod 0)</Spanish>
</Key>
<Key ID="STR_ACE_20Rnd_762x51_Mk319_Mod_0_Mag_NameShort">
<English>7.62mm Mk319</English>
<Polish>7,62mm Mk319</Polish>
<French>7.62mm Mk319</French>
<Spanish>7.62mm Mk319</Spanish>
</Key>
<Key ID="STR_ACE_20Rnd_762x51_Mk319_Mod_0_Mag_Description">
<English>Caliber: 7.62x51 mm NATO (Mk319 Mod 0)&lt;br /&gt;Rounds: 20</English>
<Polish>Kaliber: 7,62x51 mm NATO (Mk319 Mod 0)&lt;br /&gt;Pociski: 20</Polish>
<French>Calibre: 7.62x51 mm NATO (Mk319 Mod 0)&lt;br /&gt;Cartouches: 20</French>
<Spanish>Calibre: 7.62x51 mm NATO (Mk319 Mod 0)&lt;br /&gt;Balas: 20</Spanish>
</Key>
<Key ID="STR_ACE_20Rnd_762x67_Mk248_Mod_0_Mag_Name">
<English>7.62mm 20Rnd Mag (Mk248 Mod 0)</English>
@ -889,67 +895,91 @@
<English>6.5x47mm 30Rnd Mag (HPBT Scenar)</English>
<French>6.5x47mm 30Cps (HPBT Scenar)</French>
<Spanish>Cargador de 30 balas de 6.5x47mm (HPBT Scenar)</Spanish>
<Polish>Magazynek 6,5x47 mm 30rd (HPBT Scenar)</Polish>
</Key>
<Key ID="STR_ACE_30Rnd_65x47_Scenar_mag_NameShort">
<English>6.5mm Scenar</English>
<French>6.5mm Scenar</French>
<Spanish>6.5mm Scenar</Spanish>
<Polish>6,5mm Scenar</Polish>
</Key>
<Key ID="STR_ACE_30Rnd_65x47_Scenar_mag_Description">
<English>Caliber: 6.5x47mm (HPBT Scenar)&lt;br /&gt;Rounds: 30</English>
<French>Calibre: 6.5x47mm (HPBT Scenar)&lt;br /&gt;Cartouches: 30</French>
<Spanish>Calibre: 6.5x47mm (HPBT Scenar)&lt;br /&gt;Balas: 30</Spanish>
<Polish>Kaliber: 6,5x47 mm (HPBT Scenar)&lt;br /&gt;Pociski: 30</Polish>
</Key>
<Key ID="STR_ACE_10Rnd_338_300gr_HPBT_Mag_Name">
<English>.338 10Rnd Mag (300gr Sierra MatchKing HPBT)</English>
<French>.338 10 Cps (300gr Sierra MatchKing HPBT)</French>
<Spanish>Cargador de 10 balas de 8.6x70mm (300gr Sierra MatchKing HPBT)</Spanish>
<Polish>Magazynek .338 10rd (300gr Sierra MatchKing HPBT)</Polish>
</Key>
<Key ID="STR_ACE_10Rnd_338_300gr_HPBT_Mag_NameShort">
<English>.338 (HPBT)</English>
<French>.338 (HPBT)</French>
<Spanish>.338 (HPBT)</Spanish>
<Polish>.338 (HPBT)</Polish>
</Key>
<Key ID="STR_ACE_10Rnd_338_300gr_HPBT_Mag_Description">
<English>Caliber: 8.6x70mm (300gr Sierra MatchKing HPBT)&lt;br /&gt;Rounds: 10</English>
<French>Calibre: 8.6x70mm (300gr Sierra MatchKing HPBT)&lt;br /&gt;Cartouches: 10</French>
<Spanish>Calibre: 8.6x70mm (300gr Sierra MatchKing HPBT)&lt;br /&gt;Balas: 10</Spanish>
<Polish>Kaliber: 8,6x70 mm (300gr Sierra MatchKing HPBT)&lt;br /&gt;Pociski: 10</Polish>
</Key>
<Key ID="STR_ACE_10Rnd_338_API526_Mag_Name">
<English>.338 10Rnd Mag (API526)</English>
<French>.338 10Cps (API526)</French>
<Spanish>Cargador de 10 balas de .338 (API526)</Spanish>
<Polish>Magazynek .338 10rd (API526)</Polish>
</Key>
<Key ID="STR_ACE_10Rnd_338_API526_Mag_NameShort">
<English>.338 AP</English>
<French>.338 AP</French>
<Spanish>.338 AP</Spanish>
<Polish>.338 AP</Polish>
</Key>
<Key ID="STR_ACE_10Rnd_338_API526_Mag_Description">
<English>Caliber: 8.6x70mm (API526)&lt;br /&gt;Rounds: 10</English>
<French>Calibre: 8.6x70mm (API526)&lt;br /&gt;Cartouches: 10</French>
<Spanish>Calibre: 8.6x70mm (API526)&lt;br /&gt;Balas: 10</Spanish>
<Polish>Kaliber: 8,6x70 mm (API526)&lt;br /&gt;Pociski: 10</Polish>
</Key>
<Key ID="STR_ACE_5Rnd_127x99_Mag_Name">
<English>12.7x99mm 5Rnd Mag</English>
<French>12.7x99mm 5Cps</French>
<Spanish>Cargador de 5 balas de 12.7x99mm</Spanish>
<Polish>Magazynek 12,7x99 mm 5rd</Polish>
</Key>
<Key ID="STR_ACE_5Rnd_127x99_Mag_NameShort">
<English>12.7mm</English>
<French>12.7mm</French>
<Spanish>12.7mm</Spanish>
<Polish>12,7mm</Polish>
</Key>
<Key ID="STR_ACE_5Rnd_127x99_Mag_Description">
<English>Caliber: 12.7x99mm&lt;br /&gt;Rounds: 5</English>
<French>Calibre: 12.7x99mm&lt;br /&gt;Cartouches: 5</French>
<Spanish>Calibre: 12.7x99mm&lt;br /&gt;Balas: 5</Spanish>
<Polish>Kaliber: 12,7x99 mm&lt;br /&gt;Pociski: 5</Polish>
</Key>
<Key ID="STR_ACE_5Rnd_127x99_AMAX_Mag_Name">
<English>12.7x99mm 5Rnd Mag (AMAX)</English>
<French>12.7x99mm 5Rnd Mag (AMAX)</French>
<Spanish>Cargador de 5 balas de 12.7x99mm (AMAX)</Spanish>
<Polish>Magazynek 12,7x99 mm 5rd (AMAX)</Polish>
</Key>
<Key ID="STR_ACE_5Rnd_127x99_AMAX_Mag_NameShort">
<English>12.7mm</English>
<French>12.7mm</French>
<Spanish>12.7mm</Spanish>
<Polish>12,7mm</Polish>
</Key>
<Key ID="STR_ACE_5Rnd_127x99_AMAX_Mag_Description">
<English>Caliber: 12.7x99mm (AMAX)&lt;br /&gt;Rounds: 5</English>
<French>Calibre: 12.7x99mm (AMAX)&lt;br /&gt;Cartouches: 5</French>
<Spanish>Calibre: 12.7x99mm (AMAX)&lt;br /&gt;Balas: 5</Spanish>
<Polish>Kaliber: 12,7x99 mm (AMAX)&lt;br /&gt;Pociski: 5</Polish>
</Key>
</Package>
</Project>

View File

@ -7,6 +7,7 @@
if (isServer) then {
addMissionEventHandler ["HandleDisconnect", {
PARAMS_1(_disconnectedPlayer);
private "_escortedUnit";
_escortedUnit = _disconnectedPlayer getVariable [QGVAR(escortedUnit), objNull];
if ((!isNull _escortedUnit) && {(attachedTo _escortedUnit) == _disconnectedPlayer}) then {
detach _escortedUnit;

View File

@ -18,6 +18,7 @@
#include "script_component.hpp"
PARAMS_3(_unit,_target,_vehicle);
private "_objects";
if (isNull _target) then {
_objects = attachedObjects _unit;

View File

@ -18,6 +18,7 @@
#include "script_component.hpp"
PARAMS_3(_logic,_units,_activated);
private ["_bisMouseOver", "_mouseOverObject"];
if (!_activated) exitWith {};

View File

@ -50,6 +50,7 @@ if (_state) then {
//Adds an animation changed eh
//If we get a change in animation then redo the animation (handles people vaulting to break the animation chain)
private "_animChangedEHID";
_animChangedEHID = _unit addEventHandler ["AnimChanged", {
PARAMS_2(_unit,_newAnimation);
if ((_newAnimation != "ACE_AmovPercMstpSsurWnonDnon") && {!(_unit getVariable ["ACE_isUnconscious", false])}) then {
@ -66,6 +67,7 @@ if (_state) then {
[_unit, QGVAR(Handcuffed), false] call EFUNC(common,setCaptivityStatus);
//remove AnimChanged EH
private "_animChangedEHID";
_animChangedEHID = _unit getVariable [QGVAR(handcuffAnimEHID), -1];
_unit removeEventHandler ["AnimChanged", _animChangedEHID];
_unit setVariable [QGVAR(handcuffAnimEHID), -1];

View File

@ -48,6 +48,7 @@ if (_state) then {
if (_unit getVariable [QGVAR(isSurrendering), false] && {(vehicle _unit) == _unit}) then {
//Adds an animation changed eh
//If we get a change in animation then redo the animation (handles people vaulting to break the animation chain)
private "_animChangedEHID";
_animChangedEHID = _unit addEventHandler ["AnimChanged", {
PARAMS_2(_unit,_newAnimation);
if ((_newAnimation != "ACE_AmovPercMstpSsurWnonDnon") && {!(_unit getVariable ["ACE_isUnconscious", false])}) then {
@ -63,6 +64,7 @@ if (_state) then {
[_unit, QGVAR(Surrendered), false] call EFUNC(common,setCaptivityStatus);
//remove AnimChanged EH
private "_animChangedEHID";
_animChangedEHID = _unit getVariable [QGVAR(surrenderAnimEHID), -1];
_unit removeEventHandler ["AnimChanged", _animChangedEHID];
_unit setVariable [QGVAR(surrenderAnimEHID), -1];

View File

@ -95,7 +95,7 @@
<Portuguese>Algema Plástica</Portuguese>
<Italian>Fascietta</Italian>
<Hungarian>Gyorskötöző</Hungarian>
<Russian>Пластиковые наручники</Russian>
<Russian>Кабельная стяжка</Russian>
</Key>
<Key ID="STR_ACE_Captives_CableTieDescription">
<English>Cable ties that allow you to restrain prisoners.</English>
@ -107,7 +107,7 @@
<Portuguese>A algema plástica permite que você contenha prisioneiros.</Portuguese>
<Italian>Fascietta che ti consente di arrestare i prigionieri.</Italian>
<Hungarian>Gyorskötöző, emberek foglyulejtéséhez használható.</Hungarian>
<Russian>Пластиковые наручники позволяют связывать пленников.</Russian>
<Russian>Кабельные стяжки позволяют связывать пленников.</Russian>
</Key>
<Key ID="STR_ACE_Captives_FriskMenuHeader">
<English>Inventory of frisked person</English>

View File

@ -1,7 +1,7 @@
class GVAR(ProgressBar_Dialog) {
idd = -1;
movingEnable = false;
onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(ctrlProgressBar)),(_this select 0) displayCtrl 1)]; uiNamespace setVariable [ARR_2(QUOTE(QGVAR(ctrlProgressBarTitle)),(_this select 0) displayCtrl 2)];);
onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(ctrlProgressBG)),(_this select 0) displayCtrl 1)]; uiNamespace setVariable [ARR_2(QUOTE(QGVAR(ctrlProgressBar)),(_this select 0) displayCtrl 2)]; uiNamespace setVariable [ARR_2(QUOTE(QGVAR(ctrlProgressBarTitle)),(_this select 0) displayCtrl 3)];);
objects[] = {};
class controlsBackground {
@ -23,26 +23,31 @@ class GVAR(ProgressBar_Dialog) {
w = "safezoneW";
h = "safezoneH";
};
class Progress: ACE_gui_RscProgress {
class TitleBackground: ACE_gui_staticBase {
idc = 1;
x = "1.2 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "0.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "37.8 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = ".8 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
colorFrame[] = {0,0,0,0.0};
colorBar[] = {0.27,0.5,0.31,0.8};
texture = "#(argb,8,8,3)color(1,1,1,0.7)";
};
class Title_Bar : ACE_gui_staticBase {
idc = 2;
style = 0x22;
colorBackground[] = {0, 0, 0, 0};
style = ST_CENTER;
sizeEx = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
colorBackground[] = {0, 0, 0, 0.5};
colorText[] = {1, 1, 1, 1};
x = "1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "0 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "38 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
};
class Progress: ACE_gui_RscProgress {
idc = 2;
x = "1.2 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "0.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "38 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
colorFrame[] = {1,1,1,0.5};
colorBar[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.77])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.51])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.08])","(profilenamespace getvariable ['GUI_BCG_RGB_A',0.8])"};
texture = "#(argb,8,8,3)color(1,1,1,0.7)";
};
class TitleText: TitleBackground {
idc = 3;
colorBackground[] = {0, 0, 0, 0};
};
};
};

View File

@ -38,12 +38,14 @@ createDialog QGVAR(ProgressBar_Dialog);
//Adjust position based on user setting:
_ctrlPos = ctrlPosition (uiNamespace getVariable QGVAR(ctrlProgressBarTitle));
_ctrlPos set [1, ((0 + 29 * GVAR(SettingProgressBarLocation)) * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2))];
(uiNamespace getVariable QGVAR(ctrlProgressBarTitle)) ctrlSetPosition _ctrlPos;
(uiNamespace getVariable QGVAR(ctrlProgressBarTitle)) ctrlCommit 0;
_ctrlPos = ctrlPosition (uiNamespace getVariable QGVAR(ctrlProgressBar));
_ctrlPos set [1, ((0.1 + 29 * GVAR(SettingProgressBarLocation)) * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2))];
(uiNamespace getVariable QGVAR(ctrlProgressBG)) ctrlSetPosition _ctrlPos;
(uiNamespace getVariable QGVAR(ctrlProgressBG)) ctrlCommit 0;
(uiNamespace getVariable QGVAR(ctrlProgressBar)) ctrlSetPosition _ctrlPos;
(uiNamespace getVariable QGVAR(ctrlProgressBar)) ctrlCommit 0;
(uiNamespace getVariable QGVAR(ctrlProgressBarTitle)) ctrlSetPosition _ctrlPos;
(uiNamespace getVariable QGVAR(ctrlProgressBarTitle)) ctrlCommit 0;
_perFrameFunction = {

View File

@ -76,6 +76,18 @@ if (isNil _name) then {
_value
];
//Strings in the values array won't be localized from the config, so just do that now:
private "_values";
_values = _settingData select 5;
{
_text = _x;
if (((typeName _text) == "STRING") && {(count _text) > 1} && {(_text select [0,1]) == "$"}) then {
_text = localize (_text select [1, ((count _text) - 1)]); //chop off the leading $
_values set [_forEachIndex, _text];
};
} forEach _values;
GVAR(settings) pushBack _settingData;
} else {

View File

@ -40,12 +40,13 @@ if (true) then {
{
_ppos = worldToScreen (_object modelToWorld _x);
_pposX = _ppos select 0;
_pposY = _ppos select 1;
if (_pposX < _minX) then {_minX = _pposX};
if (_pposX > _maxX) then {_maxX = _pposX};
if (_pposY < _minY) then {_minY = _pposY};
if (_pposY > _maxY) then {_maxY = _pposY};
if (count _ppos >= 2) then {
EXPLODE_2_PVT(_ppos,_pposX,_pposY);
if (_pposX < _minX) then {_minX = _pposX};
if (_pposX > _maxX) then {_maxX = _pposX};
if (_pposY < _minY) then {_minY = _pposY};
if (_pposY > _maxY) then {_maxY = _pposY};
}; //else - what to do if it is offscreen?
} forEach _boundsCorners;
};

View File

@ -17,6 +17,8 @@
PARAMS_1(_target);
private ["_animationStateCfgMoves", "_putDownAnim"];
//Check animationState for putDown anim
//This ensures the unit doesn't have to actualy do any animation to drop something
//This should always be true for the 3 possible status effects that allow disarming

View File

@ -20,6 +20,9 @@
#define TIME_MAX_WAIT 5
private ["_fncSumArray", "_return", "_holder", "_dropPos", "_targetMagazinesStart", "_holderMagazinesStart", "_xClassname", "_xAmmo", "_targetMagazinesEnd", "_holderMagazinesEnd", "_holderItemsStart", "_targetItemsStart", "_addToCrateClassnames", "_addToCrateCount", "_index", "_holderItemsEnd", "_targetItemsEnd", "_holderIsEmpty"];
PARAMS_3(_caller,_target,_listOfItemsToRemove);
DEFAULT_PARAM(3,_doNotDropAmmo,false); //By default units drop all weapon mags when dropping a weapon
@ -154,6 +157,8 @@ if (_holderIsEmpty) then {
//Start the PFEH to do the actions (which could take >1 frame)
[{
private ["_needToRemoveWeapon", "_needToRemoveMagazines", "_needToRemoveBackpack", "_needToRemoveVest", "_needToRemoveUniform", "_error", "_magsToPickup", "_index", "_magazinesInHolder"];
PARAMS_2(_args,_pfID);
EXPLODE_8_PVT(_args,_caller,_target,_listOfItemsToRemove,_holder,_holderIsEmpty,_maxWaitTime,_doNotDropAmmo,_startingMagazines);

View File

@ -20,6 +20,8 @@
PARAMS_3(_caller,_target,_listOfObjectsToRemove);
private "_itemsToAdd";
_itemsToAdd = [];
{
if (_x == (uniform _target)) then {

View File

@ -17,6 +17,8 @@
PARAMS_1(_target);
private ["_allItems", "_classnamesCount", "_index", "_uniqueClassnames"];
_allItems = ((weapons _target) + (magazines _target) + (items _target) + (assignedItems _target));
if ((backpack _target) != "") then {

View File

@ -28,6 +28,7 @@
]
PARAMS_2(_caller,_target);
private "_display";
//Sanity Checks
if (_caller != ACE_player) exitwith {ERROR("Player isn't caller?");};
@ -59,6 +60,7 @@ GVAR(disarmTarget) = _target;
//Setup PFEH
[{
private ["_groundContainer", "_targetContainer", "_playerName", "_rankPicture", "_rankIndex", "_targetUniqueItems", "_holderUniqueItems"];
disableSerialization;
EXPLODE_2_PVT(_this,_args,_pfID);
EXPLODE_3_PVT(_args,_player,_target,_display);
@ -71,6 +73,7 @@ GVAR(disarmTarget) = _target;
GVAR(disarmTarget) = objNull;
if (!isNull _display) then {closeDialog 0;}; //close dialog if still open
} else {
_groundContainer = _display displayCtrl 632;
_targetContainer = _display displayCtrl 633;
_playerName = _display displayCtrl 111;

View File

@ -19,7 +19,7 @@
disableSerialization;
PARAMS_2(_listBoxCtrl,_itemsCountArray);
private "_classname";
private ["_classname", "_count", "_displayName", "_picture"];
{
_displayName = "";

View File

@ -20,7 +20,7 @@
*/
#include "script_component.hpp"
private ["_problem", "_beginingArray"];
private ["_problem", "_beginingArray", "_index"];
PARAMS_4(_startA,_endA,_startB,_endB);

View File

@ -1,44 +1,28 @@
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE( call COMPILE_FILE(XEH_preInit) );
init = QUOTE(call COMPILE_FILE(XEH_preInit));
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
clientInit = QUOTE( call COMPILE_FILE(XEH_postInitClient) );
init = QUOTE(call COMPILE_FILE(XEH_postInit));
};
};
class Extended_FiredBIS_EventHandlers {
class CAManBase {
class ADDON {
firedBIS = QUOTE( _this call FUNC(replaceATWeapon) );
firedBIS = QUOTE(_this call FUNC(replaceATWeapon));
};
};
};
// handle preloaded missile
class Extended_Init_EventHandlers {
class Extended_InitPost_EventHandlers {
class CAManBase {
class ADDON {
init = QUOTE( _this call FUNC(takeLoadedATWeapon) );
};
};
};
class Extended_Take_EventHandlers {
class CAManBase {
class ADDON {
take = QUOTE( _this call FUNC(takeLoadedATWeapon); [_this select 0] call FUNC(updateInventoryDisplay); );
};
};
};
class Extended_Put_EventHandlers {
class CAManBase {
class ADDON {
put = QUOTE( [_this select 0] call FUNC(updateInventoryDisplay); );
init = QUOTE([ARR_2(_this select 0, secondaryWeapon (_this select 0))] call FUNC(takeLoadedATWeapon));
};
};
};

View File

@ -3,6 +3,7 @@ class CfgMagazines {
class ACE_PreloadedMissileDummy: NLAW_F { // The dummy magazine
author = "$STR_ACE_Common_ACETeam";
scope = 1;
scopeArsenal = 1;
displayName = "$STR_ACE_Disposable_PreloadedMissileDummy";
picture = PATHTOEF(common,UI\blank_CO.paa);
weaponPoolAvailable = 0;

View File

@ -0,0 +1,10 @@
// by commy2
#include "script_component.hpp"
if (!hasInterface) exitWith {};
["inventoryDisplayLoaded", {[ACE_player, _this select 0] call FUNC(updateInventoryDisplay)}] call EFUNC(common,addEventHandler);
["playerInventoryChanged", {
[_this select 0, _this select 1 select 11] call FUNC(takeLoadedATWeapon);
[_this select 0] call FUNC(updateInventoryDisplay);
}] call EFUNC(common,addEventHandler);

View File

@ -1,11 +0,0 @@
// by commy2
// The Arma InventoryOpened EH fires actually before the inventory dialog is opened (findDisplay 602 => displayNull).
#include "script_component.hpp"
["inventoryDisplayLoaded",{
_player = ACE_player;
[_player] call FUNC(takeLoadedATWeapon);
[_player, (_this select 0)] call FUNC(updateInventoryDisplay);
}] call EFUNC(common,addEventHandler);

View File

@ -31,7 +31,7 @@
<Polish>Wstępnie załadowana atrapa pocisku</Polish>
<Spanish>Preloaded Missile Dummy</Spanish>
<Hungarian>Előtöltött műrakéta</Hungarian>
<Russian>Заряженная ракетная пустышка</Russian>
<Russian>Предзаряженная ракетная болванка</Russian>
<Italian>Missile stupido precaricato</Italian>
</Key>
</Package>

View File

@ -35,13 +35,6 @@ class RscInGameUI {
};
};
};
class RscOptics_LaserDesignator {
class CA_IGUI_elements_group: RscControlsGroup {
class controls {
MACRO_RANGEFINDER
};
};
};
class RscWeaponRangeFinderMAAWS {
class CA_IGUI_elements_group: RscControlsGroup {
class controls {

View File

@ -13,6 +13,8 @@
*/
#include "script_component.hpp"
private ["_interval", "_player", "_newVel", "_accel", "_currentGForce", "_average", "_sum", "_classCoef", "_suitCoef", "_gBlackOut", "_gRedOut", "_g", "_gBO", "_coef", "_strength"];
EXPLODE_2_PVT(_this,_params,_pfhId);
_interval = time - GVAR(lastUpdateTime);

View File

@ -56,6 +56,7 @@ FUNC(CheckGlasses) = {
};
player addEventHandler ["Explosion", {
private "_effects";
if (alive ace_player) then {
call FUNC(ApplyDirtEffect);
if (GETBROKEN) exitWith {};

View File

@ -16,7 +16,7 @@
#include "script_component.hpp"
if (cameraOn != ace_player || {call FUNC(externalCamera)}) exitWith{false};
private "_dirtImage";
private ["_dirtImage", "_applied", "_effects"];
_effects = GETGLASSES(ace_player);
_effects set [DIRT, true];
SETGLASSES(ace_player,_effects);

View File

@ -16,7 +16,8 @@
*/
#include "script_component.hpp"
private "_broken";
private ["_broken", "_effects"];
_broken = GETBROKEN;
_effects = GLASSESDEFAULT;
_effects set [BROKEN, _broken];

View File

@ -9,7 +9,7 @@
* The rating [0-3] <NUMBER>
*
* Example:
* _rating = 0.05 call ace_goggles_fnc_getExplosionIndex;
* 0.05 call ace_goggles_fnc_getExplosionIndex;
*
* Public: No
*/

View File

@ -14,8 +14,10 @@
* Public: Yes
*/
#include "script_component.hpp"
private ["_currentGlasses", "_result", "_unit"];
_unit = _this select 0;
PARAMS_1(_unit);
private ["_currentGlasses", "_result", "_position", "_visible"];
_currentGlasses = goggles _unit;
_result = false;

View File

@ -15,7 +15,7 @@
*/
#include "script_component.hpp"
private ["_affected", "_strength", "_posGrenade", "_posUnit", "_angleGrenade", "_angleView", "_angleDiff", "_light", "_losCount"];
private ["_affected", "_strength", "_posGrenade", "_posUnit", "_angleGrenade", "_angleView", "_angleDiff", "_light", "_losCount", "_dirToUnitVector", "_eyeDir", "_eyePos"];
PARAMS_1(_grenade);

View File

@ -20,6 +20,7 @@ PARAMS_1(_projectile);
if (alive _projectile) then {
playSound3D ["A3\Sounds_F\weapons\Explosion\explosion_mine_1.wss", _projectile, false, getPosASL _projectile, 5, 1.2, 400];
private "_affected";
_affected = _projectile nearEntities ["CAManBase", 50];
["flashbangExplosion", _affected, [_projectile]] call EFUNC(common,targetEvent);
};

View File

@ -21,7 +21,7 @@
*/
#include "script_component.hpp"
private ["_unit", "_firer", "_distance", "_weapon", "_muzzle", "_mode", "_ammo", "_silencer", "_audibleFireCoef", "_loudness", "_strength"];
private ["_unit", "_firer", "_distance", "_weapon", "_muzzle", "_mode", "_ammo", "_silencer", "_audibleFireCoef", "_loudness", "_strength", "_audibleFire", "_audibleFireTime", "_audibleFireTimeCoef"];
_unit = _this select 0;
_firer = _this select 1;

View File

@ -10,8 +10,7 @@
*/
#include "script_component.hpp"
_logic = _this select 0;
_activated = _this select 2;
PARAMS_3(_logic,_units,_activated);
if !(_activated) exitWith {};

View File

@ -18,6 +18,8 @@
#define STRENGHTODEAFNESS 3
#define MAXDEAFNESS 1.1
private ["_recoverRate", "_volume"];
// Exit if combat deafness is disabled
if !(GVAR(enableCombatDeafness)) exitWith {};

View File

@ -19,7 +19,7 @@
<Spanish>Los tapones para los oídos permiten al usuario operar armamento ruidoso sin sufrir pérdida de audición.</Spanish>
<Polish>Stopery do uszu umożliwiają użytkownikowi przebywać w pobliżu głośnej broni bez poniesienia konsekwencji jaką jest utrata słuchu.</Polish>
<Czech>Ochranné špunty umožňují uživateli, aby neutrpěl zranění jeho sluchu v blízkosti hlasitých zbraní.</Czech>
<Russian>Беруши позволяют избежать потери слуха при близкой громкой стрельбе.</Russian>
<Russian>Беруши позволяют носителю находиться возле громкого вооружения без потери слуха.</Russian>
<French>Bouchons Anti-Bruits pour la prévention des traumatismes sonores aigus.</French>
<Hungarian>Erősebb hanghatásoktól védő füldugó, megakadályozza a nagy hanggal járó fegyverzettől való halláskárosodást.</Hungarian>
<Portuguese>Protetor para ouvidos permitem que o usuário esteja próximo a ruídos sem danificar sua audição.</Portuguese>

View File

@ -22,6 +22,13 @@ private ["_target","_player","_fullPath","_activeChildren","_dynamicChildren","_
_target = _object;
_player = ACE_player;
// Check if the function should be modified first
if !((_origActionData select 10) isEqualTo {}) then {
// It should, so make a copy and pass it to the modifierFunction
_origActionData = +_origActionData;
[_target, ACE_player, _origActionData select 6, _origActionData] call (_origActionData select 10);
};
// Return nothing if the action itself is not active
if !([_target, ACE_player, _origActionData select 6] call (_origActionData select 4)) exitWith {
[]

Some files were not shown because too many files have changed in this diff Show More