mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Overworked the ATragMX target slot logic:
*Added missing privates *Solutions are now automatically calculated on target/gun selection
This commit is contained in:
@ -18,21 +18,21 @@
|
||||
[] call FUNC(parse_input);
|
||||
|
||||
private ["_scopeBaseAngle"];
|
||||
_scopeBaseAngle = ((GVAR(workingMemory) select GVAR(currentTarget)) select 3);
|
||||
_scopeBaseAngle = (GVAR(workingMemory) select 3);
|
||||
|
||||
private ["_bulletMass", "_boreHeight", "_airFriction", "_muzzleVelocity", "_bc", "_dragModel", "_atmosphereModel"];
|
||||
_bulletMass = (GVAR(workingMemory) select GVAR(currentTarget)) select 12;
|
||||
_boreHeight = (GVAR(workingMemory) select GVAR(currentTarget)) select 5;
|
||||
_airFriction = (GVAR(workingMemory) select GVAR(currentTarget)) select 4;
|
||||
_muzzleVelocity = (GVAR(workingMemory) select GVAR(currentTarget)) select 1;
|
||||
_bc = (GVAR(workingMemory) select GVAR(currentTarget)) select 15;
|
||||
_dragModel = (GVAR(workingMemory) select GVAR(currentTarget)) select 16;
|
||||
_atmosphereModel = (GVAR(workingMemory) select GVAR(currentTarget)) select 17;
|
||||
_bulletMass = GVAR(workingMemory) select 12;
|
||||
_boreHeight = GVAR(workingMemory) select 5;
|
||||
_airFriction = GVAR(workingMemory) select 4;
|
||||
_muzzleVelocity = GVAR(workingMemory) select 1;
|
||||
_bc = GVAR(workingMemory) select 15;
|
||||
_dragModel = GVAR(workingMemory) select 16;
|
||||
_atmosphereModel = GVAR(workingMemory) select 17;
|
||||
|
||||
private ["_temperature", "_barometricPressure", "_relativeHumidity"];
|
||||
_temperature = (GVAR(temperature) select GVAR(currentTarget));
|
||||
_barometricPressure = (GVAR(barometricPressure) select GVAR(currentTarget));
|
||||
_relativeHumidity = (GVAR(relativeHumidity) select GVAR(currentTarget));
|
||||
_temperature = GVAR(temperature);
|
||||
_barometricPressure = GVAR(barometricPressure);
|
||||
_relativeHumidity = GVAR(relativeHumidity);
|
||||
if (GVAR(currentUnit) == 1) then
|
||||
{
|
||||
_temperature = (_temperature - 32) / 1.8;
|
||||
@ -55,6 +55,7 @@ if (GVAR(currentUnit) == 1) then
|
||||
_targetSpeed = _targetSpeed / 2.23693629;
|
||||
};
|
||||
|
||||
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);
|
||||
|
||||
|
Reference in New Issue
Block a user