mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' into userActionPrototype
This commit is contained in:
commit
334647fa60
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,3 +4,4 @@ release/*
|
||||
texHeaders.bin
|
||||
*.swp
|
||||
*.swo
|
||||
*.biprivatekey
|
||||
|
23
AUTHORS.txt
23
AUTHORS.txt
@ -17,7 +17,7 @@ Janus
|
||||
Kieran
|
||||
NouberNou
|
||||
PabstMirror <pabstmirror@gmail.com>
|
||||
Ruthberg
|
||||
Ruthberg <ulteq@web.de>
|
||||
tpM
|
||||
ViperMaul
|
||||
VKing <kauestad@gmail.com>
|
||||
@ -30,9 +30,12 @@ ACCtomeek <tomeek99@gmail.com>
|
||||
Adanteh
|
||||
aeroson
|
||||
Aggr094 <bastards4glory@gmail.com>
|
||||
Alganthe <alganthe@live.fr>
|
||||
Anthariel <Contact@storm-simulation.com>
|
||||
BlackQwar
|
||||
Brakoviejo
|
||||
Brisse <brisse@outlook.com>
|
||||
Clon1998 <ps.patti1998@gmail.com>
|
||||
Codingboy
|
||||
Crusty
|
||||
eRazeri
|
||||
@ -40,14 +43,16 @@ evromalarkey <evromalarkey@gmail.com>
|
||||
Falke75
|
||||
Ferenczi
|
||||
Ferenzi
|
||||
Filip Basara <filip.basara93@googlemail.com> (Logo)
|
||||
Filip Basara <filip.basara93@googlemail.com>
|
||||
FreeZbe <freeseb@gmail.com>
|
||||
geraldbolso1899
|
||||
Ghost
|
||||
GieNkoV <gienkov.grzegorz@gmail.com>
|
||||
gpgpgpgp
|
||||
Grzegorz
|
||||
Gianmarco Varriale (TeamNuke) <admin@forhost.org>
|
||||
Hamburger SV
|
||||
Harakhti <shadowdragonphd@gmail.com>
|
||||
havena <silveredenis@gmail.com>
|
||||
Hawkins
|
||||
jokoho48
|
||||
@ -59,14 +64,17 @@ MarcBook
|
||||
meat <p.humberdroz@gmail.com>
|
||||
Michail Nikolaev
|
||||
nic547 <nic547@outlook.com>
|
||||
nomisum <nomisum@gmail.com>
|
||||
oscarmolinadev
|
||||
pokertour
|
||||
rakowozz
|
||||
Raspu86
|
||||
Riccardo Petricca <petriccarcc@gmail.com>
|
||||
Robert Boklahánics <bokirobi@gmail.com>
|
||||
simon84
|
||||
ramius86 <pasini86@hotmail.com>
|
||||
simon84 <badguy360th@gmail.com>
|
||||
Sniperwolf572 <tenga6@gmail.com>
|
||||
Tachi <zaveruha007@gmail.com>
|
||||
Tonic
|
||||
Tourorist <tourorist@gmail.com>
|
||||
Valentin Torikian <valentin.torikian@gmail.com>
|
||||
@ -76,4 +84,11 @@ ruPaladin <happyworm24@rambler.ru>
|
||||
BlackPixxel
|
||||
Asgar Serran <piechottaf@web.de>
|
||||
Kavinsky <nmunozfernandez@gmail.com>
|
||||
|
||||
Coren <coren4@gmail.com>
|
||||
OnkelDisMaster <onkeldismaster@gmail.com>
|
||||
Dimaslg <dimaslg@telecable.e>
|
||||
VyMajoris(W-Cephei)<vycanismajoriscsa@gmail.com>
|
||||
Bla1337
|
||||
nikolauska <nikolauska1@gmail.com>
|
||||
adam3adam <br.ada@seznam.cz>
|
||||
Professor <lukas.trneny@wo.cz>
|
||||
|
6
LICENSE
6
LICENSE
@ -1,4 +1,4 @@
|
||||
Copyright (C) 2014 Felix "KoffeinFlummi" Wiegand
|
||||
Copyright (C) 2015 Felix "KoffeinFlummi" Wiegand
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -22,6 +22,10 @@ source code of the individual modules.
|
||||
When publishing a derivative of this product you may not use a name that
|
||||
might create the impression that your version is an official release.
|
||||
|
||||
Some folders of this project may contain a seperate LICENSE file. Should
|
||||
that be the case, everything in that folder and all subfolders is subject
|
||||
to that license instead.
|
||||
|
||||
|
||||
============================================================================
|
||||
Full Gnu General Public License Text
|
||||
|
89
README.md
89
README.md
@ -1,48 +1,83 @@
|
||||
<p align="center">
|
||||
<img src="https://github.com/acemod/ACE3/blob/master/extras/assets/logo/black/ACE3-Logo.jpg" height="80" />
|
||||
<img src="https://github.com/acemod/ACE3/blob/master/extras/assets/logo/black/ACE3-Logo.jpg"
|
||||
height="112">
|
||||
</p>
|
||||
<p align="center">
|
||||
<a href="https://github.com/acemod/ACE3/releases">
|
||||
<img src="http://img.shields.io/badge/release-3.0-green.svg?style=flat" alt="ACE version">
|
||||
<img src="http://img.shields.io/badge/Version-3.0.0-blue.svg?style=flat"
|
||||
alt="ACE version">
|
||||
</a>
|
||||
<a href="#">
|
||||
<img src="http://img.shields.io/badge/download-22_MB-blue.svg?style=flat" alt="ACE download">
|
||||
<a href="https://github.com/acemod/ACE3/archive/master.zip">
|
||||
<img src="http://img.shields.io/badge/Download-48.3_MB-green.svg?style=flat"
|
||||
alt="ACE download">
|
||||
</a>
|
||||
<a href="https://github.com/acemod/ACE3/issues">
|
||||
<img src="http://img.shields.io/github/issues/acemod/ACE3.svg?style=flat" alt="ACE issues">
|
||||
<img src="http://img.shields.io/github/issues-raw/acemod/ACE3.svg?style=flat&label=Issues"
|
||||
alt="ACE issues">
|
||||
</a>
|
||||
<a href="http://forums.bistudio.com/showthread.php?190433-ACE3-A-collaborative-merger-between-AGM-CSE-and-ACE&p=2910796&viewfull=1#post2910796">
|
||||
<img src="https://img.shields.io/badge/BIF-Thread-lightgrey.svg?style=flat"
|
||||
alt="BIF thread">
|
||||
</a>
|
||||
<a href="https://github.com/acemod/ACE3/blob/master/LICENSE">
|
||||
<img src="http://img.shields.io/badge/license-GPLv2-red.svg?style=flat" alt="ACE license">
|
||||
<img src="http://img.shields.io/badge/License-GPLv2-red.svg?style=flat"
|
||||
alt="ACE license">
|
||||
</a>
|
||||
</p>
|
||||
<p align="center"><sup><strong>Requires the latest version of <a href="http://www.armaholic.com/page.php?id=18767">CBA A3</a> | <a href="#">BIF thread</a></strong></sup></p>
|
||||
<p align="center"><sup><strong>Requires the latest version of <a href="http://www.armaholic.com/page.php?id=18767">CBA A3</a>. Visit us on <a href="https://www.facebook.com/ACE3Mod">Facebook</a> | <a href="https://www.youtube.com/c/ACE3Mod">YouTube</a> | <a href="https://twitter.com/ACE3Mod">Twitter</a> | <a href="http://www.reddit.com/r/arma/search?q=ACE&restrict_sr=on&sort=new&t=all">Reddit</a></strong></sup></p>
|
||||
|
||||
**ACE3** is a joint effort by the teams behind **ACE2**, **AGM** and **CSE** to improve the realism and authenticity of Arma 3.
|
||||
|
||||
This mod is entirely **open-source**, and everyone is free to propose changes or maintain their own, customized version as long as they make their changes open to the public in accordance with the GNU General Public License (for more information check the license file attached to this project).
|
||||
The project is entirely **open-source** and all contributions are welcome. Feel free to maintain your own custom version, so long as the changes you make are open to the public in accordance with the GNU General Public License ([GPLv2](https://github.com/acemod/ACE3/blob/master/LICENSE)).
|
||||
|
||||
The mod is **built modularly** — almost any PBO can be removed, thus a team can maintain its own tailored version of ACE, which excludes a select number of components that they don't like, or which conflict with other add-ons. Components themselves, like e.g. the medical system, also include various customization options, allowing mission designers to tweak the overall experience.
|
||||
The mod is **built modularly**, so almost any included PBO can be easily removed from the configuration. This way, a team can maintain its own tailored version of ACE by simply excluding any components they don't need, or those possibly in conflict with other add-ons. Modules themselves, e.g. the medical system, also include various customization options, allowing mission designers to tweak the overall experience.
|
||||
|
||||
### Features
|
||||
* Improved medical system
|
||||
* Logistics system including cargo transport and vehicle maintenance
|
||||
* Explosives system including different trigger types
|
||||
* Captivity system
|
||||
* Realistic names for vehicles and weapons
|
||||
* Realistic ballistics including wind and humidity
|
||||
* Backblast simulation
|
||||
* A fire control system for armored vehicles and helicopters
|
||||
***and more...***
|
||||
### Core features
|
||||
* Brand new 3D interaction/action system
|
||||
* Performance and reliability framework
|
||||
* Focus on modularity and customization
|
||||
* New flexible client and server settings & configuration
|
||||
* Improved medical system with various levels (basic/advanced) focus on gameplay/realism
|
||||
* Proper & consistent network-synced weather
|
||||
* Wind and weather-based ballistics
|
||||
* Captivity system
|
||||
* Explosives system, including different trigger types
|
||||
* Map screen improvements – marker placement and map tools
|
||||
* Advanced missile guidance and laser designation
|
||||
|
||||
#### Guides & How-Tos
|
||||
If you installed ACE3, but have trouble understanding how it all works, or where to start — see [Getting Started](https://github.com/acemod/ACE3/blob/master/documentation/user/getting-started.md).
|
||||
#### Additional features
|
||||
* Carrying and dragging
|
||||
* Realistic names for vehicles and weapons
|
||||
* A fire control system (FCS) for armored vehicles and helicopters
|
||||
* Realistic ballistics/FCS calculated in C/C++ extensions
|
||||
* Backblast area and overpressure simulation
|
||||
* Disposable launchers
|
||||
* Realistic G-forces
|
||||
* Vehicle locking
|
||||
* Realistic night and thermal vision modes
|
||||
* Magazine repacking
|
||||
* Realistic weapon overheating mechanic
|
||||
* Combat deafness (temporary loss of hearing) simulation
|
||||
* Improved ragdoll physics
|
||||
* Improved interactions for AARs and ammo bearers
|
||||
* Adjustable sniper scopes
|
||||
* No idle animation with lowered weapon
|
||||
* No talking player avatar
|
||||
* Jumping over obstacles, climbing over walls and cutting down fences
|
||||
* Vector, MicroDAGR and Kestrel devices<br>
|
||||
***and much more...***
|
||||
|
||||
### Guides & how-tos
|
||||
If you installed ACE3 but have trouble understanding how it all works, or where to start, read this first:
|
||||
* [Getting started](http://ace3mod.com/wiki/user/getting-started.html)
|
||||
|
||||
#### 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.
|
||||
You can help out with the ongoing development by looking for potential bugs in our code base, or by contributing new features. To contribute something to ACE, simply fork this repository and submit your pull requests for review by other collaborators. Remember to add yourself to the author array of any PBO you will be editing and the [`AUTHORS.txt`](https://github.com/acemod/ACE3/blob/master/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).
|
||||
Please, use our [Issue Tracker](https://github.com/acemod/ACE3/issues) to report a bug, propose a feature, or suggest changes to the existing ones. See also:
|
||||
* [How to report an issue](http://ace3mod.com/wiki/user/how-to-report-an-issue.html)
|
||||
* [How to make a feature request](http://ace3mod.com/wiki/user/how-to-make-a-feature-request.html)
|
||||
|
||||
#### 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).
|
||||
|
||||
To find out how to set up your development environment and build a version of ACE for testing, follow [these instructions](https://github.com/acemod/ACE3/blob/master/documentation/development/setting-up-the-development-environment.md).
|
||||
#### Testing & building
|
||||
To help us test the latest development changes, download our master branch ([directly](https://github.com/acemod/ACE3/archive/master.zip), or [with git](https://help.github.com/articles/fetching-a-remote/)), then assemble a test build:
|
||||
* [Setting up the development environment](http://ace3mod.com/wiki/development/setting-up-the-development-environment.html) – step-by-step instructions on how to properly setup and build a version of ACE for testing purposes.
|
||||
|
Binary file not shown.
BIN
ace_break_line.dll
Normal file
BIN
ace_break_line.dll
Normal file
Binary file not shown.
BIN
ace_fcs.dll
BIN
ace_fcs.dll
Binary file not shown.
@ -57,7 +57,7 @@ class ACE_Settings {
|
||||
};
|
||||
class GVAR(simulationRadius) {
|
||||
displayName = "Simulation Radius";
|
||||
description = "Defines the radius (in meters) in which advanced ballistics are applied";
|
||||
description = "Defines the radius around the player (in meters) at which advanced ballistics are applied to projectiles";
|
||||
typeName = "SCALAR";
|
||||
value = 3000;
|
||||
};
|
||||
|
@ -69,7 +69,7 @@ class CfgVehicles {
|
||||
};
|
||||
class simulationRadius {
|
||||
displayName = "Simulation Radius";
|
||||
description = "Defines the radius (in meters) in which advanced ballistics are applied";
|
||||
description = "Defines the radius around the player (in meters) at which advanced ballistics are applied to projectiles";
|
||||
typeName = "NUMBER";
|
||||
defaultValue = 3000;
|
||||
};
|
||||
|
@ -20,26 +20,19 @@ GVAR(WindInfoStart) = time;
|
||||
GVAR(Protractor) = false;
|
||||
GVAR(ProtractorStart) = time;
|
||||
|
||||
// Those are only used in the pure sqf version (extension free PFH)
|
||||
GVAR(SimulationPrecision) = 2;
|
||||
GVAR(WindEnabled) = true;
|
||||
GVAR(SpinDriftEnabled) = true;
|
||||
GVAR(CoriolisEnabled) = true;
|
||||
GVAR(EoetvoesEnabled) = true;
|
||||
GVAR(AdvancedAirDragEnabled) = true;
|
||||
GVAR(TransonicRegionEnabled) = true;
|
||||
GVAR(AtmosphericDensitySimulationEnabled) = true;
|
||||
|
||||
GVAR(currentGrid) = 0;
|
||||
GVAR(INIT_MESSAGE_ENABLED) = false;
|
||||
|
||||
GVAR(extensionAvailable) = "ace_advanced_ballistics" callExtension "version" == "1.0";
|
||||
GVAR(extensionAvailable) = true;
|
||||
/* @TODO: Remove this until versioning is in sync with cmake/build versioning
|
||||
GVAR(extensionVersion) = ("ace_advanced_ballistics" callExtension "version");
|
||||
GVAR(extensionAvailable) = (GVAR(extensionVersion) == EXTENSION_REQUIRED_VERSION);
|
||||
if (!GVAR(extensionAvailable)) exitWith {
|
||||
if ("ace_advanced_ballistics" callExtension "version" == "") then {
|
||||
if (GVAR(extensionVersion) == "") then {
|
||||
diag_log text "[ACE] ERROR: ace_advanced_ballistics.dll is missing";
|
||||
} else {
|
||||
diag_log text "[ACE] ERROR: ace_advanced_ballistics.dll is incompatible";
|
||||
};
|
||||
};
|
||||
|
||||
*/
|
||||
[] call FUNC(initializeTerrainExtension);
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
ADDON = false;
|
||||
|
||||
PREP(calculateAirDensity);
|
||||
PREP(calculateAmmoTemperatureVelocityShift);
|
||||
PREP(calculateAtmosphericCorrection);
|
||||
PREP(calculateBarrelLengthVelocityShift);
|
||||
|
@ -15,4 +15,8 @@ class CfgPatches {
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
#include "RscTitles.hpp"
|
||||
#include "ACE_Settings.hpp"
|
||||
#include "ACE_Settings.hpp"
|
||||
|
||||
class ACE_Extensions {
|
||||
extensions[] += {"ace_advanced_ballistics"};
|
||||
};
|
||||
|
@ -24,7 +24,7 @@ _pressure = _this select 2; // in hPa
|
||||
_relativeHumidity = _this select 3; // as ratio 0-1
|
||||
_atmosphereModel = _this select 4; // "ICAO" or "ASM"
|
||||
|
||||
_airDensity = [_temperature, _pressure, _relativeHumidity] call FUNC(calculateAirDensity);
|
||||
_airDensity = [_temperature, _pressure, _relativeHumidity] call EFUNC(weather,calculateAirDensity);
|
||||
|
||||
if (_atmosphereModel == "ICAO") then {
|
||||
(STD_AIR_DENSITY_ICAO / _airDensity) * _ballisticCoefficient
|
||||
|
@ -22,9 +22,9 @@ if (GVAR(Protractor)) exitWith {
|
||||
1 cutText ["", "PLAIN"];
|
||||
true
|
||||
};
|
||||
if (weaponLowered ACE_player) exitWith { true };
|
||||
if (vehicle ACE_player != ACE_player) exitWith { true };
|
||||
if (currentWeapon ACE_player != primaryWeapon ACE_player) exitWith { true };
|
||||
if (weaponLowered ACE_player) exitWith { false };
|
||||
if (vehicle ACE_player != ACE_player) exitWith { false };
|
||||
if (currentWeapon ACE_player != primaryWeapon ACE_player) exitWith { false };
|
||||
|
||||
2 cutText ["", "PLAIN"];
|
||||
EGVAR(weather,WindInfo) = false;
|
||||
|
@ -19,7 +19,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit", "_weapon", "_mode", "_ammo", "_magazine", "_caliber", "_bullet", "_abort", "_index", "_opticsName", "_opticType", "_bulletTraceVisible", "_temperature", "_barometricPressure", "_atmosphereModel", "_bulletMass", "_bulletLength", "_bulletTranslation", "_airFriction", "_dragModel", "_velocityBoundaryData", "_muzzleVelocity", "_muzzleVelocityCoef", "_muzzleVelocityShift", "_bulletVelocity", "_bulletSpeed", "_bulletLength", "_bulletWeight", "_barrelTwist", "_twistDirection", "_stabilityFactor", "_transonicStabilityCoef", "_ACE_Elevation", "_ACE_Windage", "_ID"];
|
||||
private ["_unit", "_weapon", "_mode", "_ammo", "_magazine", "_caliber", "_bullet", "_abort", "_index", "_opticsName", "_opticType", "_bulletTraceVisible", "_temperature", "_barometricPressure", "_atmosphereModel", "_bulletMass", "_bulletLength", "_airFriction", "_dragModel", "_muzzleVelocity", "_muzzleVelocityShift", "_bulletVelocity", "_bulletSpeed", "_bulletLength", "_barrelTwist", "_twistDirection", "_stabilityFactor", "_transonicStabilityCoef", "_ballisticCoefficients", "_velocityBoundaries"];
|
||||
_unit = _this select 0;
|
||||
_weapon = _this select 1;
|
||||
_mode = _this select 3;
|
||||
@ -35,49 +35,34 @@ if (!([_unit] call EFUNC(common,isPlayer))) exitWith {};
|
||||
if (underwater _unit) exitWith {};
|
||||
if (!(_ammo isKindOf "BulletBase")) exitWith {};
|
||||
if (_unit distance ACE_player > GVAR(simulationRadius)) exitWith {};
|
||||
if (GVAR(onlyActiveForLocalPlayers) && _unit != ACE_player) then { _abort = true; };
|
||||
//if (!GVAR(vehicleGunnerEnabled) && !(_unit isKindOf "Man")) then { _abort = true; }; // TODO: We currently do not have firedEHs on vehicles
|
||||
if (GVAR(disabledInFullAutoMode) && getNumber(configFile >> "cfgWeapons" >> _weapon >> _mode >> "autoFire") == 1) then { _abort = true; };
|
||||
|
||||
if (_abort && alwaysSimulateForSnipers) then {
|
||||
// The shooter is non local
|
||||
if (currentWeapon _unit == primaryWeapon _unit && count primaryWeaponItems _unit > 2) then {
|
||||
_opticsName = (primaryWeaponItems _unit) select 2;
|
||||
_opticType = getNumber(configFile >> "cfgWeapons" >> _opticsName >> "ItemInfo" >> "opticType");
|
||||
_abort = _opticType != 2; // We only abort if the non local shooter is not a sniper
|
||||
if (GVAR(onlyActiveForLocalPlayers) && !(local _unit)) then {
|
||||
if (GVAR(alwaysSimulateForSnipers)) then {
|
||||
// The shooter is non local
|
||||
if (currentWeapon _unit == primaryWeapon _unit && count primaryWeaponItems _unit > 2) then {
|
||||
_opticsName = (primaryWeaponItems _unit) select 2;
|
||||
_opticType = getNumber(configFile >> "cfgWeapons" >> _opticsName >> "ItemInfo" >> "opticType");
|
||||
_abort = _opticType != 2; // We only abort if the non local shooter is not a sniper
|
||||
};
|
||||
} else {
|
||||
_abort = true;
|
||||
};
|
||||
};
|
||||
//if (!GVAR(vehicleGunnerEnabled) && !(_unit isKindOf "Man")) then { _abort = true; }; // We currently do not have firedEHs on vehicles
|
||||
if (GVAR(disabledInFullAutoMode) && getNumber(configFile >> "cfgWeapons" >> _weapon >> _mode >> "autoFire") == 1) then { _abort = true; };
|
||||
|
||||
if (_abort || !(GVAR(extensionAvailable))) exitWith {
|
||||
[_bullet, getNumber(configFile >> "cfgAmmo" >> _ammo >> "airFriction")] call EFUNC(winddeflection,updateTrajectoryPFH);
|
||||
};
|
||||
|
||||
_airFriction = getNumber(configFile >> "cfgAmmo" >> _ammo >> "airFriction");
|
||||
_muzzleVelocity = getNumber(configFile >> "cfgMagazines" >> _magazine >> "initSpeed");
|
||||
_muzzleVelocityCoef = getNumber(configFile >> "cfgWeapons" >> _weapon >> "initSpeed");
|
||||
if (_muzzleVelocityCoef > 0) then {
|
||||
_muzzleVelocity = _muzzleVelocityCoef;
|
||||
};
|
||||
if (_muzzleVelocityCoef < 0) then {
|
||||
_muzzleVelocity = _muzzleVelocity * (-1 * _muzzleVelocityCoef);
|
||||
};
|
||||
|
||||
_muzzleAccessory = "";
|
||||
switch (currentWeapon _unit) do {
|
||||
case primaryWeapon _unit: { _muzzleAccessory = (primaryWeaponItems _unit) select 0; };
|
||||
case handgunWeapon _unit: { _muzzleAccessory = (handgunItems _unit) select 0; };
|
||||
};
|
||||
|
||||
if (_muzzleAccessory != "" && isNumber(configFile >> "cfgWeapons" >> _muzzleAccessory >> "ItemInfo" >> "MagazineCoef" >> "initSpeed")) then {
|
||||
_initSpeedCoef = getNumber(configFile >> "cfgWeapons" >> _muzzleAccessory >> "ItemInfo" >> "MagazineCoef" >> "initSpeed");
|
||||
_muzzleVelocity = _muzzleVelocity * _initSpeedCoef;
|
||||
};
|
||||
_bulletVelocity = velocity _bullet;
|
||||
_muzzleVelocity = vectorMagnitude _bulletVelocity;
|
||||
|
||||
if (GVAR(barrelLengthInfluenceEnabled)) then {
|
||||
_muzzleVelocityShift = [_ammo, _weapon, _muzzleVelocity] call FUNC(calculateBarrelLengthVelocityShift);
|
||||
if (_muzzleVelocityShift != 0) then {
|
||||
_bulletVelocity = velocity _bullet;
|
||||
_bulletSpeed = vectorMagnitude _bulletVelocity;
|
||||
_bulletVelocity = _bulletVelocity vectorAdd ((vectorNormalized _bulletVelocity) vectorMultiply (_muzzleVelocityShift * (_bulletSpeed / _muzzleVelocity)));
|
||||
_bulletVelocity = _bulletVelocity vectorAdd ((vectorNormalized _bulletVelocity) vectorMultiply (_muzzleVelocityShift));
|
||||
_bullet setVelocity _bulletVelocity;
|
||||
_muzzleVelocity = _muzzleVelocity + _muzzleVelocityShift;
|
||||
};
|
||||
@ -87,20 +72,23 @@ if (GVAR(ammoTemperatureEnabled)) then {
|
||||
_temperature = GET_TEMPERATURE_AT_HEIGHT((getPosASL _unit) select 2);
|
||||
_muzzleVelocityShift = [_ammo, _temperature] call FUNC(calculateAmmoTemperatureVelocityShift);
|
||||
if (_muzzleVelocityShift != 0) then {
|
||||
_bulletVelocity = velocity _bullet;
|
||||
_bulletSpeed = vectorMagnitude _bulletVelocity;
|
||||
_bulletVelocity = _bulletVelocity vectorAdd ((vectorNormalized _bulletVelocity) vectorMultiply (_muzzleVelocityShift * (_bulletSpeed / _muzzleVelocity)));
|
||||
_bulletVelocity = _bulletVelocity vectorAdd ((vectorNormalized _bulletVelocity) vectorMultiply (_muzzleVelocityShift));
|
||||
_bullet setVelocity _bulletVelocity;
|
||||
_muzzleVelocity = _muzzleVelocity + _muzzleVelocityShift;
|
||||
};
|
||||
};
|
||||
|
||||
// TODO: Make _bulletTraceVisible global and toggle it with events
|
||||
_bulletTraceVisible = false;
|
||||
if (GVAR(bulletTraceEnabled) && currentWeapon ACE_player == primaryWeapon ACE_player && count primaryWeaponItems ACE_player > 2) then {
|
||||
_opticsName = (primaryWeaponItems ACE_player) select 2;
|
||||
_opticType = getNumber(configFile >> "cfgWeapons" >> _opticsName >> "ItemInfo" >> "opticType");
|
||||
_bulletTraceVisible = (_opticType == 2 || currentWeapon ACE_player in ["ACE_Vector", "Binocular", "Rangefinder", "Laserdesignator"]) && cameraView == "GUNNER";
|
||||
if (GVAR(bulletTraceEnabled) && cameraView == "GUNNER") then {
|
||||
if (currentWeapon ACE_player in ["ACE_Vector", "Binocular", "Rangefinder", "Laserdesignator"]) then {
|
||||
_bulletTraceVisible = true;
|
||||
} else {
|
||||
if (currentWeapon ACE_player == primaryWeapon ACE_player && count primaryWeaponItems ACE_player > 2) then {
|
||||
_opticsName = (primaryWeaponItems ACE_player) select 2;
|
||||
_opticType = getNumber(configFile >> "cfgWeapons" >> _opticsName >> "ItemInfo" >> "opticType");
|
||||
_bulletTraceVisible = _opticType == 2;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
_caliber = getNumber(configFile >> "cfgAmmo" >> _ammo >> "ACE_caliber");
|
||||
@ -111,7 +99,7 @@ _stabilityFactor = 1.5;
|
||||
|
||||
if (_caliber > 0 && _bulletLength > 0 && _bulletMass > 0 && _barrelTwist > 0) then {
|
||||
_temperature = GET_TEMPERATURE_AT_HEIGHT((getPosASL _unit) select 2);
|
||||
_barometricPressure = 1013.25 * exp(-(EGVAR(weather,Altitude) + ((getPosASL _bullet) select 2)) / 7990) - 10 * overcast;
|
||||
_barometricPressure = ((getPosASL _bullet) select 2) call EFUNC(weather,calculateBarometricPressure);
|
||||
_stabilityFactor = [_caliber, _bulletLength, _bulletMass, _barrelTwist, _muzzleVelocity, _temperature, _barometricPressure] call FUNC(calculateStabilityFactor);
|
||||
};
|
||||
|
||||
@ -132,251 +120,47 @@ _dragModel = 1;
|
||||
_ballisticCoefficients = [];
|
||||
_velocityBoundaries = [];
|
||||
_atmosphereModel = "ICAO";
|
||||
if (GVAR(AdvancedAirDragEnabled)) then {
|
||||
if (isNumber(configFile >> "cfgAmmo" >> _ammo >> "ACE_dragModel")) then {
|
||||
_dragModel = getNumber(configFile >> "cfgAmmo" >> _ammo >> "ACE_dragModel");
|
||||
if (!(_dragModel in [1, 2, 5, 6, 7, 8])) then {
|
||||
_dragModel = 1;
|
||||
};
|
||||
};
|
||||
if (isArray(configFile >> "cfgAmmo" >> _ammo >> "ACE_ballisticCoefficients")) then {
|
||||
_ballisticCoefficients = getArray(configFile >> "cfgAmmo" >> _ammo >> "ACE_ballisticCoefficients");
|
||||
};
|
||||
if (isArray(configFile >> "cfgAmmo" >> _ammo >> "ACE_velocityBoundaries")) then {
|
||||
_velocityBoundaries = getArray(configFile >> "cfgAmmo" >> _ammo >> "ACE_velocityBoundaries");
|
||||
};
|
||||
if (isText(configFile >> "cfgAmmo" >> _ammo >> "ACE_standardAtmosphere")) then {
|
||||
_atmosphereModel = getText(configFile >> "cfgAmmo" >> _ammo >> "ACE_standardAtmosphere");
|
||||
if (isNumber(configFile >> "cfgAmmo" >> _ammo >> "ACE_dragModel")) then {
|
||||
_dragModel = getNumber(configFile >> "cfgAmmo" >> _ammo >> "ACE_dragModel");
|
||||
if (!(_dragModel in [1, 2, 5, 6, 7, 8])) then {
|
||||
_dragModel = 1;
|
||||
};
|
||||
};
|
||||
if (isArray(configFile >> "cfgAmmo" >> _ammo >> "ACE_ballisticCoefficients")) then {
|
||||
_ballisticCoefficients = getArray(configFile >> "cfgAmmo" >> _ammo >> "ACE_ballisticCoefficients");
|
||||
};
|
||||
if (isArray(configFile >> "cfgAmmo" >> _ammo >> "ACE_velocityBoundaries")) then {
|
||||
_velocityBoundaries = getArray(configFile >> "cfgAmmo" >> _ammo >> "ACE_velocityBoundaries");
|
||||
};
|
||||
if (isText(configFile >> "cfgAmmo" >> _ammo >> "ACE_standardAtmosphere")) then {
|
||||
_atmosphereModel = getText(configFile >> "cfgAmmo" >> _ammo >> "ACE_standardAtmosphere");
|
||||
};
|
||||
|
||||
#ifdef USE_ADVANCEDBALLISTICS_DLL
|
||||
GVAR(currentbulletID) = (GVAR(currentbulletID) + 1) % 10000;
|
||||
GVAR(currentbulletID) = (GVAR(currentbulletID) + 1) % 10000;
|
||||
|
||||
"ace_advanced_ballistics" callExtension format["new:%1:%2:%3:%4:%5:%6:%7:%8:%9:%10:%11:%12:%13:%14:%15:%16:%17:%18", GVAR(currentbulletID), _airFriction, _ballisticCoefficients, _velocityBoundaries, _atmosphereModel, _dragModel, _stabilityFactor, _twistDirection, _muzzleVelocity, _transonicStabilityCoef, getPosASL _bullet, EGVAR(weather,Latitude), EGVAR(weather,currentTemperature), EGVAR(weather,Altitude), EGVAR(weather,currentHumidity), overcast, floor(time), time - floor(time)];
|
||||
"ace_advanced_ballistics" callExtension format["new:%1:%2:%3:%4:%5:%6:%7:%8:%9:%10:%11:%12:%13:%14:%15:%16:%17:%18", GVAR(currentbulletID), _airFriction, _ballisticCoefficients, _velocityBoundaries, _atmosphereModel, _dragModel, _stabilityFactor, _twistDirection, _muzzleVelocity, _transonicStabilityCoef, getPosASL _bullet, EGVAR(weather,Latitude), EGVAR(weather,currentTemperature), EGVAR(weather,Altitude), EGVAR(weather,currentHumidity), overcast, floor(time), time - floor(time)];
|
||||
|
||||
[{
|
||||
private ["_index", "_bullet", "_caliber", "_bulletTraceVisible", "_bulletVelocity", "_bulletPosition"];
|
||||
EXPLODE_4_PVT(_this select 0,_bullet,_caliber,_bulletTraceVisible,_index);
|
||||
|
||||
if (!alive _bullet) exitWith {
|
||||
[_this select 1] call cba_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
_bulletVelocity = velocity _bullet;
|
||||
_bulletPosition = getPosASL _bullet;
|
||||
|
||||
if (_bulletTraceVisible && vectorMagnitude _bulletVelocity > 600) then {
|
||||
drop ["\A3\data_f\ParticleEffects\Universal\Refract","","Billboard",1,0.1,getPos _bullet,[0,0,0],0,1.275,1,0,[0.4*_caliber,0.2*_caliber],[[0,0,0,0.6],[0,0,0,0.4]],[1,0],0,0,"","",""];
|
||||
};
|
||||
|
||||
call compile ("ace_advanced_ballistics" callExtension format["simulate:%1:%2:%3:%4:%5:%6:%7", _index, _bulletVelocity, _bulletPosition, ACE_wind, ASLToATL(_bulletPosition) select 2, floor(time), time - floor(time)]);
|
||||
|
||||
}, GVAR(simulationInterval), [_bullet, _caliber, _bulletTraceVisible, GVAR(currentbulletID)]] call CBA_fnc_addPerFrameHandler;
|
||||
#else
|
||||
_index = count GVAR(bulletDatabase);
|
||||
if (count GVAR(bulletDatabaseFreeIndices) > 0) then {
|
||||
_index = GVAR(bulletDatabaseFreeIndices) select 0;
|
||||
GVAR(bulletDatabaseFreeIndices) = GVAR(bulletDatabaseFreeIndices) - [_index];
|
||||
[{
|
||||
private ["_args", "_index", "_bullet", "_caliber", "_bulletTraceVisible", "_bulletVelocity", "_bulletPosition"];
|
||||
_args = _this select 0;
|
||||
_bullet = _args select 0;
|
||||
_caliber = _args select 1;
|
||||
_bulletTraceVisible = _args select 2;
|
||||
_index = _args select 3;
|
||||
|
||||
_bulletVelocity = velocity _bullet;
|
||||
_bulletPosition = getPosASL _bullet;
|
||||
|
||||
_bulletSpeed = vectorMagnitude _bulletVelocity;
|
||||
|
||||
if (!alive _bullet || _bulletSpeed < 100) exitWith {
|
||||
[_this select 1] call cba_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
if (_bulletTraceVisible && _bulletSpeed > 600) then {
|
||||
drop ["\A3\data_f\ParticleEffects\Universal\Refract","","Billboard",1,0.1,getPos _bullet,[0,0,0],0,1.275,1,0,[0.4*_caliber,0.2*_caliber],[[0,0,0,0.6],[0,0,0,0.4]],[1,0],0,0,"","",""];
|
||||
};
|
||||
|
||||
GVAR(bulletDatabase) set[_index, [_bullet, _caliber, _airFriction, _muzzleVelocity, _stabilityFactor, _transonicStabilityCoef, _twistDirection, _unit, _bulletTraceVisible, _ballisticCoefficients, _velocityBoundaries, _atmosphereModel, _dragModel, _index]];
|
||||
GVAR(bulletDatabaseStartTime) set[_index, time];
|
||||
GVAR(bulletDatabaseSpeed) set[_index, 0];
|
||||
GVAR(bulletDatabaseFrames) set[_index, 1];
|
||||
GVAR(bulletDatabaseLastFrame) set[_index, time];
|
||||
GVAR(bulletDatabaseHDeflect) set[_index, 0];
|
||||
GVAR(bulletDatabaseSpinDrift) set[_index, 0];
|
||||
call compile ("ace_advanced_ballistics" callExtension format["simulate:%1:%2:%3:%4:%5:%6:%7", _index, _bulletVelocity, _bulletPosition, ACE_wind, ASLToATL(_bulletPosition) select 2, floor(time), time - floor(time)]);
|
||||
|
||||
if ((GVAR(bulletDatabaseOccupiedIndices) pushBack _index) == 0) then {
|
||||
[{
|
||||
private ["_bulletDatabaseEntry", "_bullet", "_caliber", "_muzzleVelocity", "_frames", "_speed", "_airFriction", "_airFrictionRef", "_dragModel", "_atmosphereModel", "_ballisticCoefficient", "_ballisticCoefficients", "_velocityBoundaries", "_airDensity", "_stabilityFactor", "_transonicStabilityCoef", "_twistDirection", "_unit", "_bulletTraceVisible", "_index", "_temperature", "_humidity", "_deltaT", "_TOF", "_bulletPosition", "_bulletVelocity", "_bulletSpeed", "_trueVelocity", "_trueSpeed", "_bulletSpeedAvg", "_wind", "_drag", "_dragRef", "_vect", "_accel", "_accelRef", "_centripetalAccel", "_pressure", "_pressureDeviation", "_windSourceObstacle", "_windSourceTerrain", "_height", "_roughnessLength"];
|
||||
|
||||
{
|
||||
_bulletDatabaseEntry = (GVAR(bulletDatabase) select _x);
|
||||
if (!alive (_bulletDatabaseEntry select 0)) then {
|
||||
_index = _bulletDatabaseEntry select 13;
|
||||
GVAR(bulletDatabaseOccupiedIndices) = GVAR(bulletDatabaseOccupiedIndices) - [_index];
|
||||
GVAR(bulletDatabaseFreeIndices) pushBack _index;
|
||||
};
|
||||
true
|
||||
} count GVAR(bulletDatabaseOccupiedIndices);
|
||||
|
||||
if (count GVAR(bulletDatabaseOccupiedIndices) == 0) exitWith {
|
||||
GVAR(bulletDatabase) = [];
|
||||
GVAR(bulletDatabaseStartTime) = [];
|
||||
GVAR(bulletDatabaseSpeed) = [];
|
||||
GVAR(bulletDatabaseFrames) = [];
|
||||
GVAR(bulletDatabaseLastFrame) = [];
|
||||
GVAR(bulletDatabaseHDeflect) = [];
|
||||
GVAR(bulletDatabaseSpinDrift) = [];
|
||||
GVAR(bulletDatabaseOccupiedIndices) = [];
|
||||
GVAR(bulletDatabaseFreeIndices) = [];
|
||||
[_this select 1] call cba_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
{
|
||||
_bulletDatabaseEntry = GVAR(bulletDatabase) select _x;
|
||||
_bullet = _bulletDatabaseEntry select 0;
|
||||
_caliber = _bulletDatabaseEntry select 1;
|
||||
_airFriction = _bulletDatabaseEntry select 2;
|
||||
_muzzleVelocity = _bulletDatabaseEntry select 3;
|
||||
_stabilityFactor = _bulletDatabaseEntry select 4;
|
||||
_transonicStabilityCoef = _bulletDatabaseEntry select 5;
|
||||
_twistDirection = _bulletDatabaseEntry select 6;
|
||||
_unit = _bulletDatabaseEntry select 7;
|
||||
_bulletTraceVisible = _bulletDatabaseEntry select 8;
|
||||
_ballisticCoefficients = _bulletDatabaseEntry select 9;
|
||||
_velocityBoundaries = _bulletDatabaseEntry select 10;
|
||||
_atmosphereModel = _bulletDatabaseEntry select 11;
|
||||
_dragModel = _bulletDatabaseEntry select 12;
|
||||
_index = _bulletDatabaseEntry select 13;
|
||||
|
||||
_TOF = time - (GVAR(bulletDatabaseStartTime) select _index);
|
||||
|
||||
_bulletVelocity = velocity _bullet;
|
||||
_bulletPosition = getPosASL _bullet;
|
||||
|
||||
_bulletSpeed = vectorMagnitude _bulletVelocity;
|
||||
_bulletDir = (_bulletVelocity select 0) atan2 (_bulletVelocity select 1);
|
||||
|
||||
_speed = (GVAR(bulletDatabaseSpeed) select _index);
|
||||
GVAR(bulletDatabaseSpeed) set[_index, _speed + _bulletSpeed];
|
||||
|
||||
_frames = (GVAR(bulletDatabaseFrames) select _index);
|
||||
GVAR(bulletDatabaseFrames) set[_index, _frames + 1];
|
||||
|
||||
_bulletSpeedAvg = (_speed / _frames);
|
||||
|
||||
if ((GVAR(SimulationPrecision) < 2) || {_frames % GVAR(SimulationPrecision) == _index % GVAR(SimulationPrecision)}) then {
|
||||
_deltaT = time - (GVAR(bulletDatabaseLastFrame) select _index);
|
||||
GVAR(bulletDatabaseLastFrame) set[_index, time];
|
||||
|
||||
_trueVelocity = _bulletVelocity;
|
||||
_trueSpeed = _bulletSpeed;
|
||||
_wind = [0, 0, 0];
|
||||
if (GVAR(WindEnabled) && (vectorMagnitude ACE_wind) > 0) then {
|
||||
_windSourceObstacle = _bulletPosition vectorDiff ((vectorNormalized ACE_wind) vectorMultiply 10);
|
||||
_windSourceTerrain = _bulletPosition vectorDiff ((vectorNormalized ACE_wind) vectorMultiply 100);
|
||||
|
||||
if (!(lineIntersects [_bulletPosition, _windSourceObstacle]) && !(terrainIntersectASL [_bulletPosition, _windSourceTerrain])) then {
|
||||
_wind = ACE_wind;
|
||||
_height = ASLToATL(_bulletPosition) select 2;
|
||||
_height = 0 max _height min 20;
|
||||
if (_height < 20) then {
|
||||
_roughnessLength = _bulletPosition call FUNC(calculateRoughnessLength);
|
||||
_wind = _wind vectorMultiply (ln(_height / _roughnessLength) / ln(20 / _roughnessLength));
|
||||
};
|
||||
|
||||
_trueVelocity = _bulletVelocity vectorDiff _wind;
|
||||
_trueSpeed = vectorMagnitude _trueVelocity;
|
||||
};
|
||||
};
|
||||
|
||||
_airFrictionRef = _airFriction;
|
||||
if (GVAR(AdvancedAirDragEnabled) && (count _ballisticCoefficients) == (count _velocityBoundaries) + 1) then {
|
||||
_dragRef = _deltaT * _airFrictionRef * _bulletSpeed * _bulletSpeed;
|
||||
_accelRef = (vectorNormalized _bulletVelocity) vectorMultiply (_dragRef);
|
||||
_bulletVelocity = _bulletVelocity vectorDiff _accelRef;
|
||||
|
||||
_ballisticCoefficient = (_ballisticCoefficients select 0);
|
||||
for "_i" from (count _velocityBoundaries) - 1 to 0 step -1 do {
|
||||
if (_bulletSpeed < (_velocityBoundaries select _i)) exitWith {
|
||||
_ballisticCoefficient = (_ballisticCoefficients select (_i + 1));
|
||||
};
|
||||
};
|
||||
|
||||
if (GVAR(AtmosphericDensitySimulationEnabled)) then {
|
||||
_pressure = 1013.25 * exp(-(EGVAR(weather,Altitude) + (_bulletPosition select 2)) / 7990) - 10 * overcast;
|
||||
_temperature = GET_TEMPERATURE_AT_HEIGHT(_bulletPosition select 2);
|
||||
_humidity = EGVAR(weather,currentHumidity);
|
||||
_airDensity = STD_AIR_DENSITY_ICAO;
|
||||
if (_humidity > 0) then {
|
||||
private ["_pSat", "_vaporPressure", "_partialPressure"];
|
||||
// Saturation vapor pressure calculated according to: http://wahiduddin.net/calc/density_algorithms.htm
|
||||
_pSat = 6.1078 * 10 ^ ((7.5 * _temperature) / (_temperature + 237.3));
|
||||
_vaporPressure = _humidity * _pSat;
|
||||
_partialPressure = (_pressure * 100)- _vaporPressure;
|
||||
|
||||
_airDensity = (_partialPressure * DRY_AIR_MOLAR_MASS + _vaporPressure * WATER_VAPOR_MOLAR_MASS) / (UNIVERSAL_GAS_CONSTANT * KELVIN(_temperature));
|
||||
} else {
|
||||
_airDensity = (_pressure * 100) / (SPECIFIC_GAS_CONSTANT_DRY_AIR * KELVIN(_temperature));
|
||||
};
|
||||
if (_atmosphereModel == "ICAO") then {
|
||||
_ballisticCoefficient = (STD_AIR_DENSITY_ICAO / _airDensity) * _ballisticCoefficient;
|
||||
} else {
|
||||
_ballisticCoefficient = (STD_AIR_DENSITY_ASM / _airDensity) * _ballisticCoefficient;
|
||||
};
|
||||
};
|
||||
|
||||
_drag = _deltaT * ([_dragModel, _ballisticCoefficient, _trueSpeed] call FUNC(calculateRetardation));
|
||||
_accel = (vectorNormalized _trueVelocity) vectorMultiply (_drag);
|
||||
_bulletVelocity = _bulletVelocity vectorDiff _accel;
|
||||
} else {
|
||||
if (GVAR(AtmosphericDensitySimulationEnabled)) then {
|
||||
_pressureDeviation = 1013.25 * exp(-(EGVAR(weather,Altitude) + (_bulletPosition select 2)) / 7990) - 1013.25 - 10 * overcast;
|
||||
_temperature = GET_TEMPERATURE_AT_HEIGHT(_bulletPosition select 2);
|
||||
_humidity = EGVAR(weather,currentHumidity);
|
||||
_airFriction = _airFriction + ((_temperature - 15) * 0.0000015 + _humidity * 0.0000040 + _pressureDeviation * -0.0000009);
|
||||
};
|
||||
|
||||
if (_airFriction != _airFrictionRef || vectorMagnitude _wind > 0) then {
|
||||
_dragRef = _deltaT * _airFrictionRef * _bulletSpeed * _bulletSpeed;
|
||||
_accelRef = (vectorNormalized _bulletVelocity) vectorMultiply (_dragRef);
|
||||
_bulletVelocity = _bulletVelocity vectorDiff _accelRef;
|
||||
|
||||
_drag = _deltaT * _airFriction * _trueSpeed * _trueSpeed;
|
||||
_accel = (vectorNormalized _trueVelocity) vectorMultiply (_drag);
|
||||
_bulletVelocity = _bulletVelocity vectorAdd _accel;
|
||||
};
|
||||
};
|
||||
|
||||
if (GVAR(CoriolisEnabled) && _bulletSpeedAvg > 0) then {
|
||||
_horizontalDeflection = 0.0000729 * (_unit distanceSqr _bullet) * sin(EGVAR(weather,Latitude)) / _bulletSpeedAvg;
|
||||
_horizontalDeflectionPartial = _horizontalDeflection - (GVAR(bulletDatabaseHDeflect) select _index);
|
||||
GVAR(bulletDatabaseHDeflect) set[_index, _horizontalDeflection];
|
||||
_vect = [sin(_bulletDir + 90) * _horizontalDeflectionPartial, cos(_bulletDir + 90) * _horizontalDeflectionPartial, 0];
|
||||
|
||||
_bulletPosition = _bulletPosition vectorAdd _vect;
|
||||
};
|
||||
|
||||
/*
|
||||
// Negligible effect on the trajectory
|
||||
if (GVAR(EoetvoesEnabled)) then {
|
||||
_centripetalAccel = 2 * 0.0000729 * (_muzzleVelocity / -32.2) * cos(EGVAR(weather,Latitude)) * sin(_bulletDir);
|
||||
_accel = [0, 0, -(_centripetalAccel * _deltaT)];
|
||||
|
||||
_bulletVelocity = _bulletVelocity vectorAdd _accel;
|
||||
};
|
||||
//*/
|
||||
|
||||
if (GVAR(SpinDriftEnabled)) then {
|
||||
_spinDrift = _twistDirection * 0.0254 * 1.25 * (_stabilityFactor + 1.2) * _TOF ^ 1.83;
|
||||
_spinDriftPartial = _spinDrift - (GVAR(bulletDatabaseSpinDrift) select _index);
|
||||
GVAR(bulletDatabaseSpinDrift) set[_index, _spinDrift];
|
||||
_vect = [sin(_bulletDir + 90) * _spinDriftPartial, cos(_bulletDir + 90) * _spinDriftPartial, 0];
|
||||
|
||||
_bulletPosition = _bulletPosition vectorAdd _vect;
|
||||
};
|
||||
};
|
||||
|
||||
if (GVAR(TransonicRegionEnabled) && _transonicStabilityCoef < 1) then {
|
||||
if (_bulletSpeed < 345 && _bulletSpeedAvg > 340 && _bulletSpeed > 335) then {
|
||||
_accel = [(random 0.8) - 0.4, (random 0.8) - 0.4, (random 0.8) - 0.4];
|
||||
_accel = _accel vectorMultiply (1 - _transonicStabilityCoef);
|
||||
_bulletVelocity = _bulletVelocity vectorAdd _accel;
|
||||
};
|
||||
};
|
||||
|
||||
if (_bulletTraceVisible && _bulletSpeed > 600 && _bullet distanceSqr _unit > 400) then {
|
||||
drop ["\A3\data_f\ParticleEffects\Universal\Refract","","Billboard",1,0.1,getPos _bullet,[0,0,0],0,1.275,1,0,[0.4*_caliber,0.2*_caliber],[[0,0,0,0.6],[0,0,0,0.4]],[1,0],0,0,"","",""];
|
||||
};
|
||||
|
||||
_bullet setVelocity _bulletVelocity;
|
||||
_bullet setPosASL _bulletPosition;
|
||||
true
|
||||
} count GVAR(bulletDatabaseOccupiedIndices);
|
||||
|
||||
}, GVAR(simulationInterval), []] call CBA_fnc_addPerFrameHandler;
|
||||
};
|
||||
#endif
|
||||
}, GVAR(simulationInterval), [_bullet, _caliber, _bulletTraceVisible, GVAR(currentbulletID)]] call CBA_fnc_addPerFrameHandler;
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
if (!GVAR(enabled)) exitWith {};
|
||||
if (!GVAR(extensionAvailable)) exitWith {};
|
||||
|
||||
private ["_initStartTime", "_mapSize", "_mapGrids", "_gridCells", "_x", "_y", "_gridCenter", "_gridHeight", "_gridNumObjects", "_gridSurfaceIsWater"];
|
||||
|
@ -1,11 +1,10 @@
|
||||
["ACE3", QGVAR(ProtractorKey), localize "STR_ACE_AdvancedBallistics_ProtractorKey",
|
||||
["ACE3 Equipment", QGVAR(ProtractorKey), localize "STR_ACE_AdvancedBallistics_ProtractorKey",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
|
||||
// Statement
|
||||
[] call FUNC(displayProtractor);
|
||||
false
|
||||
},
|
||||
{false},
|
||||
[37, [true, true, false]], false, 0] call CBA_fnc_addKeybind; // (CTRL + SHIFT + K)
|
||||
|
@ -1,8 +1,6 @@
|
||||
#define COMPONENT advanced_ballistics
|
||||
#include "\z\ace\addons\main\script_mod.hpp"
|
||||
|
||||
#define USE_ADVANCEDBALLISTICS_DLL
|
||||
|
||||
#ifdef DEBUG_ENABLED_ADVANCEDBALLISTICS
|
||||
#define DEBUG_MODE_FULL
|
||||
#endif
|
||||
@ -24,3 +22,5 @@
|
||||
#define STD_AIR_DENSITY_ICAO 1.22498
|
||||
#define STD_AIR_DENSITY_ASM 1.20885
|
||||
#define GET_TEMPERATURE_AT_HEIGHT(h) (EGVAR(weather,currentTemperature) - 0.0065 * (h))
|
||||
|
||||
#define EXTENSION_REQUIRED_VERSION "1.0"
|
||||
|
@ -1,14 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Edited with tabler. -->
|
||||
<Project name="ACE">
|
||||
<Package name="AdvancedBallistics">
|
||||
<Key ID="STR_ACE_AdvancedBallistics_WindInfoKey">
|
||||
<English>Show Wind Info</English>
|
||||
<Polish>Pokaż inf. o wietrze</Polish>
|
||||
<Italian>Mostra indicazioni del vento</Italian>
|
||||
<Russian>Показать информацию о ветре</Russian>
|
||||
<French>Afficher les info sur le vent</French>
|
||||
<Spanish>Mostrar información del viento</Spanish>
|
||||
<German>Windinformationen anzeigen</German>
|
||||
<Hungarian>Széladatok mutatása</Hungarian>
|
||||
<Czech>Zobrazit informace o větru</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_AdvancedBallistics_ProtractorKey">
|
||||
<English>Show Protractor</English>
|
||||
<Polish>Pokaż kątomierz</Polish>
|
||||
<Italian>Mostra il rapportatore</Italian>
|
||||
<Russian>Показать транспортир</Russian>
|
||||
<French>Afficher le rapporteur</French>
|
||||
<Spanish>Mostrar transportador</Spanish>
|
||||
<German>Winkelmesser anzeigen</German>
|
||||
<Hungarian>Szögmérő mutatása</Hungarian>
|
||||
<Czech>Zobrazit úhloměr</Czech>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
</Project>
|
||||
|
@ -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,17 +13,17 @@ class CfgAmmo {
|
||||
tracerEndTime = 3.5;
|
||||
|
||||
CraterEffects = "ExploAmmoCrater";
|
||||
explosionEffects = "ExploAmmoExplosion";
|
||||
explosionEffects = "ExploAmmoExplosion";
|
||||
model = "\A3\Weapons_f\Data\bullettracer\tracer_red";
|
||||
};
|
||||
class ACE_20mm_HEDP : B_20mm {};
|
||||
class ACE_20mm_HE : B_20mm {};
|
||||
class ACE_20mm_AP : B_20mm {
|
||||
hit = 50;
|
||||
indirectHit = 12;
|
||||
indirectHitRange = 0.3; //2;
|
||||
explosive = 0;
|
||||
CraterEffects = "";
|
||||
explosionEffects = "";
|
||||
explosionEffects = "";
|
||||
};
|
||||
|
||||
// adjust minigun caliber and deflection to other ammo
|
||||
|
@ -10,7 +10,7 @@ class CfgMagazines {
|
||||
// an extended magazine for the comanche
|
||||
class 300Rnd_20mm_shells;
|
||||
class ACE_500Rnd_20mm_shells_Comanche: 300Rnd_20mm_shells {
|
||||
ammo = "ACE_20mm_HEDP";
|
||||
ammo = "ACE_20mm_HE";
|
||||
count = 500;
|
||||
};
|
||||
};
|
||||
|
@ -891,6 +891,25 @@ class Heli_Attack_01_base_F: Helicopter_Base_F {
|
||||
|
||||
class OpticsIn
|
||||
{
|
||||
class WideUnstabalized
|
||||
{
|
||||
opticsDisplayName = "WU";
|
||||
initAngleX = 0;
|
||||
minAngleX = -35;
|
||||
maxAngleX = 10;
|
||||
initAngleY = 0;
|
||||
minAngleY = -100;
|
||||
maxAngleY = 100;
|
||||
initFov = 0.466;
|
||||
minFov = 0.466;
|
||||
maxFov = 0.466;
|
||||
visionMode[] = {"Normal","Ti"};
|
||||
thermalMode[] = {0,1};
|
||||
gunnerOpticsColor[] = {0,0,0,1};
|
||||
directionStabilized = 0;
|
||||
horizontallyStabilized = 1;
|
||||
gunnerOpticsModel = "\A3\Weapons_F_Beta\Reticle\Heli_Attack_01_Optics_Gunner_wide_F";
|
||||
};
|
||||
class Wide
|
||||
{
|
||||
opticsDisplayName = "W";
|
||||
@ -907,7 +926,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 +937,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 +948,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 +960,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";
|
||||
|
||||
};
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
class CfgPatches {
|
||||
class ADDON {
|
||||
units[] = {"ACE_Comanche_Test"};
|
||||
units[] = {};
|
||||
weapons[] = {};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_common"};
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project name="ACE">
|
||||
<Package name="Aircraft">
|
||||
<Key ID="STR_ACE_Aircraft_CMFlareLauncher_Burst_Name">
|
||||
@ -29,21 +29,25 @@
|
||||
<English>Open Cargo Door</English>
|
||||
<German>Laderampe öffnen</German>
|
||||
<Spanish>Abrir compuerta de carga</Spanish>
|
||||
<French>Ourvir rampe cargo</French>
|
||||
<French>Ourvir la rampe</French>
|
||||
<Polish>Otwórz drzwi ładowni</Polish>
|
||||
<Czech>Otevřít nákladní prostor</Czech>
|
||||
<Hungarian>Rámpát kinyitni</Hungarian>
|
||||
<Hungarian>Rakodórámpa nyitása</Hungarian>
|
||||
<Russian>Открыть грузовой отсек</Russian>
|
||||
<Italian>Apri la porta del cargo</Italian>
|
||||
<Portuguese>Abrir porta de carga</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Aircraft_CloseCargoRamp">
|
||||
<English>Close Cargo Door</English>
|
||||
<German>Laderampe schließen</German>
|
||||
<Spanish>Cerrar compuerta de carga</Spanish>
|
||||
<French>Fermer rampe cargo</French>
|
||||
<French>Fermer la rampe</French>
|
||||
<Polish>Zamknij drzwi ładowni</Polish>
|
||||
<Czech>Zavřít nákladní prostor</Czech>
|
||||
<Hungarian>Rámpát zárni</Hungarian>
|
||||
<Hungarian>Rakodórámpa zárása</Hungarian>
|
||||
<Russian>Закрыть грузовой отсек</Russian>
|
||||
<Italian>Chiudi la porta del cargo</Italian>
|
||||
<Portuguese>Fechar porta de carga</Portuguese>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
|
1
addons/apl/$PBOPREFIX$
Normal file
1
addons/apl/$PBOPREFIX$
Normal file
@ -0,0 +1 @@
|
||||
z\ace\addons\apl
|
7
addons/apl/CfgEventHandlers.hpp
Normal file
7
addons/apl/CfgEventHandlers.hpp
Normal file
@ -0,0 +1,7 @@
|
||||
/*
|
||||
class Extended_PreInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_preInit));
|
||||
};
|
||||
};
|
||||
*/
|
110
addons/apl/LICENSE
Normal file
110
addons/apl/LICENSE
Normal file
@ -0,0 +1,110 @@
|
||||
ARMA PUBLIC LICENSE
|
||||
https://www.bistudio.com/community/licenses/arma-public-license
|
||||
|
||||
Brief summary of this Licence
|
||||
|
||||
PLEASE, NOTE THAT THIS SUMMARY HAS NO LEGAL EFFECT AND IS ONLY OF AN INFORMATORY NATURE DESIGNED FOR YOU TO GET THE BASIC INFORMATION ABOUT THE CONTENT OF THIS LICENCE. THE ONLY LEGALLY BINDING PROVISIONS ARE THOSE IN THE ORIGINAL AND FULL TEXT OF THIS LICENCE.
|
||||
|
||||
With this licence you are free to adapt (i.e. modify, rework or update) and share (i.e. copy, distribute or transmit) the material under the following conditions:
|
||||
|
||||
Attribution - You must attribute the material in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the material).
|
||||
Noncommercial - You may not use this material for any commercial purposes.
|
||||
Arma Only - You may not convert or adapt this material to be used in other games than Arma.
|
||||
|
||||
By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Arma Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.
|
||||
|
||||
Section 1 - Definitions
|
||||
|
||||
Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image.
|
||||
Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License.
|
||||
ArmaOnly means primarily intended for or directed towards the use in any of existing and future Arma games, including but not limited to Arma: Cold War Assault, Arma, Arma 2 and Arma 3 and its official sequels and expansion packs.
|
||||
Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.
|
||||
Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements.
|
||||
Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material.
|
||||
Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License.
|
||||
Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license.
|
||||
Licensor means the individual(s) or entity(ies) granting rights under this Public License.
|
||||
NonCommercial means not primarily intended for or directed towards commercial advantage or monetary compensation. For purposes of this Public License, the exchange of the Licensed Material for other material subject to Copyright and Similar Rights by digital file-sharing or similar means is NonCommercial provided there is no payment of monetary compensation in connection with the exchange.
|
||||
Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them.
|
||||
Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world.
|
||||
You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning.
|
||||
|
||||
Section 2 – Scope
|
||||
|
||||
License grant
|
||||
Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to:
|
||||
reproduce and Share the Licensed Material, in whole or in part, for NonCommercial and ArmaOnly purposes only; and
|
||||
produce, reproduce, and Share Adapted Material for NonCommercial and ArmaOnly purposes only.
|
||||
Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions.
|
||||
Term. The term of this Public License is specified in Section 6(a).
|
||||
Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material.
|
||||
Downstream recipients.
|
||||
Offer from the Licensor – Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License.
|
||||
No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material.
|
||||
No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(a)(i).
|
||||
Other rights
|
||||
Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise.
|
||||
Patent and trademark rights are not licensed under this Public License.
|
||||
To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties, including when the Licensed Material is used other than for NonCommercial and ArmaOnly purposes.
|
||||
|
||||
Section 3 – License Conditions
|
||||
|
||||
Your exercise of the Licensed Rights is expressly made subject to the following conditions.
|
||||
|
||||
Attribution
|
||||
|
||||
If You Share the Licensed Material (including in modified form), You must:
|
||||
retain the following if it is supplied by the Licensor with the Licensed Material:
|
||||
identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated);
|
||||
a copyright notice;
|
||||
a notice that refers to this Public License;
|
||||
a notice that refers to the disclaimer of warranties;
|
||||
a URI or hyperlink to the Licensed Material to the extent reasonably practicable;
|
||||
indicate if You modified the Licensed Material and retain an indication of any previous modifications; and
|
||||
indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License.
|
||||
You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information.
|
||||
If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(a) to the extent reasonably practicable.
|
||||
If You Share Adapted Material You produce, the Adapter’s License You apply must not prevent recipients of the Adapted Material from complying with this Public License.
|
||||
|
||||
Section 4 – Sui Generis Database Rights
|
||||
|
||||
Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material:
|
||||
|
||||
for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database for NonCommercial and ArmaOnly purposes only;
|
||||
if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material; and
|
||||
You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database.
|
||||
|
||||
Section 5 – Disclaimer of Warranties and Limitation of Liability
|
||||
|
||||
Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.
|
||||
To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.
|
||||
The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.
|
||||
|
||||
Section 6 – Term and Termination
|
||||
|
||||
This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically.
|
||||
|
||||
Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates:
|
||||
automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or
|
||||
upon express reinstatement by the Licensor.
|
||||
|
||||
For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License.
|
||||
For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License.
|
||||
Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
|
||||
|
||||
Section 7 – Other Terms and Conditions
|
||||
|
||||
The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed.
|
||||
Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License.
|
||||
|
||||
Section 8 – Interpretation
|
||||
|
||||
For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License.
|
||||
To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions.
|
||||
No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor.
|
||||
Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority.
|
||||
|
||||
Bohemia Interactive Notices
|
||||
|
||||
Bohemia Interactive a.s. is not a party to this License, and makes no warranty whatsoever in connection with the Licensed Material. Bohemia Interactive a.s. will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, Bohemia Interactive a.s. may elect to apply the Public License to material it publishes and in those instances it becomes the "Licensor".
|
||||
Except for the limited purpose of indicating to the public that the Licensed Material is shared under this Public License, Bohemia Interactive a.s. does not authorize the use by either party of the trademarks "Arma", "Bohemia Interactive" or any related trademark or logo of Arma or Bohemia Interactive without the prior written consent of Bohemia Interactive a.s.
|
@ -1,2 +1,5 @@
|
||||
#include "script_component.hpp"
|
||||
GVAR(traces) = [];
|
||||
#include "script_component.hpp"
|
||||
|
||||
ADDON = false;
|
||||
|
||||
ADDON = true;
|
BIN
addons/apl/bodybag.p3d
Normal file
BIN
addons/apl/bodybag.p3d
Normal file
Binary file not shown.
15
addons/apl/config.cpp
Normal file
15
addons/apl/config.cpp
Normal file
@ -0,0 +1,15 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
class CfgPatches {
|
||||
class ADDON {
|
||||
units[] = {};
|
||||
weapons[] = {};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_main"};
|
||||
author[] = {"Bohemia Interactive"};
|
||||
authorUrl = "http://ace3mod.com";
|
||||
VERSION_CONFIG;
|
||||
};
|
||||
};
|
||||
|
||||
#include "CfgEventHandlers.hpp"
|
@ -8,7 +8,7 @@ PixelShaderID="Super";
|
||||
VertexShaderID="Super";
|
||||
class Stage1
|
||||
{
|
||||
texture="z\ace\addons\medical\data\bodybag_nohq.paa";
|
||||
texture="z\ace\addons\apl\data\bodybag_nohq.paa";
|
||||
uvSource="tex";
|
||||
class uvTransform
|
||||
{
|
||||
@ -80,7 +80,7 @@ class Stage6
|
||||
};
|
||||
class Stage7
|
||||
{
|
||||
texture="z\ace\addons\medical\data\env_co.paa";
|
||||
texture="z\ace\addons\apl\data\env_co.paa";
|
||||
uvSource="tex";
|
||||
class uvTransform
|
||||
{
|
1
addons/apl/functions/script_component.hpp
Normal file
1
addons/apl/functions/script_component.hpp
Normal file
@ -0,0 +1 @@
|
||||
#include "\z\ace\addons\apl\script_component.hpp"
|
12
addons/apl/script_component.hpp
Normal file
12
addons/apl/script_component.hpp
Normal file
@ -0,0 +1,12 @@
|
||||
#define COMPONENT APL
|
||||
#include "\z\ace\addons\main\script_mod.hpp"
|
||||
|
||||
#ifdef DEBUG_ENABLED_APL
|
||||
#define DEBUG_MODE_FULL
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_SETTINGS_APL
|
||||
#define DEBUG_SETTINGS DEBUG_SETTINGS_APL
|
||||
#endif
|
||||
|
||||
#include "\z\ace\addons\main\script_macros.hpp"
|
@ -128,45 +128,11 @@ class ATragMX_RscListBox {
|
||||
class ATragMX_RscListNBox: ATragMX_RscListBox {
|
||||
idc=-1;
|
||||
type=102;
|
||||
columns[]={0.0, 0.225, 0.475, 0.725};
|
||||
columns[]={0.0, 0.225, 0.475, 0.7};
|
||||
drawSideArrows=0;
|
||||
idcLeft=-1;
|
||||
idcRight=-1;
|
||||
};
|
||||
class ATragMX_RscControlsGroup {
|
||||
type=15;
|
||||
idc=-1;
|
||||
style=16;
|
||||
x=0;
|
||||
y=0;
|
||||
w=1;
|
||||
h=1;
|
||||
shadow=0;
|
||||
class VScrollbar {
|
||||
color[]={1,1,1,0.6};
|
||||
width=0.021;
|
||||
autoScrollSpeed=-1;
|
||||
autoScrollDelay=5;
|
||||
autoScrollRewind=0;
|
||||
shadow=0;
|
||||
};
|
||||
class HScrollbar {
|
||||
color[]={1,1,1,0.6};
|
||||
height=0.028;
|
||||
shadow=0;
|
||||
};
|
||||
class ScrollBar {
|
||||
color[]={1,1,1,0.6};
|
||||
colorActive[]={1,1,1,1};
|
||||
colorDisabled[]={1,1,1,0.3};
|
||||
thumb="#(argb,8,8,3)color(1,1,1,1)";
|
||||
arrowEmpty="#(argb,8,8,3)color(1,1,1,1)";
|
||||
arrowFull="#(argb,8,8,3)color(1,1,1,1)";
|
||||
border="#(argb,8,8,3)color(1,1,1,1)";
|
||||
};
|
||||
class Controls {
|
||||
};
|
||||
};
|
||||
class ATragMX_RscLineBreak {
|
||||
idc=-1;
|
||||
type=98;
|
||||
@ -230,12 +196,12 @@ class ATragMX_Display {
|
||||
w=0.03;
|
||||
h=0.03;
|
||||
colorBackground[]={0,0,0,0.0};
|
||||
action=QUOTE(((GVAR(currentGun) select GVAR(currentTarget)) + (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) select GVAR(currentTarget)) + (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;
|
||||
@ -244,12 +210,12 @@ class ATragMX_Display {
|
||||
w=0.05;
|
||||
h=0.03;
|
||||
colorBackground[]={0,0,0,0};
|
||||
action=QUOTE(call FUNC(parse_input); GVAR(currentTarget) = (4 + GVAR(currentTarget) - 1) % 4; call FUNC(update_target_selection));
|
||||
action=QUOTE(((4 + GVAR(currentTarget) - 1) % 4) call FUNC(change_target_slot));
|
||||
};
|
||||
class RIGHT: LEFT {
|
||||
idc=-1;
|
||||
x=0.55*safezoneW+safezoneX+0.2725;
|
||||
action=QUOTE(call FUNC(parse_input); GVAR(currentTarget) = (4 + GVAR(currentTarget) + 1) % 4; call FUNC(update_target_selection));
|
||||
action=QUOTE(((4 + GVAR(currentTarget) + 1) % 4) call FUNC(change_target_slot));
|
||||
};
|
||||
class TOP_LEFT: ATragMX_RscButton {
|
||||
idc=-1;
|
||||
@ -263,7 +229,31 @@ class ATragMX_Display {
|
||||
idc=-1;
|
||||
x=0.55*safezoneW+safezoneX+0.315;
|
||||
};
|
||||
|
||||
|
||||
class TEXT_GUN_FRAME: ATragMX_RscText {
|
||||
idc=1001;
|
||||
style=64;
|
||||
x=0.550*safezoneW+safezoneX+0.11;
|
||||
y=0.265*safezoneH+safezoneY+0.25;
|
||||
w=0.0925;
|
||||
h=0.205;
|
||||
text="";
|
||||
};
|
||||
class TEXT_ATMOSPHERE_FRAME: TEXT_GUN_FRAME {
|
||||
idc=1002;
|
||||
x=0.550*safezoneW+safezoneX+0.205;
|
||||
};
|
||||
class TEXT_TARGET_FRAME: TEXT_GUN_FRAME {
|
||||
idc=1003;
|
||||
x=0.550*safezoneW+safezoneX+0.3;
|
||||
};
|
||||
class TEXT_RESULT_FRAME: TEXT_GUN_FRAME {
|
||||
idc=1004;
|
||||
x=0.550*safezoneW+safezoneX+0.11;
|
||||
y=0.265*safezoneH+safezoneY+0.46;
|
||||
w=0.2825;
|
||||
h=0.15;
|
||||
};
|
||||
class TEXT_GUN_PROFILE: ATragMX_RscText {
|
||||
idc=1000;
|
||||
x=0.550*safezoneW+safezoneX+0.11;
|
||||
@ -316,6 +306,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 +314,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 +327,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 +336,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 +350,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 +359,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 +397,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;
|
||||
@ -420,43 +420,43 @@ class ATragMX_Display {
|
||||
colorBackgroundDisabled[]={0,0,0,1};
|
||||
colorBackgroundActive[]={0,0,0,0};
|
||||
text="A";
|
||||
action=QUOTE(call FUNC(parse_input); GVAR(currentTarget)=0; call FUNC(update_target_selection));
|
||||
action=QUOTE(0 call FUNC(change_target_slot));
|
||||
};
|
||||
class TEXT_TARGET_B: TEXT_TARGET_A {
|
||||
idc=501;
|
||||
x=0.550*safezoneW+safezoneX+0.2281;
|
||||
text="B";
|
||||
action=QUOTE(call FUNC(parse_input); GVAR(currentTarget)=1; call FUNC(update_target_selection));
|
||||
action=QUOTE(1 call FUNC(change_target_slot));
|
||||
};
|
||||
class TEXT_TARGET_C: TEXT_TARGET_B {
|
||||
class TEXT_TARGET_C: TEXT_TARGET_A {
|
||||
idc=502;
|
||||
x=0.550*safezoneW+safezoneX+0.2512;
|
||||
text="C";
|
||||
action=QUOTE(call FUNC(parse_input); GVAR(currentTarget)=2; call FUNC(update_target_selection));
|
||||
action=QUOTE(2 call FUNC(change_target_slot));
|
||||
};
|
||||
class TEXT_TARGET_D: TEXT_TARGET_B {
|
||||
class TEXT_TARGET_D: TEXT_TARGET_A {
|
||||
idc=503;
|
||||
x=0.550*safezoneW+safezoneX+0.2743;
|
||||
text="D";
|
||||
action=QUOTE(call FUNC(parse_input); GVAR(currentTarget)=3; call FUNC(update_target_selection));
|
||||
action=QUOTE(3 call FUNC(change_target_slot));
|
||||
};
|
||||
|
||||
class TEXT_TARGET: TEXT_GUN {
|
||||
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 +464,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 +473,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 +481,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 +493,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;
|
||||
};
|
||||
@ -501,7 +501,7 @@ class ATragMX_Display {
|
||||
class TEXT_ELEVATION: TEXT_GUN_PROFILE {
|
||||
idc=40;
|
||||
w=0.05;
|
||||
x=0.550*safezoneW+safezoneX+0.11;
|
||||
x=0.550*safezoneW+safezoneX+0.115;
|
||||
y=0.265*safezoneH+safezoneY+0.50;
|
||||
text="Elev";
|
||||
};
|
||||
@ -523,9 +523,12 @@ class ATragMX_Display {
|
||||
x=0.550*safezoneW+safezoneX+0.32;
|
||||
text="Cur";
|
||||
};
|
||||
class TEXT_ELEVATION_OUTPUT_ABSOLUTE: ATragMX_RscEdit {
|
||||
class TEXT_ELEVATION_OUTPUT_ABSOLUTE: ATragMX_RscText {
|
||||
idc=400;
|
||||
w=0.07;
|
||||
style=160;
|
||||
sizeEx=0.025;
|
||||
w=0.065;
|
||||
h=0.032;
|
||||
x=0.550*safezoneW+safezoneX+0.17;
|
||||
y=0.265*safezoneH+safezoneY+0.50;
|
||||
text="";
|
||||
@ -537,7 +540,6 @@ class ATragMX_Display {
|
||||
class TEXT_ELEVATION_INPUT_CURRENT: TEXT_ELEVATION_OUTPUT_ABSOLUTE {
|
||||
idc=402;
|
||||
x=0.550*safezoneW+safezoneX+0.323;
|
||||
onKeyUp=QUOTE(if (_this select 1 == 28) then {call FUNC(parse_input); call FUNC(update_result)});
|
||||
};
|
||||
class TEXT_WINDAGE: TEXT_ELEVATION {
|
||||
idc=41;
|
||||
@ -555,14 +557,14 @@ class ATragMX_Display {
|
||||
class TEXT_WINDAGE_INPUT_CURRENT: TEXT_WINDAGE_OUTPUT_ABSOLUTE {
|
||||
idc=412;
|
||||
x=0.550*safezoneW+safezoneX+0.323;
|
||||
onKeyUp=QUOTE(if (_this select 1 == 28) then {call FUNC(parse_input); call FUNC(update_result)});
|
||||
};
|
||||
class TEXT_LEAD: TEXT_GUN {
|
||||
idc=42;
|
||||
w=0.05;
|
||||
x=0.550*safezoneW+safezoneX+0.11;
|
||||
x=0.550*safezoneW+safezoneX+0.115;
|
||||
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;
|
||||
@ -594,11 +596,20 @@ class ATragMX_Display {
|
||||
class TEXT_SCOPE_UNIT: TEXT_GUN_LIST {
|
||||
idc=2000;
|
||||
style=ST_CENTER;
|
||||
w=0.06;
|
||||
x=0.550*safezoneW+safezoneX+0.205;
|
||||
colorBackground[]={0,0,0,0};
|
||||
text="TMOA";
|
||||
action=QUOTE(call FUNC(cycle_scope_unit));
|
||||
};
|
||||
class TEXT_SCOPE_CLICK_NUMBER: TEXT_GUN_LIST {
|
||||
idc=2001;
|
||||
style=ST_CENTER;
|
||||
w=0.03;
|
||||
x=0.550*safezoneW+safezoneX+0.27;
|
||||
text="4";
|
||||
action=QUOTE(call FUNC(toggle_solution_setup));
|
||||
};
|
||||
class TEXT_CALCULATE: TEXT_SCOPE_UNIT {
|
||||
idc=3000;
|
||||
style=ST_RIGHT;
|
||||
@ -668,6 +679,7 @@ class ATragMX_Display {
|
||||
h=0.45;
|
||||
x=0.550*safezoneW+safezoneX+0.11;
|
||||
y=0.265*safezoneH+safezoneY+0.24;
|
||||
sizeEx=0.025;
|
||||
colorSelectBackground[]={0.15,0.21,0.23,0.3};
|
||||
colorSelectBackground2[]={0.15,0.21,0.23,0.3};
|
||||
onMouseButtonDblClick=QUOTE(true call FUNC(toggle_gun_list));
|
||||
@ -748,7 +760,7 @@ class ATragMX_Display {
|
||||
y=0.265*safezoneH+safezoneY+0.35;
|
||||
strings[]={"Height","Width"};
|
||||
values[]={1,0};
|
||||
onToolBoxSelChanged="GVAR(rangeAssistUseTargetHeight)=((_this select 1)==0)";
|
||||
onToolBoxSelChanged=QUOTE(GVAR(rangeAssistUseTargetHeight) = ((_this select 1) == 0));
|
||||
};
|
||||
class TEXT_TARGET_RANGE_ASSIST_TARGET_SIZE: TEXT_TARGET_RANGE_ASSIST_MEASUREMENT_METHOD {
|
||||
idc=7003;
|
||||
@ -814,13 +826,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 +873,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 +919,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 +1058,414 @@ 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_ZERO_RANGE_METER_INDICATOR: TEXT_GUN_AMMO_DATA_BORE_HEIGHT {
|
||||
idc=120061;
|
||||
w=0.05;
|
||||
x=0.550*safezoneW+safezoneX+0.315;
|
||||
y=0.265*safezoneH+safezoneY+0.520;
|
||||
text="";
|
||||
};
|
||||
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;
|
||||
style=64;
|
||||
w=0.14;
|
||||
h=0.07;
|
||||
x=0.550*safezoneW+safezoneX+0.235;
|
||||
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_SPEED_DIRECTION: ATragMX_RscButton {
|
||||
idc=140051;
|
||||
colorBackground[]={0.15,0.21,0.23,0.3};
|
||||
colorFocused[]={0.15,0.21,0.23,0.2};
|
||||
w=0.0231;
|
||||
x=0.550*safezoneW+safezoneX+0.305;
|
||||
y=0.265*safezoneH+safezoneY+0.480;
|
||||
text=">";
|
||||
action=QUOTE(call FUNC(cycle_target_speed_direction));
|
||||
};
|
||||
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_TARGET_RANGE_METER_INDICATOR: TEXT_TARGET_DATA_LATITUDE {
|
||||
idc=140061;
|
||||
w=0.05;
|
||||
x=0.550*safezoneW+safezoneX+0.315;
|
||||
y=0.265*safezoneH+safezoneY+0.520;
|
||||
text="";
|
||||
};
|
||||
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;
|
||||
};
|
||||
|
||||
class TEXT_SOLUTION_SETUP_SHOW_RESULT_IN: TEXT_GUN_AMMO_DATA_BORE_HEIGHT {
|
||||
idc=15000;
|
||||
style=64;
|
||||
w=0.25;
|
||||
h=0.07;
|
||||
x=0.550*safezoneW+safezoneX+0.13;
|
||||
y=0.265*safezoneH+safezoneY+0.32;
|
||||
text="Show result in";
|
||||
};
|
||||
class TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_1: TEXT_TARGET_A {
|
||||
idc=15001;
|
||||
w=0.04;
|
||||
x=0.550*safezoneW+safezoneX+0.14;
|
||||
y=0.265*safezoneH+safezoneY+0.35;
|
||||
text="1";
|
||||
action=QUOTE(GVAR(currentScopeClickNumberTemp) = 1; call FUNC(update_solution_setup));
|
||||
};
|
||||
class TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_2: TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_1 {
|
||||
idc=15002;
|
||||
x=0.550*safezoneW+safezoneX+0.18;
|
||||
text="2";
|
||||
action=QUOTE(GVAR(currentScopeClickNumberTemp) = 2; call FUNC(update_solution_setup));
|
||||
};
|
||||
class TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_3: TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_1 {
|
||||
idc=15003;
|
||||
x=0.550*safezoneW+safezoneX+0.22;
|
||||
text="3";
|
||||
action=QUOTE(GVAR(currentScopeClickNumberTemp) = 3; call FUNC(update_solution_setup));
|
||||
};
|
||||
class TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_4: TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_1 {
|
||||
idc=15004;
|
||||
x=0.550*safezoneW+safezoneX+0.26;
|
||||
text="4";
|
||||
action=QUOTE(GVAR(currentScopeClickNumberTemp) = 4; call FUNC(update_solution_setup));
|
||||
};
|
||||
class TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_8: TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_1 {
|
||||
idc=15005;
|
||||
x=0.550*safezoneW+safezoneX+0.30;
|
||||
text="8";
|
||||
action=QUOTE(GVAR(currentScopeClickNumberTemp) = 8; call FUNC(update_solution_setup));
|
||||
};
|
||||
class TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_10: TEXT_SOLUTION_SETUP_SHOW_RESULT_IN_1 {
|
||||
idc=15006;
|
||||
x=0.550*safezoneW+safezoneX+0.34;
|
||||
text="10";
|
||||
action=QUOTE(GVAR(currentScopeClickNumberTemp) = 10; call FUNC(update_solution_setup));
|
||||
};
|
||||
class TEXT_SOLUTION_SETUP_CLICKS_PER: TEXT_GUN_AMMO_DATA_BORE_HEIGHT {
|
||||
idc=15007;
|
||||
style=64;
|
||||
w=0.25;
|
||||
h=0.07;
|
||||
x=0.550*safezoneW+safezoneX+0.13;
|
||||
y=0.265*safezoneH+safezoneY+0.42;
|
||||
text="Clicks per";
|
||||
};
|
||||
class TEXT_SOLUTION_SETUP_CLICKS_PER_TMOA: TEXT_TARGET_A {
|
||||
idc=15008;
|
||||
w=0.05;
|
||||
x=0.550*safezoneW+safezoneX+0.15;
|
||||
y=0.265*safezoneH+safezoneY+0.45;
|
||||
text="TMOA";
|
||||
action=QUOTE(GVAR(currentScopeClickUnitTemp) = 0; call FUNC(update_solution_setup));
|
||||
};
|
||||
class TEXT_SOLUTION_SETUP_CLICKS_PER_SMOA: TEXT_SOLUTION_SETUP_CLICKS_PER_TMOA {
|
||||
idc=15009;
|
||||
x=0.550*safezoneW+safezoneX+0.23;
|
||||
text="SMOA";
|
||||
action=QUOTE(GVAR(currentScopeClickUnitTemp) = 1; call FUNC(update_solution_setup));
|
||||
};
|
||||
class TEXT_SOLUTION_SETUP_CLICKS_PER_MILS: TEXT_SOLUTION_SETUP_CLICKS_PER_TMOA {
|
||||
idc=15010;
|
||||
x=0.550*safezoneW+safezoneX+0.31;
|
||||
text="MILS";
|
||||
action=QUOTE(GVAR(currentScopeClickUnitTemp) = 2; call FUNC(update_solution_setup));
|
||||
};
|
||||
class TEXT_SOLUTION_SETUP_DONE: TEXT_TARGET_SPEED_ASSIST_DONE {
|
||||
idc=15011;
|
||||
x=0.550*safezoneW+safezoneX+0.18;
|
||||
y=0.265*safezoneH+safezoneY+0.55;
|
||||
action=QUOTE(1 call FUNC(toggle_solution_setup));
|
||||
};
|
||||
class TEXT_SOLUTION_SETUP_CANCEL: TEXT_TARGET_SPEED_ASSIST_CANCEL {
|
||||
idc=15012;
|
||||
x=0.550*safezoneW+safezoneX+0.26;
|
||||
y=0.265*safezoneH+safezoneY+0.55;
|
||||
action=QUOTE(0 call FUNC(toggle_solution_setup));
|
||||
};
|
||||
};
|
||||
};
|
@ -1,25 +1,50 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
//#include "initKeybinds.sqf"
|
||||
#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.700, 1, "ASM" ],
|
||||
["12.7x99mm" , 880, 100, 0.0607, -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.7x54mm" , 290, 100, 0.3913, -0.0014000, 3.81, 0, 0.338, 0.338, 120, 0, 0, 61.56, "B_127x54_Ball" , "10Rnd_127x54_Mag" , 1.050, 1, "ASM" ],
|
||||
["10.4x77mm" , 910, 100, 0.0572, -0.0004800, 3.81, 0, 0.338, 0.338, 120, 0, 0, 27.15, "B_408_Ball" , "7Rnd_408_Mag" , 0.970, 1, "ASM" ],
|
||||
["9.3×64mm" , 870, 100, 0.0632, -0.0007500, 3.81, 0, 0.338, 0.338, 120, 0, 0, 16.20, "B_93x64_Ball" , "10Rnd_93x64_DMR_05_Mag" , 0.368, 1, "ASM" ],
|
||||
["8.6×70mm" , 915, 100, 0.0572, -0.0006100, 3.81, 0, 0.338, 0.338, 120, 0, 0, 16.20, "B_338_Ball" , "10Rnd_338_Mag" , 0.322, 7, "ICAO"],
|
||||
["7.62x51mm" , 850, 100, 0.0639, -0.0010000, 3.81, 0, 0.338, 0.338, 120, 0, 0, 9.460, "B_762x51_Ball" , "20Rnd_762x51_Mag" , 0.393, 1, "ICAO"],
|
||||
["6.5x39mm" , 800, 100, 0.0689, -0.0009000, 3.81, 0, 0.338, 0.338, 120, 0, 0, 7.776, "B_65x39_Caseless", "30Rnd_65x39_caseless_mag", 0.263, 1, "ICAO"],
|
||||
["5.56x45mm" , 920, 100, 0.0584, -0.0012650, 3.81, 0, 0.338, 0.338, 120, 0, 0, 4.000, "B_556x45_Ball" , "30Rnd_556x45_Stanag" , 0.304, 1, "ASM" ],
|
||||
["5.56x45mm Mk262" , 850, 100, 0.0643, -0.0011250, 3.81, 0, 0.338, 0.338, 120, 0, 0, 4.990, "RH_556x45_Mk262" , "RH_30Rnd_556x45_Mk262" , 0.361, 1, "ASM" ]];
|
||||
// Profile Name, Muzzle Velocity, Zero Range, Scope Base Angle, AirFriction, Bore Height, Scope Unit, Scope Click Unit, Scope Click Number, Maximum Elevation, Dialed Elevation, Dialed Windage, Mass, Bullet Diameter, Rifle Twist, BC, Drag Model, Atmosphere Model
|
||||
GVAR(gunList) = [["12.7x108mm" , 820, 100, 0.0657, -0.0006400, 3.81, 0, 2, 10, 120, 0, 0, 48.28, 12.7, 38.10, 0.630, 1, "ASM" ],
|
||||
|
||||
["12.7x99mm AMAX" , 860, 100, 0.0612, -0.0003740, 3.81, 0, 2, 10, 120, 0, 0, 48.60, 12.7, 38.10, 1.050, 1, "ASM" ],
|
||||
["12.7x99mm" , 900, 100, 0.0623, -0.0006000, 3.81, 0, 2, 10, 120, 0, 0, 41.92, 12.7, 38.10, 0.670, 1, "ASM" ],
|
||||
|
||||
["12.7x54mm" , 300, 100, 0.3395, -0.0001400, 3.81, 0, 2, 10, 120, 0, 0, 48.60, 12.7, 24.13, 1.050, 1, "ASM" ],
|
||||
|
||||
[".408 Chey Tac" , 910, 100, 0.0571, -0.0003950, 3.81, 0, 2, 10, 120, 0, 0, 27.15, 10.4, 33.02, 0.970, 1, "ASM" ],
|
||||
|
||||
["9.3×64mm" , 870, 100, 0.0619, -0.0010600, 3.81, 0, 2, 10, 120, 0, 0, 14.90, 9.30, 35.56, 0.368, 1, "ASM" ],
|
||||
|
||||
[".338LM 250gr" , 880, 100, 0.0598, -0.0006060, 3.81, 0, 2, 10, 120, 0, 0, 16.20, 8.58, 25.40, 0.322, 7, "ICAO"],
|
||||
[".338LM 300gr" , 800, 100, 0.0677, -0.0005350, 3.81, 0, 2, 10, 120, 0, 0, 19.44, 8.58, 25.40, 0.381, 7, "ICAO"],
|
||||
[".338LM API526" , 880, 100, 0.0601, -0.0006730, 3.81, 0, 2, 10, 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, 2, 10, 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, 2, 10, 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, 2, 10, 120, 0, 0, 14.90, 7.80, 25.40, 0.368, 7, "ICAO"],
|
||||
|
||||
["7.62x54mmR" , 800, 100, 0.0692, -0.0010230, 3.81, 0, 2, 10, 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, 2, 10, 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, 2, 10, 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, 2, 10, 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, 2, 10, 120, 0, 0, 12.96, 7.82, 25.40, 0.235, 7, "ICAO"],
|
||||
|
||||
["6.5x39mm" , 800, 100, 0.0683, -0.0007850, 3.81, 0, 2, 10, 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, 2, 10, 120, 0, 0, 9.007, 6.71, 22.86, 0.290, 7, "ICAO"],
|
||||
["6.5mm Creedmor" , 840, 100, 0.0637, -0.0006510, 3.81, 0, 2, 10, 120, 0, 0, 9.072, 6.71, 22.86, 0.317, 7, "ICAO"],
|
||||
|
||||
["5.56x45mm M855" , 870, 100, 0.0626, -0.0012650, 3.81, 0, 2, 10, 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, 2, 10, 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, 2, 10, 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);
|
||||
|
@ -11,36 +11,60 @@ PREP(calculate_target_solution);
|
||||
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(cycle_target_speed_direction);
|
||||
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_solution_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_solution_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_solution_setup);
|
||||
PREP(update_target);
|
||||
PREP(update_target_data);
|
||||
PREP(update_target_selection);
|
||||
PREP(update_unit_selection);
|
||||
PREP(update_zero_range);
|
||||
|
@ -19,7 +19,7 @@ private ["_gunName", "_gunProfileEntry"];
|
||||
|
||||
_gunName = ctrlText 11001;
|
||||
if (_gunName != "") then {
|
||||
_gunProfileEntry = [_gunName, 850, 500, 0.280, -0.0010000, 3.81, 0, 0.338, 0.338, 120, 0, 0, 9.460, "", "", 0.393, 1, "ICAO"];
|
||||
_gunProfileEntry = [_gunName, 810, 100, 0.0679, -0.0010350, 3.81, 0, 2, 10, 120, 0, 0, 9.525, 7.82, 25.40, 0.393, 1, "ICAO"],
|
||||
|
||||
GVAR(gunList) = GVAR(gunList) + [_gunProfileEntry];
|
||||
|
||||
|
@ -18,45 +18,63 @@
|
||||
[] 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;
|
||||
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"];
|
||||
_temperature = (GVAR(temperature) select GVAR(currentTarget));
|
||||
_barometricPressure = (GVAR(barometricPressure) select GVAR(currentTarget));
|
||||
_relativeHumidity = (GVAR(relativeHumidity) select GVAR(currentTarget));
|
||||
if (GVAR(currentUnit) == 1) then
|
||||
{
|
||||
_temperature = (_temperature - 32) / 1.8;
|
||||
_barometricPressure = _barometricPressure * 33.8638866667;
|
||||
_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(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]) 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, _directionOfFire] call FUNC(calculate_solution);
|
||||
|
@ -34,6 +34,7 @@ _temperature = 15;
|
||||
_barometricPressure = 1013.25;
|
||||
_relativeHumidity = 0;
|
||||
|
||||
_result = [_scopeBaseAngle, _bulletMass, _boreHeight, _airFriction, _muzzleVelocity, _temperature, _barometricPressure, _relativeHumidity, 1000, 0, 0, 0, 0, _zeroRange, _airFriction, 1, "ICAO", false] call FUNC(calculate_solution);
|
||||
private ["_result"];
|
||||
_result = [_scopeBaseAngle, _bulletMass, _boreHeight, _airFriction, _muzzleVelocity, _temperature, _barometricPressure, _relativeHumidity, 1000, [0, 0], 0, 0, 0, _zeroRange, _airFriction, 1, "ICAO", false, 1.5, 0, 0, 0] call FUNC(calculate_solution);
|
||||
|
||||
_scopeBaseAngle + (_result select 0) / 60
|
||||
|
@ -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", "_drag", "_bc", "_dragModel", "_atmosphereModel", "_storeRangeCardData", "_stabilityFactor", "_twistDirection", "_latitude", "_directionOfFire"];
|
||||
_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,10 @@ _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;
|
||||
_directionOfFire = _this select 21;
|
||||
|
||||
private ["_bulletPos", "_bulletVelocity", "_bulletAccel", "_bulletSpeed", "_gravity", "_deltaT"];
|
||||
_bulletPos = [0, 0, 0];
|
||||
@ -65,31 +76,51 @@ _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];
|
||||
if ((missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) && (missionNamespace getVariable [QEGVAR(advanced_ballistics,AdvancedAirDragEnabled), false])) then {
|
||||
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]) then {
|
||||
_bc = [_bc, _temperature, _barometricPressure, _relativeHumidity, _atmosphereModel] call EFUNC(advanced_ballistics,calculateAtmosphericCorrection);
|
||||
};
|
||||
|
||||
private ["_speedTotal", "_stepsTotal", "_speedAverage"];
|
||||
_speedTotal = 0;
|
||||
_stepsTotal = 0;
|
||||
_speedAverage = 0;
|
||||
|
||||
private ["_eoetvoesMultiplier"];
|
||||
_eoetvoesMultiplier = 0;
|
||||
if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then {
|
||||
_eoetvoesMultiplier = 2 * (0.0000729 * _muzzleVelocity / -9.80665) * cos(_latitude) * sin(_directionOfFire);
|
||||
};
|
||||
|
||||
_TOF = 0;
|
||||
|
||||
_bulletPos set [0, 0];
|
||||
@ -102,16 +133,21 @@ _bulletVelocity set [2, Sin(_scopeBaseAngle) * _muzzleVelocity];
|
||||
|
||||
while {_TOF < 15 && (_bulletPos select 1) < _targetRange} do {
|
||||
_bulletSpeed = vectorMagnitude _bulletVelocity;
|
||||
|
||||
_speedTotal = _speedTotal + _bulletSpeed;
|
||||
_stepsTotal = _stepsTotal + 1;
|
||||
_speedAverage = (_speedTotal / _stepsTotal);
|
||||
|
||||
_trueVelocity = _bulletVelocity vectorDiff _wind;
|
||||
_trueVelocity = _bulletVelocity vectorDiff _wind1;
|
||||
_trueSpeed = vectorMagnitude _trueVelocity;
|
||||
|
||||
if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then {
|
||||
if (missionNamespace getVariable [QEGVAR(advanced_ballistics,AdvancedAirDragEnabled), false]) then {
|
||||
private ["_drag"];
|
||||
_drag = -1 * ([_dragModel, _bc, _trueSpeed] call EFUNC(advanced_ballistics,calculateRetardation));
|
||||
_bulletAccel = (vectorNormalized _trueVelocity) vectorMultiply (_drag);
|
||||
_drag = if (missionNamespace getVariable [QEGVAR(advanced_ballistics,extensionAvailable), false]) then {
|
||||
parseNumber(("ace_advanced_ballistics" callExtension format["retard:%1:%2:%3", _dragModel, _bc, _trueSpeed]))
|
||||
} else {
|
||||
([_dragModel, _bc, _trueSpeed] call EFUNC(advanced_ballistics,calculateRetardation))
|
||||
};
|
||||
_bulletAccel = (vectorNormalized _trueVelocity) vectorMultiply (-1 * _drag);
|
||||
} else {
|
||||
_bulletAccel = _trueVelocity vectorMultiply (_trueSpeed * _airFriction);
|
||||
};
|
||||
@ -128,15 +164,34 @@ 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);
|
||||
};
|
||||
_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]) && (_bulletPos select 1) > 0) then {
|
||||
// Coriolis
|
||||
_horizontalDeflection = 0.0000729 * ((_bulletPos select 1) ^ 2) * sin(_latitude) / _speedAverage;
|
||||
_horizontalCoriolis = - atan(_horizontalDeflection / (_bulletPos select 1));
|
||||
_windage1 = _windage1 + _horizontalCoriolis;
|
||||
_windage2 = _windage2 + _horizontalCoriolis;
|
||||
// Eoetvoes
|
||||
_verticalDeflection = (_bulletPos select 2) * _eoetvoesMultiplier;
|
||||
_verticalCoriolis = - atan(_verticalDeflection / (_bulletPos select 1));
|
||||
_elevation = _elevation + _verticalCoriolis;
|
||||
// Spin drift
|
||||
_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;
|
||||
};
|
||||
};
|
||||
@ -144,7 +199,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 {
|
||||
@ -154,4 +211,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]) && (_bulletPos select 1) > 0) then {
|
||||
// Coriolis
|
||||
_horizontalDeflection = 0.0000729 * ((_bulletPos select 1) ^ 2) * sin(_latitude) / _speedAverage;
|
||||
_horizontalCoriolis = - atan(_horizontalDeflection / (_bulletPos select 1));
|
||||
_windage1 = _windage1 + _horizontalCoriolis;
|
||||
_windage2 = _windage2 + _horizontalCoriolis;
|
||||
// Eoetvoes
|
||||
_verticalDeflection = (_bulletPos select 2) * _eoetvoesMultiplier;
|
||||
_verticalCoriolis = - atan(_verticalDeflection / (_bulletPos select 1));
|
||||
_elevation = _elevation + _verticalCoriolis;
|
||||
// Spin drift
|
||||
_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]
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
@ -18,48 +18,65 @@
|
||||
[] 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;
|
||||
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"];
|
||||
_temperature = (GVAR(temperature) select GVAR(currentTarget));
|
||||
_barometricPressure = (GVAR(barometricPressure) select GVAR(currentTarget));
|
||||
_relativeHumidity = (GVAR(relativeHumidity) select GVAR(currentTarget));
|
||||
if (GVAR(currentUnit) == 1) then
|
||||
{
|
||||
_temperature = (_temperature - 32) / 1.8;
|
||||
_barometricPressure = _barometricPressure * 33.8638866667;
|
||||
_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(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]) 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, _directionOfFire] 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];
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
@ -4,6 +4,8 @@
|
||||
*
|
||||
* Arguments:
|
||||
* gunID <number>
|
||||
* restore workingMemory from gunList <BOOL>
|
||||
* update display <BOOL>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
@ -15,24 +17,38 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (_this < 0 || _this > (count GVAR(gunList)) - 1) exitWith {};
|
||||
private ["_gunID", "_restoreMemory", "_updateDisplay"];
|
||||
_gunID = _this select 0;
|
||||
_restoreMemory = _this select 1;
|
||||
_updateDisplay = _this select 2;
|
||||
|
||||
GVAR(workingMemory) set [GVAR(currentTarget), +(GVAR(gunList) select _this)];
|
||||
GVAR(currentGun) set [GVAR(currentTarget), _this];
|
||||
if (_gunID < 0 || _gunID > (count GVAR(gunList)) - 1) exitWith {};
|
||||
|
||||
lbSetCurSel [6000, (GVAR(currentGun) select GVAR(currentTarget))];
|
||||
if (_restoreMemory) then {
|
||||
GVAR(workingMemory) = +(GVAR(gunList) select _gunID);
|
||||
};
|
||||
GVAR(currentGun) = _gunID;
|
||||
|
||||
if ((GVAR(scopeUnits) select (GVAR(currentScopeUnit) select GVAR(currentTarget))) != "Clicks") then
|
||||
{
|
||||
GVAR(currentScopeUnit) set [GVAR(currentTarget), (GVAR(workingMemory) select GVAR(currentTarget)) select 6];
|
||||
if (_updateDisplay) then {
|
||||
lbSetCurSel [6000, GVAR(currentGun)];
|
||||
};
|
||||
|
||||
[] call FUNC(update_gun);
|
||||
GVAR(currentScopeUnit) = 0 max (GVAR(workingMemory) select 6) min 3;
|
||||
GVAR(currentScopeClickUnit) = 0 max (GVAR(workingMemory) select 7) min 2;
|
||||
GVAR(currentScopeClickNumber) = 1 max (GVAR(workingMemory) select 8) min 10;
|
||||
|
||||
if (_updateDisplay) then {
|
||||
[] 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(update_result);
|
||||
if (_updateDisplay) then {
|
||||
[] call FUNC(calculate_target_solution);
|
||||
};
|
||||
|
26
addons/atragmx/functions/fnc_change_target_slot.sqf
Normal file
26
addons/atragmx/functions/fnc_change_target_slot.sqf
Normal file
@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Author: Ruthberg
|
||||
* Selects a target slot (A, B, C or D)
|
||||
*
|
||||
* Arguments:
|
||||
* target <NUMBER>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* 2 call ace_atragmx_fnc_change_target_slot
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_target"];
|
||||
_target = 0 max _this min 3;
|
||||
|
||||
call FUNC(parse_input);
|
||||
|
||||
GVAR(currentTarget) = _target;
|
||||
call FUNC(update_target_selection);
|
||||
|
||||
[] call FUNC(calculate_target_solution);
|
45
addons/atragmx/functions/fnc_clear_user_data.sqf
Normal file
45
addons/atragmx/functions/fnc_clear_user_data.sqf
Normal file
@ -0,0 +1,45 @@
|
||||
/*
|
||||
* 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 ["ACE_ATragMX_latitude", nil];
|
||||
profileNamespace setVariable ["ACE_ATragMX_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_targetSpeedDirection", nil];
|
||||
profileNamespace setVariable ["ACE_ATragMX_targetRange", nil];
|
||||
|
||||
profileNamespace setVariable ["ACE_ATragMX_rangeCardStartRange", nil];
|
||||
profileNamespace setVariable ["ACE_ATragMX_rangeCardEndRange", nil];
|
||||
profileNamespace setVariable ["ACE_ATragMX_rangeCardIncrement", nil];
|
||||
profileNamespace setVariable ["ACE_ATragMX_rangeCardCurrentColumn", nil];
|
@ -23,15 +23,25 @@ createDialog 'ATragMX_Display';
|
||||
|
||||
call FUNC(update_target_selection);
|
||||
|
||||
true call FUNC(show_main_page);
|
||||
GVAR(showMainPage) call FUNC(show_main_page);
|
||||
|
||||
false call FUNC(show_add_new_gun);
|
||||
false call FUNC(show_gun_list);
|
||||
false call FUNC(show_range_card);
|
||||
false call FUNC(show_range_card_setup);
|
||||
false call FUNC(show_target_range_assist);
|
||||
false call FUNC(show_target_speed_assist);
|
||||
false call FUNC(show_target_speed_assist_timer);
|
||||
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 ((uiNamespace getVariable "ATragMX_Display") displayCtrl 5001);
|
||||
[] call FUNC(update_range_card);
|
||||
};
|
||||
GVAR(showRangeCardSetup) call FUNC(show_range_card_setup);
|
||||
GVAR(showSolutionSetup) call FUNC(show_solution_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);
|
||||
|
||||
[GVAR(currentGun), false, true] call FUNC(change_gun);
|
||||
|
||||
{
|
||||
lbAdd [6000, _x select 0];
|
||||
|
20
addons/atragmx/functions/fnc_cycle_gun_list.sqf
Normal file
20
addons/atragmx/functions/fnc_cycle_gun_list.sqf
Normal file
@ -0,0 +1,20 @@
|
||||
/*
|
||||
* 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"
|
||||
|
||||
if (!(GVAR(showMainPage) || GVAR(showGunList))) exitWith {};
|
||||
|
||||
[(GVAR(currentGun) + (count GVAR(gunList)) + _this) % (count GVAR(gunList)), true, true] call FUNC(change_gun);
|
19
addons/atragmx/functions/fnc_cycle_image_size_units.sqf
Normal file
19
addons/atragmx/functions/fnc_cycle_image_size_units.sqf
Normal 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)];
|
20
addons/atragmx/functions/fnc_cycle_num_ticks_units.sqf
Normal file
20
addons/atragmx/functions/fnc_cycle_num_ticks_units.sqf
Normal 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);
|
@ -17,7 +17,8 @@
|
||||
|
||||
[] call FUNC(parse_input);
|
||||
|
||||
GVAR(currentScopeUnit) set [GVAR(currentTarget), ((GVAR(currentScopeUnit) select GVAR(currentTarget)) + 1) % (count GVAR(scopeUnits))];
|
||||
GVAR(currentScopeUnit) = (GVAR(currentScopeUnit) + 1) % (count GVAR(scopeUnits));
|
||||
GVAR(workingMemory) set [6, GVAR(currentScopeUnit)];
|
||||
|
||||
[] call FUNC(update_scope_unit);
|
||||
[] call FUNC(update_result);
|
||||
|
19
addons/atragmx/functions/fnc_cycle_target_size_units.sqf
Normal file
19
addons/atragmx/functions/fnc_cycle_target_size_units.sqf
Normal 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)];
|
@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Author: Ruthberg
|
||||
* Cycles through the target directions left/right
|
||||
*
|
||||
* Arguments:
|
||||
* Nothing
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* call ace_atragmx_cycle_target_direction
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
if ((ctrlText 140051) == ">") then {
|
||||
ctrlSetText [140051, "<"];
|
||||
} else {
|
||||
ctrlSetText [140051, ">"];
|
||||
};
|
@ -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];
|
||||
|
@ -9,15 +9,16 @@
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* call ace_atragmx_init
|
||||
* call ace_atragmx_fnc_init
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
GVAR(workingMemory) = [+(GVAR(gunList) select 0), +(GVAR(gunList) select 0), +(GVAR(gunList) select 0), +(GVAR(gunList) select 0)];
|
||||
GVAR(workingMemory) = +(GVAR(gunList) select 0);
|
||||
|
||||
GVAR(scopeUnits) = ["MILs", "TMOA", "SMOA", "Clicks"];
|
||||
GVAR(scopeClickUnits) = ["TMOA", "SMOA", "MILs"];
|
||||
|
||||
GVAR(rangeCardStartRange) = 200;
|
||||
GVAR(rangeCardEndRange) = 2000;
|
||||
@ -26,7 +27,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;
|
||||
@ -37,22 +38,47 @@ GVAR(speedAssistNumTicksUnit) = 0;
|
||||
GVAR(speedAssistTimer) = true;
|
||||
|
||||
GVAR(currentUnit) = 2;
|
||||
GVAR(currentGun) = [0, 0, 0, 0];
|
||||
GVAR(currentGun) = 0;
|
||||
GVAR(currentTarget) = 0;
|
||||
GVAR(currentScopeUnit) = [0, 0, 0, 0];
|
||||
GVAR(currentScopeUnit) = 0;
|
||||
GVAR(currentScopeClickUnit) = 2;
|
||||
GVAR(currentScopeClickUnitTemp) = 2;
|
||||
GVAR(currentScopeClickNumber) = 10;
|
||||
GVAR(currentScopeClickNumberTemp) = 10;
|
||||
|
||||
GVAR(temperature) = [15, 15, 15, 15];
|
||||
GVAR(barometricPressure) = [1013.25, 1013.25, 1013.25, 1013.25];
|
||||
GVAR(relativeHumidity) = [0.5, 0.5, 0.5, 0.5];
|
||||
GVAR(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(targetSpeedDirection) = [1, 1, 1, 1];
|
||||
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(showSolutionSetup) = false;
|
||||
GVAR(showTargetData) = false;
|
||||
GVAR(showTargetRangeAssist) = false;
|
||||
GVAR(showTargetSpeedAssist) = false;
|
||||
GVAR(showTargetSpeedAssistTimer) = false;
|
||||
|
@ -15,75 +15,121 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
GVAR(temperature) set [GVAR(currentTarget), parseNumber(ctrlText 200)];
|
||||
GVAR(barometricPressure) set [GVAR(currentTarget), 0 max parseNumber(ctrlText 210)];
|
||||
GVAR(relativeHumidity) set [GVAR(currentTarget), (0 max parseNumber(ctrlText 220) min 100) / 100];
|
||||
|
||||
GVAR(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) = 10 max parseNumber(ctrlText 130050) min 1350;
|
||||
GVAR(relativeHumidity) = (0 max parseNumber(ctrlText 130060) min 100) / 100;
|
||||
if (GVAR(currentUnit) != 2) 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 round(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), round(acos(_inclinationAngleCosine))];
|
||||
};
|
||||
};
|
||||
GVAR(targetSpeed) set [GVAR(currentTarget), 0 max abs(parseNumber(ctrlText 140050)) min 50];
|
||||
if ((ctrlText 140051) == ">") then {
|
||||
GVAR(targetSpeedDirection) set [GVAR(currentTarget), +1];
|
||||
} else {
|
||||
GVAR(targetSpeedDirection) set [GVAR(currentTarget), -1];
|
||||
};
|
||||
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]) 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;
|
||||
|
||||
(GVAR(workingMemory) select GVAR(currentTarget)) set [5, _boreHeight];
|
||||
(GVAR(workingMemory) select GVAR(currentTarget)) set [12, _bulletMass];
|
||||
if ((missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) && (missionNamespace getVariable [QEGVAR(advanced_ballistics,AdvancedAirDragEnabled), false])) then {
|
||||
(GVAR(workingMemory) select GVAR(currentTarget)) set [15, _airFriction];
|
||||
_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]) then {
|
||||
GVAR(workingMemory) set [15, _airFriction];
|
||||
} else {
|
||||
(GVAR(workingMemory) select GVAR(currentTarget)) set [4, _airFriction];
|
||||
GVAR(workingMemory) set [4, _airFriction];
|
||||
};
|
||||
(GVAR(workingMemory) select GVAR(currentTarget)) set [1, _muzzleVelocity];
|
||||
GVAR(workingMemory) set [1, _muzzleVelocity];
|
||||
GVAR(workingMemory) set [2, _zeroRange];
|
||||
|
||||
private ["_elevationCur", "_elevationCur", "_elevationScopeStep", "_windageScopeStep"];
|
||||
_elevationCur = parseNumber(ctrlText 402);
|
||||
_windageCur = parseNumber(ctrlText 412);
|
||||
private ["_elevationCur", "_windageCur", "_clickSize", "_clickNumber", "_clickInterval"];
|
||||
_elevationCur = GVAR(workingMemory) select 10;
|
||||
_windageCur = GVAR(workingMemory) select 11;
|
||||
|
||||
switch ((GVAR(currentScopeUnit) select GVAR(currentTarget))) 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:
|
||||
{
|
||||
_elevationScopeStep = ((GVAR(workingMemory) select GVAR(currentTarget)) select 7);
|
||||
_windageScopeStep = ((GVAR(workingMemory) select GVAR(currentTarget)) select 8);
|
||||
case 3: {
|
||||
switch (GVAR(workingMemory) select 7) do {
|
||||
case 0: { _clickSize = 1; };
|
||||
case 1: { _clickSize = 1 / 1.047; };
|
||||
case 2: { _clickSize = 3.38; };
|
||||
};
|
||||
_clickNumber = GVAR(workingMemory) select 8;
|
||||
_clickInterval = _clickSize / _clickNumber;
|
||||
|
||||
_elevationCur = _elevationCur * _elevationScopeStep;
|
||||
_windageCur = _windageCur * _windageScopeStep;
|
||||
_elevationCur = Round(_elevationCur / _clickInterval);
|
||||
_windageCur = Round(_windageCur / _clickInterval);
|
||||
};
|
||||
};
|
||||
|
||||
(GVAR(workingMemory) select GVAR(currentTarget)) set [10, _elevationCur];
|
||||
(GVAR(workingMemory) select GVAR(currentTarget)) set [11, _windageCur];
|
||||
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);
|
||||
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
(GVAR(workingMemory) select GVAR(currentTarget)) set [10, 0];
|
||||
(GVAR(workingMemory) select GVAR(currentTarget)) set [11, 0];
|
||||
GVAR(workingMemory) set [10, 0];
|
||||
GVAR(workingMemory) set [11, 0];
|
||||
|
||||
[] call FUNC(update_result);
|
||||
|
25
addons/atragmx/functions/fnc_restore_atmo_default.sqf
Normal file
25
addons/atragmx/functions/fnc_restore_atmo_default.sqf
Normal 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);
|
42
addons/atragmx/functions/fnc_restore_user_data.sqf
Normal file
42
addons/atragmx/functions/fnc_restore_user_data.sqf
Normal file
@ -0,0 +1,42 @@
|
||||
/*
|
||||
* 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]), true, false] call FUNC(change_gun);
|
||||
GVAR(currentTarget) = 0 max (profileNamespace getVariable ["ACE_ATragMX_currentTarget", 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(targetSpeedDirection) = profileNamespace getVariable ["ACE_ATragMX_targetSpeedDirection", [1, 1, 1, 1]];
|
||||
GVAR(targetRange) = profileNamespace getVariable ["ACE_ATragMX_targetRange", [0, 0, 0, 0]];
|
||||
|
||||
GVAR(rangeCardStartRange) = 0 max (profileNamespace getVariable ["ACE_ATragMX_rangeCardStartRange", 200]) min 3000;
|
||||
GVAR(rangeCardEndRange) = 0 max (profileNamespace getVariable ["ACE_ATragMX_rangeCardEndRange", 2000]) min 3000;
|
||||
GVAR(rangeCardIncrement) = 1 max (profileNamespace getVariable ["ACE_ATragMX_rangeCardIncrement", 50]) min 3000;
|
||||
GVAR(rangeCardCurrentColumn) = 0 max (profileNamespace getVariable ["ACE_ATragMX_rangeCardCurrentColumn", 3]) min 3;
|
@ -18,7 +18,7 @@
|
||||
private ["_index"];
|
||||
_index = 0 max (lbCurSel 6000);
|
||||
|
||||
GVAR(gunList) set [_index, +(GVAR(workingMemory) select GVAR(currentTarget))];
|
||||
GVAR(gunList) set [_index, +GVAR(workingMemory)];
|
||||
|
||||
lbClear 6000;
|
||||
{
|
||||
|
@ -15,4 +15,6 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
GVAR(showAddNewGun) = _this;
|
||||
|
||||
{ctrlShow [_x, _this]} forEach [11000, 11001, 11002, 11003];
|
25
addons/atragmx/functions/fnc_show_atmo_env_data.sqf
Normal file
25
addons/atragmx/functions/fnc_show_atmo_env_data.sqf
Normal 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);
|
||||
};
|
24
addons/atragmx/functions/fnc_show_gun_ammo_data.sqf
Normal file
24
addons/atragmx/functions/fnc_show_gun_ammo_data.sqf
Normal 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, 120061, 12007, 12008, 12009, 12010, 12011];
|
||||
|
||||
if (_this) then {
|
||||
[] call FUNC(update_gun_ammo_data);
|
||||
};
|
@ -15,4 +15,12 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
{ctrlShow [_x, _this]} forEach [6000, 6001, 6002, 6003, 6004, 6005, 6006, 6007];
|
||||
GVAR(showGunList) = _this;
|
||||
|
||||
{ctrlShow [_x, _this]} forEach [6000, 6001, 6002, 6003, 6004, 6005, 6006, 6007];
|
||||
|
||||
if (_this) then {
|
||||
ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 6002);
|
||||
|
||||
lbSetCurSel [6000, GVAR(currentGun)];
|
||||
};
|
||||
|
@ -15,5 +15,18 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
{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,
|
||||
500, 501, 502, 503, 600, 601, 602, 603, 1000, 2000, 3000, 4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008];
|
||||
GVAR(showMainPage) = _this;
|
||||
|
||||
{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, 1001, 1002, 1003, 1004, 2000, 2001, 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];
|
||||
};
|
||||
if (GVAR(currentScopeUnit) != 3) then {
|
||||
{ctrlShow [_x, false]} forEach [2001];
|
||||
};
|
||||
};
|
||||
|
@ -15,4 +15,6 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
GVAR(showRangeCard) = _this;
|
||||
|
||||
{ctrlShow [_x, _this]} forEach [5000, 5001, 5002, 5003, 5004, 5005, 5006, 5007];
|
||||
|
@ -15,4 +15,14 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
GVAR(showRangeCardSetup) = _this;
|
||||
|
||||
{ctrlShow [_x, _this]} forEach [10000, 10001, 10002, 10003, 10004, 10005, 10006, 10007, 10008, 10009];
|
||||
|
||||
if (_this) then {
|
||||
ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 10006);
|
||||
|
||||
ctrlSetText [10003, Str(Round(GVAR(rangeCardStartRange)))];
|
||||
ctrlSetText [10004, Str(Round(GVAR(rangeCardEndRange)))];
|
||||
ctrlSetText [10005, Str(Round(GVAR(rangeCardIncrement)))];
|
||||
};
|
||||
|
20
addons/atragmx/functions/fnc_show_solution_setup.sqf
Normal file
20
addons/atragmx/functions/fnc_show_solution_setup.sqf
Normal file
@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Author: Ruthberg
|
||||
* Shows/Hides the solution setup controls
|
||||
*
|
||||
* Arguments:
|
||||
* visible - <BOOL>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* false call ace_atragmx_fnc_show_solution_setup
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
GVAR(showSolutionSetup) = _this;
|
||||
|
||||
{ctrlShow [_x, _this]} forEach [15000, 15001, 15002, 15003, 15004, 15005, 15006, 15007, 15008, 15009, 15010, 15011, 15012];
|
24
addons/atragmx/functions/fnc_show_target_data.sqf
Normal file
24
addons/atragmx/functions/fnc_show_target_data.sqf
Normal 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, 140051, 14006, 140060, 140061, 14007, 14008, 14009, 14010, 14011];
|
||||
|
||||
if (_this) then {
|
||||
[] call FUNC(update_target_data);
|
||||
};
|
@ -15,4 +15,19 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
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 ((uiNamespace getVariable "ATragMX_Display") displayCtrl 7018);
|
||||
|
||||
ctrlSetText [7012, Str(parseNumber(ctrlText 320))];
|
||||
ctrlSetText [7013, Str(parseNumber(ctrlText 340))];
|
||||
|
||||
if (GVAR(currentUnit) == 1) then {
|
||||
ctrlSetText [7016, "Yards"];
|
||||
} else {
|
||||
ctrlSetText [7016, "Meters"];
|
||||
};
|
||||
};
|
@ -15,4 +15,24 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
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 ((uiNamespace getVariable "ATragMX_Display") displayCtrl 8012);
|
||||
|
||||
ctrlSetText [8004, Str(Round((GVAR(targetRange) select GVAR(currentTarget))))];
|
||||
|
||||
if (GVAR(currentUnit) == 1) then {
|
||||
ctrlSetText [8008, "Yards"];
|
||||
} else {
|
||||
ctrlSetText [8008, "Meters"];
|
||||
};
|
||||
|
||||
if (GVAR(currentUnit) == 2) then {
|
||||
ctrlSetText [8011, "m/s"];
|
||||
} else {
|
||||
ctrlSetText [8011, "mph"];
|
||||
};
|
||||
};
|
||||
|
@ -15,4 +15,6 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
GVAR(showTargetSpeedAssistTimer) = _this;
|
||||
|
||||
{ctrlShow [_x, _this]} forEach [9000, 9001, 9002];
|
||||
|
@ -22,6 +22,6 @@ _slopeDistance = _this select 0;
|
||||
_azimuth = _this select 1;
|
||||
_inclination = _this select 2;
|
||||
|
||||
//_inclination = asin((ACE_player weaponDirection currentWeapon ACE_player) select 2);
|
||||
GVAR(inclinationAngle) set [GVAR(currentTarget), _inclination];
|
||||
GVAR(targetRange) set [GVAR(currentTarget), _slopeDistance];
|
||||
GVAR(inclinationAngle) set [GVAR(currentTarget), round(_inclination)];
|
||||
GVAR(directionOfFire) set [GVAR(currentTarget), round(_azimuth)];
|
||||
GVAR(targetRange) set [GVAR(currentTarget), round(_slopeDistance)];
|
||||
|
44
addons/atragmx/functions/fnc_store_user_data.sqf
Normal file
44
addons/atragmx/functions/fnc_store_user_data.sqf
Normal file
@ -0,0 +1,44 @@
|
||||
/*
|
||||
* 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_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 ["ACE_ATragMX_latitude", GVAR(latitude)];
|
||||
profileNamespace setVariable ["ACE_ATragMX_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_targetSpeedDirection", GVAR(targetSpeedDirection)];
|
||||
profileNamespace setVariable ["ACE_ATragMX_targetRange", GVAR(targetRange)];
|
||||
|
||||
profileNamespace setVariable ["ACE_ATragMX_rangeCardStartRange", GVAR(rangeCardStartRange)];
|
||||
profileNamespace setVariable ["ACE_ATragMX_rangeCardEndRange", GVAR(rangeCardEndRange)];
|
||||
profileNamespace setVariable ["ACE_ATragMX_rangeCardIncrement", GVAR(rangeCardIncrement)];
|
||||
profileNamespace setVariable ["ACE_ATragMX_rangeCardCurrentColumn", GVAR(rangeCardCurrentColumn)];
|
@ -15,14 +15,12 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
#define _dsp (uiNamespace getVariable "ATragMX_Display")
|
||||
|
||||
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"];
|
||||
|
28
addons/atragmx/functions/fnc_toggle_atmo_env_data.sqf
Normal file
28
addons/atragmx/functions/fnc_toggle_atmo_env_data.sqf
Normal 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);
|
||||
};
|
29
addons/atragmx/functions/fnc_toggle_gun_ammo_data.sqf
Normal file
29
addons/atragmx/functions/fnc_toggle_gun_ammo_data.sqf
Normal 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);
|
||||
};
|
@ -3,34 +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"
|
||||
|
||||
#define _dsp (uiNamespace getVariable "ATragMX_Display")
|
||||
|
||||
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, true] call FUNC(change_gun);
|
||||
};
|
||||
} else
|
||||
{
|
||||
} else {
|
||||
false call FUNC(show_main_page);
|
||||
true call FUNC(show_gun_list);
|
||||
|
||||
ctrlSetFocus (_dsp displayCtrl 6002);
|
||||
|
||||
lbSetCurSel [6000, (GVAR(currentGun) select GVAR(currentTarget))];
|
||||
};
|
||||
|
@ -15,18 +15,14 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
#define _dsp (uiNamespace getVariable "ATragMX_Display")
|
||||
|
||||
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);
|
||||
|
@ -3,27 +3,23 @@
|
||||
* Toggles the range card setup screen on/off
|
||||
*
|
||||
* Arguments:
|
||||
* Nothing
|
||||
* 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"
|
||||
|
||||
#define _dsp (uiNamespace getVariable "ATragMX_Display")
|
||||
|
||||
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;
|
||||
@ -31,14 +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);
|
||||
|
||||
ctrlSetFocus (_dsp displayCtrl 10006);
|
||||
|
||||
ctrlSetText [10003, Str(Round(GVAR(rangeCardStartRange)))];
|
||||
ctrlSetText [10004, Str(Round(GVAR(rangeCardEndRange)))];
|
||||
ctrlSetText [10005, Str(Round(GVAR(rangeCardIncrement)))];
|
||||
};
|
||||
|
38
addons/atragmx/functions/fnc_toggle_solution_setup.sqf
Normal file
38
addons/atragmx/functions/fnc_toggle_solution_setup.sqf
Normal file
@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Author: Ruthberg
|
||||
* Toggles the solution setup screen on/off
|
||||
*
|
||||
* Arguments:
|
||||
* Apply new data? <NUMBER>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* 1 call ace_atragmx_fnc_toggle_solution_setup
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (ctrlVisible 15000) then {
|
||||
false call FUNC(show_solution_setup);
|
||||
true call FUNC(show_main_page);
|
||||
|
||||
if (_this == 1) then {
|
||||
GVAR(currentScopeClickUnit) = GVAR(currentScopeClickUnitTemp);
|
||||
GVAR(currentScopeClickNumber) = GVAR(currentScopeClickNumberTemp);
|
||||
GVAR(workingMemory) set [7, GVAR(currentScopeClickUnit)];
|
||||
GVAR(workingMemory) set [8, GVAR(currentScopeClickNumber)];
|
||||
[] call FUNC(update_scope_unit);
|
||||
[] call FUNC(update_result);
|
||||
};
|
||||
} else {
|
||||
true call FUNC(show_solution_setup);
|
||||
false call FUNC(show_main_page);
|
||||
|
||||
GVAR(currentScopeClickUnitTemp) = GVAR(currentScopeClickUnit);
|
||||
GVAR(currentScopeClickNumberTemp) = GVAR(currentScopeClickNumber);
|
||||
|
||||
[] call FUNC(update_solution_setup);
|
||||
};
|
28
addons/atragmx/functions/fnc_toggle_target_data.sqf
Normal file
28
addons/atragmx/functions/fnc_toggle_target_data.sqf
Normal 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);
|
||||
};
|
@ -3,45 +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"
|
||||
|
||||
#define _dsp (uiNamespace getVariable "ATragMX_Display")
|
||||
|
||||
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);
|
||||
|
||||
ctrlSetFocus (_dsp displayCtrl 7018);
|
||||
|
||||
ctrlSetText [7012, Str(parseNumber(ctrlText 320))];
|
||||
ctrlSetText [7013, Str(parseNumber(ctrlText 340))];
|
||||
|
||||
if (GVAR(currentUnit) != 2) then
|
||||
{
|
||||
ctrlSetText [7016, "Yards"];
|
||||
} else
|
||||
{
|
||||
ctrlSetText [7016, "Meters"];
|
||||
};
|
||||
};
|
||||
|
@ -3,52 +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"
|
||||
|
||||
#define _dsp (uiNamespace getVariable "ATragMX_Display")
|
||||
|
||||
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);
|
||||
|
||||
ctrlSetFocus (_dsp displayCtrl 8012);
|
||||
|
||||
ctrlSetText [8004, Str(Round((GVAR(targetRange) select GVAR(currentTarget))))];
|
||||
|
||||
if (GVAR(currentUnit) != 2) then
|
||||
{
|
||||
ctrlSetText [8008, "Yards"];
|
||||
} else
|
||||
{
|
||||
ctrlSetText [8008, "Meters"];
|
||||
};
|
||||
|
||||
if (GVAR(currentUnit) != 1) then
|
||||
{
|
||||
ctrlSetText [8011, "m/s"];
|
||||
} else
|
||||
{
|
||||
ctrlSetText [8011, "mph"];
|
||||
};
|
||||
};
|
||||
|
45
addons/atragmx/functions/fnc_update_atmo_env_data.sqf
Normal file
45
addons/atragmx/functions/fnc_update_atmo_env_data.sqf
Normal 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) == 2) then {
|
||||
ctrlSetText [130040, Str(Round(GVAR(temperature) * 10) / 10)];
|
||||
} else {
|
||||
ctrlSetText [130040, Str(Round((GVAR(temperature) * 1.8 + 32) * 10) / 10)];
|
||||
};
|
||||
if (GVAR(currentUnit) == 2) 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) == 2) 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.)"];
|
||||
};
|
31
addons/atragmx/functions/fnc_update_atmo_selection.sqf
Normal file
31
addons/atragmx/functions/fnc_update_atmo_selection.sqf
Normal 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);
|
@ -15,10 +15,19 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
ctrlSetText [200, Str(Round((GVAR(temperature) select GVAR(currentTarget)) * 10) / 10)];
|
||||
if (GVAR(currentUnit) == 1) then {
|
||||
ctrlSetText [210, Str(Round((GVAR(barometricPressure) select GVAR(currentTarget)) * 100) / 100)];
|
||||
if (GVAR(currentUnit) == 2) then {
|
||||
ctrlSetText [200, Str(Round(GVAR(temperature) * 10) / 10)];
|
||||
} else {
|
||||
ctrlSetText [210, Str(Round(GVAR(barometricPressure) select GVAR(currentTarget)))];
|
||||
ctrlSetText [200, Str(Round((GVAR(temperature) * 1.8 + 32) * 10) / 10)];
|
||||
};
|
||||
if (GVAR(currentUnit) == 2) 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) == 2) then {
|
||||
ctrlSetText [230, Str(Round(GVAR(altitude)))];
|
||||
} else {
|
||||
ctrlSetText [230, Str(Round(GVAR(altitude) * 3.2808399))];
|
||||
};
|
||||
ctrlSetText [220, Str(Round((GVAR(relativeHumidity) select GVAR(currentTarget)) * 100 * 10) / 10)];
|
||||
|
@ -15,39 +15,36 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
ctrlSetText [1000, (GVAR(workingMemory) select GVAR(currentTarget)) select 0];
|
||||
if (GVAR(currentUnit) == 1) then
|
||||
{
|
||||
ctrlSetText [ 100, Str(Round(((GVAR(workingMemory) select GVAR(currentTarget)) select 5) / 2.54 * 100) / 100)];
|
||||
} else
|
||||
{
|
||||
ctrlSetText [ 100, Str(Round(((GVAR(workingMemory) select GVAR(currentTarget)) select 5) * 100) / 100)];
|
||||
};
|
||||
if (GVAR(currentUnit) == 1) then
|
||||
{
|
||||
ctrlSetText [ 110, Str(Round(((GVAR(workingMemory) select GVAR(currentTarget)) select 12) * 15.4323584))];
|
||||
} else
|
||||
{
|
||||
ctrlSetText [ 110, Str(Round((GVAR(workingMemory) select GVAR(currentTarget)) 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 GVAR(currentTarget)) select 15) * 1000) / 1000)];
|
||||
ctrlSetText [1000, GVAR(workingMemory) select 0];
|
||||
if (GVAR(currentUnit) != 2) then {
|
||||
ctrlSetText [100, Str(Round((GVAR(workingMemory) select 5) / 2.54 * 100) / 100)];
|
||||
} else {
|
||||
ctrlSetText [ 120, Str(Round(((GVAR(workingMemory) select GVAR(currentTarget)) select 4) * -1000 * 1000) / 1000)];
|
||||
ctrlSetText [100, Str(Round((GVAR(workingMemory) select 5) * 100) / 100)];
|
||||
};
|
||||
if (GVAR(currentUnit) == 1) then
|
||||
{
|
||||
ctrlSetText [130, Str(Round(((GVAR(workingMemory) select GVAR(currentTarget)) select 1) * 3.2808399))];
|
||||
} else
|
||||
{
|
||||
ctrlSetText [130, Str(Round((GVAR(workingMemory) select GVAR(currentTarget)) select 1))];
|
||||
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 (GVAR(currentUnit) == 2) then
|
||||
{
|
||||
ctrlSetText [140, Str(Round((GVAR(workingMemory) select GVAR(currentTarget)) select 2))];
|
||||
} else
|
||||
{
|
||||
ctrlSetText [140, Str(Round(((GVAR(workingMemory) select GVAR(currentTarget)) select 2) * 1.0936133))];
|
||||
if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then {
|
||||
ctrlSetText [120, Str(Round((GVAR(workingMemory) select 15) * 1000) / 1000)];
|
||||
} else {
|
||||
ctrlSetText [120, Str(Round((GVAR(workingMemory) select 4) * -1000 * 1000) / 1000)];
|
||||
};
|
||||
if (GVAR(currentUnit) != 2) then {
|
||||
ctrlSetText [130, Str(Round((GVAR(workingMemory) select 1) * 3.2808399))];
|
||||
} else {
|
||||
ctrlSetText [130, Str(Round(GVAR(workingMemory) select 1))];
|
||||
};
|
||||
switch (GVAR(currentUnit)) do {
|
||||
case 0: {
|
||||
ctrlSetText [140, format["*%1", Round(GVAR(workingMemory) select 2)]];
|
||||
};
|
||||
case 1: {
|
||||
ctrlSetText [140, Str(Round((GVAR(workingMemory) select 2) * 1.0936133))];
|
||||
};
|
||||
case 2: {
|
||||
ctrlSetText [140, Str(Round(GVAR(workingMemory) select 2))];
|
||||
};
|
||||
};
|
||||
|
||||
[] call FUNC(update_scope_unit);
|
||||
|
79
addons/atragmx/functions/fnc_update_gun_ammo_data.sqf
Normal file
79
addons/atragmx/functions/fnc_update_gun_ammo_data.sqf
Normal file
@ -0,0 +1,79 @@
|
||||
/*
|
||||
* 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]) 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) == 1) then {
|
||||
ctrlSetText [120060, Str(Round((GVAR(workingMemory) select 2) * 1.0936133))];
|
||||
} else {
|
||||
ctrlSetText [120060, Str(Round(GVAR(workingMemory) select 2))];
|
||||
};
|
||||
if (GVAR(currentUnit) == 0) then {
|
||||
ctrlSetText [120061, "*"];
|
||||
} else {
|
||||
ctrlSetText [120061, ""];
|
||||
};
|
||||
|
||||
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)"];
|
||||
};
|
26
addons/atragmx/functions/fnc_update_inclination_angle.sqf
Normal file
26
addons/atragmx/functions/fnc_update_inclination_angle.sqf
Normal 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)];
|
||||
};
|
@ -15,16 +15,18 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_range", "_elevation", "_windage", "_lead", "_TOF", "_velocity", "_kineticEnergy", "_rangeOutput", "_elevationOutput", "_windageOutput", "_lastColumnOutput"];
|
||||
private ["_range", "_elevation", "_windage1", "_windage2", "_clickSize", "_clickNumber", "_clickInterval", "_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,66 @@ 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) select GVAR(currentTarget))) 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:
|
||||
{
|
||||
_elevationScopeStep = ((GVAR(workingMemory) select GVAR(currentTarget)) select 7);
|
||||
_windageScopeStep = ((GVAR(workingMemory) select GVAR(currentTarget)) select 8);
|
||||
case 3: {
|
||||
switch (GVAR(workingMemory) select 7) do {
|
||||
case 0: { _clickSize = 1; };
|
||||
case 1: { _clickSize = 1 / 1.047; };
|
||||
case 2: { _clickSize = 3.38; };
|
||||
};
|
||||
_clickNumber = GVAR(workingMemory) select 8;
|
||||
_clickInterval = _clickSize / _clickNumber;
|
||||
|
||||
_elevation = Round(_elevation / _elevationScopeStep);
|
||||
_windage = Round(_windage / _windageScopeStep);
|
||||
_elevation = Round(_elevation / _clickInterval);
|
||||
_windage1 = Round(_windage1 / _clickInterval);
|
||||
_windage2 = Round(_windage2 / _clickInterval);
|
||||
};
|
||||
};
|
||||
|
||||
_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);
|
||||
}
|
||||
};
|
||||
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
(GVAR(workingMemory) select GVAR(currentTarget)) set [10, (GVAR(elevationOutput) select GVAR(currentTarget))];
|
||||
(GVAR(workingMemory) select GVAR(currentTarget)) set [11, (GVAR(windageOutput) select GVAR(currentTarget))];
|
||||
GVAR(workingMemory) set [10, (GVAR(elevationOutput) select GVAR(currentTarget))];
|
||||
GVAR(workingMemory) set [11, (GVAR(windage1Output) select GVAR(currentTarget))];
|
||||
|
||||
[] call FUNC(update_result);
|
||||
|
@ -15,66 +15,155 @@
|
||||
*/
|
||||
#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", "_clickSize", "_clickNumber", "_clickInterval"];
|
||||
_elevationAbs = GVAR(elevationOutput) select GVAR(currentTarget);
|
||||
_windageAbs = GVAR(windage1Output) select GVAR(currentTarget);
|
||||
|
||||
_elevationCur = (GVAR(workingMemory) select GVAR(currentTarget)) select 10;
|
||||
_windageCur = (GVAR(workingMemory) select GVAR(currentTarget)) select 11;
|
||||
_wind2 = GVAR(windage2Output) select GVAR(currentTarget);
|
||||
|
||||
_elevationCur = GVAR(workingMemory) select 10;
|
||||
_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) select GVAR(currentTarget))) 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:
|
||||
{
|
||||
_elevationScopeStep = ((GVAR(workingMemory) select GVAR(currentTarget)) select 7);
|
||||
_windageScopeStep = ((GVAR(workingMemory) select GVAR(currentTarget)) select 8);
|
||||
case 3: {
|
||||
switch (GVAR(workingMemory) select 7) do {
|
||||
case 0: { _clickSize = 1; };
|
||||
case 1: { _clickSize = 1 / 1.047; };
|
||||
case 2: { _clickSize = 3.38; };
|
||||
};
|
||||
_clickNumber = GVAR(workingMemory) select 8;
|
||||
_clickInterval = _clickSize / _clickNumber;
|
||||
|
||||
_elevationAbs = Round(_elevationAbs / _elevationScopeStep);
|
||||
_windageAbs = Round(_windageAbs / _windageScopeStep);
|
||||
_elevationAbs = Round(_elevationAbs / _clickInterval);
|
||||
_windageAbs = Round(_windageAbs / _clickInterval);
|
||||
|
||||
_elevationRel = Round(_elevationRel / _elevationScopeStep);
|
||||
_windageRel = Round(_windageRel / _windageScopeStep);
|
||||
_wind2 = Round(_wind2 / _clickInterval);
|
||||
|
||||
_elevationCur = Round(_elevationCur / _elevationScopeStep);
|
||||
_windageCur = Round(_windageCur / _windageScopeStep);
|
||||
_elevationRel = Round(_elevationRel / _clickInterval);
|
||||
_windageRel = Round(_windageRel / _clickInterval);
|
||||
|
||||
_elevationCur = Round(_elevationCur / _clickInterval);
|
||||
_windageCur = Round(_windageCur / _clickInterval);
|
||||
};
|
||||
};
|
||||
|
||||
ctrlSetText [400, Str(Round(_elevationAbs * 100) / 100)];
|
||||
ctrlSetText [401, Str(Round(_elevationRel * 100) / 100)];
|
||||
ctrlSetText [402, Str(Round(_elevationCur * 100) / 100)];
|
||||
if (GVAR(showWind2)) then {
|
||||
ctrlSetText [42, "Wind2"];
|
||||
} else {
|
||||
ctrlSetText [42, "Lead"];
|
||||
};
|
||||
|
||||
ctrlSetText [410, Str(Round(_windageAbs * 100) / 100)];
|
||||
ctrlSetText [411, Str(Round(_windageRel * 100) / 100)];
|
||||
ctrlSetText [412, Str(Round(_windageCur * 100) / 100)];
|
||||
_elevationAbs = Round(_elevationAbs * 100) / 100;
|
||||
if (_elevationAbs > 0) then {
|
||||
ctrlSetText [400, format["%1", abs(_elevationAbs)]];
|
||||
} else {
|
||||
if (_elevationAbs < 0) then {
|
||||
ctrlSetText [400, format["%1D", abs(_elevationAbs)]];
|
||||
} else {
|
||||
ctrlSetText [400, "0.0"];
|
||||
};
|
||||
};
|
||||
_elevationRel = Round(_elevationRel * 100) / 100;
|
||||
if (_elevationRel > 0) then {
|
||||
ctrlSetText [401, format["%1", abs(_elevationRel)]];
|
||||
} else {
|
||||
if (_elevationRel < 0) then {
|
||||
ctrlSetText [401, format["%1D", abs(_elevationRel)]];
|
||||
} else {
|
||||
ctrlSetText [401, "0.0"];
|
||||
};
|
||||
};
|
||||
_elevationCur = Round(_elevationCur * 100) / 100;
|
||||
if (_elevationCur > 0) then {
|
||||
ctrlSetText [402, format["%1", abs(_elevationCur)]];
|
||||
} else {
|
||||
if (_elevationCur < 0) then {
|
||||
ctrlSetText [402, format["%1D", abs(_elevationCur)]];
|
||||
} else {
|
||||
ctrlSetText [402, "0.0"];
|
||||
};
|
||||
};
|
||||
|
||||
ctrlSetText [420, Str(Round(_lead * 100) / 100)];
|
||||
_windageAbs = Round(_windageAbs * 100) / 100;
|
||||
if (_windageAbs > 0) then {
|
||||
ctrlSetText [410, format["%1R", abs(_windageAbs)]];
|
||||
} else {
|
||||
if (_windageAbs < 0) then {
|
||||
ctrlSetText [410, format["%1L", abs(_windageAbs)]];
|
||||
} else {
|
||||
ctrlSetText [410, "0.0"];
|
||||
};
|
||||
};
|
||||
_windageRel = Round(_windageRel * 100) / 100;
|
||||
if (_windageRel > 0) then {
|
||||
ctrlSetText [411, format["%1R", abs(_windageRel)]];
|
||||
} else {
|
||||
if (_windageRel < 0) then {
|
||||
ctrlSetText [411, format["%1L", abs(_windageRel)]];
|
||||
} else {
|
||||
ctrlSetText [411, "0.0"];
|
||||
};
|
||||
};
|
||||
_windageCur = Round(_windageCur * 100) / 100;
|
||||
if (_windageCur > 0) then {
|
||||
ctrlSetText [412, format["%1R", abs(_windageCur)]];
|
||||
} else {
|
||||
if (_windageCur < 0) then {
|
||||
ctrlSetText [412, format["%1L", abs(_windageCur)]];
|
||||
} else {
|
||||
ctrlSetText [412, "0.0"];
|
||||
};
|
||||
};
|
||||
|
||||
if (GVAR(showWind2)) then {
|
||||
_wind2 = Round(_wind2 * 100) / 100;
|
||||
if (_wind2 > 0) then {
|
||||
ctrlSetText [420, format["%1R", abs(_wind2)]];
|
||||
} else {
|
||||
if (_wind2 < 0) then {
|
||||
ctrlSetText [420, format["%1L", abs(_wind2)]];
|
||||
} else {
|
||||
ctrlSetText [420, "0.0"];
|
||||
};
|
||||
};
|
||||
} else {
|
||||
_lead = Round(_lead * 100) / 100;
|
||||
if (_lead > 0) then {
|
||||
if ((GVAR(targetSpeedDirection) select GVAR(currentTarget)) == 1) then {
|
||||
ctrlSetText [420, format["%1R", abs(_lead)]];
|
||||
} else {
|
||||
ctrlSetText [420, format["%1L", abs(_lead)]];
|
||||
};
|
||||
} else {
|
||||
ctrlSetText [420, "0.0"];
|
||||
};
|
||||
};
|
@ -15,5 +15,15 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
ctrlSetText [2000, GVAR(scopeUnits) select (GVAR(currentScopeUnit) select GVAR(currentTarget))];
|
||||
ctrlSetText [5000, GVAR(scopeUnits) select (GVAR(currentScopeUnit) select GVAR(currentTarget))];
|
||||
ctrlSetText [2000, GVAR(scopeUnits) select GVAR(currentScopeUnit)];
|
||||
ctrlSetText [2001, Str(GVAR(currentScopeClickNumber))];
|
||||
|
||||
if (GVAR(currentScopeUnit) == 3) then {
|
||||
ctrlSetText [5000, format["Clicks=%1", GVAR(currentScopeClickNumber)]];
|
||||
if (GVAR(showMainPage)) then {
|
||||
ctrlShow [2001, true];
|
||||
};
|
||||
} else {
|
||||
ctrlSetText [5000, GVAR(scopeUnits) select GVAR(currentScopeUnit)];
|
||||
ctrlShow [2001, false];
|
||||
};
|
31
addons/atragmx/functions/fnc_update_solution_setup.sqf
Normal file
31
addons/atragmx/functions/fnc_update_solution_setup.sqf
Normal file
@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Author: Ruthberg
|
||||
* Updates all solution setup input fields
|
||||
*
|
||||
* Arguments:
|
||||
* Nothing
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* call ace_atragmx_fnc_update_solution_setup
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
{((uiNamespace getVariable "ATragMX_Display") displayCtrl _x) ctrlEnable true} forEach [15001, 15002, 15003, 15004, 15005, 15006, 15008, 15009, 15010];
|
||||
|
||||
switch (GVAR(currentScopeClickNumberTemp)) do {
|
||||
case 1: { ((uiNamespace getVariable "ATragMX_Display") displayCtrl 15001) ctrlEnable false; };
|
||||
case 2: { ((uiNamespace getVariable "ATragMX_Display") displayCtrl 15002) ctrlEnable false; };
|
||||
case 3: { ((uiNamespace getVariable "ATragMX_Display") displayCtrl 15003) ctrlEnable false; };
|
||||
case 4: { ((uiNamespace getVariable "ATragMX_Display") displayCtrl 15004) ctrlEnable false; };
|
||||
case 8: { ((uiNamespace getVariable "ATragMX_Display") displayCtrl 15005) ctrlEnable false; };
|
||||
case 10: { ((uiNamespace getVariable "ATragMX_Display") displayCtrl 15006) ctrlEnable false; };
|
||||
};
|
||||
|
||||
((uiNamespace getVariable "ATragMX_Display") displayCtrl (15008 + GVAR(currentScopeClickUnitTemp))) ctrlEnable false;
|
||||
|
||||
ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 15011);
|
@ -15,23 +15,34 @@
|
||||
*/
|
||||
#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
|
||||
{
|
||||
ctrlSetText [340, Str(Round((GVAR(targetRange) select GVAR(currentTarget))))];
|
||||
switch (GVAR(currentUnit)) do {
|
||||
case 0: {
|
||||
ctrlSetText [340, format["*%1", Round((GVAR(targetRange) select GVAR(currentTarget)))]];
|
||||
};
|
||||
case 1: {
|
||||
ctrlSetText [340, Str(Round((GVAR(targetRange) select GVAR(currentTarget)) * 1.0936133))];
|
||||
};
|
||||
case 2: {
|
||||
ctrlSetText [340, Str(Round((GVAR(targetRange) select GVAR(currentTarget))))];
|
||||
};
|
||||
};
|
||||
|
63
addons/atragmx/functions/fnc_update_target_data.sqf
Normal file
63
addons/atragmx/functions/fnc_update_target_data.sqf
Normal file
@ -0,0 +1,63 @@
|
||||
/*
|
||||
* 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(targetSpeedDirection) select GVAR(currentTarget)) == 1) then {
|
||||
ctrlSetText [140051, ">"];
|
||||
} else {
|
||||
ctrlSetText [140051, "<"];
|
||||
};
|
||||
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) == 0) then {
|
||||
ctrlSetText [140061, "*"];
|
||||
} else {
|
||||
ctrlSetText [140061, ""];
|
||||
};
|
||||
|
||||
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)"];
|
||||
};
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user