mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
ATragMX - Fixed UI (C1 vs. Distance interpolation) (#5720)
* The C1 coefficient needs to be updated automatically whenever the target range changes
This commit is contained in:
parent
1b3052584e
commit
0bae4511e4
@ -15,10 +15,9 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private _target = 0 max _this min 3;
|
||||
GVAR(currentTarget) = 0 max _this min 3;
|
||||
|
||||
[] call FUNC(parse_input);
|
||||
GVAR(targetRangeDirtyFlag) = true;
|
||||
|
||||
GVAR(currentTarget) = _target;
|
||||
call FUNC(update_target_selection);
|
||||
call FUNC(calculate_target_solution);
|
||||
|
@ -84,6 +84,8 @@ GVAR(truingDropMuzzleVelocity) = 0;
|
||||
|
||||
GVAR(targetSolutionInput) = nil;
|
||||
|
||||
GVAR(targetRangeDirtyFlag) = false;
|
||||
|
||||
GVAR(showMainPage) = true;
|
||||
GVAR(showAddNewGun) = false;
|
||||
GVAR(showAtmoEnvData) = false;
|
||||
|
@ -99,6 +99,7 @@ if (GVAR(currentUnit) == 1) then {
|
||||
} else {
|
||||
_targetRange = 25 max _targetRange min 3700;
|
||||
};
|
||||
GVAR(targetRangeDirtyFlag) = GVAR(targetRangeDirtyFlag) || {_targetRange != GVAR(targetRange) select GVAR(currentTarget)};
|
||||
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), _windSpeed1];
|
||||
@ -173,6 +174,11 @@ if (_muzzleVelocity != GVAR(workingMemory) select 1) then {
|
||||
GVAR(workingMemory) set [1, _muzzleVelocity];
|
||||
GVAR(workingMemory) set [2, _zeroRange];
|
||||
|
||||
if (GVAR(targetRangeDirtyFlag) && missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then {
|
||||
[false, false] call FUNC(recalculate_c1_ballistic_coefficient);
|
||||
GVAR(targetRangeDirtyFlag) = false;
|
||||
};
|
||||
|
||||
[] call FUNC(update_gun);
|
||||
[] call FUNC(update_gun_ammo_data);
|
||||
[] call FUNC(update_atmosphere);
|
||||
|
@ -21,6 +21,8 @@ if (!GVAR(initialised)) exitWith {};
|
||||
|
||||
params ["_slopeDistance", "_azimuth", "_inclination"];
|
||||
|
||||
GVAR(targetRangeDirtyFlag) = (round(_slopeDistance) != (GVAR(targetRange) select GVAR(currentTarget)));
|
||||
|
||||
GVAR(inclinationAngle) set [GVAR(currentTarget), round(_inclination)];
|
||||
GVAR(directionOfFire) set [GVAR(currentTarget), round(_azimuth)];
|
||||
GVAR(targetRange) set [GVAR(currentTarget), round(_slopeDistance)];
|
||||
|
Loading…
Reference in New Issue
Block a user