mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' of https://github.com/acemod/ACE3 into buildingLitter
This commit is contained in:
commit
617a54201d
@ -8,6 +8,7 @@ stages:
|
||||
- status/wontfix
|
||||
exclude:
|
||||
- status/marked for cleanup
|
||||
- status/accepting-pr
|
||||
comment:
|
||||
- 'Hello @{author}! There has been no activity on this ticket for over a period of {days} days. I am automatically replying to let you know we will close this ticket within 1 week due to inactivity and consider this resolved.'
|
||||
- 'If you believe this is in error, please reply with the requested information.'
|
||||
@ -34,7 +35,7 @@ stages:
|
||||
remove_label:
|
||||
- status/marked for cleanup
|
||||
remind_about_old_ticket:
|
||||
days: 160
|
||||
days: 365
|
||||
labels:
|
||||
- kind/bug
|
||||
- kind/critical bug
|
||||
@ -46,6 +47,7 @@ stages:
|
||||
- status/marked for cleanup
|
||||
- status/inactive
|
||||
- status/stale
|
||||
- status/accepting-pr
|
||||
comment:
|
||||
- 'Hello @acemod/maintainers. This ticket has been open for over {days} days without any activity.'
|
||||
action:
|
||||
|
@ -4,7 +4,7 @@ branches:
|
||||
- release
|
||||
language: python
|
||||
python:
|
||||
- '3.4'
|
||||
- '3.5'
|
||||
before_script:
|
||||
- if [ -n "${GH_TOKEN}" ] && [ "${TRAVIS_BRANCH}" == "master" ] && [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then
|
||||
pip install pygithub;
|
||||
|
@ -53,6 +53,7 @@ Brisse <brisse@outlook.com>
|
||||
Brostrom.A | Evul <andreas.brostrom.ce@gmail.com>
|
||||
BullHorn <bullhorn7@gmail.com>
|
||||
chris579 <github@klemm.one>
|
||||
classicarma
|
||||
Clon1998 <ps.patti1998@gmail.com>
|
||||
Codingboy
|
||||
Coren <coren4@gmail.com>
|
||||
@ -63,6 +64,7 @@ dixon13 <dixonbegay@gmail.com>
|
||||
Drill <drill87@gmail.com>
|
||||
Dudakov aka [OMCB]Kaban <dudakov.s@gmail.com>
|
||||
Dslyecxi <dslyecxi@gmail.com>
|
||||
ElTyranos
|
||||
eRazeri
|
||||
evromalarkey <evromalarkey@gmail.com>
|
||||
F3 Project <alanr@ferstaberinde.com>
|
||||
@ -89,6 +91,7 @@ Head <brobergsebastian@gmail.com>
|
||||
Hybrid V
|
||||
Karneck <dschultz26@hotmail.com>
|
||||
Kavinsky <nmunozfernandez@gmail.com>
|
||||
Keithen <Keithen.Neu@gmail.com>
|
||||
Kllrt <kllrtik@gmail.com>
|
||||
legman <juicemelon@msn.com>
|
||||
Legolasindar "Viper" <legolasindar@gmail.com>
|
||||
@ -109,6 +112,7 @@ PaxJaromeMalues <seemax1991@gmail.com>
|
||||
Phyma <sethramstrom@gmail.com>
|
||||
pokertour
|
||||
Professor <lukas.trneny@wo.cz>
|
||||
QuickDagger
|
||||
rakowozz
|
||||
ramius86 <pasini86@hotmail.com>
|
||||
Raspu86
|
||||
@ -125,8 +129,10 @@ Tessa Elieff <Fastroping Sound - CreativeCommons Attributions 3.0>
|
||||
Toaster <jonathan.pereira@gmail.com>
|
||||
Tonic
|
||||
Tourorist <tourorist@gmail.com>
|
||||
Tuupertunut
|
||||
Valentin Torikian <valentin.torikian@gmail.com>
|
||||
voiper
|
||||
VyMajoris(W-Cephei)<vycanismajoriscsa@gmail.com>
|
||||
Winter <simon@agius-muscat.net>
|
||||
xrufix
|
||||
zGuba
|
||||
|
56
README.md
56
README.md
@ -4,7 +4,7 @@
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/acemod/ACE3/releases/latest">
|
||||
<img src="https://img.shields.io/badge/Version-3.10.2-blue.svg?style=flat-square" alt="ACE3 Version">
|
||||
<img src="https://img.shields.io/badge/Version-3.11.0-blue.svg?style=flat-square" alt="ACE3 Version">
|
||||
</a>
|
||||
<a href="https://github.com/acemod/ACE3/issues">
|
||||
<img src="https://img.shields.io/github/issues-raw/acemod/ACE3.svg?style=flat-square&label=Issues" alt="ACE3 Issues">
|
||||
@ -37,7 +37,8 @@ The project is entirely **open-source** and all contributions are welcome. Feel
|
||||
|
||||
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 ACE3 by simply excluding any components they don't need, or those possibly in conflict with other mods. Modules themselves, e.g. the medical system, also include various customization options, allowing mission designers to tweak the overall experience.
|
||||
|
||||
### Core features
|
||||
## Core features
|
||||
|
||||
- Brand new 3D interaction/action system
|
||||
- Performance and reliability framework
|
||||
- Focus on modularity and customization
|
||||
@ -51,7 +52,8 @@ The mod is **built modularly**, so almost any included PBO can be easily removed
|
||||
- Logistics
|
||||
- Advanced missile guidance and laser designation
|
||||
|
||||
#### Additional features
|
||||
### Additional features
|
||||
|
||||
- Carrying and dragging
|
||||
- Realistic names for vehicles and weapons
|
||||
- A fire control system (FCS) for armored vehicles and helicopters
|
||||
@ -72,18 +74,56 @@ The mod is **built modularly**, so almost any included PBO can be easily removed
|
||||
- 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
|
||||
|
||||
ACE3 requires Arma 3 and the latest version of <a href="https://github.com/CBATeam/CBA_A3/releases">CBA A3</a>. See the following pages for help and information on how to get started with ACE3:
|
||||
|
||||
- [Installation guide](https://ace3mod.com/wiki/user/installation-guide.html)
|
||||
- [Information center](https://ace3mod.com/wiki/user/information-center.html)
|
||||
|
||||
#### Contributing
|
||||
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 ACE3, 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.
|
||||
## Contributing
|
||||
|
||||
You can help out with the ongoing development by looking for potential bugs in our code base, or by contributing new features. We are always welcoming new pull requests containing bug fixes, refactors and new features. We have a list of tasks and bugs on our issue tracker on Github. Please comment on issues if you want to contribute with, to avoid duplicating effort.
|
||||
|
||||
### Contribution guidelines
|
||||
|
||||
To contribute something to ACE3, 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.
|
||||
|
||||
### Submitting issues and requesting features
|
||||
|
||||
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](https://ace3mod.com/wiki/user/how-to-report-an-issue.html)
|
||||
- [How to make a feature request](https://ace3mod.com/wiki/user/how-to-make-a-feature-request.html)
|
||||
|
||||
#### Testing & building
|
||||
### 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](https://ace3mod.com/wiki/development/setting-up-the-development-environment.html) – step-by-step instructions on how to properly setup and build a version of ACE3 for testing purposes.
|
||||
|
||||
### Get in touch
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="https://slackin.ace3mod.com/">Slack</a></td>
|
||||
<td>We have a public Slack team that anyone can join. This is where all our developers and contributors hang out and where we make announcements</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><a href="https://twitter.com/ACE3Mod">Twitter</a></td>
|
||||
<td>You can follow our Twitter account to get updates and various links to guides</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://www.facebook.com/ACE3Mod">Facebook</a></td>
|
||||
<td>You can follow our Facebook account to get updates and various links to guides</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><a href="https://forums.bistudio.com/topic/181341-ace3-a-collaborative-merger-between-agm-cse-and-ace/?p=2859670">Bohemia Forum</a></td>
|
||||
<td>We have a dedicated thread on the Bohemia Forums for the ACE3 project</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
## License
|
||||
|
||||
ACE3 is licensed under the GNU General Public License ([GPLv2](https://github.com/acemod/ACE3/blob/master/LICENSE)).
|
||||
|
Binary file not shown.
Binary file not shown.
@ -6,43 +6,13 @@ class ACE_Settings {
|
||||
typeName = "BOOL";
|
||||
value = 0;
|
||||
};
|
||||
class GVAR(simulateForSnipers) {
|
||||
class GVAR(muzzleVelocityVariationEnabled) {
|
||||
category = CSTRING(DisplayName);
|
||||
displayName = CSTRING(simulateForSnipers_DisplayName);
|
||||
description = CSTRING(simulateForSnipers_Description);
|
||||
displayName = CSTRING(muzzleVelocityVariationEnabled_DisplayName);
|
||||
description = CSTRING(muzzleVelocityVariationEnabled_Description);
|
||||
typeName = "BOOL";
|
||||
value = 1;
|
||||
};
|
||||
class GVAR(simulateForGroupMembers) {
|
||||
category = CSTRING(DisplayName);
|
||||
displayName = CSTRING(simulateForGroupMembers_DisplayName);
|
||||
description = CSTRING(simulateForGroupMembers_Description);
|
||||
typeName = "BOOL";
|
||||
value = 0;
|
||||
};
|
||||
class GVAR(simulateForEveryone) {
|
||||
category = CSTRING(DisplayName);
|
||||
displayName = CSTRING(simulateForEveryone_DisplayName);
|
||||
description = CSTRING(simulateForEveryone_Description);
|
||||
typeName = "BOOL";
|
||||
value = 0;
|
||||
};
|
||||
class GVAR(disabledInFullAutoMode) {
|
||||
category = CSTRING(DisplayName);
|
||||
displayName = CSTRING(disabledInFullAutoMod_DisplayName);
|
||||
description = CSTRING(disabledInFullAutoMod_Description);
|
||||
typeName = "BOOL";
|
||||
value = 0;
|
||||
};
|
||||
/* // TODO: We currently do not have firedEHs on vehicles
|
||||
class GVAR(vehicleGunnerEnabled) {
|
||||
category = CSTRING(DisplayName);
|
||||
displayName = "Enabled For Vehicle Gunners";
|
||||
description = "Enables advanced ballistics for vehicle gunners";
|
||||
typeName = "BOOL";
|
||||
value = 0;
|
||||
};
|
||||
*/
|
||||
};
|
||||
class GVAR(ammoTemperatureEnabled) {
|
||||
category = CSTRING(DisplayName);
|
||||
displayName = CSTRING(ammoTemperatureEnabled_DisplayName);
|
||||
@ -70,12 +40,6 @@ class ACE_Settings {
|
||||
description = CSTRING(simulationInterval_Description);
|
||||
typeName = "SCALAR";
|
||||
value = 0.05;
|
||||
};
|
||||
class GVAR(simulationRadius) {
|
||||
category = CSTRING(DisplayName);
|
||||
displayName = CSTRING(simulationRadius_DisplayName);
|
||||
description = CSTRING(simulationRadius_Description);
|
||||
typeName = "SCALAR";
|
||||
value = 3000;
|
||||
sliderSettings[] = {0, 0.2, 0.05, 1};
|
||||
};
|
||||
};
|
||||
|
@ -1,7 +1,7 @@
|
||||
class CfgVehicles {
|
||||
class ACE_Module;
|
||||
class GVAR(ModuleSettings): ACE_Module {
|
||||
scope = 2;
|
||||
scope = 1;
|
||||
displayName = CSTRING(DisplayName);
|
||||
icon = QPATHTOF(UI\Icon_Module_Wind_ca.paa);
|
||||
category = "ACE";
|
||||
@ -17,38 +17,12 @@ class CfgVehicles {
|
||||
typeName = "BOOL";
|
||||
defaultValue = 0;
|
||||
};
|
||||
class simulateForSnipers {
|
||||
displayName = CSTRING(simulateForSnipers_DisplayName);
|
||||
description = CSTRING(simulateForSnipers_Description);
|
||||
class muzzleVelocityVariationEnabled {
|
||||
displayName = CSTRING(muzzleVelocityVariationEnabled_DisplayName);
|
||||
description = CSTRING(muzzleVelocityVariationEnabled_Description);
|
||||
typeName = "BOOL";
|
||||
defaultValue = 1;
|
||||
};
|
||||
class simulateForGroupMembers {
|
||||
displayName = CSTRING(simulateForGroupMembers_DisplayName);
|
||||
description = CSTRING(simulateForGroupMembers_Description);
|
||||
typeName = "BOOL";
|
||||
defaultValue = 0;
|
||||
};
|
||||
class simulateForEveryone {
|
||||
displayName = CSTRING(simulateForEveryone_DisplayName);
|
||||
description = CSTRING(simulateForEveryone_Description);
|
||||
typeName = "BOOL";
|
||||
defaultValue = 0;
|
||||
};
|
||||
class disabledInFullAutoMode {
|
||||
displayName = CSTRING(disabledInFullAutoMod_DisplayName);
|
||||
description = CSTRING(disabledInFullAutoMod_Description);
|
||||
typeName = "BOOL";
|
||||
defaultValue = 0;
|
||||
};
|
||||
/* // TODO: We currently do not have firedEHs on vehicles
|
||||
class vehicleGunnerEnabled {
|
||||
displayName = "Enabled For Vehicle Gunners";
|
||||
description = "Enables advanced ballistics for vehicle gunners";
|
||||
typeName = "BOOL";
|
||||
defaultValue = 0;
|
||||
};
|
||||
*/
|
||||
class ammoTemperatureEnabled {
|
||||
displayName = CSTRING(ammoTemperatureEnabled_DisplayName);
|
||||
description = CSTRING(ammoTemperatureEnabled_Description);
|
||||
@ -73,15 +47,9 @@ class CfgVehicles {
|
||||
typeName = "NUMBER";
|
||||
defaultValue = 0.05;
|
||||
};
|
||||
class simulationRadius {
|
||||
displayName = CSTRING(simulationRadius_DisplayName);
|
||||
description = CSTRING(simulationRadius_Description);
|
||||
typeName = "NUMBER";
|
||||
defaultValue = 3000;
|
||||
};
|
||||
};
|
||||
class ModuleDescription {
|
||||
description = CSTRING(Description);
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -9,19 +9,6 @@ GVAR(ProtractorStart) = CBA_missionTime;
|
||||
GVAR(allBullets) = [];
|
||||
GVAR(currentGrid) = 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 (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";
|
||||
};
|
||||
};
|
||||
*/
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
["ace_settingsInitialized", {
|
||||
@ -54,4 +41,4 @@ if (!hasInterface) exitWith {};
|
||||
|
||||
#ifdef DEBUG_MODE_FULL
|
||||
call FUNC(diagnoseWeapons);
|
||||
#endif
|
||||
#endif
|
||||
|
@ -19,20 +19,16 @@
|
||||
|
||||
params ["_muzzleVelocityShiftTable", "_temperature"];
|
||||
|
||||
// Check if muzzleVelocityShiftTable is Less Than 11 Entrys
|
||||
// Check if muzzleVelocityShiftTable is less than 11 Entrys
|
||||
if ((count _muzzleVelocityShiftTable) < 11) exitWith {0};
|
||||
private _muzzleVelocityShiftTableUpperLimit = _muzzleVelocityShiftTable select 10;
|
||||
if (isNil "_muzzleVelocityShiftTableUpperLimit") exitWith { 0 };
|
||||
if (isNil "_muzzleVelocityShiftTableUpperLimit") exitWith {0};
|
||||
|
||||
// Find exact data index required for given temperature
|
||||
private _temperatureIndexFunction = (_temperature + 15) / 5;
|
||||
private _temperatureIndexFunction = 0 max ((_temperature + 15) / 5) min 10;
|
||||
|
||||
// lower and upper data index used for interpolation
|
||||
private _temperatureIndexA = (0 max (floor(_temperatureIndexFunction))) min 10;
|
||||
private _temperatureIndexB = (0 max (ceil(_temperatureIndexFunction))) min 10;
|
||||
// Lower and upper data index used for interpolation
|
||||
private _temperatureIndexA = floor(_temperatureIndexFunction);
|
||||
private _temperatureIndexB = ceil(_temperatureIndexFunction);
|
||||
|
||||
// Interpolation ratio
|
||||
private _interpolationRatio = _temperatureIndexFunction - floor(_temperatureIndexFunction);
|
||||
|
||||
// Interpolation
|
||||
(_muzzleVelocityShiftTable select _temperatureIndexA) * (1 - _interpolationRatio) + (_muzzleVelocityShiftTable select _temperatureIndexB) * _interpolationRatio // Return
|
||||
linearConversion [_temperatureIndexA, _temperatureIndexB, _temperatureIndexFunction, _muzzleVelocityShiftTable select _temperatureIndexA, _muzzleVelocityShiftTable select _temperatureIndexB, true] // Return
|
||||
|
@ -19,22 +19,17 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
scopeName "main";
|
||||
|
||||
private ["_muzzleVelocityTableCount", "_barrelLengthTableCount", "_lowerDataIndex",
|
||||
"_upperDataIndex", "_lowerBarrelLength", "_upperBarrelLength", "_lowerMuzzleVelocity",
|
||||
"_upperMuzzleVelocity", "_interpolationRatio"];
|
||||
params ["_barrelLength", "_muzzleVelocityTable", "_barrelLengthTable", "_muzzleVelocity"];
|
||||
TRACE_4("params",_barrelLength,_muzzleVelocityTable,_barrelLengthTable,_muzzleVelocity);
|
||||
|
||||
// If barrel length is not defined, then there is no point in calculating muzzle velocity
|
||||
if (_barrelLength == 0) exitWith { 0 };
|
||||
|
||||
_muzzleVelocityTableCount = count _muzzleVelocityTable;
|
||||
_barrelLengthTableCount = count _barrelLengthTable;
|
||||
private _muzzleVelocityTableCount = count _muzzleVelocityTable;
|
||||
private _barrelLengthTableCount = count _barrelLengthTable;
|
||||
|
||||
// Exit if tables are different sizes, have no elements or have only one element
|
||||
if (_muzzleVelocityTableCount != _barrelLengthTableCount || _muzzleVelocityTableCount == 0 || _barrelLengthTableCount == 0) exitWith { 0 };
|
||||
if (_muzzleVelocityTableCount != _barrelLengthTableCount || _muzzleVelocityTableCount == 0) exitWith { 0 };
|
||||
if (_muzzleVelocityTableCount == 1) exitWith { (_muzzleVelocityTable select 0) - _muzzleVelocity };
|
||||
|
||||
// If we have the precise barrel length value, return result immediately
|
||||
@ -46,29 +41,15 @@ if (_barrelLength in _barrelLengthTable) exitWith {
|
||||
if (_barrelLength <= (_barrelLengthTable select 0)) exitWith { (_muzzleVelocityTable select 0) - _muzzleVelocity };
|
||||
if (_barrelLength >= (_barrelLengthTable select _barrelLengthTableCount - 1)) exitWith { (_muzzleVelocityTable select _barrelLengthTableCount - 1) - _muzzleVelocity };
|
||||
|
||||
private _upperDataIndex = 0;
|
||||
private _lowerDataIndex = 1;
|
||||
|
||||
// Find closest bordering values for barrel length
|
||||
{
|
||||
if (_barrelLength <= _x) then {
|
||||
if (_barrelLength <= _x) exitWith {
|
||||
_upperDataIndex = _forEachIndex;
|
||||
_lowerDataIndex = _upperDataIndex - 1;
|
||||
breakTo "main";
|
||||
};
|
||||
} forEach _barrelLengthTable;
|
||||
|
||||
// Worst case scenario
|
||||
if (isNil "_lowerDataIndex" || isNil "_upperDataIndex") exitWith {0};
|
||||
|
||||
_lowerBarrelLength = _barrelLengthTable select _lowerDataIndex;
|
||||
_upperBarrelLength = _barrelLengthTable select _upperDataIndex;
|
||||
_lowerMuzzleVelocity = _muzzleVelocityTable select _lowerDataIndex;
|
||||
_upperMuzzleVelocity = _muzzleVelocityTable select _upperDataIndex;
|
||||
|
||||
// Calculate interpolation ratio
|
||||
_interpolationRatio = if (abs (_lowerBarrelLength - _upperBarrelLength) > 0) then {
|
||||
(_upperBarrelLength - _barrelLength) / (_upperBarrelLength - _lowerBarrelLength)
|
||||
} else {
|
||||
0
|
||||
};
|
||||
|
||||
// Calculate interpolated muzzle velocity shift
|
||||
(_lowerMuzzleVelocity + ((_upperMuzzleVelocity - _lowerMuzzleVelocity) * (1 - _interpolationRatio))) - _muzzleVelocity // Return
|
||||
(linearConversion [_barrelLengthTable select _lowerDataIndex, _barrelLengthTable select _upperDataIndex, _barrelLength, _muzzleVelocityTable select _lowerDataIndex, _muzzleVelocityTable select _upperDataIndex]) - _muzzleVelocity // Return
|
||||
|
@ -18,14 +18,23 @@
|
||||
#define DEBUG_MODE_FULL
|
||||
#include "script_component.hpp"
|
||||
|
||||
private _diagnoseStartTime = diag_tickTime;
|
||||
#ifdef DEBUG_INIT_SPEEDS
|
||||
private _data = [];
|
||||
private _weapons = [];
|
||||
private _magazines = [];
|
||||
private _weaponInitSpeeds = [];
|
||||
private _magazineInitSpeeds = [];
|
||||
#endif
|
||||
|
||||
private _cfgWeapons = configFile >> "CfgWeapons";
|
||||
for "_i" from 0 to (count _cfgWeapons)-1 do {
|
||||
private _weaponConfig = _cfgWeapons select _i;
|
||||
if (isClass _weaponConfig) then {
|
||||
private _weapon = configName _weaponConfig;
|
||||
private _weaponType = getNumber (_weaponConfig >> "Type");
|
||||
if (_weaponType == 1) then {
|
||||
// The weapon is a primary weapon
|
||||
if (_weaponType in [1, 2]) then {
|
||||
// The weapon is a primary weapon or a handgun weapon
|
||||
|
||||
private _weaponInitSpeed = getNumber (_weaponConfig >> "initSpeed");
|
||||
private _magazines = getArray (_weaponConfig >> "magazines");
|
||||
@ -47,16 +56,78 @@ for "_i" from 0 to (count _cfgWeapons)-1 do {
|
||||
|
||||
// AB initial speed --------------------------------
|
||||
// Get Weapon and Ammo Configurations
|
||||
private _AmmoCacheEntry = _ammo call FUNC(readAmmoDataFromConfig);
|
||||
private _WeaponCacheEntry = _weapon call FUNC(readWeaponDataFromConfig);
|
||||
_AmmoCacheEntry params ["_airFriction", "_caliber", "_bulletLength", "_bulletMass", "_transonicStabilityCoef", "_dragModel", "_ballisticCoefficients", "_velocityBoundaries", "_atmosphereModel", "_ammoTempMuzzleVelocityShifts", "_muzzleVelocityTable", "_barrelLengthTable"];
|
||||
private _AmmoCacheEntry = uiNamespace getVariable format[QGVAR(%1), _ammo];
|
||||
if (isNil "_AmmoCacheEntry") then {
|
||||
_AmmoCacheEntry = _ammo call FUNC(readAmmoDataFromConfig);
|
||||
};
|
||||
private _WeaponCacheEntry = uiNamespace getVariable format[QGVAR(%1), _weapon];
|
||||
if (isNil "_WeaponCacheEntry") then {
|
||||
_WeaponCacheEntry = _weapon call FUNC(readWeaponDataFromConfig);
|
||||
};
|
||||
_AmmoCacheEntry params ["_airFriction", "_caliber", "_bulletLength", "_bulletMass", "_transonicStabilityCoef", "_dragModel", "_ballisticCoefficients", "_velocityBoundaries", "_atmosphereModel", "_ammoTempMuzzleVelocityShifts", "_muzzleVelocityTable", "_barrelLengthTable", "_muzzleVelocityVariationSD"];
|
||||
_WeaponCacheEntry params ["_barrelTwist", "_twistDirection", "_barrelLength"];
|
||||
|
||||
private _barrelVelocityShift = [_barrelLength, _muzzleVelocityTable, _barrelLengthTable, _vanillaInitialSpeed] call FUNC(calculateBarrelLengthVelocityShift);
|
||||
private _abInitialSpeed = _vanillaInitialSpeed + _barrelVelocityShift;
|
||||
// --------------------------------------------------
|
||||
diag_log text format ["ABDiagnose,%1,%2,%3,%4,%5,%6,%7",_weapon,_magazine,_ammo,_magazineInitSpeed,_weaponInitSpeed,_vanillaInitialSpeed,_abInitialSpeed];
|
||||
|
||||
if (_weapon find "_base" == -1 && _weapon find "_Base" == -1) then {
|
||||
#ifdef DEBUG_INIT_SPEEDS
|
||||
_data pushBack [-_forEachIndex, _abInitialSpeed, _magazine, _weapon];
|
||||
#endif
|
||||
if (_barrelLength > 0 && abs(_vanillaInitialSpeed - _abInitialSpeed) > abs(_abInitialSpeed) * 0.0025) then {
|
||||
diag_log text format ["AB_Diagnose_initSpeed,%1,%2,%3,%4,%5,%6,%7,%8",_weapon,_magazine,_ammo,_magazineInitSpeed,_weaponInitSpeed,_vanillaInitialSpeed,_abInitialSpeed,_abInitialSpeed/_vanillaInitialSpeed];
|
||||
};
|
||||
if (_barrelTwist == 0) then {
|
||||
diag_log text format ["AB_Diagnose_barrelTwist,%1,%2,%3,%4,%5",_weapon,_magazine,_ammo,_twistDirection,_barrelTwist];
|
||||
};
|
||||
if (_barrelLength == 0) then {
|
||||
diag_log text format ["AB_Diagnose_barrelLength,%1,%2,%3,%4,%5",_weapon,_magazine,_ammo,_barrelLength];
|
||||
};
|
||||
};
|
||||
} forEach _magazines;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
#ifdef DEBUG_INIT_SPEEDS
|
||||
_data sort false;
|
||||
{
|
||||
_x params ["_magazineIndex", "_abInitialSpeed", "_magazine", "_weapon"];
|
||||
if (_magazines find _magazine == -1) then {
|
||||
private _magSpeed = _abInitialSpeed;
|
||||
private _ammoRef = getText (configFile >> "CfgMagazines" >> _magazine >> "ammo");
|
||||
if (_ammoRef != "") then {
|
||||
{
|
||||
private _ammo = getText (configFile >> "CfgMagazines" >> _x >> "ammo");
|
||||
if (_ammo == _ammoRef) exitWith {
|
||||
_magSpeed = _magazineInitSpeeds select _forEachIndex;
|
||||
};
|
||||
} forEach _magazines;
|
||||
};
|
||||
_magazines pushBack _magazine;
|
||||
_magazineInitSpeeds pushBack round(_magSpeed);
|
||||
};
|
||||
if (_weapons find _weapon == -1) then {
|
||||
_weapons pushBack _weapon;
|
||||
_magIndex = _magazines find _magazine;
|
||||
_magSpeed = _magazineInitSpeeds select _magIndex;
|
||||
_weaponInitSpeeds pushBack (_abInitialSpeed / _magSpeed);
|
||||
};
|
||||
} forEach _data;
|
||||
{
|
||||
_x params ["_magazineIndex", "_abInitialSpeed", "_magazine", "_weapon"];
|
||||
_magIndex = _magazines find _magazine;
|
||||
_magSpeed = _magazineInitSpeeds select _magIndex;
|
||||
_wepIndex = _weapons find _weapon;
|
||||
_wepSpeed = _weaponInitSpeeds select _wepIndex;
|
||||
} forEach _data;
|
||||
{
|
||||
diag_log text format ["AB_WeaponInitSpeed,%1,%2", _x, _weaponInitSpeeds select _forEachIndex];
|
||||
} forEach _weapons;
|
||||
{
|
||||
diag_log text format ["AB_MagazineInitSpeed,%1,%2", _x, _magazineInitSpeeds select _forEachIndex];
|
||||
} forEach _magazines;
|
||||
#endif
|
||||
|
||||
diag_log format["AdvancedBallistics: Finished 'diagnoseWeapons' in %1 seconds", (diag_tickTime - _diagnoseStartTime) toFixed 2];
|
||||
|
@ -15,25 +15,20 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private _aceTimeSecond = floor CBA_missionTime;
|
||||
|
||||
{
|
||||
_x params ["_bullet","_caliber","_bulletTraceVisible","_index"];
|
||||
|
||||
private _bulletVelocity = velocity _bullet;
|
||||
|
||||
private _bulletSpeed = vectorMagnitude _bulletVelocity;
|
||||
|
||||
if (!alive _bullet || _bulletSpeed < 100) then {
|
||||
if (!alive _bullet) then {
|
||||
GVAR(allBullets) deleteAt (GVAR(allBullets) find _x);
|
||||
} else {
|
||||
private _bulletVelocity = velocity _bullet;
|
||||
private _bulletPosition = getPosASL _bullet;
|
||||
|
||||
if (_bulletTraceVisible && _bulletSpeed > 500) then {
|
||||
if (_bulletTraceVisible && {vectorMagnitude _bulletVelocity > BULLET_TRACE_MIN_VELOCITY}) then {
|
||||
drop ["\A3\data_f\ParticleEffects\Universal\Refract","","Billboard",1,0.1,getPos _bullet,[0,0,0],0,1.275,1,0,[0.02*_caliber,0.01*_caliber],[[0,0,0,0.65],[0,0,0,0.2]],[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, _aceTimeSecond, CBA_missionTime - _aceTimeSecond]);
|
||||
_bullet setVelocity (_bulletVelocity vectorAdd (parseSimpleArray ("ace_advanced_ballistics" callExtension format["simulate:%1:%2:%3:%4:%5:%6", _index, _bulletVelocity, _bulletPosition, wind, ASLToATL(_bulletPosition) select 2, CBA_missionTime toFixed 6])));
|
||||
};
|
||||
nil
|
||||
} count +GVAR(allBullets);
|
||||
|
@ -19,102 +19,108 @@
|
||||
//IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"];
|
||||
TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile, _vehicle, _gunner, _turret);
|
||||
|
||||
// Parameterization
|
||||
private ["_abort", "_AmmoCacheEntry", "_WeaponCacheEntry", "_opticsName", "_opticType", "_bulletTraceVisible", "_temperature", "_barometricPressure", "_bulletMass", "_bulletLength", "_muzzleVelocity", "_muzzleVelocityShift", "_bulletVelocity", "_bulletLength", "_barrelTwist", "_stabilityFactor", "_aceTimeSecond", "_barrelVelocityShift", "_ammoTemperatureVelocityShift"];
|
||||
|
||||
_abort = false;
|
||||
|
||||
if (!(_ammo isKindOf "BulletBase")) exitWith {};
|
||||
if (!alive _projectile) exitWith {};
|
||||
if (_unit distance ACE_player > GVAR(simulationRadius)) exitWith {};
|
||||
if (underwater _unit) exitWith {};
|
||||
if (!GVAR(simulateForEveryone) && !(local _unit)) then {
|
||||
// The shooter is non local
|
||||
_abort = true;
|
||||
if (GVAR(simulateForSnipers)) then {
|
||||
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
|
||||
|
||||
private _abort = !local _unit;
|
||||
if (_abort) then {
|
||||
private _bulletVelocity = velocity _projectile;
|
||||
private _muzzleVelocity = vectorMagnitude _bulletVelocity;
|
||||
|
||||
private _maxRange = uiNamespace getVariable format[QGVAR(maxRange_%1), _ammo];
|
||||
if (isNil "_maxRange") then {
|
||||
private _airFriction = getNumber(configFile >> "CfgAmmo" >> _ammo >> "airFriction");
|
||||
private _maxRange = if (_airFriction < 0) then {
|
||||
private _maxTime = ((_vanillaInitialSpeed - BULLET_TRACE_MIN_VELOCITY) / (BULLET_TRACE_MIN_VELOCITY * -_airFriction * _vanillaInitialSpeed)) max getNumber(configFile >> "CfgAmmo" >> _ammo >> "tracerEndTime");
|
||||
-ln(1 - _airFriction * _vanillaInitialSpeed * _maxTime) / _airFriction
|
||||
} else {
|
||||
_vanillaInitialSpeed * getNumber(configFile >> "CfgAmmo" >> _ammo >> "tracerEndTime")
|
||||
};
|
||||
uiNamespace setVariable [format[QGVAR(maxRange_%1), _ammo], _maxRange];
|
||||
};
|
||||
if (ACE_player distance _unit > _maxRange && {ACE_player distance ((getPosASL _unit) vectorAdd ((vectorNormalized _bulletVelocity) vectorMultiply _maxRange)) > _maxRange}) exitWith {};
|
||||
|
||||
private _ammoCount = (_unit ammo _muzzle) + 1;
|
||||
private _tracersEvery = getNumber(configFile >> "CfgMagazines" >> _magazine >> "tracersEvery");
|
||||
private _lastRoundsTracer = getNumber(configFile >> "CfgMagazines" >> _magazine >> "lastRoundsTracer");
|
||||
if (_ammoCount <= _lastRoundsTracer || {_tracersEvery > 0 && {(_ammoCount - _lastRoundsTracer) % _tracersEvery == 0}}) exitWith { _abort = false };
|
||||
|
||||
if (GVAR(bulletTraceEnabled) && {_muzzleVelocity > BULLET_TRACE_MIN_VELOCITY} && {cameraView == "GUNNER"}) then {
|
||||
if (currentWeapon ACE_player == binocular ACE_player) exitWith { _abort = false };
|
||||
if (currentWeapon ACE_player == primaryWeapon ACE_player && {count primaryWeaponItems ACE_player > 2}) then {
|
||||
private _opticsName = (primaryWeaponItems ACE_player) select 2;
|
||||
private _opticType = getNumber(configFile >> "CfgWeapons" >> _opticsName >> "ItemInfo" >> "opticType");
|
||||
if (_opticType == 2) exitWith { _abort = false };
|
||||
};
|
||||
};
|
||||
if (GVAR(simulateForGroupMembers) && _abort) then {
|
||||
_abort = (group ACE_player) != (group _unit);
|
||||
};
|
||||
};
|
||||
//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) exitWith {};
|
||||
|
||||
// Get Weapon and Ammo Configurations
|
||||
_AmmoCacheEntry = uiNamespace getVariable format[QGVAR(%1), _ammo];
|
||||
private _AmmoCacheEntry = uiNamespace getVariable format[QGVAR(%1), _ammo];
|
||||
if (isNil "_AmmoCacheEntry") then {
|
||||
_AmmoCacheEntry = _ammo call FUNC(readAmmoDataFromConfig);
|
||||
};
|
||||
_WeaponCacheEntry = uiNamespace getVariable format[QGVAR(%1), _weapon];
|
||||
private _WeaponCacheEntry = uiNamespace getVariable format[QGVAR(%1), _weapon];
|
||||
if (isNil "_WeaponCacheEntry") then {
|
||||
_WeaponCacheEntry = _weapon call FUNC(readWeaponDataFromConfig);
|
||||
};
|
||||
|
||||
_AmmoCacheEntry params ["_airFriction", "_caliber", "_bulletLength", "_bulletMass", "_transonicStabilityCoef", "_dragModel", "_ballisticCoefficients", "_velocityBoundaries", "_atmosphereModel", "_ammoTempMuzzleVelocityShifts", "_muzzleVelocityTable", "_barrelLengthTable"];
|
||||
_AmmoCacheEntry params ["_airFriction", "_caliber", "_bulletLength", "_bulletMass", "_transonicStabilityCoef", "_dragModel", "_ballisticCoefficients", "_velocityBoundaries", "_atmosphereModel", "_ammoTempMuzzleVelocityShifts", "_muzzleVelocityTable", "_barrelLengthTable", "_muzzleVelocityVariationSD"];
|
||||
_WeaponCacheEntry params ["_barrelTwist", "_twistDirection", "_barrelLength"];
|
||||
|
||||
private _temperature = nil; // We need the variable in this scope. So we need to init it here.
|
||||
|
||||
_bulletVelocity = velocity _projectile;
|
||||
_muzzleVelocity = vectorMagnitude _bulletVelocity;
|
||||
private _ammoCount = _unit ammo _muzzle;
|
||||
private _bulletVelocity = velocity _projectile;
|
||||
private _muzzleVelocity = vectorMagnitude _bulletVelocity;
|
||||
|
||||
_barrelVelocityShift = 0;
|
||||
if (GVAR(barrelLengthInfluenceEnabled)) then {
|
||||
_barrelVelocityShift = [_barrelLength, _muzzleVelocityTable, _barrelLengthTable, _muzzleVelocity] call FUNC(calculateBarrelLengthVelocityShift);
|
||||
_muzzleVelocity = _muzzleVelocity + ([_barrelLength, _muzzleVelocityTable, _barrelLengthTable, _muzzleVelocity] call FUNC(calculateBarrelLengthVelocityShift));
|
||||
};
|
||||
|
||||
_ammoTemperatureVelocityShift = 0;
|
||||
if (GVAR(ammoTemperatureEnabled)) then {
|
||||
_temperature = ((getPosASL _unit) select 2) call EFUNC(weather,calculateTemperatureAtHeight);
|
||||
_ammoTemperatureVelocityShift = ([_ammoTempMuzzleVelocityShifts, _temperature] call FUNC(calculateAmmoTemperatureVelocityShift));
|
||||
_muzzleVelocity = _muzzleVelocity + ([_ammoTempMuzzleVelocityShifts, _temperature] call FUNC(calculateAmmoTemperatureVelocityShift));
|
||||
};
|
||||
if (GVAR(muzzleVelocityVariationEnabled)) then {
|
||||
private _time = round (CBA_missionTime / 2);
|
||||
// Generate seed from publicly known values (via Cantor pairing function)
|
||||
private _seed = 0.5 * (_time + _ammoCount) * (_time + _ammoCount + 1) + _ammoCount;
|
||||
// Generate normally distributed random number (via Box–Muller transform)
|
||||
private _z = sqrt(-2.0 * ln(0.00000001 max (-_seed random 1))) * cos(_seed random 360);
|
||||
|
||||
_muzzleVelocity = _muzzleVelocity * (_z * _muzzleVelocityVariationSD + 1);
|
||||
};
|
||||
|
||||
if (GVAR(ammoTemperatureEnabled) || GVAR(barrelLengthInfluenceEnabled)) then {
|
||||
_muzzleVelocityShift = _barrelVelocityShift + _ammoTemperatureVelocityShift;
|
||||
TRACE_4("shift",_muzzleVelocity,_muzzleVelocityShift, _barrelVelocityShift, _ammoTemperatureVelocityShift);
|
||||
if (_muzzleVelocityShift != 0) then {
|
||||
_muzzleVelocity = _muzzleVelocity + _muzzleVelocityShift;
|
||||
_bulletVelocity = _bulletVelocity vectorAdd ((vectorNormalized _bulletVelocity) vectorMultiply (_muzzleVelocityShift));
|
||||
_projectile setVelocity _bulletVelocity;
|
||||
};
|
||||
};
|
||||
_bulletVelocity = (vectorNormalized _bulletVelocity) vectorMultiply _muzzleVelocity;
|
||||
_projectile setVelocity _bulletVelocity;
|
||||
|
||||
if (_abort || !(GVAR(extensionAvailable))) exitWith {
|
||||
if (missionNamespace getVariable [QEGVAR(windDeflection,enabled), false]) then {
|
||||
EGVAR(windDeflection,trackedBullets) pushBack [_projectile, getNumber(configFile >> "CfgAmmo" >> _ammo >> "airFriction")];
|
||||
};
|
||||
};
|
||||
|
||||
_bulletTraceVisible = false;
|
||||
if (GVAR(bulletTraceEnabled) && cameraView == "GUNNER") then {
|
||||
private _bulletTraceVisible = false;
|
||||
if (GVAR(bulletTraceEnabled) && {_muzzleVelocity > BULLET_TRACE_MIN_VELOCITY} && {cameraView == "GUNNER"}) then {
|
||||
if (currentWeapon ACE_player == binocular ACE_player) 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");
|
||||
private _opticsName = (primaryWeaponItems ACE_player) select 2;
|
||||
private _opticType = getNumber(configFile >> "CfgWeapons" >> _opticsName >> "ItemInfo" >> "opticType");
|
||||
_bulletTraceVisible = _opticType == 2;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
_stabilityFactor = 1.5;
|
||||
if (_caliber > 0 && _bulletLength > 0 && _bulletMass > 0 && _barrelTwist > 0) then {
|
||||
private _stabilityFactor = 1.5;
|
||||
if (_caliber * _bulletLength * _bulletMass * _barrelTwist > 0) then {
|
||||
if (isNil "_temperature") then {
|
||||
_temperature = ((getPosASL _unit) select 2) call EFUNC(weather,calculateTemperatureAtHeight);
|
||||
};
|
||||
_barometricPressure = ((getPosASL _projectile) select 2) call EFUNC(weather,calculateBarometricPressure);
|
||||
private _barometricPressure = ((getPosASL _projectile) select 2) call EFUNC(weather,calculateBarometricPressure);
|
||||
_stabilityFactor = [_caliber, _bulletLength, _bulletMass, _barrelTwist, _muzzleVelocity, _temperature, _barometricPressure] call FUNC(calculateStabilityFactor);
|
||||
};
|
||||
|
||||
GVAR(currentbulletID) = (GVAR(currentbulletID) + 1) % 10000;
|
||||
|
||||
_aceTimeSecond = floor CBA_missionTime;
|
||||
"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 _projectile, EGVAR(common,mapLatitude), EGVAR(weather,currentTemperature), EGVAR(common,mapAltitude), EGVAR(weather,currentHumidity), overcast, _aceTimeSecond, CBA_missionTime - _aceTimeSecond];
|
||||
"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), _ammoCount, _airFriction, _ballisticCoefficients, _velocityBoundaries, _atmosphereModel, _dragModel, _stabilityFactor, _twistDirection, _transonicStabilityCoef, getPosASL _projectile, _bulletVelocity, EGVAR(common,mapLatitude), EGVAR(weather,currentTemperature), EGVAR(common,mapAltitude), EGVAR(weather,currentHumidity), EGVAR(weather,currentOvercast), CBA_missionTime toFixed 6];
|
||||
|
||||
GVAR(allBullets) pushBack [_projectile, _caliber, _bulletTraceVisible, GVAR(currentbulletID)];
|
||||
|
||||
|
@ -22,14 +22,10 @@ params ["_logic","_units", "_activated"];
|
||||
if !(_activated) exitWith {};
|
||||
|
||||
[_logic, QGVAR(enabled), "enabled"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(muzzleVelocityVariationEnabled), "muzzleVelocityVariationEnabled"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(ammoTemperatureEnabled), "ammoTemperatureEnabled"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(barrelLengthInfluenceEnabled), "barrelLengthInfluenceEnabled"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(bulletTraceEnabled), "bulletTraceEnabled"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(simulateForEveryone), "simulateForEveryone"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(disabledInFullAutoMode), "disabledInFullAutoMode"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(simulateForSnipers), "simulateForSnipers"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(simulateForGroupMembers), "simulateForGroupMembers"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(simulationInterval), "simulationInterval"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(simulationRadius), "simulationRadius"] call EFUNC(common,readSettingFromModule);
|
||||
|
||||
GVAR(simulationInterval) = 0 max GVAR(simulationInterval) min 0.2;
|
||||
|
@ -17,12 +17,9 @@
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
if (!GVAR(enabled)) exitWith {};
|
||||
if (!GVAR(extensionAvailable)) exitWith {};
|
||||
|
||||
private ["_initStartTime", "_mapSize", "_mapGrids", "_gridCells", "_x", "_y", "_gridCenter", "_gridHeight", "_gridNumObjects", "_gridSurfaceIsWater"];
|
||||
|
||||
_initStartTime = CBA_missionTime;
|
||||
_mapSize = getNumber (configFile >> "CfgWorlds" >> worldName >> "MapSize");
|
||||
private _initStartTime = diag_tickTime;
|
||||
private _mapSize = getNumber (configFile >> "CfgWorlds" >> worldName >> "MapSize");
|
||||
|
||||
if (("ace_advanced_ballistics" callExtension format["init:%1:%2", worldName, _mapSize]) == "Terrain already initialized") exitWith {
|
||||
INFO_1("Terrain already initialized [world: %1]", worldName);
|
||||
@ -31,8 +28,8 @@ if (("ace_advanced_ballistics" callExtension format["init:%1:%2", worldName, _ma
|
||||
#endif
|
||||
};
|
||||
|
||||
_mapGrids = ceil(_mapSize / 50) + 1;
|
||||
_gridCells = _mapGrids * _mapGrids;
|
||||
private _mapGrids = ceil(_mapSize / 50) + 1;
|
||||
private _gridCells = _mapGrids * _mapGrids;
|
||||
|
||||
GVAR(currentGrid) = 0;
|
||||
|
||||
@ -43,20 +40,20 @@ INFO_2("Starting Terrain Extension [cells: %1] [world: %2]", _gridCells, worldNa
|
||||
_args params ["_mapGrids", "_gridCells", "_initStartTime"];
|
||||
|
||||
if (GVAR(currentGrid) >= _gridCells) exitWith {
|
||||
INFO_2("Finished terrain initialization in %1 seconds [world: %2]", ceil(CBA_missionTime - _initStartTime), worldName);
|
||||
INFO_2("Finished terrain initialization in %1 seconds [world: %2]", (diag_tickTime - _initStartTime) toFixed 2, worldName);
|
||||
#ifdef DEBUG_MODE_FULL
|
||||
systemChat format["AdvancedBallistics: Finished terrain initialization in %1 seconds", ceil(CBA_missionTime - _initStartTime)];
|
||||
systemChat format["AdvancedBallistics: Finished terrain initialization in %1 seconds", (diag_tickTime - _initStartTime) toFixed 2];
|
||||
#endif
|
||||
[_idPFH] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
for "_i" from 1 to 50 do {
|
||||
_x = floor(GVAR(currentGrid) / _mapGrids) * 50;
|
||||
_y = (GVAR(currentGrid) - floor(GVAR(currentGrid) / _mapGrids) * _mapGrids) * 50;
|
||||
_gridCenter = [_x + 25, _y + 25];
|
||||
_gridHeight = round(getTerrainHeightASL _gridCenter);
|
||||
_gridNumObjects = count (_gridCenter nearObjects ["Building", 50]);
|
||||
_gridSurfaceIsWater = if (surfaceIsWater _gridCenter) then {1} else {0};
|
||||
private _x = floor(GVAR(currentGrid) / _mapGrids) * 50;
|
||||
private _y = (GVAR(currentGrid) - floor(GVAR(currentGrid) / _mapGrids) * _mapGrids) * 50;
|
||||
private _gridCenter = [_x + 25, _y + 25];
|
||||
private _gridHeight = round(getTerrainHeightASL _gridCenter);
|
||||
private _gridNumObjects = count (_gridCenter nearObjects ["Building", 50]);
|
||||
private _gridSurfaceIsWater = if (surfaceIsWater _gridCenter) then {1} else {0};
|
||||
"ace_advanced_ballistics" callExtension format["set:%1:%2:%3", _gridHeight, _gridNumObjects, _gridSurfaceIsWater];
|
||||
GVAR(currentGrid) = GVAR(currentGrid) + 1;
|
||||
if (GVAR(currentGrid) >= _gridCells) exitWith {};
|
||||
|
@ -28,30 +28,34 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
TRACE_1("Reading Ammo Config",_this);
|
||||
private ["_ammo", "_airFriction", "_caliber", "_bulletLength", "_bulletMass", "_transonicStabilityCoef", "_dragModel", "_ballisticCoefficients", "_velocityBoundaries", "_atmosphereModel", "_ammoTempMuzzleVelocityShifts", "_muzzleVelocityTable", "_barrelLengthTable", "_result"];
|
||||
|
||||
private _ammoConfig = configFile >> "CfgAmmo" >> _this;
|
||||
|
||||
_airFriction = getNumber(_ammoConfig >> "airFriction");
|
||||
_caliber = getNumber(_ammoConfig >> "ACE_caliber");
|
||||
_bulletLength = getNumber(_ammoConfig >> "ACE_bulletLength");
|
||||
_bulletMass = getNumber(_ammoConfig >> "ACE_bulletMass");
|
||||
_transonicStabilityCoef = getNumber(_ammoConfig >> "ACE_transonicStabilityCoef");
|
||||
private _airFriction = getNumber(_ammoConfig >> "airFriction");
|
||||
private _caliber = 0 max getNumber(_ammoConfig >> "ACE_caliber");
|
||||
private _bulletLength = 0 max getNumber(_ammoConfig >> "ACE_bulletLength");
|
||||
private _bulletMass = 0 max getNumber(_ammoConfig >> "ACE_bulletMass");
|
||||
private _transonicStabilityCoef = 0 max getNumber(_ammoConfig >> "ACE_transonicStabilityCoef") min 1;
|
||||
if (_transonicStabilityCoef == 0) then {
|
||||
_transonicStabilityCoef = 0.5;
|
||||
};
|
||||
_dragModel = getNumber(_ammoConfig >> "ACE_dragModel");
|
||||
if (_dragModel == 0 || !(_dragModel in [1, 2, 5, 6, 7, 8])) then {
|
||||
private _dragModel = getNumber(_ammoConfig >> "ACE_dragModel");
|
||||
if (!(_dragModel in [1, 2, 5, 6, 7, 8])) then {
|
||||
_dragModel = 1;
|
||||
};
|
||||
_ballisticCoefficients = getArray(_ammoConfig >> "ACE_ballisticCoefficients");
|
||||
_velocityBoundaries = getArray(_ammoConfig >> "ACE_velocityBoundaries");
|
||||
_atmosphereModel = getText(_ammoConfig >> "ACE_standardAtmosphere");
|
||||
private _ballisticCoefficients = getArray(_ammoConfig >> "ACE_ballisticCoefficients");
|
||||
private _velocityBoundaries = getArray(_ammoConfig >> "ACE_velocityBoundaries");
|
||||
private _atmosphereModel = getText(_ammoConfig >> "ACE_standardAtmosphere");
|
||||
if (_atmosphereModel isEqualTo "") then {
|
||||
_atmosphereModel = "ICAO";
|
||||
};
|
||||
_ammoTempMuzzleVelocityShifts = getArray(_ammoConfig >> "ACE_ammoTempMuzzleVelocityShifts");
|
||||
_muzzleVelocityTable = getArray(_ammoConfig >> "ACE_muzzleVelocities");
|
||||
_barrelLengthTable = getArray(_ammoConfig >> "ACE_barrelLengths");
|
||||
private _muzzleVelocityVariationSD = DEFAULT_MUZZLE_VELOCITY_VARIATION_SD;
|
||||
if (isNumber (_ammoConfig >> "ACE_muzzleVelocityVariationSD")) then {
|
||||
_muzzleVelocityVariationSD = getNumber(_ammoConfig >> "ACE_muzzleVelocityVariationSD") / 100;
|
||||
};
|
||||
private _ammoTempMuzzleVelocityShifts = getArray(_ammoConfig >> "ACE_ammoTempMuzzleVelocityShifts");
|
||||
private _muzzleVelocityTable = getArray(_ammoConfig >> "ACE_muzzleVelocities");
|
||||
private _barrelLengthTable = getArray(_ammoConfig >> "ACE_barrelLengths");
|
||||
|
||||
//Handle subsonic ammo that would have a huge muzzle velocity shift (when ballistic configs not explicitly defined)
|
||||
private _typicalSpeed = getNumber (_ammoConfig >> "typicalSpeed");
|
||||
@ -89,7 +93,7 @@ if ((_typicalSpeed > 0) && {_typicalSpeed < 360}) then {
|
||||
};
|
||||
};
|
||||
|
||||
_result = [_airFriction, _caliber, _bulletLength, _bulletMass, _transonicStabilityCoef, _dragModel, _ballisticCoefficients, _velocityBoundaries, _atmosphereModel, _ammoTempMuzzleVelocityShifts, _muzzleVelocityTable, _barrelLengthTable];
|
||||
private _result = [_airFriction, _caliber, _bulletLength, _bulletMass, _transonicStabilityCoef, _dragModel, _ballisticCoefficients, _velocityBoundaries, _atmosphereModel, _ammoTempMuzzleVelocityShifts, _muzzleVelocityTable, _barrelLengthTable, _muzzleVelocityVariationSD];
|
||||
|
||||
uiNamespace setVariable [format[QGVAR(%1), _this], _result];
|
||||
|
||||
|
@ -20,8 +20,8 @@
|
||||
|
||||
private _weaponConfig = (configFile >> "CfgWeapons" >> _this);
|
||||
|
||||
private _barrelTwist = getNumber(_weaponConfig >> "ACE_barrelTwist");
|
||||
private _twistDirection = 1;
|
||||
private _barrelTwist = 0 max getNumber(_weaponConfig >> "ACE_barrelTwist");
|
||||
private _twistDirection = [0, 1] select (_barrelTwist != 0);
|
||||
if (isNumber (_weaponConfig >> "ACE_twistDirection")) then {
|
||||
_twistDirection = getNumber (_weaponConfig >> "ACE_twistDirection");
|
||||
if !(_twistDirection in [-1, 0, 1]) then {
|
||||
@ -29,7 +29,7 @@ if (isNumber (_weaponConfig >> "ACE_twistDirection")) then {
|
||||
};
|
||||
};
|
||||
|
||||
private _barrelLength = getNumber(_weaponConfig >> "ACE_barrelLength");
|
||||
private _barrelLength = 0 max getNumber(_weaponConfig >> "ACE_barrelLength");
|
||||
|
||||
private _result = [_barrelTwist, _twistDirection, _barrelLength];
|
||||
|
||||
|
@ -6,6 +6,8 @@
|
||||
// #define DISABLE_COMPILE_CACHE
|
||||
// #define ENABLE_PERFORMANCE_COUNTERS
|
||||
|
||||
#define DEBUG_INIT_SPEEDS
|
||||
|
||||
#ifdef DEBUG_ENABLED_ADVANCEDBALLISTICS
|
||||
#define DEBUG_MODE_FULL
|
||||
#endif
|
||||
@ -16,7 +18,6 @@
|
||||
|
||||
#include "\z\ace\addons\main\script_macros.hpp"
|
||||
|
||||
#define GRAVITY 9.80665
|
||||
#define ABSOLUTE_ZERO_IN_CELSIUS -273.15
|
||||
#define KELVIN(t) (t - ABSOLUTE_ZERO_IN_CELSIUS)
|
||||
#define CELSIUS(t) (t + ABSOLUTE_ZERO_IN_CELSIUS)
|
||||
@ -27,4 +28,9 @@
|
||||
#define STD_AIR_DENSITY_ICAO 1.22498
|
||||
#define STD_AIR_DENSITY_ASM 1.20885
|
||||
|
||||
// Standard deviation of the default muzzle velocity variation (0.3%)
|
||||
#define DEFAULT_MUZZLE_VELOCITY_VARIATION_SD 0.003
|
||||
|
||||
#define BULLET_TRACE_MIN_VELOCITY 500
|
||||
|
||||
#define EXTENSION_REQUIRED_VERSION "1.0"
|
||||
|
@ -81,165 +81,13 @@
|
||||
<Chinese>啟用先進彈道系統</Chinese>
|
||||
<Chinesesimp>启用先进弹道系统</Chinesesimp>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_simulateForSnipers_DisplayName">
|
||||
<English>Enabled For Snipers</English>
|
||||
<Spanish>Activada para francotiradores</Spanish>
|
||||
<Polish>Akt. dla snajperów</Polish>
|
||||
<German>Für Scharfschützen aktiviert</German>
|
||||
<Czech>Povoleno pro odstřelovače</Czech>
|
||||
<Portuguese>Ativar para caçadores</Portuguese>
|
||||
<French>Activé pour les snipers</French>
|
||||
<Hungarian>Mesterlövészeknek engedélyezve</Hungarian>
|
||||
<Russian>Включена для снайперов</Russian>
|
||||
<Italian>Abilita per Tiratori Scelti</Italian>
|
||||
<Japanese>狙撃手へ有効化</Japanese>
|
||||
<Korean>저격수만 적용</Korean>
|
||||
<Chinese>啟用給狙擊手</Chinese>
|
||||
<Chinesesimp>启用给狙击手</Chinesesimp>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_muzzleVelocityVariationEnabled_DisplayName">
|
||||
<English>Enable Muzzle Velocity Variation</English>
|
||||
<German>Variation der Mündungsgeschwindigkeit aktivieren</German>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_simulateForSnipers_Description">
|
||||
<English>Enables advanced ballistics for non local snipers (when using high power optics)</English>
|
||||
<Spanish>Activa la balística avanzada para francotiradores no locales (cuando se usa una mira telescópica)</Spanish>
|
||||
<Polish>Aktywuje zaawansowaną balistykę dla nielokalnych snajperów (kiedy używają optyki)</Polish>
|
||||
<German>Aktiviert die erweiterte Ballistik für nicht lokale Scharfschützen (bei Benutzung von Optiken mit starker Vergrößerung)</German>
|
||||
<Czech>Aktivuje pokročilou balistiku pro nelokální odstřelovače (při použití optiky)</Czech>
|
||||
<Portuguese>Ativa balística avançada para caçadores não locais (quando usando miras telescópicas)</Portuguese>
|
||||
<French>Active la balistique avancée pour les snipers non locaux (en utilisant les optiques avancées)</French>
|
||||
<Hungarian>Engedélyezi a fejlett ballisztikát nem-helyi mesterlövészeknek (nagy-teljesítményű optika használatakor)</Hungarian>
|
||||
<Russian>Включает продвинутую баллистику для нелокальных снайперов (при использовании мощной оптики)</Russian>
|
||||
<Italian>Abilita Balistica Avanzata per Tiratori Scelti non locali (con ottiche ad alto potenziale)</Italian>
|
||||
<Japanese>非ローカルの狙撃手 (高倍率スコープを使っている場合)へアドバンスド バリスティックスを有効化します</Japanese>
|
||||
<Korean>고급 탄도학을 비-저격수 인원에게도 적용합니다(고성능 조준경을 사용시)</Korean>
|
||||
<Chinese>啟用先進彈道系統給非本地狙擊手(當使用高倍率光學瞄鏡時)</Chinese>
|
||||
<Chinesesimp>启用先进弹道系统给非本地狙击手(当使用高倍率光学瞄镜时)</Chinesesimp>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_simulateForGroupMembers_DisplayName">
|
||||
<English>Enabled For Group Members</English>
|
||||
<Spanish>Activada para miembros de grupo</Spanish>
|
||||
<Polish>Akt. dla czł. grupy</Polish>
|
||||
<German>Für Gruppenmitglieder aktiviert</German>
|
||||
<Czech>Povoleno pro členy skupiny</Czech>
|
||||
<Portuguese>Ativada para membros do grupo</Portuguese>
|
||||
<French>Activé pour les membres groupés</French>
|
||||
<Hungarian>Csoporttagoknak engedélyezve</Hungarian>
|
||||
<Russian>Включена для группы</Russian>
|
||||
<Italian>Abilita per Membri del Gruppo</Italian>
|
||||
<Japanese>グループ メンバーへ有効化</Japanese>
|
||||
<Korean>그룹 멤버도 적용</Korean>
|
||||
<Chinese>啟用給小隊成員</Chinese>
|
||||
<Chinesesimp>启用给小队成员</Chinesesimp>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_simulateForGroupMembers_Description">
|
||||
<English>Enables advanced ballistics for non local group members</English>
|
||||
<Spanish>Activada la balística avanzada para miembros de grupo no locales</Spanish>
|
||||
<Polish>Aktywuje zaawansowaną balistykę dla nielokalnych członków grupy</Polish>
|
||||
<German>Aktiviert die erweiterte Ballistik für nicht lokale Gruppenmitglieder</German>
|
||||
<Czech>Aktivuje pokročilou balistiku pro nelokální členy skupiny</Czech>
|
||||
<Portuguese>Ativa balística avançada para membros de grupo não locais</Portuguese>
|
||||
<French>Active la balistique avancée pour les membres du groupe non locaux</French>
|
||||
<Hungarian>Engedélyezi a fejlett ballisztikát nem-helyi csoporttagoknak</Hungarian>
|
||||
<Russian>Включает продвинутую баллистику для нелокальных членов группы</Russian>
|
||||
<Italian>Abilita Balistica Avanzata per Membri non locali del Gruppo</Italian>
|
||||
<Japanese>非ローカルのグループ メンバーへアドバンスド バリスティックスを有効化します</Japanese>
|
||||
<Korean>고급 탄도학을 비-그룹멤버에게도 적용합니다</Korean>
|
||||
<Chinese>啟用先進彈道系統給非本地小隊成員</Chinese>
|
||||
<Chinesesimp>启用先进弹道系统给非本地小队成员</Chinesesimp>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_simulateForEveryone_DisplayName">
|
||||
<English>Enabled For Everyone</English>
|
||||
<Spanish>Activada para todos</Spanish>
|
||||
<Polish>Akt. dla wszystkich</Polish>
|
||||
<German>Für jeden aktiviert</German>
|
||||
<Czech>Povoleno pro všechny</Czech>
|
||||
<Portuguese>Ativada para todos</Portuguese>
|
||||
<French>Activé pour tout le monde</French>
|
||||
<Hungarian>Mindenkinek engedélyezve</Hungarian>
|
||||
<Russian>Включена для всех</Russian>
|
||||
<Italian>Abilita per tutti</Italian>
|
||||
<Japanese>全員に有効化</Japanese>
|
||||
<Korean>모두에게 적용</Korean>
|
||||
<Chinese>啟用給所有人</Chinese>
|
||||
<Chinesesimp>启用给所有人</Chinesesimp>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_simulateForEveryone_Description">
|
||||
<English>Enables advanced ballistics for all non local players (enabling this may degrade performance during heavy firefights in multiplayer)</English>
|
||||
<Spanish>Activada la balística avanzada para todos los jugadores no locales (activarlo puede degradar el rendimiento durante grandes tiroteos en multijugador).</Spanish>
|
||||
<Polish>Aktywuje zaawansowaną balistykę dla wszystkich nielokalnych graczy (aktywacja tej opcji może spodowować spory spadek wydajności podczas ciężkiej wymiany ognia)</Polish>
|
||||
<German>Aktiviert die erweiterte Ballistik für alle nicht lokalen Spieler (das Aktivieren dieser Funktion kann zur Beeinträchtigung des Spielerlebnisses im Multiplayer führen)</German>
|
||||
<Czech>Aktivuje pokročilou balistiku pro všechny nelokální hráče (aktivace této možnosti způsobuje pokles FPS během velké přestřelky v multiplayeru)</Czech>
|
||||
<Portuguese>Ativa balística avançada para todos os jogadores não locais (ativando isso pode degradar a performance durante troca de tiros intensas no multiplayer)</Portuguese>
|
||||
<French>Active la balistique avancée pour tous les joueurs non locaux (activer cette option peut avoir un impact sur les performance en multi durant les grands échanges de tirs)</French>
|
||||
<Hungarian>Engedélyezi a fejlett ballisztikát az összes nem-helyi játékosnak (ez a funkció leronthatja a teljesítményt intenzív többjátékos tűzharcok alatt)</Hungarian>
|
||||
<Russian>Включает продвинутую баллистику для всех нелокальных игроков (включение этой опции может снизить производительность при массовых перестрелках в мультиплеере)</Russian>
|
||||
<Italian>Abilita Balistica Avanzata per tutti i giocatori non locali (abilitare questo parametro potrebbe ridurre le prestazioni durante scontri intensi in multiplayer)</Italian>
|
||||
<Japanese>非ローカルの全プレイヤーへアドバンスド バリスティックスを有効化します (マルチプレイで大規模な銃撃戦がおこなわれると、動作の低下を招きます)</Japanese>
|
||||
<Korean>고급 탄도학을 모든 비-로컬그룹에게도 적용합니다(적용 후 대규모 전투시 성능하락을 유발할 수 있습니다)</Korean>
|
||||
<Chinese>啟用先進彈道系統給所有非本地玩家 (啟用此功能後,在多人連線大量交火時可能會降低效能)</Chinese>
|
||||
<Chinesesimp>启用先进弹道系统给所有非本地玩家 (启用此功能后,在多人连线大量交火时可能会降低效能)</Chinesesimp>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_alwaysSimulateForGroupMembers_DisplayName">
|
||||
<English>Always Enabled For Group Members</English>
|
||||
<Polish>Zawsze akt. dla czł. grupy</Polish>
|
||||
<Spanish>Siempre activada para miembros de grupo</Spanish>
|
||||
<German>Für Gruppenmitglieder immer aktiviert</German>
|
||||
<Czech>Vždy povoleno pro členy skupiny</Czech>
|
||||
<Portuguese>Sempre ativada para membros do grupo</Portuguese>
|
||||
<French>Toujours activer pour les membres du groupe</French>
|
||||
<Hungarian>Mindig engedélyezve csoporttagoknak</Hungarian>
|
||||
<Russian>Всегда включена для членов группы</Russian>
|
||||
<Italian>Sempre abilitato per Membri del Gruppo</Italian>
|
||||
<Japanese>常にグループ メンバーへ有効化</Japanese>
|
||||
<Korean>그룹 멤버에게 항상 적용</Korean>
|
||||
<Chinese>永遠啟用給小隊成員</Chinese>
|
||||
<Chinesesimp>永远启用给小队成员</Chinesesimp>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_alwaysSimulateForGroupMembers_Description">
|
||||
<English>Always enables advanced ballistics when a group member fires</English>
|
||||
<Polish>Aktywuje zaawansowaną balistykę dla wszystkich członków grupy</Polish>
|
||||
<Spanish>Activada la balística avanzada siempre cuando miembros de grupo disparan</Spanish>
|
||||
<German>Aktiviert die erweiterte Ballistik immer, wenn ein Gruppenmitglied schießt</German>
|
||||
<Czech>Aktivuje pokročilou balistiku pro členy skupiny</Czech>
|
||||
<Portuguese>Sempre ative balística avançada quando um membro do grupo disparar</Portuguese>
|
||||
<French>Active tout le temps la balistique avancée quand un membre du groupe ouvre le feu</French>
|
||||
<Hungarian>Mindig engedélyezi a fejlett ballisztikát, ha egy csoporttag tüzel</Hungarian>
|
||||
<Russian>Всегда включает продвинутую баллистику когда стреляет член группы</Russian>
|
||||
<Italian>Abilita sempre Balistica Avanzata quando un membro del gruppo spara</Italian>
|
||||
<Japanese>グループ メンバーが射撃した時、常にアドバンスド バリスティックスを有効化します</Japanese>
|
||||
<Korean>그룹 멤버가 발사시 항상 고급 탄도학을 적용합니다</Korean>
|
||||
<Chinese>當小隊成員開火時,永遠啟用先進彈道系統</Chinese>
|
||||
<Chinesesimp>当小队成员开火时,永远启用先进弹道系统</Chinesesimp>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_disabledInFullAutoMod_DisplayName">
|
||||
<English>Disabled In FullAuto Mode</English>
|
||||
<Polish>Wył. podczas ognia auto.</Polish>
|
||||
<Spanish>Desactivada en modo automático</Spanish>
|
||||
<German>Beim vollautomatischen Feuern deaktiviert</German>
|
||||
<Czech>Zakázáno v automatickém režimu střelby</Czech>
|
||||
<Portuguese>Desabilitar no modo automático</Portuguese>
|
||||
<French>Désactiver en mode automatique</French>
|
||||
<Hungarian>Automata módban letiltva</Hungarian>
|
||||
<Russian>Выкл. для автомат. режима</Russian>
|
||||
<Italian>Disabilita in modalità di fuoco automatico</Italian>
|
||||
<Japanese>フルオートでは無効化</Japanese>
|
||||
<Korean>조정간 자동시 비활성화</Korean>
|
||||
<Chinese>在全自動模式時關閉</Chinese>
|
||||
<Chinesesimp>在全自动模式时关闭</Chinesesimp>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_disabledInFullAutoMod_Description">
|
||||
<English>Disables the advanced ballistics during full auto fire</English>
|
||||
<Polish>Dezaktywuje zaawansowaną balistykę podczas ognia automatycznego</Polish>
|
||||
<Spanish>Desactivada la balística avanzada durante el fuego automático</Spanish>
|
||||
<German>Deaktiviert die erweiterte Ballistik beim vollautomatischen Feuern</German>
|
||||
<Czech>Zákáže pokročilou balistiku během střelby v režimu automat</Czech>
|
||||
<Portuguese>Desabilitar a balística avançada durante fogo automático</Portuguese>
|
||||
<French>Désactive la balistique avancée pour les tirs en automatique</French>
|
||||
<Hungarian>Letiltja a fejlett ballisztikát automata tüzelés folyamán</Hungarian>
|
||||
<Russian>Выключает продвинутую баллистику при стрельбе в полностью автоматическом режиме</Russian>
|
||||
<Italian>Disabilita Balistica Avanzata durante fuoco automatico</Italian>
|
||||
<Japanese>フルオートで射撃中ではアドバンスド バリスティックスを無効化します</Japanese>
|
||||
<Korean>조정간 자동시 고급 탄도학을 비활성화 합니다</Korean>
|
||||
<Chinese>在全自動模式開火時,關閉先進彈道系統</Chinese>
|
||||
<Chinesesimp>在全自动模式开火时,关闭先进弹道系统</Chinesesimp>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_muzzleVelocityVariationEnabled_Description">
|
||||
<English>Simulates slight variations in muzzle velocity between each shot</English>
|
||||
<German>Simuliert leichte Variationen der Mündungsgeschwindigkeit zwischen jedem Schuss.</German>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_ammoTemperatureEnabled_DisplayName">
|
||||
<English>Enable Ammo Temperature Simulation</English>
|
||||
@ -354,10 +202,10 @@
|
||||
<Chinesesimp>模拟间隔</Chinesesimp>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_simulationInterval_Description">
|
||||
<English>Defines the interval between every calculation step</English>
|
||||
<English>Defines the interval between each calculation step</English>
|
||||
<Polish>Określa interwał pomiędzy każdym krokiem kalkulacji</Polish>
|
||||
<Spanish>Define el intervalo entre cada cálculo</Spanish>
|
||||
<German>Legt das Intervall zwischen den Berechnungsschritten fest</German>
|
||||
<German>Definiert das Intervall zwischen den einzelnen Simulationsschritten</German>
|
||||
<Czech>Určuje interval mezi každým výpočtem</Czech>
|
||||
<Portuguese>Define o intervalo entre cada cálculo</Portuguese>
|
||||
<French>Définit un intervalle de calcul entre deux simulations</French>
|
||||
|
@ -5,7 +5,7 @@ class CfgVehicles {
|
||||
category = "ACE";
|
||||
displayName = CSTRING(DisplayName);
|
||||
function = QFUNC(moduleSettings);
|
||||
scope = 2;
|
||||
scope = 1;
|
||||
isGlobal = 1;
|
||||
isTriggerActivated = 0;
|
||||
icon = QPATHTOF(UI\Icon_Module.paa);
|
||||
|
@ -3,9 +3,12 @@
|
||||
<Package name="Advanced_Fatigue">
|
||||
<Key ID="STR_ACE_Advanced_Fatigue_DisplayName">
|
||||
<English>Advanced Fatigue</English>
|
||||
<German>Erweiterte Ausdauer</German>
|
||||
<Chinese>進階疲勞</Chinese>
|
||||
<Chinesesimp>进阶疲劳</Chinesesimp>
|
||||
<Japanese>アドバンスド疲労</Japanese>
|
||||
<Italian>Fatica Avanzata</Italian>
|
||||
<Korean>고급 피로도</Korean>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Fatigue_PerformanceFactor">
|
||||
<English>Performance Factor</English>
|
||||
@ -21,7 +24,7 @@
|
||||
<Key ID="STR_ACE_Advanced_Fatigue_PerformanceFactor_Description">
|
||||
<English>Influences the overall performance of all players with no custom factor. Higher means better.</English>
|
||||
<German>Beinflusst die Leistungsfähigkeit aller Spieler ohne eigenen Leistungsfaktor. Ein höherer Wert bedeutet bessere Leistung.</German>
|
||||
<Japanese>非カスタム要因をもつ全プレイヤーへ全体的に動作を影響させます。高いほど影響がでます。</Japanese>
|
||||
<Japanese>非カスタム要因をもつ全プレイヤーへ全体的に動作を影響させます。高いほど良い効果があります。</Japanese>
|
||||
<Polish>Wpływa na ogólną wydolność organizmu u wszystkich graczy bez ustawionego niestandardowego współczynnika. Więcej znaczy lepiej.</Polish>
|
||||
<Korean>모든 성능이 임의로 설정된 값 없이 영향받습니다. 값이 클수록 더 나은 성능을 발휘합니다</Korean>
|
||||
<French>Influence les performances générales de tous les joueurs sans facteurs personalisés. Une valeur plus élevée implique de meilleures performances.</French>
|
||||
@ -32,7 +35,7 @@
|
||||
<Key ID="STR_ACE_Advanced_Fatigue_PerformanceFactor_EdenDescription">
|
||||
<English>Influences the overall performance of this unit. Higher means better.</English>
|
||||
<German>Beinflusst die Leistungsfähigkeit dieser Einheit. Ein höherer Wert bedeutet bessere Leistung.</German>
|
||||
<Japanese>非カスタム要因をもつ全プレイヤーへ全体的に動作を影響させます。高いほど影響がでます。</Japanese>
|
||||
<Japanese>このユニットの全体的な動作に影響させます。高いほど良い効果があります。</Japanese>
|
||||
<Polish>Wpływa na ogólną wydolność tej jednostki. Więcej znaczy lepiej.</Polish>
|
||||
<Korean>모든 성능이 이 단위로 영향을 받습니다. 값이 클수록 더 나은 성능을 발휘합니다</Korean>
|
||||
<French>Influence les performances générales de cette unité. Une valeur plus élevée implique de meilleures performances.</French>
|
||||
@ -54,7 +57,7 @@
|
||||
<Key ID="STR_ACE_Advanced_Fatigue_RecoveryFactor_Description">
|
||||
<English>Changes how fast the player recovers when resting. Higher is faster.</English>
|
||||
<German>Ändert, wie schnell ein Spieler Ausdauer regeneriert. Ein höherer Wert bedeutet eine schnellere Regeneration.</German>
|
||||
<Japanese>休憩時は、プレイヤーが早く回復します。高いほど早くなります。</Japanese>
|
||||
<Japanese>休憩時はプレイヤーが早く回復します。高いほど早くなります。</Japanese>
|
||||
<Polish>Wpływa na czas regeneracji podczas postoju. Więcej znaczy szybciej.</Polish>
|
||||
<Korean>얼마나 빨리 회복하는지를 바꿉니다. 값이 클수록 더 나은 성능을 발휘합니다</Korean>
|
||||
<French>Change la vitesse à laquelle les joueurs récupèrent leur endurance lorsqu'ils se reposent. Une valeur plus élevée implique une récupération plus rapide.</French>
|
||||
@ -76,7 +79,7 @@
|
||||
<Key ID="STR_ACE_Advanced_Fatigue_LoadFactor_Description">
|
||||
<English>Increases or decreases how much weight influences the players performance. Zero means equipment weight has no performance influence.</English>
|
||||
<German>Erhöht oder verringert, wie viel Einfluss das Ausrüstungsgewicht auf die Leistung hat. Null heißt, dass es keinen Einfluss hat.</German>
|
||||
<Japanese>重量によりプレイヤーの動作への影響下増加したり、低下します。装備を持っていない場合、影響はしません。</Japanese>
|
||||
<Japanese>重量の増減によりプレイヤーの動作へ影響を与えます。装備を持っていない場合、影響はしません。</Japanese>
|
||||
<Polish>Zmniejsza lub zwiększa wpływ ciężaru ekwipunku na wydolność gracza. Zero oznacza kompletny brak wpływu na wydolność.</Polish>
|
||||
<Korean>플레이어가 무게에 따라 얼마나 영향받는지를 증가시키거나 감소시킵니다. 0의 경우 플레이어가 장비 무게에 영향받지 않습니다.</Korean>
|
||||
<French>Augmente ou réduit l'influence que le poids à sur les performances des joueurs. Zéro implique que le poids de l'équipement n'a pas d'influence sur les performances.</French>
|
||||
|
11
addons/advanced_throwing/CfgAmmo.hpp
Normal file
11
addons/advanced_throwing/CfgAmmo.hpp
Normal file
@ -0,0 +1,11 @@
|
||||
class CfgAmmo {
|
||||
class Default;
|
||||
class Grenade: Default {
|
||||
GVAR(torqueDirection)[] = {1, 1, 0};
|
||||
GVAR(torqueMagnitude) = "(50 + random 100) * selectRandom [1, -1]";
|
||||
};
|
||||
class GrenadeCore: Default {
|
||||
GVAR(torqueDirection)[] = {1, 1, 0};
|
||||
GVAR(torqueMagnitude) = "(50 + random 100) * selectRandom [1, -1]";
|
||||
};
|
||||
};
|
@ -7,7 +7,7 @@ class CfgVehicles {
|
||||
category = "ACE";
|
||||
displayName = CSTRING(Category);
|
||||
function = QFUNC(moduleInit);
|
||||
scope = 2;
|
||||
scope = 1;
|
||||
isGlobal = 1;
|
||||
icon = QPATHTOF(UI\Icon_Module_AdvancedThrowing_ca.paa);
|
||||
class Arguments {
|
||||
@ -60,6 +60,7 @@ class CfgVehicles {
|
||||
displayName = CSTRING(PickUp);
|
||||
condition = QUOTE([ARR_2(_player,true)] call FUNC(canPrepare));
|
||||
statement = QUOTE(_this call FUNC(pickUp));
|
||||
exceptions[] = {"isNotSwimming"};
|
||||
distance = 1.8; // Requires >1.7 to work when standing with weapon on back
|
||||
icon = "\a3\ui_f\data\igui\cfg\actions\obsolete\ui_action_takemine_ca.paa";
|
||||
};
|
||||
|
@ -31,7 +31,7 @@ GVAR(ammoMagLookup) = call CBA_fnc_createNamespace;
|
||||
|
||||
["ACE3 Weapons", QGVAR(dropModeToggle), localize LSTRING(DropModeToggle), {
|
||||
// Condition
|
||||
if !(ACE_player getVariable [QGVAR(inHand), false]) exitWith {false};
|
||||
if (!(ACE_player getVariable [QGVAR(inHand), false]) || {underwater ACE_player}) exitWith {false};
|
||||
|
||||
// Statement
|
||||
private _currentDropMode = ACE_player getVariable [QGVAR(dropMode), false];
|
||||
@ -117,7 +117,9 @@ addMissionEventHandler ["Draw3D", { // Blue is predicted before throw, red is re
|
||||
drawIcon3D ["\a3\ui_f\data\gui\cfg\hints\icon_text\group_1_ca.paa", [0,0,1,1], _newTrajAGL, 1, 1, 0, "", 2];
|
||||
} forEach GVAR(predictedPath);
|
||||
{
|
||||
drawIcon3D ["\a3\ui_f\data\gui\cfg\hints\icon_text\group_1_ca.paa", [1,0,0,1], _x, 1, 1, 0, "", 2];
|
||||
} forEach GVAR(flightPath)
|
||||
_x params ["_pos", "_vectorUp"];
|
||||
drawIcon3D ["\a3\ui_f\data\gui\cfg\hints\icon_text\group_1_ca.paa", [1,0,0,1], _pos, 1, 1, 0, "", 2];
|
||||
drawLine3D [_pos, _pos vectorAdd _vectorUp, [1,0,1,1]];
|
||||
} forEach GVAR(flightPath);
|
||||
}];
|
||||
#endif
|
||||
|
@ -15,5 +15,6 @@ class CfgPatches {
|
||||
};
|
||||
|
||||
#include "ACE_Settings.hpp"
|
||||
#include "CfgAmmo.hpp"
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
|
@ -32,5 +32,5 @@ GVAR(enabled) &&
|
||||
#endif
|
||||
|
||||
{!(call EFUNC(common,isFeatureCameraActive))} &&
|
||||
{[_unit, objNull, ["isNotInside", "isNotSitting"/*, "isNotOnLadder"*/]] call EFUNC(common,canInteractWith)} && // Ladder needs positioning fixes on throw
|
||||
{[_unit, objNull, ["isNotInside", "isNotSwimming", "isNotSitting"/*, "isNotOnLadder"*/]] call EFUNC(common,canInteractWith)} && // Ladder needs positioning fixes on throw
|
||||
{_unit call CBA_fnc_canUseWeapon} // Disable in non-FFV seats due to surface detection issues
|
||||
|
@ -67,7 +67,7 @@ for "_i" from 0.05 to 1.45 step 0.1 do {
|
||||
private _col = [ [1, 1, 1, _alpha], [0, 1, 0, _alpha], [1, 0, 0, _alpha], [1, 1, 0, _alpha] ] select _cross;
|
||||
|
||||
if (_cross != 2 && {lineIntersects [eyePos ACE_player, _newTrajASL]}) then {
|
||||
_col set [3, 0.1]
|
||||
_col set [3, 0.1];
|
||||
};
|
||||
|
||||
_pathData pushBack [_col, ASLToAGL _newTrajASL, _iDim];
|
||||
|
@ -128,6 +128,10 @@ _activeThrowable setDir (_unitDirVisual + 90);
|
||||
private _pitch = [-30, -90] select (_throwType == "high");
|
||||
[_activeThrowable, _pitch, 0] call BIS_fnc_setPitchBank;
|
||||
|
||||
// Force drop mode if underwater
|
||||
if (underwater player) then {
|
||||
ACE_player setVariable [QGVAR(dropMode), true];
|
||||
};
|
||||
|
||||
if (ACE_player getVariable [QGVAR(dropMode), false]) then {
|
||||
_posFin = _posFin vectorAdd (AGLToASL (positionCameraToWorld [_leanCoef, 0, ACE_player getVariable [QGVAR(dropDistance), DROP_DISTANCE_DEFAULT]]));
|
||||
|
@ -17,8 +17,6 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (!isServer) exitWith {};
|
||||
|
||||
params ["_logic", "_units", "_activated"];
|
||||
|
||||
if (!_activated) exitWith {};
|
||||
|
@ -49,9 +49,26 @@ if (!(_unit getVariable [QGVAR(primed), false])) then {
|
||||
_newVelocity = _newVelocity vectorAdd (velocity (vehicle _unit));
|
||||
};
|
||||
|
||||
// Calculate torque of thrown grenade
|
||||
private _config = configFile >> "CfgAmmo" >> typeOf _activeThrowable;
|
||||
private _torqueDir = getArray (_config >> QGVAR(torqueDirection));
|
||||
_torqueDir = if (_torqueDir isEqualTypeArray [0,0,0]) then { vectorNormalized _torqueDir } else { [0,0,0] };
|
||||
private _torqueMag = getNumber (_config >> QGVAR(torqueMagnitude));
|
||||
|
||||
if (_dropMode) then {
|
||||
_torqueMag = _torqueMag * THROWSTYLE_DROP_TORQUE_COEF;
|
||||
} else {
|
||||
if (_throwType == "high") then {
|
||||
_torqueMag = _torqueMag * THROWSTYLE_HIGH_TORQUE_COEF;
|
||||
};
|
||||
};
|
||||
|
||||
private _torque = _torqueDir vectorMultiply _torqueMag;
|
||||
|
||||
// Drop if unit dies during throw process
|
||||
if (alive _unit) then {
|
||||
_activeThrowable setVelocity _newVelocity;
|
||||
_activeThrowable addTorque (_unit vectorModelToWorld _torque);
|
||||
};
|
||||
|
||||
// Invoke listenable event
|
||||
@ -67,12 +84,12 @@ if (!(_unit getVariable [QGVAR(primed), false])) then {
|
||||
|
||||
|
||||
#ifdef DRAW_THROW_PATH
|
||||
GVAR(predictedPath) = call FUNC(drawArc); // save the current throw arc
|
||||
GVAR(predictedPath) = call FUNC(drawArc); // Save the current throw arc
|
||||
GVAR(flightPath) = [];
|
||||
[_unit getVariable QGVAR(activeThrowable)] spawn {
|
||||
params ["_grenade"];
|
||||
while {!isNull _grenade} do {
|
||||
GVAR(flightPath) pushBack ASLtoAGL getPosASL _grenade;
|
||||
GVAR(flightRotation) = [];
|
||||
(_unit getVariable QGVAR(activeThrowable)) spawn {
|
||||
while {!isNull _this && {(getPosATL _this) select 2 > 0.05}} do {
|
||||
GVAR(flightPath) pushBack [ASLtoAGL (getPosASL _this), vectorUp _this];
|
||||
sleep 0.05;
|
||||
};
|
||||
};
|
||||
|
@ -23,6 +23,8 @@
|
||||
#define THROWSTYLE_HIGH_DIR [0, 200, 500]
|
||||
#define THROWSTYLE_HIGH_VEL_COEF 2
|
||||
#define THROWSTYLE_DROP_VEL 2
|
||||
#define THROWSTYLE_HIGH_TORQUE_COEF .6
|
||||
#define THROWSTYLE_DROP_TORQUE_COEF .2
|
||||
|
||||
#define THROW_TYPE_DEFAULT "normal"
|
||||
#define THROW_SPEED_DEFAULT 18
|
||||
|
@ -148,7 +148,7 @@
|
||||
<Key ID="STR_ACE_Advanced_Throwing_Prepare">
|
||||
<English>Prepare/Change Throwable</English>
|
||||
<Russian>Подготовить/заменить гранату</Russian>
|
||||
<Japanese>機能の起動/変更</Japanese>
|
||||
<Japanese>投てき物の準備/変更</Japanese>
|
||||
<Polish>Przygotuj/zmień ob. miotany</Polish>
|
||||
<German>Wurfobjekt vorbereiten/wechseln</German>
|
||||
<Korean>투척물 준비/변경</Korean>
|
||||
@ -172,7 +172,7 @@
|
||||
<Key ID="STR_ACE_Advanced_Throwing_DropModeToggle">
|
||||
<English>Throwable Drop Mode (Toggle)</English>
|
||||
<Russian>Режим броска гранаты (переключить)</Russian>
|
||||
<Japanese>投てきモード (トグル)</Japanese>
|
||||
<Japanese>投てきモード (切り替え)</Japanese>
|
||||
<Polish>Tryb upuszczania ob. miotanego (przełącz)</Polish>
|
||||
<German>Wurfobjekt Fallmodus (umschalten)</German>
|
||||
<Korean>투척물 떨어뜨리기 모드(토글)</Korean>
|
||||
|
18
addons/ai/CfgEventHandlers.hpp
Normal file
18
addons/ai/CfgEventHandlers.hpp
Normal file
@ -0,0 +1,18 @@
|
||||
|
||||
class Extended_PreStart_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_preStart));
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_PreInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_preInit));
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_PostInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_postInit));
|
||||
};
|
||||
};
|
3
addons/ai/XEH_PREP.hpp
Normal file
3
addons/ai/XEH_PREP.hpp
Normal file
@ -0,0 +1,3 @@
|
||||
PREP(garrison);
|
||||
PREP(unGarrison);
|
||||
PREP(garrisonMove);
|
84
addons/ai/XEH_postInit.sqf
Normal file
84
addons/ai/XEH_postInit.sqf
Normal file
@ -0,0 +1,84 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
[QGVAR(AISection), {
|
||||
params [["_units", [], [[]]], ["_sections", [], [[]]], ["_bool", true, [true]]];
|
||||
{
|
||||
private _section = _x;
|
||||
{
|
||||
if (_bool) then {
|
||||
_x enableAI _section;
|
||||
} else {
|
||||
_x disableAI _section;
|
||||
};
|
||||
LOG(format [ARR_4("XEH_postInit: %1 disableAI %2 | ID %3", _x, _section, clientOwner)]);
|
||||
} foreach (_units select {local _x});
|
||||
} foreach _sections
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
[QGVAR(unGarrison), FUNC(unGarrison)] call CBA_fnc_addEventHandler;
|
||||
[QGVAR(doMove), {
|
||||
params ["_unitsArray"];
|
||||
{
|
||||
_x params ["_unit", "_pos"];
|
||||
//_unit doFollow leader _unit;
|
||||
_unit setDestination [_pos, "LEADER PLANNED", true];
|
||||
_unit doMove _pos;
|
||||
LOG(format [ARR_4("XEH_postInit: %1 doMove %2 | ID %3", _unit, _pos, clientOwner)]);
|
||||
} foreach _unitsArray
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
[QGVAR(setBehaviour), {
|
||||
params ["_groupsArray", "_behaviour"];
|
||||
{
|
||||
_x params ["_group"];
|
||||
_group setBehaviour _behaviour;
|
||||
LOG(format [ARR_4("XEH_postInit: %1 setBehaviour %2 | ID %3", _group, _behaviour, clientOwner)]);
|
||||
} foreach _groupsArray
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
[QGVAR(enableAttack), {
|
||||
params ["_unitsArray", "_mode"];
|
||||
{
|
||||
_x params ["_unit"];
|
||||
_unit enableAttack _mode;
|
||||
LOG(format [ARR_4("XEH_postInit: %1 enableAttack %2 | ID %3", _unit, _mode, clientOwner)]);
|
||||
} foreach _unitsArray
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
#ifdef DEBUG_MODE_FULL
|
||||
addMissionEventHandler ["Draw3D", {
|
||||
private _unitMoveList = missionNameSpace getVariable [QGVAR(garrison_unitMoveList), []];
|
||||
|
||||
{
|
||||
_x params ["_unit", "_pos"];
|
||||
|
||||
switch true do {
|
||||
case (surfaceIsWater (getPos _unit) && {surfaceIsWater _pos}) : {
|
||||
for "_i" from 0 to 3 do {
|
||||
drawLine3D [_unit modelToWorldVisualWorld [0,0,1], (AGLtoASL _pos), [1,0,0,1]];
|
||||
};
|
||||
drawIcon3D ["\a3\ui_f\data\map\groupicons\waypoint.paa", [1,0,0,1], (AGLtoASL _pos), 0.75, 0.75, 0.75];
|
||||
};
|
||||
|
||||
case (!surfaceIsWater (getPos _unit) && {!surfaceIsWater _pos}) : {
|
||||
for "_i" from 0 to 3 do {
|
||||
drawLine3D [_unit modelToWorldVisual [0,0,1], _pos, [1,0,0,1]];
|
||||
};
|
||||
drawIcon3D ["\a3\ui_f\data\map\groupicons\waypoint.paa", [1,0,0,1], _pos, 0.75, 0.75, 0.75];
|
||||
};
|
||||
|
||||
case (!surfaceIsWater (getPos _unit) && {surfaceIsWater _pos}) : {
|
||||
for "_i" from 0 to 3 do {
|
||||
drawLine3D [_unit modelToWorldVisual [0,0,1], (AGLToASL _pos), [1,0,0,1]];
|
||||
};
|
||||
drawIcon3D ["\a3\ui_f\data\map\groupicons\waypoint.paa", [1,0,0,1], (AGLtoASL _pos), 0.75, 0.75, 0.75];
|
||||
};
|
||||
|
||||
case (surfaceIsWater (getPos _unit) && {!surfaceIsWater _pos}) : {
|
||||
for "_i" from 0 to 3 do {
|
||||
drawLine3D [_unit modelToWorldVisualWorld [0,0,1], _pos, [1,0,0,1]];
|
||||
};
|
||||
drawIcon3D ["\a3\ui_f\data\map\groupicons\waypoint.paa", [1,0,0,1], _pos, 0.75, 0.75, 0.75];
|
||||
};
|
||||
};
|
||||
} foreach _unitMoveList;
|
||||
}];
|
||||
#endif
|
9
addons/ai/XEH_preInit.sqf
Normal file
9
addons/ai/XEH_preInit.sqf
Normal file
@ -0,0 +1,9 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
ADDON = false;
|
||||
|
||||
PREP_RECOMPILE_START;
|
||||
#include "XEH_PREP.hpp"
|
||||
PREP_RECOMPILE_END;
|
||||
|
||||
ADDON = true;
|
3
addons/ai/XEH_preStart.sqf
Normal file
3
addons/ai/XEH_preStart.sqf
Normal file
@ -0,0 +1,3 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
#include "XEH_PREP.hpp"
|
@ -15,3 +15,4 @@ class CfgPatches {
|
||||
};
|
||||
|
||||
#include "CfgWeapons.hpp"
|
||||
#include "CfgEventHandlers.hpp"
|
||||
|
278
addons/ai/functions/fnc_garrison.sqf
Normal file
278
addons/ai/functions/fnc_garrison.sqf
Normal file
@ -0,0 +1,278 @@
|
||||
/*
|
||||
* Author: alganthe
|
||||
* Garrison function used to garrison AI inside buildings.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The building(s) nearest this position are used <POSITION>
|
||||
* 1: Limit the building search to those type of building <ARRAY>
|
||||
* 2: Units that will be garrisoned <ARRAY>
|
||||
* 3: Radius to fill building(s) <SCALAR> (default: 50)
|
||||
* 4: 0: even filling, 1: building by building, 2: random filling <SCALAR> (default: 0)
|
||||
* 5: True to fill building(s) from top to bottom <BOOL> (default: false) (note: only works with filling mode 0 and 1)
|
||||
* 6: Teleport units <BOOL> (default: false)
|
||||
|
||||
* Return Value:
|
||||
* Units not garrisoned <ARRAY>
|
||||
*
|
||||
* Example:
|
||||
* [position, nil, [unit1, unit2, unit3, unitN], 200, 1, false, false] call ace_ai_fnc_garrison
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params [["_startingPos",[0,0,0], [[]], 3], ["_buildingTypes", ["Building"], [[]]], ["_unitsArray", [], [[]]], ["_fillingRadius", 50, [0]], ["_fillingType", 0, [0]], ["_topDownFilling", false, [true]], ["_teleport", false, [true]]];
|
||||
|
||||
TRACE_6("fnc_garrison: Start",_startingPos,_buldingTypes,count _unitsArray,_fillingRadius,_fillingTYpe,_topDownFilling);
|
||||
|
||||
_unitsArray = _unitsArray select {alive _x && {!isPlayer _x}};
|
||||
|
||||
if (_startingPos isEqualTo [0,0,0]) exitWith {
|
||||
TRACE_1("fnc_garrison: StartingPos error",_startingPos);
|
||||
[LSTRING(GarrisonInvalidPosition)] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
|
||||
if (count _unitsArray == 0 || {isNull (_unitsArray select 0)}) exitWith {
|
||||
TRACE_1("fnc_garrison: Units error",_unitsArray);
|
||||
[LSTRING(GarrisonNoUnits)] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
|
||||
private _buildings = nearestObjects [_startingPos, _buildingTypes, ([_fillingRadius, 50] select (_fillingRadius < 50))];
|
||||
if (_fillingRadius >= 50) then {
|
||||
_buildings = [_buildings] call CBA_fnc_shuffle;
|
||||
};
|
||||
|
||||
if (count _buildings == 0) exitWith {
|
||||
TRACE_1("fnc_garrison: Building error",_buildings);
|
||||
[LSTRING(GarrisonNoBuilding)] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
|
||||
private _buildingsIndex = [];
|
||||
|
||||
if (_topDownFilling) then {
|
||||
{
|
||||
private _buildingPos = _x buildingPos -1;
|
||||
|
||||
// Those reverse are necessary, as dumb as it is there's no better way to sort those subarrays in sqf
|
||||
{
|
||||
reverse _x;
|
||||
} foreach _buildingPos;
|
||||
|
||||
_buildingPos sort false;
|
||||
|
||||
{
|
||||
reverse _x;
|
||||
} foreach _buildingPos;
|
||||
|
||||
_buildingsIndex pushBack _buildingPos;
|
||||
} foreach _buildings;
|
||||
} else {
|
||||
{
|
||||
_buildingsIndex pushBack (_x buildingPos -1);
|
||||
} foreach _buildings;
|
||||
};
|
||||
|
||||
// Remove buildings without positions
|
||||
{
|
||||
_buildingsIndex deleteAt (_buildingsIndex find _x);
|
||||
} foreach (_buildingsIndex select {count _x == 0});
|
||||
|
||||
//Remove positions units are already pathing to
|
||||
_buildingsIndex = _buildingsIndex apply {
|
||||
private _testedBuilding = _x;
|
||||
|
||||
_testedBuilding select {
|
||||
private _testedPos = _x;
|
||||
(({(_x select 1) isEqualTo _testedPos} count (missionNameSpace getVariable [QGVAR(garrison_unitMoveList), []])) == 0)
|
||||
}
|
||||
};
|
||||
|
||||
// Warn the user that there's not enough positions to place all units
|
||||
private _count = 0;
|
||||
{_count = _count + count _x} foreach _buildingsIndex;
|
||||
if ( (count _unitsArray) - _count > 0) then {
|
||||
TRACE_4("fnc_garrison: Not enough spots to place all units",_unitsArray,count _unitsArray,_count,((count _unitsArray) - _count > 0));
|
||||
[LSTRING(GarrisonNotEnoughPos)] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
|
||||
private _placedUnits = [];
|
||||
private _unitMoveList = [];
|
||||
|
||||
// Force all units to un-garrison
|
||||
[QGVAR(unGarrison), [_unitsArray], _unitsArray] call CBA_fnc_targetEvent;
|
||||
|
||||
private _fnc_comparePos = {
|
||||
params ["_nearestUnits", "_pos"];
|
||||
({
|
||||
if (surfaceIsWater getPos _x) then {
|
||||
floor ((getPosASL _x) select 2) == floor ((AGLtoASL _pos) select 2)
|
||||
} else {
|
||||
floor ((getPosATL _x) select 2) == floor (_pos select 2)
|
||||
};
|
||||
} count _nearestUnits) > 0
|
||||
};
|
||||
|
||||
// Do the placement
|
||||
switch (_fillingType) do {
|
||||
|
||||
// Even filling
|
||||
case 0: {
|
||||
|
||||
while {count _unitsArray > 0} do {
|
||||
if (count _buildingsIndex == 0) exitWith {};
|
||||
private _building = _buildingsIndex select 0;
|
||||
|
||||
if (_building isEqualTo []) then {
|
||||
LOG(format [ARR_2("fnc_garrison: Empty building array | removing building from buildingsIndex | %1 buildings remaining",count _buildingsIndex)]);
|
||||
_buildingsIndex deleteAt 0;
|
||||
|
||||
} else {
|
||||
private _pos = _building select 0;
|
||||
private _nearestUnits = (_pos nearEntities ["CAManBase", 2]);
|
||||
LOG(format [ARR_3("fnc_garrison: Unit detection | %1 units nearby | %2 units within height",count _nearestUnits, {floor ((getPos _x) select 2) == floor (_pos select 2)} count _nearestUnits)]);
|
||||
|
||||
if (count _nearestUnits > 0 && {[_nearestUnits, _pos] call _fnc_comparePos}) then {
|
||||
LOG(format [ARR_2("fnc_garrison: Unit present | removing position | %1 positions remaining for this building",count (_buildingsIndex select (_buildingsIndex find _building)) - 1)]);
|
||||
_buildingsIndex set [0, _building - [_pos]];
|
||||
|
||||
} else {
|
||||
private _unit = _unitsArray select 0;
|
||||
private _posSurface = surfaceIsWater _pos;
|
||||
|
||||
if (_teleport) then {
|
||||
doStop _unit;
|
||||
if (_posSurface) then {
|
||||
_unit setPosASL (AGLtoASL _pos);
|
||||
} else {
|
||||
_unit setPosATL _pos;
|
||||
};
|
||||
|
||||
} else {
|
||||
_unitMoveList pushBack [_unit,[_pos, AGLToASL _pos] select (_posSurface)];
|
||||
};
|
||||
|
||||
_placedUnits pushBack _unit;
|
||||
_unitsArray deleteAt (_unitsArray find _unit);
|
||||
_building deleteAt 0;
|
||||
_buildingsIndex deleteAt 0;
|
||||
_buildingsIndex pushBackUnique _building;
|
||||
_unit setVariable [QGVAR(garrisonned), true, true];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
// Building by building
|
||||
case 1: {
|
||||
|
||||
while {count _unitsArray > 0} do {
|
||||
if (count _buildingsIndex == 0) exitWith {};
|
||||
private _building = _buildingsIndex select 0;
|
||||
|
||||
if (_building isEqualTo []) then {
|
||||
LOG(format [ARR_2("fnc_garrison: empty building array | removing building from buildingsIndex | %1 buildings remaining",count _buildingsIndex)]);
|
||||
_buildingsIndex deleteAt 0;
|
||||
|
||||
} else {
|
||||
private _pos = _building select 0;
|
||||
private _nearestUnits = (_pos nearEntities ["CAManBase", 2]);
|
||||
LOG(format [ARR_3("fnc_garrison: Unit detection | %1 units nearby | %2 units within height",count _nearestUnits, {floor ((getPos _x) select 2) == floor (_pos select 2)} count _nearestUnits)]);
|
||||
|
||||
if (count _nearestUnits > 0 && {[_nearestUnits, _pos] call _fnc_comparePos}) then {
|
||||
LOG(format [ARR_2("fnc_garrison: Unit present | removing position | %1 positions remaining for this building",count (_buildingsIndex select (_buildingsIndex find _building)) - 1)]);
|
||||
_buildingsIndex set [0, _building - [_pos]];
|
||||
|
||||
} else {
|
||||
private _unit = _unitsArray select 0;
|
||||
private _posSurface = surfaceIsWater _pos;
|
||||
|
||||
if (_teleport) then {
|
||||
doStop _unit;
|
||||
if (_posSurface) then {
|
||||
_unit setPosASL (AGLtoASL _pos);
|
||||
} else {
|
||||
_unit setPosATL _pos;
|
||||
};
|
||||
|
||||
} else {
|
||||
_unitMoveList pushBack [_unit,[_pos, AGLToASL _pos] select (_posSurface)];
|
||||
};
|
||||
|
||||
_placedUnits pushBack _unit;
|
||||
_unitsArray deleteAt (_unitsArray find _unit);
|
||||
_buildingsIndex set [0, _building - [_pos]];
|
||||
_unit setVariable [QGVAR(garrisonned), true, true];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
// Random
|
||||
case 2: {
|
||||
|
||||
while {count _unitsArray > 0} do {
|
||||
if (count _buildingsIndex == 0) exitWith {};
|
||||
private _building = selectRandom _buildingsIndex;
|
||||
|
||||
if (_building isEqualTo []) then {
|
||||
LOG(format [ARR_2("fnc_garrison: empty building array | removing building from buildingsIndex | %1 buildings remaining",count _buildingsIndex)]);
|
||||
_buildingsIndex deleteAt (_buildingsIndex find _building);
|
||||
|
||||
} else {
|
||||
private _pos = selectRandom _building;
|
||||
private _nearestUnits = (_pos nearEntities ["CAManBase", 2]);
|
||||
LOG(format [ARR_3("fnc_garrison: Unit detection | %1 units nearby | %2 units within height",count _nearestUnits, {floor ((getPos _x) select 2) == floor (_pos select 2)} count _nearestUnits)]);
|
||||
|
||||
if (count _nearestUnits > 0 && {[_nearestUnits, _pos] call _fnc_comparePos}) then {
|
||||
LOG(format [ARR_2("fnc_garrison: Unit present | removing position | %1 positions remaining for this building",count (_buildingsIndex select (_buildingsIndex find _building)) - 1)]);
|
||||
_buildingsIndex set [(_buildingsIndex find _building), _building - [_pos]];
|
||||
|
||||
} else {
|
||||
private _unit = _unitsArray select 0;
|
||||
private _posSurface = surfaceIsWater _pos;
|
||||
|
||||
if (_teleport) then {
|
||||
doStop _unit;
|
||||
if (_posSurface) then {
|
||||
_unit setPosASL (AGLtoASL _pos);
|
||||
} else {
|
||||
_unit setPosATL _pos;
|
||||
};
|
||||
|
||||
} else {
|
||||
_unitMoveList pushBack [_unit,[_pos, AGLToASL _pos] select (_posSurface)];
|
||||
};
|
||||
|
||||
_placedUnits pushBack _unit;
|
||||
_unitsArray deleteAt (_unitsArray find _unit);
|
||||
_buildingsIndex set [(_buildingsIndex find _building), _building - [_pos]];
|
||||
_unit setVariable [QGVAR(garrisonned), true, true];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
TRACE_1(format [ARR_2("fnc_garrison: while loop ended | %1 units ready to be treated by PFH",count _unitMoveList)], _teleport);
|
||||
|
||||
// Update the unit list and remove duplicate positions and units
|
||||
private _garrison_unitMoveList = missionNameSpace getVariable [QGVAR(garrison_unitMoveList), []];
|
||||
|
||||
_garrison_unitMoveList = _garrison_unitMoveList select {
|
||||
_x params ["_testedUnit", "_testedPos"];
|
||||
({(_x select 0) isEqualTo _testedUnit} count _unitMoveList == 0)
|
||||
};
|
||||
|
||||
_garrison_unitMoveList append _unitMoveList;
|
||||
|
||||
missionNameSpace setVariable [QGVAR(garrison_unitMoveList), _garrison_unitMoveList, true];
|
||||
|
||||
if (_teleport) then {
|
||||
[QGVAR(AISection), [_placedUnits, ["PATH"], false], _placedUnits] call CBA_fnc_targetEvent;
|
||||
|
||||
} else {
|
||||
[_unitMoveList] call FUNC(garrisonMove);
|
||||
};
|
||||
|
||||
TRACE_1(format [ARR_3("fnc_garrison: End | %1 units left | %2 buildings left", count _unitsArray, count _buildingsIndex)], _unitsArray);
|
||||
_unitsArray
|
149
addons/ai/functions/fnc_garrisonMove.sqf
Normal file
149
addons/ai/functions/fnc_garrisonMove.sqf
Normal file
@ -0,0 +1,149 @@
|
||||
/*
|
||||
* Author: alganthe
|
||||
* Internal function used by ace_ai_fnc_garrison to make the units move to the positions it picked.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Array of arrays <ARRAY>
|
||||
* 0: Unit needing to be placed <UNIT>
|
||||
* 1: Position the unit need to be placed at <POSITION>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [ [unit1, [10, 10, 10]], [unit2, [30, 30, 30]], [unitN, getPos player] ] call ace_ai_fnc_garrisonMove
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params [ ["_unitMoveList", nil, [[]]] ];
|
||||
|
||||
if (isNil "_unitMoveList") exitWith {};
|
||||
|
||||
// Start initial movement
|
||||
private _unitMoveListUnits = (_unitMoveList apply {_x select 0});
|
||||
[QGVAR(setBehaviour), [(_unitMoveListUnits select {leader _x == _x}), "AWARE"], _unitMoveListUnits] call CBA_fnc_targetEvent;
|
||||
[QGVAR(AISection), [_unitMoveListUnits, ["FSM"], false], _unitMoveListUnits] call CBA_fnc_targetEvent;
|
||||
[QGVAR(doMove), [_unitMoveList], _unitMoveListUnits] call CBA_fnc_targetEvent;
|
||||
[QGVAR(enableAttack), [_unitMoveListUnits select {leader _x == _x}, false], _unitMoveListUnits] call CBA_fnc_targetEvent;
|
||||
|
||||
{
|
||||
_x setVariable [QGVAR(garrisonMove_failSafe), nil, true];
|
||||
_x setVariable [QGVAR(garrisonMove_unitPosMemory), nil, true];
|
||||
} foreach _unitMoveListUnits;
|
||||
|
||||
// Avoid duplicate PFHs
|
||||
if (isNil QGVAR(garrison_moveUnitPFH)) then {
|
||||
missionNameSpace setVariable [QGVAR(garrison_moveUnitPFH), true, true];
|
||||
|
||||
// PFH checking if the units have reached their destination
|
||||
[{
|
||||
params ["_args", "_pfhID"];
|
||||
|
||||
private _unitMoveList = missionNameSpace getVariable [QGVAR(garrison_unitMoveList), []];
|
||||
|
||||
// End PFH if all units are placed / unable to reach position
|
||||
if (_unitMoveList isEqualTo []) then {
|
||||
missionNameSpace setVariable [QGVAR(garrison_moveUnitPFH), nil, true];
|
||||
LOG("garrisonMove PFH: PFH finished it's job | deleting PFH");
|
||||
_pfhID call CBA_fnc_removePerFrameHandler;
|
||||
|
||||
} else {
|
||||
{
|
||||
_x params ["_unit", "_pos"];
|
||||
|
||||
// Check if unit is alive or even existing
|
||||
if (!alive _unit) then {
|
||||
_unitMoveList deleteAt (_unitMoveList find _x);
|
||||
LOG(format [ARR_2("garrisonMove PFH: unit dead or deleted | %1 units left", count _unitMoveList)]);
|
||||
|
||||
} else {
|
||||
private _unitPos = getPos _unit;
|
||||
if (surfaceisWater _unitPos) then {
|
||||
_unitPos = getPosASL _unit;
|
||||
} else {
|
||||
_unitPos = getPosATL _unit;
|
||||
};
|
||||
|
||||
if (unitReady _unit) then {
|
||||
// Check for distance, doMove and AI are moody and may stop for no reason, within 6 meters and ready should be fine
|
||||
if (_unitPos distance _pos < 3) then {
|
||||
_unit setVariable [QGVAR(garrisonMove_failSafe), nil, true];
|
||||
_unit setVariable [QGVAR(garrisonMove_unitPosMemory), nil, true];
|
||||
_unit setVariable [QGVAR(garrisonned), true, true];
|
||||
_unitMoveList deleteAt (_unitMoveList find _x);
|
||||
|
||||
[QGVAR(AISection), [[_unit], ["PATH"], false], _unit] call CBA_fnc_targetEvent;
|
||||
[QGVAR(AISection), [[_unit], ["FSM"], true], _unit] call CBA_fnc_targetEvent;
|
||||
|
||||
if ({(_x select 0) in units _unit && {!isPlayer (_x select 0)}} count _unitMoveList == 0) then {
|
||||
[QGVAR(enableAttack), [[_unit], true], _unit] call CBA_fnc_targetEvent;
|
||||
};
|
||||
|
||||
LOG(format [ARR_2("garrisonMove PFH: unit in position | %1 units left", count _unitMoveList)]);
|
||||
|
||||
} else {
|
||||
// Tell the unit to move if an order wasn't given within 30s, avoid doMove spam
|
||||
(_unit getVariable [QGVAR(garrisonMove_failSafe), [CBA_missionTime, 5]]) params ["_failSafeTimer", "_failSafeRemainingAttemps"];
|
||||
|
||||
if (_failSafeTimer <= CBA_missionTime) then {
|
||||
if (_failSafeRemainingAttemps == 0 ) then {
|
||||
_unit setVariable [QGVAR(garrisonMove_failSafe), nil, true];
|
||||
_unit setVariable [QGVAR(garrisonMove_unitPosMemory), nil, true];
|
||||
[QGVAR(unGarrison), [[_unit]], _unit] call CBA_fnc_targetEvent;
|
||||
_unitMoveList deleteAt (_unitMoveList find _x);
|
||||
LOG("garrisonMove PFH unitReady: all moving commands failed | restoring AI capabilities");
|
||||
|
||||
} else {
|
||||
_unit setVariable [QGVAR(garrisonMove_failSafe), [_failSafeTimer + 15, _failSafeRemainingAttemps - 1]];
|
||||
[QGVAR(doMove), [[[_unit, _pos]]], _unit] call CBA_fnc_targetEvent;
|
||||
LOG("garrisonMove PFH unitReady: unit not close enough | Sending another doMove command");
|
||||
};
|
||||
};
|
||||
};
|
||||
} else {
|
||||
(_unit getVariable [QGVAR(garrisonMove_unitPosMemory), [CBA_missionTime, [0,0,0]]]) params ["_unitPosTimer", "_unitOldPos"];
|
||||
|
||||
// AI may sometimes not be able to report unitReady, this is to avoid the PFH running forever
|
||||
switch true do {
|
||||
case ((_unitPosTimer + 15) < CBA_missionTime && {(_unitPos distance _pos) < 3}) : {
|
||||
TRACE_1("case 1",_unit);
|
||||
_unit setVariable [QGVAR(garrisonMove_failSafe), nil, true];
|
||||
_unit setVariable [QGVAR(garrisonMove_unitPosMemory), nil, true];
|
||||
_unit setVariable [QGVAR(garrisonned), true, true];
|
||||
_unitMoveList deleteAt (_unitMoveList find _x);
|
||||
|
||||
[QGVAR(AISection), [[_unit], ["PATH"], false], _unit] call CBA_fnc_targetEvent;
|
||||
[QGVAR(AISection), [[_unit], ["FSM"], true], _unit] call CBA_fnc_targetEvent;
|
||||
|
||||
if ({(_x select 0) in units _unit && {!isPlayer (_x select 0)}} count _unitMoveList == 0) then {
|
||||
[QGVAR(enableAttack), [[_unit], true], _unit] call CBA_fnc_targetEvent;
|
||||
};
|
||||
|
||||
LOG(format [ARR_2("garrisonMove PFH unitNotReady: unit in position | %1 units left", count _unitMoveList)]);
|
||||
};
|
||||
|
||||
case ((_unitPosTimer + 15) < CBA_missionTime && {_unitOldPos distance _unitPos < 0.5}) : {
|
||||
TRACE_3("case 2",_unit, ((_unitPosTimer + 15) < CBA_missionTime), (_unitOldPos distance _unitPos < 0.5));
|
||||
_unit setVariable [QGVAR(garrisonMove_failSafe), nil, true];
|
||||
_unit setVariable [QGVAR(garrisonMove_unitPosMemory), nil, true];
|
||||
[QGVAR(unGarrison), [[_unit]], _unit] call CBA_fnc_targetEvent;
|
||||
_unitMoveList deleteAt (_unitMoveList find _x);
|
||||
LOG("garrisonMove PFH unitNotReady: all moving commands failed | restoring AI capabilities");
|
||||
};
|
||||
|
||||
case (_unitOldPos distance _unitPos < 0.5) : {};
|
||||
|
||||
default {
|
||||
_unit setVariable [QGVAR(garrisonMove_unitPosMemory), [CBA_missionTime, _unitPos]];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
} foreach _unitMoveList;
|
||||
|
||||
missionNameSpace setVariable [QGVAR(garrison_unitMoveList), _unitMoveList, true];
|
||||
};
|
||||
}, 0.5, []] call CBA_fnc_addPerFrameHandler;
|
||||
};
|
57
addons/ai/functions/fnc_unGarrison.sqf
Normal file
57
addons/ai/functions/fnc_unGarrison.sqf
Normal file
@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Author: alganthe
|
||||
* Used to un-garrison units.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Units to un-garrison <ARRAY>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [unit1, unit2, unit3] call ace_ai_fnc_unGarrison
|
||||
*
|
||||
* Public: Yes
|
||||
*
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params [["_units", [], [[]]]];
|
||||
|
||||
_units = _units select {local _x};
|
||||
|
||||
{
|
||||
if (!isPlayer _x && {local _x}) then {
|
||||
_x enableAI "PATH";
|
||||
_x enableAI "FSM";
|
||||
|
||||
private _leader = leader _x;
|
||||
|
||||
TRACE_3("fnc_ungarrison: unit and leader",_x , _leader, (_leader == _x));
|
||||
|
||||
_x setVariable [QGVAR(garrisonned), false, true];
|
||||
|
||||
if (_leader != _x) then {
|
||||
doStop _x;
|
||||
_x doFollow _leader;
|
||||
|
||||
} else {
|
||||
_x doMove ((nearestBuilding (getPos _x)) buildingExit 0);
|
||||
};
|
||||
|
||||
private _fnc_countGarrisonnedUnits = {
|
||||
params ["_unit", "_bool"];
|
||||
if (_bool) then {
|
||||
({(_x getVariable [QGVAR(garrisonned), false]) && {!isPlayer _x}} count units _unit)
|
||||
} else {
|
||||
({!(_x getVariable [QGVAR(garrisonned), false]) && {!isPlayer _x}} count units _unit)
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
if ([_x, true] call _fnc_countGarrisonnedUnits == ({!isPlayer _x} count (units _x)) - 1 || {[_x, false] call _fnc_countGarrisonnedUnits == {!isPlayer _x} count (units _x)}) then {
|
||||
LOG("fnc_ungarrison: enableAttack true");
|
||||
(group _x) enableAttack true;
|
||||
};
|
||||
};
|
||||
} foreach _units;
|
1
addons/ai/functions/script_component.hpp
Normal file
1
addons/ai/functions/script_component.hpp
Normal file
@ -0,0 +1 @@
|
||||
#include "\z\ace\addons\ai\script_component.hpp"
|
@ -2,8 +2,8 @@
|
||||
#define COMPONENT_BEAUTIFIED AI
|
||||
#include "\z\ace\addons\main\script_mod.hpp"
|
||||
|
||||
// #define DEBUG_MODE_FULL
|
||||
// #define DISABLE_COMPILE_CACHE
|
||||
//#define DEBUG_MODE_FULL
|
||||
//#define DISABLE_COMPILE_CACHE
|
||||
// #define ENABLE_PERFORMANCE_COUNTERS
|
||||
|
||||
#ifdef DEBUG_ENABLED_AI
|
||||
|
41
addons/ai/stringtable.xml
Normal file
41
addons/ai/stringtable.xml
Normal file
@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project name="ACE">
|
||||
<Package name="ai">
|
||||
<Key ID="STR_ACE_ai_GarrisonInvalidPosition">
|
||||
<English>Invalid position provided.</English>
|
||||
<French>Position invalide fourni</French>
|
||||
<Japanese>位置が無効です。</Japanese>
|
||||
<Italian>Posizione invalida fornita.</Italian>
|
||||
<Chinese>提供的位置無效。</Chinese>
|
||||
<Chinesesimp>提供的位置无效。</Chinesesimp>
|
||||
<Korean>위치가 잘못되었습니다.</Korean>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_ai_GarrisonNoUnits">
|
||||
<English>No units provided.</English>
|
||||
<French>Aucune unité fourni</French>
|
||||
<Japanese>ユニットがありません。</Japanese>
|
||||
<Italian>Nessuna unità fornita.</Italian>
|
||||
<Chinese>找不到可用的單位。</Chinese>
|
||||
<Chinesesimp>找不到可用的单位。</Chinesesimp>
|
||||
<Korean>병력이 없습니다.</Korean>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_ai_GarrisonNotEnoughPos">
|
||||
<English>There aren't enough positions to place all units.</English>
|
||||
<French>Il n'y a pas assez de positions pour placer toutes les unités</French>
|
||||
<Japanese>全ユニットを置くために十分な位置がありません。</Japanese>
|
||||
<Italian>Non ci sono abbastanza posizioni per piazzare tutte le unità.</Italian>
|
||||
<Chinese>沒有足夠的位置能擺放所有單位。</Chinese>
|
||||
<Chinesesimp>没有足够的位置能摆放所有单位。</Chinesesimp>
|
||||
<Korean>모든 병력을 배치 할 공간이 없습니다.</Korean>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_ai_GarrisonNoBuilding">
|
||||
<English>No building found.</English>
|
||||
<French>Aucun bâtiment trouvé</French>
|
||||
<Japanese>建物がありません。</Japanese>
|
||||
<Italian>Nessun edificio trovato.</Italian>
|
||||
<Chinese>沒找到建築物。</Chinese>
|
||||
<Chinesesimp>没找到建筑物。</Chinesesimp>
|
||||
<Korean>건물이 없습니다.</Korean>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
17
addons/aircraft/CfgEventHandlers.hpp
Normal file
17
addons/aircraft/CfgEventHandlers.hpp
Normal file
@ -0,0 +1,17 @@
|
||||
class Extended_PreStart_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_preStart));
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_PreInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_preInit));
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_PostInit_EventHandlers {
|
||||
class ADDON {
|
||||
clientInit = QUOTE(call COMPILE_FILE(XEH_postInitClient));
|
||||
};
|
||||
};
|
@ -37,11 +37,9 @@ class CfgVehicles {
|
||||
|
||||
class Heli_Light_01_base_F: Helicopter_Base_H {
|
||||
incomingMissileDetectionSystem = 16; // Vanilla: 0
|
||||
driverCanEject = 1;
|
||||
|
||||
class Turrets: Turrets {
|
||||
class CopilotTurret: CopilotTurret {
|
||||
canEject = 1;
|
||||
showHMD = 1;
|
||||
};
|
||||
};
|
||||
@ -49,22 +47,13 @@ class CfgVehicles {
|
||||
|
||||
class Heli_Light_01_armed_base_F: Heli_Light_01_base_F {
|
||||
incomingMissileDetectionSystem = 16; // Vanilla: 0
|
||||
driverCanEject = 1;
|
||||
|
||||
class Turrets: Turrets {
|
||||
class CopilotTurret: CopilotTurret {
|
||||
canEject = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
class Heli_Light_02_base_F: Helicopter_Base_H {
|
||||
driverCanEject = 1;
|
||||
incomingMissileDetectionSystem = 16; // Vanilla: 24
|
||||
magazines[] = {"2000Rnd_762x51_Belt_T_Green", "12Rnd_PG_missiles", "168Rnd_CMFlare_Chaff_Magazine"}; // Switch gun magazine to 7.62mm from 6.5mm
|
||||
|
||||
class Turrets: Turrets {
|
||||
class CopilotTurret: CopilotTurret {
|
||||
canEject = 1;
|
||||
showHMD = 1;
|
||||
};
|
||||
};
|
||||
@ -80,44 +69,31 @@ class CfgVehicles {
|
||||
|
||||
class Heli_Attack_02_base_F: Helicopter_Base_F {
|
||||
incomingMissileDetectionSystem = 16; // Vanilla: 24
|
||||
driverCanEject = 1;
|
||||
|
||||
class Turrets: Turrets {
|
||||
class MainTurret: MainTurret {
|
||||
canEject = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Heli_Transport_01_base_F: Helicopter_Base_H {
|
||||
incomingMissileDetectionSystem = 16; // Vanilla: 24
|
||||
driverCanEject = 1;
|
||||
|
||||
class Turrets: Turrets {
|
||||
class CopilotTurret: CopilotTurret {
|
||||
canEject = 1;
|
||||
showHMD = 1;
|
||||
};
|
||||
|
||||
class MainTurret: MainTurret {
|
||||
magazines[] = {"2000Rnd_762x51_Belt_T_Red"}; // Switch gun magazine to 7.62mm from 6.5mm
|
||||
canEject = 1;
|
||||
};
|
||||
|
||||
class RightDoorGun: MainTurret {
|
||||
magazines[] = {"2000Rnd_762x51_Belt_T_Red"}; // Switch gun magazine to 7.62mm from 6.5mm
|
||||
canEject = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Heli_Transport_02_base_F: Helicopter_Base_H {
|
||||
incomingMissileDetectionSystem = 16; // Vanilla: 24
|
||||
driverCanEject = 1;
|
||||
|
||||
class Turrets: Turrets {
|
||||
class CopilotTurret: CopilotTurret {
|
||||
canEject = 1;
|
||||
showHMD = 1;
|
||||
};
|
||||
};
|
||||
@ -126,11 +102,9 @@ class CfgVehicles {
|
||||
class Heli_light_03_base_F: Helicopter_Base_F {
|
||||
lockDetectionSystem = 0; // Vanilla: 12
|
||||
incomingMissileDetectionSystem = 16; // Vanilla: 24
|
||||
driverCanEject = 1;
|
||||
|
||||
class Turrets: Turrets {
|
||||
class MainTurret: MainTurret {
|
||||
canEject = 1;
|
||||
showHMD = 1;
|
||||
weapons[] = {"Laserdesignator_mounted"}; // Add Laser Designator
|
||||
magazines[] = {"Laserbatteries"};
|
||||
@ -166,26 +140,8 @@ class CfgVehicles {
|
||||
|
||||
class Heli_Transport_03_base_F: Helicopter_Base_H {
|
||||
incomingMissileDetectionSystem = 16; // Vanilla: 24
|
||||
driverCanEject = 1;
|
||||
|
||||
class Turrets: Turrets {
|
||||
class CopilotTurret: CopilotTurret {
|
||||
canEject = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
class Heli_Transport_04_base_F: Helicopter_Base_H {
|
||||
incomingMissileDetectionSystem = 16; // Vanilla: 24
|
||||
driverCanEject = 1;
|
||||
|
||||
class Turrets: Turrets {
|
||||
class CopilotTurret: CopilotTurret {
|
||||
canEject = 1;
|
||||
};
|
||||
|
||||
class LoadmasterTurret: MainTurret {
|
||||
canEject = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -105,10 +105,5 @@ class CfgWeapons {
|
||||
dispersion = 0.0064; //0.0023;
|
||||
multiplier = 1;
|
||||
};
|
||||
|
||||
class close: HighROF {};
|
||||
class short: close {};
|
||||
class medium: LowROF {};
|
||||
class far: medium {};
|
||||
};
|
||||
};
|
||||
|
@ -1,6 +1,5 @@
|
||||
class Heli_Attack_01_base_F: Helicopter_Base_F {
|
||||
incomingMissileDetectionSystem = 16; // Vanilla: 24
|
||||
driverCanEject = 1;
|
||||
|
||||
class Turrets: Turrets {
|
||||
class MainTurret: MainTurret {
|
||||
|
2
addons/aircraft/XEH_PREP.hpp
Normal file
2
addons/aircraft/XEH_PREP.hpp
Normal file
@ -0,0 +1,2 @@
|
||||
PREP(initEjectAction);
|
||||
PREP(canShowEject);
|
29
addons/aircraft/XEH_postInitClient.sqf
Normal file
29
addons/aircraft/XEH_postInitClient.sqf
Normal file
@ -0,0 +1,29 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
private _cfgAction = configFile >> "CfgActions" >> "Eject";
|
||||
GVAR(ejectActionParams) = [
|
||||
[
|
||||
"", // will be set with setUserActionText
|
||||
{
|
||||
params ["_vehicle", "_unit"];
|
||||
private _preserveEngineOn = (_unit == driver _vehicle) && {isEngineOn _vehicle};
|
||||
moveOut _unit;
|
||||
if (_preserveEngineOn) then {
|
||||
// vehicle is local to last driver, no need to care
|
||||
_vehicle engineOn true;
|
||||
};
|
||||
},
|
||||
nil,
|
||||
getNumber (_cfgAction >> "priority"),
|
||||
false,
|
||||
true,
|
||||
getText (_cfgAction >> "shortcut"),
|
||||
'[_this, _target] call DFUNC(canShowEject)'
|
||||
],
|
||||
getText (_cfgAction >> "text"),
|
||||
getText (_cfgAction >> "textDefault")
|
||||
];
|
||||
|
||||
["Helicopter", "initPost", LINKFUNC(initEjectAction)] call CBA_fnc_addClassEventHandler;
|
9
addons/aircraft/XEH_preInit.sqf
Normal file
9
addons/aircraft/XEH_preInit.sqf
Normal file
@ -0,0 +1,9 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
ADDON = false;
|
||||
|
||||
PREP_RECOMPILE_START;
|
||||
#include "XEH_PREP.hpp"
|
||||
PREP_RECOMPILE_END;
|
||||
|
||||
ADDON = true;
|
3
addons/aircraft/XEH_preStart.sqf
Normal file
3
addons/aircraft/XEH_preStart.sqf
Normal file
@ -0,0 +1,3 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
#include "XEH_PREP.hpp"
|
@ -18,6 +18,7 @@ class CfgPatches {
|
||||
};
|
||||
|
||||
#include "CfgAmmo.hpp"
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgMagazines.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
#include "CfgWeapons.hpp"
|
||||
|
34
addons/aircraft/functions/fnc_canShowEject.sqf
Normal file
34
addons/aircraft/functions/fnc_canShowEject.sqf
Normal file
@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Author: Dystopian
|
||||
* Check if Eject action can be shown.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit who calls action <OBJECT>
|
||||
* 1: Vehicle which action is attached to <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Can show <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [player, vehicle player] call ace_aircraft_fnc_canShowEject
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
#define FULLCREW_UNIT 0
|
||||
#define FULLCREW_ROLE 1
|
||||
#define FULLCREW_TURRETPATH 3
|
||||
|
||||
params ["_unit", "_vehicle"];
|
||||
|
||||
_vehicle == vehicle _unit
|
||||
&& {
|
||||
private _ejectVarName = "";
|
||||
{
|
||||
if (_unit == _x select FULLCREW_UNIT) exitWith {
|
||||
_ejectVarName = format [QGVAR(ejectAction_%1_%2), _x select FULLCREW_ROLE, _x select FULLCREW_TURRETPATH];
|
||||
};
|
||||
} count fullCrew _vehicle;
|
||||
_vehicle getVariable [_ejectVarName, false]
|
||||
}
|
48
addons/aircraft/functions/fnc_initEjectAction.sqf
Normal file
48
addons/aircraft/functions/fnc_initEjectAction.sqf
Normal file
@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Author: Dystopian
|
||||
* Add Eject action to vehicle if needed.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Vehicle <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [cursorObject] call ace_aircraft_fnc_initEjectAction
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_vehicle"];
|
||||
|
||||
if (unitIsUAV _vehicle) exitWith {};
|
||||
|
||||
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
|
||||
private _addAction = false;
|
||||
|
||||
if (0 == getNumber (_config >> "driverCanEject")) then {
|
||||
TRACE_2("eject action",typeOf _vehicle,"driver");
|
||||
_vehicle setVariable [QGVAR(ejectAction_driver_[]), true];
|
||||
_addAction = true;
|
||||
};
|
||||
|
||||
{
|
||||
{
|
||||
_x params ["", "_role", "", "_turretPath"];
|
||||
if (0 == getNumber (([_config, _turretPath] call CBA_fnc_getTurret) >> "canEject")) then {
|
||||
TRACE_2("eject action",typeOf _vehicle,_turretPath);
|
||||
_vehicle setVariable [format [QGVAR(ejectAction_%1_%2), _role, _turretPath], true];
|
||||
_addAction = true;
|
||||
};
|
||||
} forEach fullCrew [_vehicle, _x, true];
|
||||
} forEach ["gunner", "commander", "turret"];
|
||||
|
||||
if (!_addAction) exitWith {};
|
||||
|
||||
GVAR(ejectActionParams) params ["_params", "_text", "_picture"];
|
||||
private _actionID = _vehicle addAction _params;
|
||||
_vehicle setUserActionText [_actionID, _text, "", _picture];
|
||||
_vehicle setVariable [QGVAR(ejectAction), _actionID];
|
1
addons/aircraft/functions/script_component.hpp
Normal file
1
addons/aircraft/functions/script_component.hpp
Normal file
@ -0,0 +1 @@
|
||||
#include "\z\ace\addons\aircraft\script_component.hpp"
|
@ -1 +0,0 @@
|
||||
#include "\z\ace\addons\apl\script_component.hpp"
|
@ -1,7 +1,7 @@
|
||||
|
||||
class CfgWeapons {
|
||||
class ACE_ItemCore;
|
||||
class InventoryItem_Base_F;
|
||||
class CBA_MiscItem_ItemInfo;
|
||||
|
||||
class ACE_ATragMX: ACE_ItemCore {
|
||||
author = "Ruthberg";
|
||||
@ -13,7 +13,7 @@ class CfgWeapons {
|
||||
icon = "iconObject_circle";
|
||||
mapSize = 0.034;
|
||||
|
||||
class ItemInfo: InventoryItem_Base_F {
|
||||
class ItemInfo: CBA_MiscItem_ItemInfo {
|
||||
mass = 2;
|
||||
};
|
||||
};
|
||||
|
@ -52,7 +52,6 @@ class ATragMX_RscButton {
|
||||
shadow=0;
|
||||
};
|
||||
class ATragMX_RscEdit {
|
||||
access=0;
|
||||
type=2;
|
||||
style=ST_RIGHT;
|
||||
x=0;
|
||||
|
@ -27,6 +27,7 @@ PREP(init);
|
||||
PREP(initGunList);
|
||||
PREP(insert_c1_ballistic_coefficient_data);
|
||||
PREP(insert_muzzle_velocity_data);
|
||||
PREP(lookup_c1_ballistic_coefficient);
|
||||
PREP(parse_input);
|
||||
PREP(read_gun_list_entries_from_config);
|
||||
PREP(recalculate_c1_ballistic_coefficient);
|
||||
|
@ -29,7 +29,8 @@ private _distance = 0;
|
||||
while {_velocity > _thresholdVelocity} do {
|
||||
private _bc = GVAR(targetSolutionInput) select 14;
|
||||
private _dragModel = GVAR(targetSolutionInput) select 15;
|
||||
private _drag = parseNumber(("ace_advanced_ballistics" callExtension format["retard:%1:%2:%3", _dragModel, _bc, _velocity]));
|
||||
private _temperature = GVAR(targetSolutionInput) select 5;
|
||||
private _drag = parseNumber(("ace_advanced_ballistics" callExtension format["retard:%1:%2:%3:%4", _dragModel, _bc, _velocity, _temperature]));
|
||||
_distance = _distance + _velocity * __DELTA_T;
|
||||
_velocity = _velocity - (_drag * __DELTA_T);
|
||||
};
|
||||
|
@ -27,4 +27,9 @@ _solutionInput set [ 8, round(_solutionInput select 4)];
|
||||
_solutionInput set [13, _targetRange];
|
||||
_solutionInput set [17, true];
|
||||
|
||||
if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then {
|
||||
private _c1 = [_targetRange] call FUNC(lookup_c1_ballistic_coefficient);
|
||||
_solutionInput set [14, _c1];
|
||||
};
|
||||
|
||||
private _result = _solutionInput call FUNC(calculate_solution);
|
||||
|
@ -51,37 +51,34 @@ params [
|
||||
];
|
||||
_windSpeed params ["_windSpeed1", "_windSpeed2"];
|
||||
|
||||
private ["_tx", "_tz", "_lastBulletPos", "_bulletPos", "_bulletVelocity", "_bulletAccel", "_bulletSpeed", "_gravity", "_deltaT"];
|
||||
_tx = 0;
|
||||
_tz = 0;
|
||||
_lastBulletPos = [0, 0, 0];
|
||||
_bulletPos = [0, 0, 0];
|
||||
_bulletVelocity = [0, 0, 0];
|
||||
_bulletAccel = [0, 0, 0];
|
||||
_bulletSpeed = 0;
|
||||
_gravity = [0, sin(_scopeBaseAngle + _inclinationAngle) * -9.80665, cos(_scopeBaseAngle + _inclinationAngle) * -9.80665];
|
||||
_deltaT = 1 / _simSteps;
|
||||
private _tx = 0;
|
||||
private _tz = 0;
|
||||
private _lastBulletPos = [0, 0, 0];
|
||||
private _bulletPos = [0, 0, 0];
|
||||
private _bulletVelocity = [0, 0, 0];
|
||||
private _bulletAccel = [0, 0, 0];
|
||||
private _bulletSpeed = 0;
|
||||
private _gravity = [0, sin(_scopeBaseAngle + _inclinationAngle) * -GRAVITY, cos(_scopeBaseAngle + _inclinationAngle) * -GRAVITY];
|
||||
private _deltaT = 1 / _simSteps;
|
||||
|
||||
private ["_elevation", "_windage1", "_windage2", "_lead", "_TOF", "_trueVelocity", "_trueSpeed", "_kineticEnergy", "_verticalCoriolis", "_verticalDeflection", "_horizontalCoriolis", "_horizontalDeflection", "_spinDrift", "_spinDeflection"];
|
||||
_elevation = 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 _elevation = 0;
|
||||
private _windage1 = 0;
|
||||
private _windage2 = 0;
|
||||
private _lead = 0;
|
||||
private _TOF = 0;
|
||||
private _trueVelocity = [0, 0, 0];
|
||||
private _trueSpeed = 0;
|
||||
private _verticalCoriolis = 0;
|
||||
private _verticalDeflection = 0;
|
||||
private _horizontalCoriolis = 0;
|
||||
private _horizontalDeflection = 0;
|
||||
private _spinDrift = 0;
|
||||
private _spinDeflection = 0;
|
||||
|
||||
private ["_n", "_range", "_trueRange", "_rangeFactor"];
|
||||
_n = 0;
|
||||
_range = 0;
|
||||
_trueRange = 0;
|
||||
_rangeFactor = 1;
|
||||
private _n = 0;
|
||||
private _range = 0;
|
||||
private _trueRange = 0;
|
||||
private _rangeFactor = 1;
|
||||
if (_storeRangeCardData) then {
|
||||
if (GVAR(currentUnit) == 1) then {
|
||||
_rangeFactor = 1.0936133;
|
||||
@ -89,18 +86,16 @@ if (_storeRangeCardData) then {
|
||||
GVAR(rangeCardData) = [];
|
||||
};
|
||||
|
||||
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;
|
||||
private _wind1 = [cos(270 - _windDirection * 30) * _windSpeed1, sin(270 - _windDirection * 30) * _windSpeed1, 0];
|
||||
private _wind2 = [cos(270 - _windDirection * 30) * _windSpeed2, sin(270 - _windDirection * 30) * _windSpeed2, 0];
|
||||
private _windDrift = 0;
|
||||
if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then {
|
||||
_bc = parseNumber(("ace_advanced_ballistics" callExtension format["atmosphericCorrection:%1:%2:%3:%4:%5", _bc, _temperature, _barometricPressure, _relativeHumidity, _atmosphereModel]));
|
||||
};
|
||||
|
||||
private ["_eoetvoesMultiplier"];
|
||||
_eoetvoesMultiplier = 0;
|
||||
private _eoetvoesMultiplier = 0;
|
||||
if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then {
|
||||
_eoetvoesMultiplier = 2 * (0.0000729 * _muzzleVelocity / -9.80665) * cos(_latitude) * sin(_directionOfFire);
|
||||
_eoetvoesMultiplier = 2 * (0.0000729 * _muzzleVelocity / -GRAVITY) * cos(_latitude) * sin(_directionOfFire);
|
||||
};
|
||||
|
||||
_bulletPos set [0, 0];
|
||||
@ -118,7 +113,7 @@ while {_TOF < 15 && (_bulletPos select 1) < _targetRange} do {
|
||||
_trueSpeed = vectorMagnitude _trueVelocity;
|
||||
|
||||
if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then {
|
||||
private _drag = parseNumber(("ace_advanced_ballistics" callExtension format["retard:%1:%2:%3", _dragModel, _bc, _trueSpeed]));
|
||||
private _drag = parseNumber(("ace_advanced_ballistics" callExtension format["retard:%1:%2:%3:%4", _dragModel, _bc, _trueSpeed, _temperature]));
|
||||
_bulletAccel = (vectorNormalized _trueVelocity) vectorMultiply (-1 * _drag);
|
||||
} else {
|
||||
_bulletAccel = _trueVelocity vectorMultiply (_trueSpeed * _airFriction);
|
||||
@ -144,7 +139,7 @@ while {_TOF < 15 && (_bulletPos select 1) < _targetRange} do {
|
||||
_windage1 = - atan(_tx / _trueRange);
|
||||
_windDrift = (_wind2 select 0) * (_TOF - _trueRange / _muzzleVelocity);
|
||||
_windage2 = - atan(_windDrift / _trueRange);
|
||||
_lead = (_targetSpeed * _TOF) / (Tan(3.38 / 60) * _trueRange);
|
||||
_lead = (_targetSpeed * _TOF) / (Tan(MRAD_TO_DEG(1)) * _trueRange);
|
||||
};
|
||||
_kineticEnergy = 0.5 * (_bulletMass / 1000 * (_bulletSpeed ^ 2));
|
||||
_kineticEnergy = _kineticEnergy * 0.737562149;
|
||||
@ -179,7 +174,7 @@ if (_targetRange != 0) then {
|
||||
_windage1 = - atan(_tx / _targetRange);
|
||||
_windDrift = (_wind2 select 0) * (_TOF - _targetRange / _muzzleVelocity);
|
||||
_windage2 = - atan(_windDrift / _targetRange);
|
||||
_lead = (_targetSpeed * _TOF) / (Tan(3.38 / 60) * _targetRange);
|
||||
_lead = (_targetSpeed * _TOF) / (Tan(MRAD_TO_DEG(1)) * _targetRange);
|
||||
};
|
||||
|
||||
_kineticEnergy = 0.5 * (_bulletMass / 1000 * (_bulletSpeed ^ 2));
|
||||
|
@ -17,21 +17,19 @@
|
||||
|
||||
[] call FUNC(parse_input);
|
||||
|
||||
private ["_scopeBaseAngle"];
|
||||
_scopeBaseAngle = (GVAR(workingMemory) select 3);
|
||||
private _scopeBaseAngle = (GVAR(workingMemory) select 3);
|
||||
|
||||
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 _bulletMass = GVAR(workingMemory) select 12;
|
||||
private _bulletDiameter = GVAR(workingMemory) select 13;
|
||||
private _boreHeight = GVAR(workingMemory) select 5;
|
||||
private _airFriction = GVAR(workingMemory) select 4;
|
||||
private _barrelTwist = GVAR(workingMemory) select 14;
|
||||
private _muzzleVelocity = GVAR(workingMemory) select 1;
|
||||
private _bc = GVAR(workingMemory) select 15;
|
||||
private _dragModel = GVAR(workingMemory) select 16;
|
||||
private _atmosphereModel = GVAR(workingMemory) select 17;
|
||||
|
||||
_twistDirection = 0;
|
||||
private _twistDirection = 0;
|
||||
if (_barrelTwist > 0) then {
|
||||
_twistDirection = 1;
|
||||
} else {
|
||||
@ -41,34 +39,31 @@ if (_barrelTwist > 0) then {
|
||||
};
|
||||
_barrelTwist = abs(_barrelTwist);
|
||||
|
||||
private ["_altitude", "_temperature", "_barometricPressure", "_relativeHumidity"];
|
||||
_altitude = GVAR(altitude);
|
||||
_temperature = GVAR(temperature);
|
||||
_barometricPressure = GVAR(barometricPressure);
|
||||
_relativeHumidity = GVAR(relativeHumidity);
|
||||
private _altitude = GVAR(altitude);
|
||||
private _temperature = GVAR(temperature);
|
||||
private _barometricPressure = GVAR(barometricPressure);
|
||||
private _relativeHumidity = GVAR(relativeHumidity);
|
||||
if (!GVAR(atmosphereModeTBH)) then {
|
||||
_barometricPressure = 1013.25 * (1 - (0.0065 * _altitude) / (273.15 + _temperature + 0.0065 * _altitude)) ^ 5.255754495;
|
||||
_relativeHumidity = 50;
|
||||
_relativeHumidity = 0.5;
|
||||
};
|
||||
|
||||
private ["_bulletLength", "_stabilityFactor"];
|
||||
_bulletLength = 50 * _bulletMass / ((_bulletDiameter/2)^2);
|
||||
_stabilityFactor = 1.5;
|
||||
private _bulletLength = 50 * _bulletMass / ((_bulletDiameter/2)^2);
|
||||
private _stabilityFactor = 1.5;
|
||||
if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then {
|
||||
if (_bulletDiameter > 0 && _bulletLength > 0 && _bulletMass > 0 && _barrelTwist > 0) then {
|
||||
_stabilityFactor = [_bulletDiameter, _bulletLength, _bulletMass, _barrelTwist * 10, _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 _latitude = GVAR(latitude) select GVAR(currentTarget);
|
||||
private _directionOfFire = GVAR(directionOfFire) select GVAR(currentTarget);
|
||||
private _windSpeed1 = GVAR(windSpeed1) select GVAR(currentTarget);
|
||||
private _windSpeed2 = GVAR(windSpeed2) select GVAR(currentTarget);
|
||||
private _windDirection = GVAR(windDirection) select GVAR(currentTarget);
|
||||
private _inclinationAngle = GVAR(inclinationAngle) select GVAR(currentTarget);
|
||||
private _targetSpeed = GVAR(targetSpeed) select GVAR(currentTarget);
|
||||
private _targetRange = GVAR(targetRange) select GVAR(currentTarget);
|
||||
|
||||
GVAR(targetSolutionInput) = [_scopeBaseAngle, _bulletMass, _boreHeight, _airFriction, _muzzleVelocity, _temperature, _barometricPressure, _relativeHumidity, round(_muzzleVelocity),
|
||||
[_windSpeed1, _windSpeed2], _windDirection, _inclinationAngle, _targetSpeed, _targetRange, _bc, _dragModel, _atmosphereModel, false, _stabilityFactor, _twistDirection, _latitude, _directionOfFire];
|
||||
|
@ -15,12 +15,10 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_targetRange", "_numTicks", "_timeSecs", "_estSpeed"];
|
||||
|
||||
_targetRange = parseNumber(ctrlText 8004);
|
||||
_numTicks = parseNumber(ctrlText 8005);
|
||||
_timeSecs = parseNumber(ctrlText 8006);
|
||||
_estSpeed = 0;
|
||||
private _targetRange = parseNumber(ctrlText 8004);
|
||||
private _numTicks = parseNumber(ctrlText 8005);
|
||||
private _timeSecs = parseNumber(ctrlText 8006);
|
||||
private _estSpeed = 0;
|
||||
|
||||
if (GVAR(currentUnit) == 1) then {
|
||||
_targetRange = _targetRange / 1.0936133;
|
||||
|
@ -46,8 +46,8 @@ if (_parseInput) then {
|
||||
};
|
||||
switch (_dropUnit) do {
|
||||
case 0: {
|
||||
_transonicDrop = _transonicDrop * 3.38;
|
||||
_subsonicDrop = _subsonicDrop * 3.38;
|
||||
_transonicDrop = MRAD_TO_MOA(_transonicDrop);
|
||||
_subsonicDrop = MRAD_TO_MOA(_subsonicDrop);
|
||||
};
|
||||
case 2: {
|
||||
_transonicDrop = _transonicDrop / 1.047;
|
||||
|
@ -15,10 +15,9 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private _target = 0 max _this min 3;
|
||||
GVAR(currentTarget) = 0 max _this min 3;
|
||||
|
||||
[] call FUNC(parse_input);
|
||||
GVAR(targetRangeDirtyFlag) = true;
|
||||
|
||||
GVAR(currentTarget) = _target;
|
||||
call FUNC(update_target_selection);
|
||||
call FUNC(calculate_target_solution);
|
||||
|
@ -51,7 +51,7 @@ GVAR(atmosphereModeTBH) = true;
|
||||
GVAR(altitude) = 0;
|
||||
GVAR(temperature) = 15;
|
||||
GVAR(barometricPressure) = 1013.25;
|
||||
GVAR(relativeHumidity) = 0.5;
|
||||
GVAR(relativeHumidity) = 0.0;
|
||||
|
||||
GVAR(latitude) = [38, 38, 38, 38];
|
||||
GVAR(directionOfFire) = [0, 0, 0, 0];
|
||||
@ -84,6 +84,8 @@ GVAR(truingDropMuzzleVelocity) = 0;
|
||||
|
||||
GVAR(targetSolutionInput) = nil;
|
||||
|
||||
GVAR(targetRangeDirtyFlag) = false;
|
||||
|
||||
GVAR(showMainPage) = true;
|
||||
GVAR(showAddNewGun) = false;
|
||||
GVAR(showAtmoEnvData) = false;
|
||||
|
@ -32,51 +32,51 @@ if ((profileNamespace getVariable ["ACE_ATragMX_profileNamespaceVersion", 0]) ==
|
||||
if (_resetGunList) then {
|
||||
WARNING("Reseting Profile Gunlist");
|
||||
// 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, Muzzle Velocity vs. Temperature Interpolation, C1 Ballistic Coefficient vs. Distance Interpolation, Persistent
|
||||
GVAR(gunList) = [["12.7x108mm" , 812, 100, 0.0666557, -0.00063800, 3.81, 0, 2, 10, 120, 0, 0, 48.28, 12.7, 38.10, 0.630, 1, "ASM" , [[-15,793],[0,800],[10,807],[15,812],[25,826],[30,835],[35,846]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
GVAR(gunList) = [["12.7x108mm" , 812, 100, 0.0958029, -0.00063800, 8.89, 0, 2, 10, 120, 0, 0, 48.28, 12.7, 38.10, 0.630, 1, "ASM" , [[-15,793],[0,800],[10,807],[15,812],[25,826],[30,835],[35,846]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
|
||||
["12.7x99mm AMAX" , 852, 100, 0.0615965, -0.00036645, 3.81, 0, 2, 10, 120, 0, 0, 48.60, 12.7, 38.10, 1.050, 1, "ASM" , [[-15,833],[0,840],[10,847],[15,852],[25,866],[30,875],[35,886]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["12.7x99mm" , 892, 100, 0.0588284, -0.00057503, 3.81, 0, 2, 10, 120, 0, 0, 41.92, 12.7, 38.10, 0.670, 1, "ASM" , [[-15,873],[0,880],[10,887],[15,892],[25,906],[30,915],[35,926]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["12.7x99mm AMAX" , 852, 100, 0.0907214, -0.00037397, 8.89, 0, 2, 10, 120, 0, 0, 48.60, 12.7, 38.10, 1.050, 1, "ASM" , [[-15,833],[0,840],[10,847],[15,852],[25,866],[30,875],[35,886]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["12.7x99mm" , 892, 100, 0.0879633, -0.00058679, 8.89, 0, 2, 10, 120, 0, 0, 41.92, 12.7, 38.10, 0.670, 1, "ASM" , [[-15,873],[0,880],[10,887],[15,892],[25,906],[30,915],[35,926]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
|
||||
["12.7x54mm" , 299, 100, 0.3406920, -0.00019268, 3.81, 0, 2, 10, 120, 0, 0, 48.60, 12.7, 24.13, 1.050, 1, "ASM" , [[-15,297],[0,298],[10,299],[15,299],[25,301],[30,302],[35,303]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["12.7x54mm" , 299, 100, 0.3567550, -0.00019568, 6.60, 0, 2, 10, 120, 0, 0, 48.60, 12.7, 24.13, 1.050, 1, "ASM" , [[-15,297],[0,298],[10,299],[15,299],[25,301],[30,302],[35,303]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
|
||||
[".50 Beowulf" , 562, 100, 0.1262000, -0.00202645, 3.81, 0, 2, 10, 120, 0, 0, 21.71, 12.7, 50.80, 0.210, 1, "ASM" , [[-15,560],[0,561],[10,562],[15,562],[25,564],[30,565],[35,566]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
[".50 Beowulf" , 562, 100, 0.1425100, -0.00205896, 6.60, 0, 2, 10, 120, 0, 0, 21.71, 12.7, 50.80, 0.210, 1, "ASM" , [[-15,560],[0,561],[10,562],[15,562],[25,564],[30,565],[35,566]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
|
||||
[".408 CheyTac 305gr", 1059, 100, 0.0482146, -0.00063655, 3.81, 0, 2, 10, 120, 0, 0, 19.76, 10.4, 33.02, 0.569, 1, "ICAO", [[-15,1040],[0,1047],[10,1054],[15,1059],[25,1073],[30,1082],[35,1093]], [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
[".408 CheyTac 419gr", 859, 100, 0.0611842, -0.00044958, 3.81, 0, 2, 10, 120, 0, 0, 27.15, 10.4, 33.02, 0.866, 1, "ICAO", [[-15,840],[0,847],[10,854],[15,859],[25,873],[30,882],[35,893]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
[".408 CheyTac 305gr", 1059, 100, 0.0686329, -0.00065414, 7.37, 0, 2, 10, 120, 0, 0, 19.76, 10.4, 33.02, 0.569, 1, "ICAO", [[-15,1040],[0,1047],[10,1054],[15,1059],[25,1073],[30,1082],[35,1093]], [[0, 0.605], [1110, 0.569], [1500, 0.560], [1790, 0.551], [1990, 0.547], [2140, 0.545], [2300, 0.544]], true],
|
||||
[".408 CheyTac 419gr", 859, 100, 0.0816039, -0.00046249, 7.37, 0, 2, 10, 120, 0, 0, 27.15, 10.4, 33.02, 0.866, 1, "ICAO", [[-15,840],[0,847],[10,854],[15,859],[25,873],[30,882],[35,893]] , [[0, 0.872], [1440, 0.862], [1630, 0.859], [1870, 0.852], [2090, 0.843], [2230, 0.838], [2420, 0.833]], true],
|
||||
|
||||
["9.3×64mm" , 862, 100, 0.0627652, -0.00108571, 3.81, 0, 2, 10, 120, 0, 0, 14.90, 9.30, 35.56, 0.368, 1, "ASM" , [[-15,843],[0,850],[10,857],[15,862],[25,876],[30,885],[35,896]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["9.3×64mm" , 862, 100, 0.0875873, -0.00110727, 8.13, 0, 2, 10, 120, 0, 0, 14.90, 9.30, 35.56, 0.368, 1, "ASM" , [[-15,843],[0,850],[10,857],[15,862],[25,876],[30,885],[35,896]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
|
||||
[".338LM 250gr" , 872, 100, 0.0604821, -0.00059133, 3.81, 0, 2, 10, 120, 0, 0, 16.20, 8.58, 25.40, 0.645, 1, "ICAO", [[-15,853],[0,860],[10,867],[15,872],[25,886],[30,895],[35,906]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
[".338LM 300gr" , 792, 100, 0.0685883, -0.00052190, 3.81, 0, 2, 10, 120, 0, 0, 19.44, 8.58, 25.40, 0.759, 1, "ICAO", [[-15,773],[0,780],[10,787],[15,792],[25,806],[30,815],[35,826]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
[".338LM API526" , 872, 100, 0.0602535, -0.00069611, 3.81, 0, 2, 10, 120, 0, 0, 16.39, 8.58, 25.40, 0.580, 1, "ICAO", [[-15,853],[0,860],[10,867],[15,872],[25,886],[30,895],[35,906]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
[".338LM 250gr" , 872, 100, 0.0809096, -0.00060841, 7.37, 0, 2, 10, 120, 0, 0, 16.20, 8.58, 25.40, 0.645, 1, "ICAO", [[-15,853],[0,860],[10,867],[15,872],[25,886],[30,895],[35,906]] , [[0, 0.656], [1300, 0.64], [1460, 0.636], [1770, 0.625], [1920, 0.621], [2030, 0.619], [2190, 0.618]], true],
|
||||
[".338LM 300gr" , 792, 100, 0.0890193, -0.00055706, 7.37, 0, 2, 10, 120, 0, 0, 19.44, 8.58, 25.40, 0.759, 1, "ICAO", [[-15,773],[0,780],[10,787],[15,792],[25,806],[30,815],[35,826]] , [[0, 0.734], [1300, 0.726], [1500, 0.720], [1770, 0.708], [1880, 0.705], [2000, 0.702], [2110, 0.700]], true],
|
||||
[".338LM API526" , 872, 100, 0.0810834, -0.00069220, 7.37, 0, 2, 10, 120, 0, 0, 16.39, 8.58, 25.40, 0.580, 1, "ICAO", [[-15,853],[0,860],[10,867],[15,872],[25,886],[30,895],[35,906]] , [[0, 0.590], [1180, 0.576], [1320, 0.572], [1570, 0.563], [1690, 0.560], [1860, 0.557], [2050, 0.555]], true],
|
||||
|
||||
[".300WM Mk248 Mod0" , 857, 100, 0.0621425, -0.00070530, 3.81, 0, 2, 10, 120, 0, 0, 12.31, 7.80, 25.40, 0.537, 1, "ICAO", [[-15,838],[0,845],[10,852],[15,857],[25,871],[30,880],[35,891]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
[".300WM Mk248 Mod1" , 839, 100, 0.0637038, -0.00061188, 3.81, 0, 2, 10, 120, 0, 0, 14.26, 7.80, 25.40, 0.619, 1, "ICAO", [[-15,820],[0,827],[10,834],[15,839],[25,853],[30,862],[35,873]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
[".300WM Berger OTM" , 792, 100, 0.0686968, -0.00053733, 3.81, 0, 2, 10, 120, 0, 0, 14.90, 7.80, 25.40, 0.715, 1, "ICAO", [[-15,773],[0,780],[10,787],[15,792],[25,806],[30,815],[35,826]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
[".300WM Mk248 Mod0" , 857, 100, 0.0825862, -0.00072468, 7.37, 0, 2, 10, 120, 0, 0, 12.31, 7.80, 25.40, 0.537, 1, "ICAO", [[-15,838],[0,845],[10,852],[15,857],[25,871],[30,880],[35,891]] , [[0, 0.546], [1210, 0.529], [1470, 0.520], [1570, 0.518], [1730, 0.515], [1880, 0.513], [1970, 0.513]], true],
|
||||
[".300WM Mk248 Mod1" , 839, 100, 0.0841417, -0.00063027, 7.37, 0, 2, 10, 120, 0, 0, 14.26, 7.80, 25.40, 0.619, 1, "ICAO", [[-15,820],[0,827],[10,834],[15,839],[25,853],[30,862],[35,873]] , [[0, 0.623], [1150, 0.614], [1330, 0.609], [1620, 0.598], [1770, 0.595], [1970, 0.592], [2030, 0.591]], true],
|
||||
[".300WM Berger OTM" , 792, 100, 0.0891300, -0.00055262, 7.37, 0, 2, 10, 120, 0, 0, 14.90, 7.80, 25.40, 0.715, 1, "ICAO", [[-15,773],[0,780],[10,787],[15,792],[25,806],[30,815],[35,826]] , [[0, 0.721], [1400, 0.708], [1570, 0.703], [1860, 0.692], [1990, 0.689], [2140, 0.686], [2220, 0.685]], true],
|
||||
|
||||
["7.62x54mmR" , 812, 100, 0.0678441, -0.00100023, 3.81, 0, 2, 10, 120, 0, 0, 9.849, 7.92, 24.13, 0.400, 1, "ICAO", [[-15,793],[0,800],[10,807],[15,812],[25,826],[30,835],[35,846]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["7.62x54mmR" , 828, 100, 0.0853677, -0.00103739, 7.11, 0, 2, 10, 120, 0, 0, 9.849, 7.92, 24.13, 0.400, 1, "ICAO", [[-15,809],[0,816],[10,823],[15,828],[25,842],[30,851],[35,862]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
|
||||
["7.62x51mm M80" , 802, 100, 0.0690229, -0.00100957, 3.81, 0, 2, 10, 120, 0, 0, 9.461, 7.82, 25.40, 0.398, 1, "ICAO", [[-15,783],[0,790],[10,797],[15,802],[25,816],[30,825],[35,836]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["7.62x51mm M118LR" , 757, 100, 0.0739989, -0.00082828, 3.81, 0, 2, 10, 120, 0, 0, 11.34, 7.82, 25.40, 0.482, 1, "ICAO", [[-15,738],[0,745],[10,752],[15,757],[25,771],[30,780],[35,791]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["7.62x51mm Mk316" , 781, 100, 0.0709422, -0.00082029, 3.81, 0, 2, 10, 120, 0, 0, 11.34, 7.82, 25.40, 0.483, 1, "ICAO", [[-15,777],[0,778],[10,779],[15,781],[25,783],[30,785],[35,787]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["7.62x51mm Mk319" , 900, 100, 0.0593025, -0.00102338, 3.81, 0, 2, 10, 120, 0, 0, 8.424, 7.82, 25.40, 0.377, 1, "ICAO", [[-15,898],[0,899],[10,900],[15,900],[25,902],[30,903],[35,904]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["7.62x51mm M993" , 912, 100, 0.0585007, -0.00107148, 3.81, 0, 2, 10, 120, 0, 0, 8.230, 7.82, 25.40, 0.359, 1, "ICAO", [[-15,893],[0,900],[10,907],[15,912],[25,926],[30,935],[35,946]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["7.62x51mm Subsonic", 314, 100, 0.3168140, -0.00049899, 3.81, 0, 2, 10, 120, 0, 0, 12.96, 7.82, 25.40, 0.502, 1, "ICAO", [[-15,312],[0,313],[10,314],[15,314],[25,316],[30,317],[35,318]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["7.62x51mm M80" , 802, 100, 0.0909184, -0.00103711, 7.62, 0, 2, 10, 120, 0, 0, 9.461, 7.82, 25.40, 0.398, 1, "ICAO", [[-15,783],[0,790],[10,797],[15,802],[25,816],[30,825],[35,836]] , [[0, 0.399], [810, 0.392], [1030, 0.383], [1120, 0.381], [1270, 0.380], [1410, 0.379], [1530, 0.379]], true],
|
||||
["7.62x51mm M118LR" , 757, 100, 0.0958841, -0.00085157, 7.62, 0, 2, 10, 120, 0, 0, 11.34, 7.82, 25.40, 0.482, 1, "ICAO", [[-15,738],[0,745],[10,752],[15,757],[25,771],[30,780],[35,791]] , [[0, 0.483], [790, 0.479], [920, 0.475], [1130, 0.465], [1230, 0.462], [1420, 0.460], [1630, 0.459]], true],
|
||||
["7.62x51mm Mk316" , 781, 100, 0.0928267, -0.00084311, 7.62, 0, 2, 10, 120, 0, 0, 11.34, 7.82, 25.40, 0.483, 1, "ICAO", [[-15,777],[0,778],[10,779],[15,781],[25,783],[30,785],[35,787]] , [[0, 0.484], [830, 0.479], [950, 0.475], [1130, 0.467], [1260, 0.463], [1430, 0.461], [1660, 0.459]], true],
|
||||
["7.62x51mm Mk319" , 900, 100, 0.0811838, -0.00104515, 7.62, 0, 2, 10, 120, 0, 0, 8.424, 7.82, 25.40, 0.377, 1, "ICAO", [[-15,898],[0,899],[10,900],[15,900],[25,902],[30,903],[35,904]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["7.62x51mm M993" , 912, 100, 0.0803840, -0.00109390, 7.62, 0, 2, 10, 120, 0, 0, 8.230, 7.82, 25.40, 0.359, 1, "ICAO", [[-15,893],[0,900],[10,907],[15,912],[25,926],[30,935],[35,946]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["7.62x51mm Subsonic", 314, 100, 0.3344490, -0.00060194, 6.86, 0, 2, 10, 120, 0, 0, 12.96, 7.82, 25.40, 0.502, 1, "ICAO", [[-15,312],[0,313],[10,314],[15,314],[25,316],[30,317],[35,318]] , [[0, 0.303], [250, 0.409], [320, 0.427], [420, 0.445], [550, 0.460], [650, 0.467], [730, 0.470]], true],
|
||||
|
||||
["7.62x39mm" , 708, 100, 0.0846559, -0.00151621, 3.81, 0, 2, 10, 120, 0, 0, 7.970, 7.82, 25.40, 0.275, 1, "ICAO", [[-15,689],[0,696],[10,703],[15,708],[25,722],[30,731],[35,742]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["7.62x39mm" , 708, 100, 0.1066160, -0.00154815, 7.62, 0, 2, 10, 120, 0, 0, 7.970, 7.82, 25.40, 0.275, 1, "ICAO", [[-15,689],[0,696],[10,703],[15,708],[25,722],[30,731],[35,742]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
|
||||
["6.5x39mm" , 766, 100, 0.0725986, -0.00075308, 3.81, 0, 2, 10, 120, 0, 0, 7.970, 6.71, 22.86, 0.524, 1, "ICAO", [[-15,747],[0,754],[10,761],[15,766],[25,780],[30,789],[35,800]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["6.5x47mm Lapua" , 767, 100, 0.0722256, -0.00067037, 3.81, 0, 2, 10, 120, 0, 0, 9.007, 6.71, 22.86, 0.577, 1, "ICAO", [[-15,748],[0,755],[10,762],[15,767],[25,781],[30,790],[35,801]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["6.5mm Creedmor" , 822, 100, 0.0655022, -0.00060887, 3.81, 0, 2, 10, 120, 0, 0, 9.072, 6.71, 22.86, 0.632, 1, "ICAO", [[-15,803],[0,810],[10,817],[15,822],[25,836],[30,845],[35,856]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["6.5x39mm" , 766, 100, 0.0872025, -0.00077363, 6.35, 0, 2, 10, 120, 0, 0, 7.970, 6.71, 22.86, 0.524, 1, "ICAO", [[-15,747],[0,754],[10,761],[15,766],[25,780],[30,789],[35,800]] , [[0, 0.525], [910, 0.520], [1050, 0.515], [1270, 0.506], [1390, 0.503], [1570, 0.500], [1770, 0.498]], true],
|
||||
["6.5x47mm Lapua" , 767, 100, 0.0868248, -0.00069003, 6.35, 0, 2, 10, 120, 0, 0, 9.007, 6.71, 22.86, 0.577, 1, "ICAO", [[-15,748],[0,755],[10,762],[15,767],[25,781],[30,790],[35,801]] , [[0, 0.578], [970, 0.574], [1140, 0.569], [1430, 0.557], [1610, 0.553], [1750, 0.551], [1860, 0.550]], true],
|
||||
["6.5mm Creedmor" , 822, 100, 0.0800956, -0.00062437, 6.35, 0, 2, 10, 120, 0, 0, 9.072, 6.71, 22.86, 0.632, 1, "ICAO", [[-15,803],[0,810],[10,817],[15,822],[25,836],[30,845],[35,856]] , [[0, 0.635], [1150, 0.627], [1350, 0.621], [1630, 0.611], [1760, 0.607], [1860, 0.606], [2020, 0.604]], true],
|
||||
|
||||
["5.8x42mm DBP87" , 942, 100, 0.0566639, -0.00117956, 3.81, 0, 2, 10, 120, 0, 0, 4.150, 5.99, 24.40, 0.313, 1, "ICAO", [[-15,923],[0,930],[10,937],[15,942],[25,956],[30,965],[35,976]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["5.8x42mm DBP87" , 942, 100, 0.0916742, -0.00121087, 9.91, 0, 2, 10, 120, 0, 0, 4.150, 5.99, 24.40, 0.313, 1, "ICAO", [[-15,923],[0,930],[10,937],[15,942],[25,956],[30,965],[35,976]] , [[0, 0.323], [760, 0.309], [970, 0.303], [1030, 0.302], [1130, 0.301], [1210, 0.300], [1510, 0.299]], true],
|
||||
|
||||
["5.56x45mm M855" , 862, 100, 0.0635456, -0.00126466, 3.81, 0, 2, 10, 120, 0, 0, 4.018, 5.70, 17.78, 0.302, 1, "ASM" , [[-15,843],[0,849],[10,857],[15,862],[25,876],[30,885],[35,898]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["5.56x45mm Mk262" , 812, 100, 0.0682606, -0.00109563, 3.81, 0, 2, 10, 120, 0, 0, 4.990, 5.70, 17.78, 0.361, 1, "ASM" , [[-15,793],[0,800],[10,807],[15,812],[25,826],[30,835],[35,846]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["5.56x45mm Mk318" , 872, 100, 0.0624569, -0.00123318, 3.81, 0, 2, 10, 120, 0, 0, 4.018, 5.70, 17.78, 0.307, 1, "ASM" , [[-15,853],[0,860],[10,867],[15,872],[25,886],[30,895],[35,906]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["5.56x45mm M995" , 861, 100, 0.0635355, -0.00123272, 3.81, 0, 2, 10, 120, 0, 0, 4.536, 5.70, 17.78, 0.310, 1, "ASM" , [[-15,842],[0,849],[10,856],[15,861],[25,875],[30,884],[35,895]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["5.56x45mm M855" , 862, 100, 0.0825404, -0.00130094, 7.11, 0, 2, 10, 120, 0, 0, 4.018, 5.70, 17.78, 0.302, 1, "ASM" , [[-15,843],[0,849],[10,857],[15,862],[25,876],[30,885],[35,898]] , [[0, 0.306], [670, 0.298], [880, 0.291], [1000, 0.289], [1150, 0.288], [1340, 0.288], [1410, 0.288]], true],
|
||||
["5.56x45mm Mk262" , 812, 100, 0.0872422, -0.00111805, 7.11, 0, 2, 10, 120, 0, 0, 4.990, 5.70, 17.78, 0.361, 1, "ASM" , [[-15,793],[0,800],[10,807],[15,812],[25,826],[30,835],[35,846]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["5.56x45mm Mk318" , 872, 100, 0.0814490, -0.00125880, 7.11, 0, 2, 10, 120, 0, 0, 4.018, 5.70, 17.78, 0.307, 1, "ASM" , [[-15,853],[0,860],[10,867],[15,872],[25,886],[30,895],[35,906]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
["5.56x45mm M995" , 861, 100, 0.0825279, -0.00126182, 7.11, 0, 2, 10, 120, 0, 0, 4.536, 5.70, 17.78, 0.310, 1, "ASM" , [[-15,842],[0,849],[10,856],[15,861],[25,875],[30,884],[35,895]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
|
||||
|
||||
["5.45x39mm 7N6M" , 727, 100, 0.0801269, -0.00116278, 3.81, 0, 2, 10, 120, 0, 0, 3.428, 5.59, 16.00, 0.336, 1, "ICAO", [[-15,708],[0,715],[10,722],[15,727],[25,741],[30,750],[35,761]], [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true]];
|
||||
["5.45x39mm 7N6M" , 727, 100, 0.0802286, -0.00119458, 3.81, 0, 2, 10, 120, 0, 0, 3.428, 5.59, 16.00, 0.336, 1, "ICAO", [[-15,708],[0,715],[10,722],[15,727],[25,741],[30,750],[35,761]], [[0, 0.339], [730, 0.331], [960, 0.323], [1100, 0.321], [1220, 0.320], [1380, 0.320], [1480, 0.320]], true]];
|
||||
|
||||
[] call FUNC(clear_user_data);
|
||||
profileNamespace setVariable ["ACE_ATragMX_gunList", GVAR(gunList)];
|
||||
|
@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Author: Ruthberg
|
||||
* Lookup the correct C1 ballistic coefficient in the c1 ballistic coefficient vs. distance interpolation table
|
||||
*
|
||||
* Arguments:
|
||||
* Target Range <NUMBER>
|
||||
*
|
||||
* Return Value:
|
||||
* C1 ballistic coefficient <NUMBER
|
||||
*
|
||||
* Example:
|
||||
* call ace_atragmx_fnc_lookup_c1_ballistic_coefficient
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_targetRange"];
|
||||
|
||||
private _lookupTable = [];
|
||||
{
|
||||
if ((_x select 1) > 0) then {
|
||||
_lookupTable pushBack _x;
|
||||
};
|
||||
} forEach (GVAR(workingMemory) select 19);
|
||||
|
||||
private _lookupTableSize = count _lookupTable;
|
||||
if (_lookupTableSize < 2) exitWith { (GVAR(workingMemory) select 15) };
|
||||
_lookupTable sort true;
|
||||
|
||||
private _lowerIndex = 0;
|
||||
private _upperIndex = 1;
|
||||
|
||||
for "_index" from 1 to (_lookupTableSize - 1) do {
|
||||
_upperIndex = _index;
|
||||
_lowerIndex = _upperIndex - 1;
|
||||
if (((_lookupTable select _index) select 0) >= _targetRange) exitWith {};
|
||||
};
|
||||
|
||||
(_lookupTable select _lowerIndex) params ["_lowerDistance", "_lowerC1"];
|
||||
(_lookupTable select _upperIndex) params ["_upperDistance", "_upperC1"];
|
||||
|
||||
(0.1 max (linearConversion [_lowerDistance, _upperDistance, _targetRange, _lowerC1, _upperC1]) min 2.0)
|
@ -77,11 +77,10 @@ if (GVAR(currentUnit) != 2) then {
|
||||
GVAR(barometricPressure) = 340 max GVAR(barometricPressure) min 1350;
|
||||
};
|
||||
|
||||
private ["_windSpeed1", "_windSpeed2", "_targetSpeed", "_targetRange", "_inclinationAngleCosine", "_inclinationAngleDegree"];
|
||||
_windSpeed1 = parseNumber(ctrlText 140020);
|
||||
_windSpeed2 = parseNumber(ctrlText 140021);
|
||||
_targetSpeed = parseNumber(ctrlText 140050);
|
||||
_targetRange = parseNumber(ctrlText 140060);
|
||||
private _windSpeed1 = parseNumber(ctrlText 140020);
|
||||
private _windSpeed2 = parseNumber(ctrlText 140021);
|
||||
private _targetSpeed = parseNumber(ctrlText 140050);
|
||||
private _targetRange = parseNumber(ctrlText 140060);
|
||||
if (GVAR(currentUnit) != 2) then {
|
||||
_windSpeed1 = 0 max _windSpeed1 min 50;
|
||||
_windSpeed2 = 0 max _windSpeed2 min 50;
|
||||
@ -100,6 +99,7 @@ if (GVAR(currentUnit) == 1) then {
|
||||
} else {
|
||||
_targetRange = 25 max _targetRange min 3700;
|
||||
};
|
||||
GVAR(targetRangeDirtyFlag) = GVAR(targetRangeDirtyFlag) || {_targetRange != GVAR(targetRange) select GVAR(currentTarget)};
|
||||
GVAR(latitude) set [GVAR(currentTarget), -90 max Round(parseNumber(ctrlText 140000)) min 90];
|
||||
GVAR(directionOfFire) set [GVAR(currentTarget), 0 max abs(Round(parseNumber(ctrlText 140010))) min 359];
|
||||
GVAR(windSpeed1) set [GVAR(currentTarget), _windSpeed1];
|
||||
@ -107,8 +107,8 @@ GVAR(windSpeed2) set [GVAR(currentTarget), _windSpeed2];
|
||||
GVAR(windDirection) set [GVAR(currentTarget), 1 max Round(parseNumber(ctrlText 140030)) min 12];
|
||||
GVAR(targetSpeed) set [GVAR(currentTarget), _targetSpeed];
|
||||
GVAR(targetRange) set [GVAR(currentTarget), _targetRange];
|
||||
_inclinationAngleCosine = 0.5 max parseNumber(ctrlText 140041) min 1;
|
||||
_inclinationAngleDegree = -60 max round(parseNumber(ctrlText 140040)) min 60;
|
||||
private _inclinationAngleCosine = 0.5 max parseNumber(ctrlText 140041) min 1;
|
||||
private _inclinationAngleDegree = -60 max round(parseNumber(ctrlText 140040)) min 60;
|
||||
if (_inclinationAngleDegree != GVAR(inclinationAngle) select GVAR(currentTarget)) then {
|
||||
GVAR(inclinationAngle) set [GVAR(currentTarget), _inclinationAngleDegree];
|
||||
} else {
|
||||
@ -122,19 +122,18 @@ if ((ctrlText 140051) == ">") then {
|
||||
GVAR(targetSpeedDirection) set [GVAR(currentTarget), -1];
|
||||
};
|
||||
|
||||
private ["_boreHeight", "_bulletMass", "_bulletDiameter", "_airFriction", "_rifleTwist", "_muzzleVelocity", "_zeroRange"];
|
||||
_boreHeight = parseNumber(ctrlText 120000);
|
||||
_bulletMass = parseNumber(ctrlText 120010);
|
||||
_bulletDiameter = parseNumber(ctrlText 120020);
|
||||
_airFriction = parseNumber(ctrlText 120030);
|
||||
private _boreHeight = parseNumber(ctrlText 120000);
|
||||
private _bulletMass = parseNumber(ctrlText 120010);
|
||||
private _bulletDiameter = parseNumber(ctrlText 120020);
|
||||
private _airFriction = parseNumber(ctrlText 120030);
|
||||
if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then {
|
||||
_airFriction = 0.1 max _airFriction min 2;
|
||||
} else {
|
||||
_airFriction = _airFriction / -1000;
|
||||
};
|
||||
_rifleTwist = parseNumber(ctrlText 120040);
|
||||
_muzzleVelocity = parseNumber(ctrlText 120050);
|
||||
_zeroRange = parseNumber(ctrlText 120060);
|
||||
private _rifleTwist = parseNumber(ctrlText 120040);
|
||||
private _muzzleVelocity = parseNumber(ctrlText 120050);
|
||||
private _zeroRange = parseNumber(ctrlText 120060);
|
||||
if (GVAR(currentUnit) != 2) then {
|
||||
_boreHeight = 0.1 max _boreHeight min 5;
|
||||
_bulletMass = 1 max _bulletMass min 1500;
|
||||
@ -175,6 +174,11 @@ if (_muzzleVelocity != GVAR(workingMemory) select 1) then {
|
||||
GVAR(workingMemory) set [1, _muzzleVelocity];
|
||||
GVAR(workingMemory) set [2, _zeroRange];
|
||||
|
||||
if (GVAR(targetRangeDirtyFlag) && missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then {
|
||||
[false, false] call FUNC(recalculate_c1_ballistic_coefficient);
|
||||
GVAR(targetRangeDirtyFlag) = false;
|
||||
};
|
||||
|
||||
[] call FUNC(update_gun);
|
||||
[] call FUNC(update_gun_ammo_data);
|
||||
[] call FUNC(update_atmosphere);
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Author: Ruthberg
|
||||
* Recalculates the c1 ballistic coefficient based on the c1 ballistic coefficient vs. distance interpolation input
|
||||
* Recalculates the c1 ballistic coefficient based on the current target range
|
||||
*
|
||||
* Arguments:
|
||||
* parse input <BOOL>
|
||||
@ -22,35 +22,7 @@ if (_parseInput) then {
|
||||
[] call FUNC(parse_input);
|
||||
};
|
||||
|
||||
private _lookupTable = [];
|
||||
{
|
||||
if ((_x select 1) > 0) then {
|
||||
_lookupTable pushBack _x;
|
||||
};
|
||||
} forEach (GVAR(workingMemory) select 19);
|
||||
|
||||
private _lookupTableSize = count _lookupTable;
|
||||
if (_lookupTableSize < 2) exitWith {};
|
||||
_lookupTable sort true;
|
||||
|
||||
private ["_lowerIndex", "_upperIndex"];
|
||||
for "_index" from 1 to (_lookupTableSize - 1) do {
|
||||
_upperIndex = _index;
|
||||
_lowerIndex = _upperIndex - 1;
|
||||
if (((_lookupTable select _index) select 0) >= (GVAR(targetRange) select GVAR(currentTarget))) exitWith {};
|
||||
};
|
||||
|
||||
private ["_lowerDistance", "_upperDistance", "_lowerC1", "_upperC1", "_c1"];
|
||||
_lowerDistance = (_lookupTable select _lowerIndex) select 0;
|
||||
_upperDistance = (_lookupTable select _upperIndex) select 0;
|
||||
_lowerC1 = (_lookupTable select _lowerIndex) select 1;
|
||||
_upperC1 = (_lookupTable select _upperIndex) select 1;
|
||||
_c1 = _lowerC1;
|
||||
if (_lowerDistance != _upperDistance) then {
|
||||
private _slope = (_upperC1 - _lowerC1) / (_upperDistance - _lowerDistance);
|
||||
_c1 = _lowerC1 + ((GVAR(targetRange) select GVAR(currentTarget)) - _lowerDistance) * _slope;
|
||||
};
|
||||
_c1 = 0.1 max _c1 min 2.0;
|
||||
private _c1 = [GVAR(targetRange) select GVAR(currentTarget)] call FUNC(lookup_c1_ballistic_coefficient);
|
||||
|
||||
if (_c1 != GVAR(workingMemory) select 15) then {
|
||||
GVAR(workingMemory) set [15, _c1];
|
||||
|
@ -33,24 +33,19 @@ private _lookupTableSize = count _lookupTable;
|
||||
if (_lookupTableSize < 2) exitWith {};
|
||||
_lookupTable sort true;
|
||||
|
||||
private ["_lowerIndex", "_upperIndex"];
|
||||
private _lowerIndex = 0;
|
||||
private _upperIndex = 1;
|
||||
|
||||
for "_index" from 1 to (_lookupTableSize - 1) do {
|
||||
_upperIndex = _index;
|
||||
_lowerIndex = _upperIndex - 1;
|
||||
if (((_lookupTable select _index) select 0) >= GVAR(temperature)) exitWith {};
|
||||
};
|
||||
|
||||
private ["_lowerTemperature", "_upperTemperature", "_lowerMuzzleVelocity", "_upperMuzzleVelocity", "_muzzleVelocity"];
|
||||
_lowerTemperature = (_lookupTable select _lowerIndex) select 0;
|
||||
_upperTemperature = (_lookupTable select _upperIndex) select 0;
|
||||
_lowerMuzzleVelocity = (_lookupTable select _lowerIndex) select 1;
|
||||
_upperMuzzleVelocity = (_lookupTable select _upperIndex) select 1;
|
||||
_muzzleVelocity = _lowerMuzzleVelocity;
|
||||
if (_lowerTemperature != _upperTemperature) then {
|
||||
private _slope = (_upperMuzzleVelocity - _lowerMuzzleVelocity) / (_upperTemperature - _lowerTemperature);
|
||||
_muzzleVelocity = _lowerMuzzleVelocity + (GVAR(temperature) - _lowerTemperature) * _slope;
|
||||
};
|
||||
_muzzleVelocity = 100 max _muzzleVelocity min 1400;
|
||||
(_lookupTable select _lowerIndex) params ["_lowerDistance", "_lowerMuzzleVelocity"];
|
||||
(_lookupTable select _upperIndex) params ["_upperDistance", "_upperMuzzleVelocity"];
|
||||
|
||||
_muzzleVelocity = 100 max (linearConversion [_lowerDistance, _upperDistance, GVAR(temperature), _lowerMuzzleVelocity, _upperMuzzleVelocity]) min 1400;
|
||||
|
||||
if (_muzzleVelocity != GVAR(workingMemory) select 1) then {
|
||||
GVAR(workingMemory) set [1, _muzzleVelocity];
|
||||
|
@ -19,7 +19,7 @@ GVAR(atmosphereModeTBH) = true;
|
||||
GVAR(altitude) = 0;
|
||||
GVAR(temperature) = 15;
|
||||
GVAR(barometricPressure) = 1013.25;
|
||||
GVAR(relativeHumidity) = 0.5;
|
||||
GVAR(relativeHumidity) = 0.0;
|
||||
|
||||
[] call FUNC(update_atmo_selection);
|
||||
[] call FUNC(update_atmosphere);
|
||||
|
@ -23,7 +23,7 @@ GVAR(atmosphereModeTBH) = profileNamespace getVariable ["ACE_ATragMX_atmosphereM
|
||||
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(relativeHumidity) = 0 max (profileNamespace getVariable ["ACE_ATragMX_relativeHumidity", 0.0]) min 1;
|
||||
|
||||
GVAR(showWind2) = profileNamespace getVariable ["ACE_ATragMX_showWind2", false];
|
||||
GVAR(showCoriolis) = profileNamespace getVariable ["ACE_ATragMX_showCoriolis", true];
|
||||
|
@ -15,8 +15,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_index"];
|
||||
_index = 0 max (lbCurSel 6000);
|
||||
private _index = 0 max (lbCurSel 6000);
|
||||
|
||||
GVAR(gunList) set [_index, +GVAR(workingMemory)];
|
||||
|
||||
|
@ -21,6 +21,8 @@ if (!GVAR(initialised)) exitWith {};
|
||||
|
||||
params ["_slopeDistance", "_azimuth", "_inclination"];
|
||||
|
||||
GVAR(targetRangeDirtyFlag) = (round(_slopeDistance) != (GVAR(targetRange) select GVAR(currentTarget)));
|
||||
|
||||
GVAR(inclinationAngle) set [GVAR(currentTarget), round(_inclination)];
|
||||
GVAR(directionOfFire) set [GVAR(currentTarget), round(_azimuth)];
|
||||
GVAR(targetRange) set [GVAR(currentTarget), round(_slopeDistance)];
|
||||
|
@ -21,8 +21,7 @@ if (ctrlVisible 8000) then {
|
||||
|
||||
if (_this == 1) then {
|
||||
[] call FUNC(calculate_target_speed_assist);
|
||||
private ["_targetSpeed"];
|
||||
_targetSpeed = parseNumber(ctrlText 8007);
|
||||
private _targetSpeed = parseNumber(ctrlText 8007);
|
||||
if (_targetSpeed != 0) then {
|
||||
ctrlSetText [330, Str(_targetSpeed)];
|
||||
ctrlSetText [140050, Str(_targetSpeed)];
|
||||
|
@ -15,9 +15,8 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_inclinationAngleCosine", "_inclinationAngleDegree"];
|
||||
_inclinationAngleCosine = 0.5 max parseNumber(ctrlText 140041) min 1;
|
||||
_inclinationAngleDegree = -60 max parseNumber(ctrlText 140040) min 60;
|
||||
private _inclinationAngleCosine = 0.5 max parseNumber(ctrlText 140041) min 1;
|
||||
private _inclinationAngleDegree = -60 max parseNumber(ctrlText 140040) min 60;
|
||||
|
||||
if (_this == 0) then {
|
||||
ctrlSetText [140040, Str(round(acos(_inclinationAngleCosine)))];
|
||||
|
@ -15,8 +15,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_range", "_elevation", "_windage1", "_windage2", "_clickSize", "_clickNumber", "_clickInterval", "_lead", "_TOF", "_velocity", "_kineticEnergy", "_rangeOutput", "_elevationOutput", "_windageOutput", "_lastColumnOutput", "_speedOfSound"];
|
||||
_lastColumnOutput = "";
|
||||
private _lastColumnOutput = "";
|
||||
|
||||
if (GVAR(showWind2) && GVAR(rangeCardCurrentColumn) == 0) then {
|
||||
ctrlSetText [5006, "Wind2"];
|
||||
@ -32,23 +31,23 @@ if (GVAR(currentUnit) == 1) then {
|
||||
|
||||
lnbClear 5007;
|
||||
|
||||
_speedOfSound = GVAR(temperature) call EFUNC(weather,calculateSpeedOfSound);
|
||||
private _speedOfSound = GVAR(temperature) call EFUNC(weather,calculateSpeedOfSound);
|
||||
|
||||
{
|
||||
_range = _x select 0;
|
||||
_elevation = _x select 1;
|
||||
_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;
|
||||
private _range = _x select 0;
|
||||
private _elevation = _x select 1;
|
||||
private _windage1 = (_x select 2) select 0;
|
||||
private _windage2 = (_x select 2) select 1;
|
||||
private _lead = _x select 3;
|
||||
private _TOF = _x select 4;
|
||||
private _velocity = _x select 5;
|
||||
private _kineticEnergy = _x select 6;
|
||||
|
||||
switch (GVAR(currentScopeUnit)) do {
|
||||
case 0: {
|
||||
_elevation = _elevation / 3.38;
|
||||
_windage1 = _windage1 / 3.38;
|
||||
_windage2 = _windage2 / 3.38;
|
||||
_elevation = MOA_TO_MRAD(_elevation);
|
||||
_windage1 = MOA_TO_MRAD(_windage1);
|
||||
_windage2 = MOA_TO_MRAD(_windage2);
|
||||
};
|
||||
case 2: {
|
||||
_elevation = _elevation * 1.047;
|
||||
@ -56,13 +55,9 @@ _speedOfSound = GVAR(temperature) call EFUNC(weather,calculateSpeedOfSound);
|
||||
_windage2 = _windage2 * 1.047;
|
||||
};
|
||||
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;
|
||||
private _clickSize = [1, 1 / 1.047, MRAD_TO_MOA(1)] select (GVAR(workingMemory) select 7);
|
||||
private _clickNumber = GVAR(workingMemory) select 8;
|
||||
private _clickInterval = _clickSize / _clickNumber;
|
||||
|
||||
_elevation = Round(_elevation / _clickInterval);
|
||||
_windage1 = Round(_windage1 / _clickInterval);
|
||||
@ -70,10 +65,10 @@ _speedOfSound = GVAR(temperature) call EFUNC(weather,calculateSpeedOfSound);
|
||||
};
|
||||
};
|
||||
|
||||
_elevationOutput = Str(Round(_elevation * 100) / 100);
|
||||
_windageOutput = Str(Round(_windage1 * 100) / 100);
|
||||
private _elevationOutput = Str(Round(_elevation * 100) / 100);
|
||||
private _windageOutput = Str(Round(_windage1 * 100) / 100);
|
||||
|
||||
_rangeOutput = Str(_range);
|
||||
private _rangeOutput = Str(_range);
|
||||
if (_velocity < _speedOfSound) then {
|
||||
_rangeOutput = _rangeOutput + "*";
|
||||
};
|
||||
|
@ -15,15 +15,14 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_elevationAbs", "_elevationRel", "_elevationCur", "_windageAbs", "_windageRel", "_windageCur", "_wind2", "_lead", "_clickSize", "_clickNumber", "_clickInterval"];
|
||||
_elevationAbs = GVAR(elevationOutput) select GVAR(currentTarget);
|
||||
_elevationRel = 0;
|
||||
_elevationCur = 0;
|
||||
_windageAbs = GVAR(windage1Output) select GVAR(currentTarget);
|
||||
_windageRel = 0;
|
||||
_windageCur = 0;
|
||||
private _elevationAbs = GVAR(elevationOutput) select GVAR(currentTarget);
|
||||
private _elevationRel = 0;
|
||||
private _elevationCur = 0;
|
||||
private _windageAbs = GVAR(windage1Output) select GVAR(currentTarget);
|
||||
private _windageRel = 0;
|
||||
private _windageCur = 0;
|
||||
|
||||
_wind2 = GVAR(windage2Output) select GVAR(currentTarget);
|
||||
private _wind2 = GVAR(windage2Output) select GVAR(currentTarget);
|
||||
|
||||
if (GVAR(showCoriolis)) then {
|
||||
_elevationRel = GVAR(verticalCoriolisOutput) select GVAR(currentTarget);
|
||||
@ -38,20 +37,20 @@ if (GVAR(showCoriolis)) then {
|
||||
_windageRel = _windageAbs - _windageCur;
|
||||
};
|
||||
|
||||
_lead = GVAR(leadOutput) select GVAR(currentTarget);
|
||||
private _lead = GVAR(leadOutput) select GVAR(currentTarget);
|
||||
|
||||
switch (GVAR(currentScopeUnit)) do {
|
||||
case 0: {
|
||||
_elevationAbs = _elevationAbs / 3.38;
|
||||
_windageAbs = _windageAbs / 3.38;
|
||||
_elevationAbs = MOA_TO_MRAD(_elevationAbs);
|
||||
_windageAbs = MOA_TO_MRAD(_windageAbs);
|
||||
|
||||
_wind2 = _wind2 / 3.38;
|
||||
_wind2 = MOA_TO_MRAD(_wind2);
|
||||
|
||||
_elevationRel = _elevationRel / 3.38;
|
||||
_windageRel = _windageRel / 3.38;
|
||||
_elevationRel = MOA_TO_MRAD(_elevationRel);
|
||||
_windageRel = MOA_TO_MRAD(_windageRel);
|
||||
|
||||
_elevationCur = _elevationCur / 3.38;
|
||||
_windageCur = _windageCur / 3.38;
|
||||
_elevationCur = MOA_TO_MRAD(_elevationCur);
|
||||
_windageCur = MOA_TO_MRAD(_windageCur);
|
||||
};
|
||||
case 2: {
|
||||
_elevationAbs = _elevationAbs * 1.047;
|
||||
@ -66,13 +65,9 @@ switch (GVAR(currentScopeUnit)) do {
|
||||
_windageCur = _windageCur * 1.047;
|
||||
};
|
||||
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;
|
||||
private _clickSize = [1, 1 / 1.047, MRAD_TO_MOA(1)] select (GVAR(workingMemory) select 7);
|
||||
private _clickNumber = GVAR(workingMemory) select 8;
|
||||
private _clickInterval = _clickSize / _clickNumber;
|
||||
|
||||
_elevationAbs = Round(_elevationAbs / _clickInterval);
|
||||
_windageAbs = Round(_windageAbs / _clickInterval);
|
||||
|
@ -42,9 +42,9 @@ private _dropData = +GVAR(truingDropDropData);
|
||||
|
||||
switch (_dropUnit) do {
|
||||
case 0: {
|
||||
_dropData set [0, (_dropData select 0) / 3.38];
|
||||
_dropData set [1, (_dropData select 1) / 3.38];
|
||||
_dropData set [2, (_dropData select 2) / 3.38];
|
||||
_dropData set [0, MOA_TO_MRAD(_dropData select 0)];
|
||||
_dropData set [1, MOA_TO_MRAD(_dropData select 1)];
|
||||
_dropData set [2, MOA_TO_MRAD(_dropData select 2)];
|
||||
};
|
||||
case 2: {
|
||||
_dropData set [0, (_dropData select 0) * 1.047];
|
||||
|
@ -17,33 +17,29 @@
|
||||
|
||||
[] call FUNC(parse_input);
|
||||
|
||||
private ["_bulletMass", "_boreHeight", "_airFriction", "_muzzleVelocity", "_bc", "_dragModel", "_atmosphereModel"];
|
||||
_bulletMass = GVAR(workingMemory) select 12;
|
||||
_boreHeight = GVAR(workingMemory) select 5;
|
||||
_airFriction = GVAR(workingMemory) select 4;
|
||||
_muzzleVelocity = GVAR(workingMemory) select 1;
|
||||
_bc = GVAR(workingMemory) select 15;
|
||||
_dragModel = GVAR(workingMemory) select 16;
|
||||
_atmosphereModel = GVAR(workingMemory) select 17;
|
||||
private _bulletMass = GVAR(workingMemory) select 12;
|
||||
private _boreHeight = GVAR(workingMemory) select 5;
|
||||
private _airFriction = GVAR(workingMemory) select 4;
|
||||
private _muzzleVelocity = GVAR(workingMemory) select 1;
|
||||
private _bc = GVAR(workingMemory) select 15;
|
||||
private _dragModel = GVAR(workingMemory) select 16;
|
||||
private _atmosphereModel = GVAR(workingMemory) select 17;
|
||||
private _zeroRange = GVAR(workingMemory) select 2;
|
||||
private _altitude = GVAR(altitude);
|
||||
private _temperature = GVAR(temperature);
|
||||
private _barometricPressure = GVAR(barometricPressure);
|
||||
private _relativeHumidity = GVAR(relativeHumidity);
|
||||
|
||||
private ["_zeroRange"];
|
||||
_zeroRange = GVAR(workingMemory) select 2;
|
||||
|
||||
private ["_altitude", "_temperature", "_barometricPressure", "_relativeHumidity"];
|
||||
_altitude = GVAR(altitude);
|
||||
_temperature = GVAR(temperature);
|
||||
_barometricPressure = GVAR(barometricPressure);
|
||||
_relativeHumidity = GVAR(relativeHumidity);
|
||||
if (!GVAR(atmosphereModeTBH)) then {
|
||||
_barometricPressure = 1013.25 * (1 - (0.0065 * _altitude) / (273.15 + _temperature + 0.0065 * _altitude)) ^ 5.255754495;
|
||||
_relativeHumidity = 50;
|
||||
_relativeHumidity = 0.5;
|
||||
};
|
||||
|
||||
private _scopeBaseAngle = if (!(missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false])) then {
|
||||
private _zeroAngle = "ace_advanced_ballistics" callExtension format ["zeroAngleVanilla:%1:%2:%3:%4", _zeroRange, _muzzleVelocity, _airFriction, _boreHeight];
|
||||
private _zeroAngle = "ace_advanced_ballistics" callExtension format ["calcZero:%1:%2:%3:%4", _zeroRange, _muzzleVelocity, _airFriction, _boreHeight];
|
||||
(parseNumber _zeroAngle)
|
||||
} else {
|
||||
private _zeroAngle = "ace_advanced_ballistics" callExtension format ["zeroAngle:%1:%2:%3:%4:%5:%6:%7:%8:%9", _zeroRange, _muzzleVelocity, _boreHeight, _temperature, _barometricPressure, _relativeHumidity, _bc, _dragModel, _atmosphereModel];
|
||||
private _zeroAngle = "ace_advanced_ballistics" callExtension format ["calcZeroAB:%1:%2:%3:%4:%5:%6:%7:%8:%9", _zeroRange, _muzzleVelocity, _boreHeight, _temperature, _barometricPressure, _relativeHumidity, _bc, _dragModel, _atmosphereModel];
|
||||
(parseNumber _zeroAngle)
|
||||
};
|
||||
|
||||
|
@ -15,11 +15,10 @@
|
||||
|
||||
|
||||
//Add deviceKey entry:
|
||||
private ["_conditonCode", "_toggleCode", "_closeCode"];
|
||||
_conditonCode = {
|
||||
private _conditonCode = {
|
||||
[] call FUNC(can_show);
|
||||
};
|
||||
_toggleCode = {
|
||||
private _toggleCode = {
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {};
|
||||
if (GVAR(active)) exitWith {
|
||||
@ -28,7 +27,7 @@ _toggleCode = {
|
||||
// Statement
|
||||
[] call FUNC(create_dialog);
|
||||
};
|
||||
_closeCode = {
|
||||
private _closeCode = {
|
||||
if (GVAR(active)) exitWith {
|
||||
closeDialog 0;
|
||||
};
|
||||
|
@ -16,4 +16,4 @@
|
||||
|
||||
#include "\z\ace\addons\main\script_macros.hpp"
|
||||
|
||||
#define ATRAGMX_PROFILE_NAMESPACE_VERSION 2.0
|
||||
#define ATRAGMX_PROFILE_NAMESPACE_VERSION 2.2
|
||||
|
@ -6,7 +6,7 @@
|
||||
displayName = CSTRING(AttachDetach); \
|
||||
condition = QUOTE(_this call FUNC(canAttach)); \
|
||||
insertChildren = QUOTE(_this call FUNC(getChildrenAttachActions)); \
|
||||
exceptions[] = {}; \
|
||||
exceptions[] = {"isNotSwimming"}; \
|
||||
showDisabled = 0; \
|
||||
priority = 0; \
|
||||
icon = QPATHTOF(UI\attach_ca.paa); \
|
||||
@ -15,7 +15,7 @@
|
||||
displayName = CSTRING(Detach); \
|
||||
condition = QUOTE(_this call FUNC(canDetach)); \
|
||||
statement = QUOTE(_this call FUNC(detach) ); \
|
||||
exceptions[] = {}; \
|
||||
exceptions[] = {"isNotSwimming"}; \
|
||||
showDisabled = 0; \
|
||||
priority = 0.1; \
|
||||
icon = QPATHTOF(UI\detach_ca.paa); \
|
||||
@ -55,7 +55,7 @@ class CfgVehicles {
|
||||
displayName = CSTRING(AttachDetach);
|
||||
condition = QUOTE(_this call FUNC(canAttach));
|
||||
insertChildren = QUOTE(_this call FUNC(getChildrenAttachActions));
|
||||
exceptions[] = {"isNotDragging"};
|
||||
exceptions[] = {"isNotDragging", "isNotSwimming"};
|
||||
showDisabled = 0;
|
||||
priority = 5;
|
||||
icon = QPATHTOF(UI\attach_ca.paa);
|
||||
@ -64,7 +64,7 @@ class CfgVehicles {
|
||||
displayName = CSTRING(Detach);
|
||||
condition = QUOTE(_this call FUNC(canDetach));
|
||||
statement = QUOTE(_this call FUNC(detach));
|
||||
exceptions[] = {"isNotDragging"};
|
||||
exceptions[] = {"isNotDragging", "isNotSwimming"};
|
||||
showDisabled = 0;
|
||||
priority = 5;
|
||||
icon = QPATHTOF(UI\detach_ca.paa);
|
||||
|
@ -1,6 +1,6 @@
|
||||
class CfgWeapons {
|
||||
class ACE_ItemCore;
|
||||
class InventoryItem_Base_F;
|
||||
class CBA_MiscItem_ItemInfo;
|
||||
|
||||
class ACE_IR_Strobe_Item: ACE_ItemCore {
|
||||
ACE_attachable = "ACE_IR_Strobe_Effect";
|
||||
@ -11,8 +11,8 @@ class CfgWeapons {
|
||||
model = QPATHTOF(data\ace_IRStrobe.p3d);
|
||||
picture = QPATHTOF(UI\irstrobe_item.paa);
|
||||
|
||||
class ItemInfo: InventoryItem_Base_F {
|
||||
class ItemInfo: CBA_MiscItem_ItemInfo {
|
||||
mass = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -21,29 +21,27 @@ params ["_attachToVehicle","_unit","_args", ["_silentScripted", false]];
|
||||
_args params [["_itemClassname","", [""]]];
|
||||
TRACE_4("params",_attachToVehicle,_unit,_itemClassname,_silentScripted);
|
||||
|
||||
private ["_itemVehClass", "_onAtachText", "_selfAttachPosition", "_attachedItem", "_tempObject", "_actionID", "_model"];
|
||||
|
||||
//Sanity Check (_unit has item in inventory, not over attach limit)
|
||||
if ((_itemClassname == "") || {(!_silentScripted) && {!(_this call FUNC(canAttach))}}) exitWith {ERROR("Tried to attach, but check failed");};
|
||||
|
||||
_itemVehClass = getText (configFile >> "CfgWeapons" >> _itemClassname >> "ACE_Attachable");
|
||||
_onAtachText = getText (configFile >> "CfgWeapons" >> _itemClassname >> "displayName");
|
||||
private _itemVehClass = getText (configFile >> "CfgWeapons" >> _itemClassname >> "ACE_Attachable");
|
||||
private _onAttachText = getText (configFile >> "CfgWeapons" >> _itemClassname >> "displayName");
|
||||
|
||||
if (_itemVehClass == "") then {
|
||||
_itemVehClass = getText (configFile >> "CfgMagazines" >> _itemClassname >> "ACE_Attachable");
|
||||
_onAtachText = getText (configFile >> "CfgMagazines" >> _itemClassname >> "displayName");
|
||||
_onAttachText = getText (configFile >> "CfgMagazines" >> _itemClassname >> "displayName");
|
||||
};
|
||||
|
||||
if (_itemVehClass == "") exitWith {ERROR("no ACE_Attachable for Item");};
|
||||
|
||||
_onAtachText = format [localize LSTRING(Item_Attached), _onAtachText];
|
||||
private _onAttachText = format [localize LSTRING(Item_Attached), _onAttachText];
|
||||
|
||||
if (_unit == _attachToVehicle) then { //Self Attachment
|
||||
_attachedItem = _itemVehClass createVehicle [0,0,0];
|
||||
private _attachedItem = _itemVehClass createVehicle [0,0,0];
|
||||
_attachedItem attachTo [_unit, [0.05, -0.09, 0.1], "leftshoulder"];
|
||||
if (!_silentScripted) then {
|
||||
_unit removeItem _itemClassname; // Remove item
|
||||
[_onAtachText] call EFUNC(common,displayTextStructured);
|
||||
[_onAttachText] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
_unit setVariable [QGVAR(attached), [[_attachedItem, _itemClassname]], true];
|
||||
} else {
|
||||
@ -54,10 +52,10 @@ if (_unit == _attachToVehicle) then { //Self Attachment
|
||||
[{[localize LSTRING(PlaceAction), ""] call EFUNC(interaction,showMouseHint)}, []] call CBA_fnc_execNextFrame;
|
||||
_unit setVariable [QGVAR(placeActionEH), [_unit, "DefaultAction", {true}, {GVAR(placeAction) = PLACE_APPROVE;}] call EFUNC(common,AddActionEventHandler)];
|
||||
|
||||
_actionID = _unit addAction [format ["<t color='#FF0000'>%1</t>", localize LSTRING(CancelAction)], {GVAR(placeAction) = PLACE_CANCEL}];
|
||||
private _actionID = _unit addAction [format ["<t color='#FF0000'>%1</t>", localize LSTRING(CancelAction)], {GVAR(placeAction) = PLACE_CANCEL}];
|
||||
|
||||
//Display to show virtual object:
|
||||
_model = getText (configFile >> "CfgAmmo" >> _itemVehClass >> "model");
|
||||
private _model = getText (configFile >> "CfgAmmo" >> _itemVehClass >> "model");
|
||||
if (_model == "") then {
|
||||
_model = getText (configFile >> "CfgVehicles" >> _itemVehClass >> "model");
|
||||
};
|
||||
@ -67,23 +65,22 @@ if (_unit == _attachToVehicle) then { //Self Attachment
|
||||
((uiNamespace getVariable [QGVAR(virtualAmmoDisplay), displayNull]) displayCtrl 800851) ctrlSetModel _model;
|
||||
|
||||
[{
|
||||
private ["_angle", "_dir", "_screenPos", "_realDistance", "_up", "_virtualPos", "_virtualPosASL", "_lineInterection"];
|
||||
params ["_args","_idPFH"];
|
||||
_args params ["_unit","_attachToVehicle","_itemClassname","_itemVehClass","_onAtachText","_actionID"];
|
||||
_args params ["_unit","_attachToVehicle","_itemClassname","_itemVehClass","_onAttachText","_actionID"];
|
||||
|
||||
_virtualPosASL = (eyePos _unit) vectorAdd (positionCameraToWorld [0,0,0.6]) vectorDiff (positionCameraToWorld [0,0,0]);
|
||||
private _virtualPosASL = (eyePos _unit) vectorAdd (positionCameraToWorld [0,0,0.6]) vectorDiff (positionCameraToWorld [0,0,0]);
|
||||
if (cameraView == "EXTERNAL") then {
|
||||
_virtualPosASL = _virtualPosASL vectorAdd ((positionCameraToWorld [0.3,0,0]) vectorDiff (positionCameraToWorld [0,0,0]));
|
||||
};
|
||||
_virtualPos = _virtualPosASL call EFUNC(common,ASLToPosition);
|
||||
_lineInterection = lineIntersects [eyePos ACE_player, _virtualPosASL, ACE_player];
|
||||
private _virtualPos = _virtualPosASL call EFUNC(common,ASLToPosition);
|
||||
private _lineInterection = lineIntersects [eyePos ACE_player, _virtualPosASL, ACE_player];
|
||||
|
||||
//Don't allow placing in a bad position:
|
||||
if (_lineInterection && {GVAR(placeAction) == PLACE_APPROVE}) then {GVAR(placeAction) = PLACE_WAITING;};
|
||||
|
||||
if ((GVAR(placeAction) != PLACE_WAITING) ||
|
||||
{_unit != ACE_player} ||
|
||||
{!([_unit, _attachToVehicle, []] call EFUNC(common,canInteractWith))} ||
|
||||
{!([_unit, _attachToVehicle, ["isNotSwimming"]] call EFUNC(common,canInteractWith))} ||
|
||||
{!([_attachToVehicle, _unit, _itemClassname] call FUNC(canAttach))}) then {
|
||||
|
||||
[_idPFH] call CBA_fnc_removePerFrameHandler;
|
||||
@ -95,7 +92,7 @@ if (_unit == _attachToVehicle) then { //Self Attachment
|
||||
(QGVAR(virtualAmmo) call BIS_fnc_rscLayer) cutText ["", "PLAIN"];
|
||||
|
||||
if (GVAR(placeAction) == PLACE_APPROVE) then {
|
||||
[_unit, _attachToVehicle, _itemClassname, _itemVehClass, _onAtachText, _virtualPos] call FUNC(placeApprove);
|
||||
[_unit, _attachToVehicle, _itemClassname, _itemVehClass, _onAttachText, _virtualPos] call FUNC(placeApprove);
|
||||
};
|
||||
} else {
|
||||
//Show the virtual object:
|
||||
@ -103,18 +100,18 @@ if (_unit == _attachToVehicle) then { //Self Attachment
|
||||
((uiNamespace getVariable [QGVAR(virtualAmmoDisplay), displayNull]) displayCtrl 800851) ctrlShow false;
|
||||
} else {
|
||||
((uiNamespace getVariable [QGVAR(virtualAmmoDisplay), displayNull]) displayCtrl 800851) ctrlShow true;
|
||||
_screenPos = worldToScreen _virtualPos;
|
||||
private _screenPos = worldToScreen _virtualPos;
|
||||
if (_screenPos isEqualTo []) exitWith {
|
||||
((uiNamespace getVariable [QGVAR(virtualAmmoDisplay), displayNull]) displayCtrl 800851) ctrlShow false;
|
||||
};
|
||||
_realDistance = (_virtualPos distance (positionCameraToWorld [0,0,0])) / ((call CBA_fnc_getFov) select 1);
|
||||
private _realDistance = (_virtualPos distance (positionCameraToWorld [0,0,0])) / ((call CBA_fnc_getFov) select 1);
|
||||
_screenPos = [(_screenPos select 0), _realDistance, (_screenPos select 1)];
|
||||
((uiNamespace getVariable [QGVAR(virtualAmmoDisplay), displayNull]) displayCtrl 800851) ctrlSetPosition _screenPos;
|
||||
_dir = (positionCameraToWorld [0,0,1]) vectorFromTo (positionCameraToWorld [0,0,0]);
|
||||
_angle = asin (_dir select 2);
|
||||
_up = [0, cos _angle, sin _angle];
|
||||
private _dir = (positionCameraToWorld [0,0,1]) vectorFromTo (positionCameraToWorld [0,0,0]);
|
||||
private _angle = asin (_dir select 2);
|
||||
private _up = [0, cos _angle, sin _angle];
|
||||
((uiNamespace getVariable [QGVAR(virtualAmmoDisplay), displayNull]) displayCtrl 800851) ctrlSetModelDirAndUp [[1,0,0], _up];
|
||||
};
|
||||
};
|
||||
}, 0, [_unit, _attachToVehicle, _itemClassname, _itemVehClass, _onAtachText, _actionID]] call CBA_fnc_addPerFrameHandler;
|
||||
}, 0, [_unit, _attachToVehicle, _itemClassname, _itemVehClass, _onAttachText, _actionID]] call CBA_fnc_addPerFrameHandler;
|
||||
};
|
||||
|
@ -21,10 +21,8 @@ params ["_attachToVehicle","_player","_args"];
|
||||
_args params [["_itemClassname","", [""]]];
|
||||
TRACE_3("params",_attachToVehicle,_player,_itemClassname);
|
||||
|
||||
private ["_attachLimit", "_attachedObjects"];
|
||||
|
||||
_attachLimit = [6, 1] select (_player == _attachToVehicle);
|
||||
_attachedObjects = _attachToVehicle getVariable [QGVAR(attached), []];
|
||||
private _attachLimit = [6, 1] select (_player == _attachToVehicle);
|
||||
private _attachedObjects = _attachToVehicle getVariable [QGVAR(attached), []];
|
||||
|
||||
((_player == _attachToVehicle) || {canStand _player}) &&
|
||||
{(_attachToVehicle distance _player) < 10} &&
|
||||
|
@ -24,9 +24,7 @@ if ((vehicle _unit) != _unit) exitWith {false};
|
||||
private _attachedList = _attachToVehicle getVariable [QGVAR(attached), []];
|
||||
if ((count _attachedList) == 0) exitWith {false};
|
||||
|
||||
private ["_inRange"];
|
||||
|
||||
_inRange = false;
|
||||
private _inRange = false;
|
||||
{
|
||||
_x params ["_xObject"];
|
||||
if (isNull _xObject) exitWith {
|
||||
|
@ -19,16 +19,14 @@
|
||||
params ["_attachToVehicle","_unit"],
|
||||
TRACE_2("params",_attachToVehicle,_unit);
|
||||
|
||||
private ["_attachedList", "_itemDisplayName", "_attachedObject", "_attachedIndex", "_itemName", "_minDistance", "_isChemlight"];
|
||||
private _attachedList = _attachToVehicle getVariable [QGVAR(attached), []];
|
||||
|
||||
_attachedList = _attachToVehicle getVariable [QGVAR(attached), []];
|
||||
|
||||
_attachedObject = objNull;
|
||||
_attachedIndex = -1;
|
||||
_itemName = "";
|
||||
private _attachedObject = objNull;
|
||||
private _attachedIndex = -1;
|
||||
private _itemName = "";
|
||||
|
||||
//Find closest attached object
|
||||
_minDistance = 1000;
|
||||
private _minDistance = 1000;
|
||||
|
||||
{
|
||||
_x params ["_xObject", "_xItemName"];
|
||||
@ -45,7 +43,7 @@ _minDistance = 1000;
|
||||
if (isNull _attachedObject || {_itemName == ""}) exitWith {ERROR("Could not find attached object")};
|
||||
|
||||
// Check if item is a chemlight
|
||||
_isChemlight = _attachedObject isKindOf "Chemlight_base";
|
||||
private _isChemlight = _attachedObject isKindOf "Chemlight_base";
|
||||
|
||||
// Exit if can't add the item
|
||||
if (!(_unit canAdd _itemName) && {!_isChemlight}) exitWith {
|
||||
@ -80,7 +78,7 @@ _attachedList deleteAt _attachedIndex;
|
||||
_attachToVehicle setVariable [QGVAR(attached), _attachedList, true];
|
||||
|
||||
// Display message
|
||||
_itemDisplayName = getText (configFile >> "CfgWeapons" >> _itemName >> "displayName");
|
||||
private _itemDisplayName = getText (configFile >> "CfgWeapons" >> _itemName >> "displayName");
|
||||
if (_itemDisplayName == "") then {
|
||||
_itemDisplayName = getText (configFile >> "CfgMagazines" >> _itemName >> "displayName");
|
||||
};
|
||||
|
@ -17,21 +17,20 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_listed", "_actions", "_item", "_displayName", "_picture", "_action"];
|
||||
params ["_target","_player"];
|
||||
TRACE_2("params",_target,_player);
|
||||
|
||||
_listed = [];
|
||||
_actions = [];
|
||||
private _listed = [];
|
||||
private _actions = [];
|
||||
|
||||
{
|
||||
if !(_x in _listed) then {
|
||||
_listed pushBack _x;
|
||||
_item = ConfigFile >> "CfgMagazines" >> _x;
|
||||
private _item = ConfigFile >> "CfgMagazines" >> _x;
|
||||
if (getText (_item >> "ACE_Attachable") != "") then {
|
||||
_displayName = getText(_item >> "displayName");
|
||||
_picture = getText(_item >> "picture");
|
||||
_action = [_x, _displayName, _picture, {[{_this call FUNC(attach)}, _this] call CBA_fnc_execNextFrame}, {_this call FUNC(canAttach)}, {}, [_x]] call EFUNC(interact_menu,createAction);
|
||||
private _displayName = getText(_item >> "displayName");
|
||||
private _picture = getText(_item >> "picture");
|
||||
private _action = [_x, _displayName, _picture, {[{_this call FUNC(attach)}, _this] call CBA_fnc_execNextFrame}, {true}, {}, [_x]] call EFUNC(interact_menu,createAction);
|
||||
_actions pushBack [_action, [], _target];
|
||||
};
|
||||
};
|
||||
@ -40,11 +39,11 @@ _actions = [];
|
||||
{
|
||||
if !(_x in _listed) then {
|
||||
_listed pushBack _x;
|
||||
_item = ConfigFile >> "CfgWeapons" >> _x;
|
||||
private _item = ConfigFile >> "CfgWeapons" >> _x;
|
||||
if (getText (_item >> "ACE_Attachable") != "") then {
|
||||
_displayName = getText(_item >> "displayName");
|
||||
_picture = getText(_item >> "picture");
|
||||
_action = [_x, _displayName, _picture, {[{_this call FUNC(attach)}, _this] call CBA_fnc_execNextFrame}, {_this call FUNC(canAttach)}, {}, [_x]] call EFUNC(interact_menu,createAction);
|
||||
private _displayName = getText(_item >> "displayName");
|
||||
private _picture = getText(_item >> "picture");
|
||||
private _action = [_x, _displayName, _picture, {[{_this call FUNC(attach)}, _this] call CBA_fnc_execNextFrame}, {true}, {}, [_x]] call EFUNC(interact_menu,createAction);
|
||||
_actions pushBack [_action, [], _target];
|
||||
};
|
||||
};
|
||||
|
@ -25,38 +25,47 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_startingOffset", "_startDistanceFromCenter", "_closeInUnitVector", "_closeInMax", "_closeInMin", "_closeInDistance", "_endPosTestOffset", "_endPosTest", "_doesIntersect", "_startingPosShifted", "_startASL", "_endPosShifted", "_endASL", "_attachedObject", "_attachList"];
|
||||
params ["_unit", "_attachToVehicle", "_itemClassname", "_itemVehClass", "_onAttachText", "_startingPosition"];
|
||||
TRACE_6("params",_unit,_attachToVehicle,_itemClassname,_itemVehClass,_onAttachText,_startingPosition);
|
||||
|
||||
params ["_unit", "_attachToVehicle", "_itemClassname", "_itemVehClass", "_onAtachText", "_startingPosition"];
|
||||
TRACE_6("params",_unit,_attachToVehicle,_itemClassname,_itemVehClass,_onAtachText,_startingPosition);
|
||||
private _startingOffset = _attachToVehicle worldToModel _startingPosition;
|
||||
|
||||
_startingOffset = _attachToVehicle worldToModel _startingPosition;
|
||||
private _startDistanceFromCenter = vectorMagnitude _startingOffset;
|
||||
private _closeInUnitVector = vectorNormalized (_startingOffset vectorFromTo [0,0,0]);
|
||||
|
||||
_startDistanceFromCenter = vectorMagnitude _startingOffset;
|
||||
_closeInUnitVector = vectorNormalized (_startingOffset vectorFromTo [0,0,0]);
|
||||
|
||||
_closeInMax = _startDistanceFromCenter;
|
||||
_closeInMin = 0;
|
||||
private _closeInMax = _startDistanceFromCenter;
|
||||
private _closeInMin = 0;
|
||||
|
||||
while {(_closeInMax - _closeInMin) > 0.01} do {
|
||||
_closeInDistance = (_closeInMax + _closeInMin) / 2;
|
||||
private _closeInDistance = (_closeInMax + _closeInMin) / 2;
|
||||
// systemChat format ["Trying %1 from %2 start %3", _closeInDistance, [_closeInMax, _closeInMin], _startDistanceFromCenter];
|
||||
_endPosTestOffset = _startingOffset vectorAdd (_closeInUnitVector vectorMultiply _closeInDistance);
|
||||
private _endPosTestOffset = _startingOffset vectorAdd (_closeInUnitVector vectorMultiply _closeInDistance);
|
||||
_endPosTestOffset set [2, (_startingOffset select 2)];
|
||||
_endPosTest = _attachToVehicle modelToWorldVisual _endPosTestOffset;
|
||||
private _endPosTest = _attachToVehicle modelToWorldVisual _endPosTestOffset;
|
||||
|
||||
_doesIntersect = false;
|
||||
private _doesIntersect = false;
|
||||
{
|
||||
if (_doesIntersect) exitWith {};
|
||||
_startingPosShifted = _startingPosition vectorAdd _x;
|
||||
_startASL = if (surfaceIsWater _startingPosShifted) then {_startingPosShifted} else {ATLtoASL _startingPosShifted};
|
||||
private _startingPosShifted = _startingPosition vectorAdd _x;
|
||||
private _startASL = if (surfaceIsWater _startingPosShifted) then {_startingPosShifted} else {ATLtoASL _startingPosShifted};
|
||||
{
|
||||
_endPosShifted = _endPosTest vectorAdd _x;
|
||||
_endASL = if (surfaceIsWater _startingPosShifted) then {_endPosShifted} else {ATLtoASL _endPosShifted};
|
||||
private _endPosShifted = _endPosTest vectorAdd _x;
|
||||
private _endASL = if (surfaceIsWater _startingPosShifted) then {_endPosShifted} else {ATLtoASL _endPosShifted};
|
||||
|
||||
//Uncomment to see the lazor show, and see how the scanning works:
|
||||
// drawLine3D [_startingPosShifted, _endPosShifted, [1,0,0,1]];
|
||||
if (_attachToVehicle in lineIntersectsWith [_startASL, _endASL, _unit]) exitWith {_doesIntersect = true};
|
||||
#ifdef DRAW_ATTACH_SCAN
|
||||
[{
|
||||
params ["_args", "_idPFH"];
|
||||
_args params ["_startingPosShifted", "_endPosShifted", "_timeAdded"];
|
||||
drawLine3D [_startingPosShifted, _endPosShifted, [1,0,0,1]];
|
||||
if (_timeAdded + 5 < CBA_missionTime) then {
|
||||
[_idPFH] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
}, 0, [_startingPosShifted, _endPosShifted, CBA_missionTime]] call CBA_fnc_addPerFrameHandler;
|
||||
#endif
|
||||
|
||||
// Default max results is 1, so take only first subarray and select parentObject (object itself or parent of proxy)
|
||||
private _intersectObject = ((lineIntersectsSurfaces [_startASL, _endASL, _unit]) param [0, objNull]) param [3, objNull];
|
||||
if (_attachToVehicle == _intersectObject) exitWith {_doesIntersect = true};
|
||||
} forEach [[0,0,0.045], [0,0,-0.045], [0,0.045,0], [0,-0.045,0], [0.045,0,0], [-0.045,0,0]];
|
||||
} forEach [[0,0,0], [0,0,0.05], [0,0,-0.05]];
|
||||
|
||||
@ -67,7 +76,7 @@ while {(_closeInMax - _closeInMin) > 0.01} do {
|
||||
};
|
||||
};
|
||||
|
||||
_closeInDistance = (_closeInMax + _closeInMin) / 2;
|
||||
private _closeInDistance = (_closeInMax + _closeInMin) / 2;
|
||||
|
||||
//Checks (too close to center or can't attach)
|
||||
if (((_startDistanceFromCenter - _closeInDistance) < 0.1) || {!([_attachToVehicle, _unit, _itemClassname] call FUNC(canAttach))}) exitWith {
|
||||
@ -79,17 +88,17 @@ if (((_startDistanceFromCenter - _closeInDistance) < 0.1) || {!([_attachToVehicl
|
||||
_closeInDistance = (_closeInDistance - 0.0085);
|
||||
|
||||
//Create New 'real' Object
|
||||
_endPosTestOffset = _startingOffset vectorAdd (_closeInUnitVector vectorMultiply _closeInDistance);
|
||||
private _endPosTestOffset = _startingOffset vectorAdd (_closeInUnitVector vectorMultiply _closeInDistance);
|
||||
_endPosTestOffset set [2, (_startingOffset select 2)];
|
||||
_attachedObject = _itemVehClass createVehicle (getPos _unit);
|
||||
private _attachedObject = _itemVehClass createVehicle (getPos _unit);
|
||||
_attachedObject attachTo [_attachToVehicle, _endPosTestOffset];
|
||||
|
||||
//Remove Item from inventory
|
||||
_unit removeItem _itemClassname;
|
||||
|
||||
//Add Object to attached array
|
||||
_attachList = _attachToVehicle getVariable [QGVAR(attached), []];
|
||||
private _attachList = _attachToVehicle getVariable [QGVAR(attached), []];
|
||||
_attachList pushBack [_attachedObject, _itemClassname];
|
||||
_attachToVehicle setVariable [QGVAR(attached), _attachList, true];
|
||||
|
||||
[_onAtachText] call EFUNC(common,displayTextStructured);
|
||||
[_onAttachText] call EFUNC(common,displayTextStructured);
|
||||
|
@ -2,6 +2,7 @@
|
||||
#define COMPONENT_BEAUTIFIED Attach
|
||||
#include "\z\ace\addons\main\script_mod.hpp"
|
||||
|
||||
// #define DRAW_ATTACH_SCAN
|
||||
// #define DEBUG_MODE_FULL
|
||||
// #define DISABLE_COMPILE_CACHE
|
||||
// #define ENABLE_PERFORMANCE_COUNTERS
|
||||
|
@ -7,7 +7,7 @@ class CfgAmmo {
|
||||
};
|
||||
|
||||
class B_556x45_Ball : BulletBase {
|
||||
airFriction=-0.00126466;
|
||||
airFriction=-0.00130094;
|
||||
tracerScale = 1;
|
||||
tracerStartTime=0.073; // M856 tracer burns out to 800m
|
||||
tracerEndTime=1.57123; // Time in seconds calculated with ballistics calculator
|
||||
@ -23,10 +23,11 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={210.82, 238.76, 269.24, 299.72, 330.2, 360.68, 391.16, 419.1, 449.58, 480.06, 508.0, 609.6};
|
||||
};
|
||||
class ACE_556x45_Ball_Mk262 : B_556x45_Ball {
|
||||
airFriction=-0.00109563;
|
||||
airFriction=-0.00111805;
|
||||
ACE_caliber=5.69;
|
||||
ACE_bulletLength=23.012;
|
||||
ACE_bulletMass=4.9896;
|
||||
ACE_muzzleVelocityVariationSD=0.4;
|
||||
ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19};
|
||||
ACE_ballisticCoefficients[]={0.361};
|
||||
ACE_velocityBoundaries[]={};
|
||||
@ -36,7 +37,7 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={190.5, 368.3, 457.2, 508.0};
|
||||
};
|
||||
class ACE_556x45_Ball_Mk318 : B_556x45_Ball {
|
||||
airFriction=-0.00123318;
|
||||
airFriction=-0.0012588;
|
||||
ACE_caliber=5.69;
|
||||
ACE_bulletLength=23.012;
|
||||
ACE_bulletMass=4.0176;
|
||||
@ -49,7 +50,7 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={254.0, 393.7, 508.0};
|
||||
};
|
||||
class ACE_556x45_Ball_M995_AP : B_556x45_Ball {
|
||||
airFriction=-0.00123272;
|
||||
airFriction=-0.00126182;
|
||||
caliber=1.6;
|
||||
ACE_caliber=5.69;
|
||||
ACE_bulletLength=23.012;
|
||||
@ -67,7 +68,7 @@ class CfgAmmo {
|
||||
nvgOnly = 1;
|
||||
};
|
||||
class B_545x39_Ball_F : BulletBase {
|
||||
airFriction=-0.00116278;
|
||||
airFriction=-0.00119458;
|
||||
ACE_caliber=5.588;
|
||||
ACE_bulletLength=21.59;
|
||||
ACE_bulletMass=3.42792;
|
||||
@ -83,7 +84,7 @@ class CfgAmmo {
|
||||
tracerScale = 0.5;
|
||||
};
|
||||
class B_580x42_Ball_F: BulletBase {
|
||||
airFriction=-0.00117956;
|
||||
airFriction=-0.00121087;
|
||||
ACE_caliber=5.9944;
|
||||
ACE_bulletLength=24.2;
|
||||
ACE_bulletMass=4.15;
|
||||
@ -96,7 +97,7 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={369.0, 463.0, 600.0};
|
||||
};
|
||||
class B_65x39_Caseless : BulletBase {
|
||||
airFriction=-0.00075308;
|
||||
airFriction=-0.00077363;
|
||||
tracerScale = 1.1; //1.0;
|
||||
ACE_caliber=6.706;
|
||||
ACE_bulletLength=32.893;
|
||||
@ -118,11 +119,12 @@ class CfgAmmo {
|
||||
nvgOnly = 1;
|
||||
};
|
||||
class ACE_65x47_Ball_Scenar: B_65x39_Caseless {
|
||||
airFriction=-0.00067037;
|
||||
airFriction=-0.00069003;
|
||||
caliber=0.9;
|
||||
ACE_caliber=6.706;
|
||||
ACE_bulletLength=34.646;
|
||||
ACE_bulletMass=9.0072;
|
||||
ACE_muzzleVelocityVariationSD=0.35;
|
||||
ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19};
|
||||
ACE_ballisticCoefficients[]={0.290};
|
||||
ACE_velocityBoundaries[]={};
|
||||
@ -132,11 +134,12 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={254.0, 406.4, 508.0, 609.6, 660.4};
|
||||
};
|
||||
class ACE_65_Creedmor_Ball: B_65x39_Caseless {
|
||||
airFriction=-0.00060887;
|
||||
airFriction=-0.00062437;
|
||||
caliber=1.1;
|
||||
ACE_caliber=6.706;
|
||||
ACE_bulletLength=36.22;
|
||||
ACE_bulletMass=9.072;
|
||||
ACE_muzzleVelocityVariationSD=0.3;
|
||||
ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19};
|
||||
ACE_ballisticCoefficients[]={0.317};
|
||||
ACE_velocityBoundaries[]={};
|
||||
@ -150,7 +153,7 @@ class CfgAmmo {
|
||||
tracerScale = 1.1; //1.0;
|
||||
};
|
||||
class B_762x51_Ball : BulletBase {
|
||||
airFriction=-0.00100957;
|
||||
airFriction=-0.00103711;
|
||||
tracerScale = 1.2; //0.6;
|
||||
tracerStartTime=0.073; // Based on the British L5A1 which burns out to 1000m
|
||||
tracerEndTime=2.15957; // Time in seconds calculated with ballistics calculator
|
||||
@ -170,13 +173,14 @@ class CfgAmmo {
|
||||
nvgOnly = 1;
|
||||
};
|
||||
class ACE_762x51_Ball_M118LR : B_762x51_Ball {
|
||||
airFriction=-0.00082828;
|
||||
airFriction=-0.00085157;
|
||||
caliber=1.8;
|
||||
hit=16;
|
||||
typicalSpeed=790;
|
||||
ACE_caliber=7.823;
|
||||
ACE_bulletLength=31.496;
|
||||
ACE_bulletMass=11.34;
|
||||
ACE_muzzleVelocityVariationSD=0.4;
|
||||
ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19};
|
||||
ACE_ballisticCoefficients[]={0.243};
|
||||
ACE_velocityBoundaries[]={};
|
||||
@ -186,13 +190,14 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4};
|
||||
};
|
||||
class ACE_762x51_Ball_Mk316_Mod_0 : B_762x51_Ball {
|
||||
airFriction=-0.00082029;
|
||||
airFriction=-0.00084311;
|
||||
caliber=1.8;
|
||||
hit=16;
|
||||
typicalSpeed=790;
|
||||
ACE_caliber=7.823;
|
||||
ACE_bulletLength=31.496;
|
||||
ACE_bulletMass=11.34;
|
||||
ACE_muzzleVelocityVariationSD=0.45;
|
||||
ACE_ammoTempMuzzleVelocityShifts[]={-5.3, -5.1, -4.6, -4.2, -3.4, -2.6, -1.4, -0.3, 1.4, 3.0, 5.2};
|
||||
ACE_ballisticCoefficients[]={0.243};
|
||||
ACE_velocityBoundaries[]={};
|
||||
@ -202,13 +207,14 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4};
|
||||
};
|
||||
class ACE_762x51_Ball_Mk319_Mod_0 : B_762x51_Ball {
|
||||
airFriction=-0.00102338;
|
||||
airFriction=-0.00104515;
|
||||
caliber=1.5;
|
||||
hit=14;
|
||||
typicalSpeed=900;
|
||||
ACE_caliber=7.823;
|
||||
ACE_bulletLength=31.496;
|
||||
ACE_bulletMass=8.424;
|
||||
ACE_muzzleVelocityVariationSD=0.45;
|
||||
ACE_ammoTempMuzzleVelocityShifts[]={-2.655, -2.547, -2.285, -2.012, -1.698, -1.280, -0.764, -0.153, 0.596, 1.517, 2.619};
|
||||
ACE_ballisticCoefficients[]={0.377};
|
||||
ACE_velocityBoundaries[]={};
|
||||
@ -218,7 +224,7 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={330.2, 406.4, 508.0};
|
||||
};
|
||||
class ACE_762x51_Ball_M993_AP : B_762x51_Ball {
|
||||
airFriction=-0.00107148;
|
||||
airFriction=-0.0010939;
|
||||
caliber=2.2;
|
||||
hit=11;
|
||||
typicalSpeed=910;
|
||||
@ -234,7 +240,7 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={330.2, 406.4, 508.0};
|
||||
};
|
||||
class ACE_762x51_Ball_Subsonic : B_762x51_Ball {
|
||||
airFriction=-0.00049899;
|
||||
airFriction=-0.00060194;
|
||||
caliber=1;
|
||||
hit=6;
|
||||
typicalSpeed=320;
|
||||
@ -250,13 +256,14 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4};
|
||||
};
|
||||
class ACE_762x67_Ball_Mk248_Mod_0 : B_762x51_Ball {
|
||||
airFriction=-0.00070530;
|
||||
airFriction=-0.00072468;
|
||||
caliber=1.8;
|
||||
hit=17;
|
||||
typicalSpeed=900;
|
||||
ACE_caliber=7.823;
|
||||
ACE_bulletLength=34.366;
|
||||
ACE_bulletMass=12.312;
|
||||
ACE_muzzleVelocityVariationSD=0.45;
|
||||
ACE_ammoTempMuzzleVelocityShifts[]={-5.3, -5.1, -4.6, -4.2, -3.4, -2.6, -1.4, -0.3, 1.4, 3.0, 5.2};
|
||||
ACE_ballisticCoefficients[]={0.268};
|
||||
ACE_velocityBoundaries[]={};
|
||||
@ -266,13 +273,14 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={508.0, 609.6, 660.4};
|
||||
};
|
||||
class ACE_762x67_Ball_Mk248_Mod_1 : B_762x51_Ball {
|
||||
airFriction=-0.00061188;
|
||||
airFriction=-0.00063027;
|
||||
caliber=1.9;
|
||||
hit=18;
|
||||
typicalSpeed=867;
|
||||
ACE_caliber=7.823;
|
||||
ACE_bulletLength=37.821;
|
||||
ACE_bulletMass=14.256;
|
||||
ACE_muzzleVelocityVariationSD=0.45;
|
||||
ACE_ammoTempMuzzleVelocityShifts[]={-5.3, -5.1, -4.6, -4.2, -3.4, -2.6, -1.4, -0.3, 1.4, 3.0, 5.2};
|
||||
ACE_ballisticCoefficients[]={0.310};
|
||||
ACE_velocityBoundaries[]={};
|
||||
@ -282,13 +290,14 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={508.0, 609.6, 660.4};
|
||||
};
|
||||
class ACE_762x67_Ball_Berger_Hybrid_OTM : B_762x51_Ball {
|
||||
airFriction=-0.00053733;
|
||||
airFriction=-0.00055262;
|
||||
caliber=2.0;
|
||||
hit=19;
|
||||
typicalSpeed=853;
|
||||
ACE_caliber=7.823;
|
||||
ACE_bulletLength=40.691;
|
||||
ACE_bulletMass=14.904;
|
||||
ACE_muzzleVelocityVariationSD=0.35;
|
||||
ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19};
|
||||
ACE_ballisticCoefficients[]={0.368};
|
||||
ACE_velocityBoundaries[]={};
|
||||
@ -298,7 +307,8 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={508.0, 609.6, 660.4};
|
||||
};
|
||||
class B_762x54_Ball: B_762x51_Ball {
|
||||
airFriction=-0.00100023;
|
||||
airFriction=-0.00101071;
|
||||
typicalSpeed=835;
|
||||
ACE_caliber=7.925;
|
||||
ACE_bulletLength=28.956;
|
||||
ACE_bulletMass=9.8496;
|
||||
@ -307,12 +317,12 @@ class CfgAmmo {
|
||||
ACE_velocityBoundaries[]={};
|
||||
ACE_standardAtmosphere="ICAO";
|
||||
ACE_dragModel=1;
|
||||
ACE_muzzleVelocities[]={700, 800, 820, 833};
|
||||
ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4};
|
||||
ACE_muzzleVelocities[]={760, 795, 835, 865};
|
||||
ACE_barrelLengths[]={406.4, 508.0, 604.5, 736.6};
|
||||
};
|
||||
class B_762x54_Tracer_Green;
|
||||
class ACE_762x54_Ball_7T2 : B_762x54_Tracer_Green {
|
||||
airFriction=-0.00103989;
|
||||
airFriction=-0.00103739;
|
||||
typicalSpeed=800;
|
||||
tracerStartTime=0.073; // Based on the 7T2 which burns three seconds
|
||||
tracerEndTime=3;
|
||||
@ -324,11 +334,11 @@ class CfgAmmo {
|
||||
ACE_velocityBoundaries[]={};
|
||||
ACE_standardAtmosphere="ICAO";
|
||||
ACE_dragModel=1;
|
||||
ACE_muzzleVelocities[]={680, 750, 798, 800};
|
||||
ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4};
|
||||
ACE_muzzleVelocities[]={735, 770, 809, 838};
|
||||
ACE_barrelLengths[]={406.4, 508.0, 604.5, 736.6};
|
||||
};
|
||||
class B_762x39_Ball_F : BulletBase {
|
||||
airFriction=-0.00151621;
|
||||
airFriction=-0.00154815;
|
||||
ACE_caliber=7.823;
|
||||
ACE_bulletLength=28.956;
|
||||
ACE_bulletMass=7.9704;
|
||||
@ -341,7 +351,7 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={254.0, 414.02, 508.0};
|
||||
};
|
||||
class B_9x21_Ball : BulletBase {
|
||||
airFriction=-0.00208292;
|
||||
airFriction=-0.00211064;
|
||||
tracerScale = 0.5;
|
||||
ACE_caliber=9.042;
|
||||
ACE_bulletLength=15.494;
|
||||
@ -358,7 +368,7 @@ class CfgAmmo {
|
||||
tracerScale = 0.5;
|
||||
};
|
||||
class ACE_9x19_Ball : B_9x21_Ball {
|
||||
airFriction=-0.0019835;
|
||||
airFriction=-0.00201185;
|
||||
ACE_caliber=9.017;
|
||||
ACE_bulletLength=15.494;
|
||||
ACE_bulletMass=8.0352;
|
||||
@ -371,10 +381,11 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={101.6, 127.0, 228.6};
|
||||
};
|
||||
class B_93x64_Ball : BulletBase {
|
||||
airFriction=-0.00108571;
|
||||
airFriction=-0.00110727;
|
||||
ACE_caliber=9.296;
|
||||
ACE_bulletLength=34.29;
|
||||
ACE_bulletMass=14.904;
|
||||
ACE_muzzleVelocityVariationSD=0.4;
|
||||
ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19};
|
||||
ACE_ballisticCoefficients[]={0.368};
|
||||
ACE_velocityBoundaries[]={};
|
||||
@ -385,12 +396,13 @@ class CfgAmmo {
|
||||
};
|
||||
class B_408_Ball : BulletBase {
|
||||
timeToLive=10;
|
||||
airFriction=-0.00044958;
|
||||
airFriction=-0.00046249;
|
||||
tracerScale = 1.3;
|
||||
ACE_caliber=10.363;
|
||||
ACE_bulletLength=55.1942;
|
||||
ACE_bulletMass=27.1507; // 419 gr
|
||||
ACE_transonicStabilityCoef=1;
|
||||
ACE_muzzleVelocityVariationSD=0.2;
|
||||
ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19};
|
||||
ACE_ballisticCoefficients[]={0.434};
|
||||
ACE_velocityBoundaries[]={};
|
||||
@ -401,13 +413,14 @@ class CfgAmmo {
|
||||
};
|
||||
class ACE_408_Ball : BulletBase {
|
||||
timeToLive=10;
|
||||
airFriction=-0.00063655;
|
||||
airFriction=-0.00065414;
|
||||
typicalSpeed=1067;
|
||||
tracerScale = 1.3;
|
||||
ACE_caliber=10.363;
|
||||
ACE_bulletLength=41.4528;
|
||||
ACE_bulletMass=19.7637; // 305 gr
|
||||
ACE_transonicStabilityCoef=1;
|
||||
ACE_muzzleVelocityVariationSD=0.2;
|
||||
ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19};
|
||||
ACE_ballisticCoefficients[]={0.279};
|
||||
ACE_velocityBoundaries[]={};
|
||||
@ -418,10 +431,11 @@ class CfgAmmo {
|
||||
};
|
||||
class B_338_Ball : BulletBase {
|
||||
timeToLive=10;
|
||||
airFriction=-0.00059133;
|
||||
airFriction=-0.00060841;
|
||||
ACE_caliber=8.585;
|
||||
ACE_bulletLength=39.573;
|
||||
ACE_bulletMass=16.2;
|
||||
ACE_muzzleVelocityVariationSD=0.3;
|
||||
ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19};
|
||||
ACE_ballisticCoefficients[]={0.322};
|
||||
ACE_velocityBoundaries[]={};
|
||||
@ -431,7 +445,7 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={508.0, 660.4, 711.2};
|
||||
};
|
||||
class B_338_NM_Ball : BulletBase {
|
||||
airFriction=-0.00052201;
|
||||
airFriction=-0.00053639;
|
||||
ACE_caliber=8.585;
|
||||
ACE_bulletLength=43.18;
|
||||
ACE_bulletMass=19.44;
|
||||
@ -445,11 +459,12 @@ class CfgAmmo {
|
||||
};
|
||||
class ACE_338_Ball : B_338_Ball {
|
||||
timeToLive=10;
|
||||
airFriction=-0.00052190;
|
||||
airFriction=-0.00055706;
|
||||
typicalSpeed=826;
|
||||
ACE_caliber=8.585;
|
||||
ACE_bulletLength=43.18;
|
||||
ACE_bulletMass=19.44;
|
||||
ACE_muzzleVelocityVariationSD=0.3;
|
||||
ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19};
|
||||
ACE_ballisticCoefficients[]={0.368};
|
||||
ACE_velocityBoundaries[]={};
|
||||
@ -460,12 +475,13 @@ class CfgAmmo {
|
||||
};
|
||||
class ACE_338_Ball_API526 : B_338_Ball {
|
||||
timeToLive=10;
|
||||
airFriction=-0.00069611;
|
||||
airFriction=-0.0006922;
|
||||
caliber=2.8;
|
||||
typicalSpeed=895;
|
||||
ACE_caliber=8.585;
|
||||
ACE_bulletLength=38.989;
|
||||
ACE_bulletMass=16.3941242;
|
||||
ACE_muzzleVelocityVariationSD=0.4;
|
||||
ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19};
|
||||
ACE_ballisticCoefficients[]={0.290};
|
||||
ACE_velocityBoundaries[]={};
|
||||
@ -478,7 +494,7 @@ class CfgAmmo {
|
||||
tracerScale = 1.3; //1.2;
|
||||
};
|
||||
class B_127x54_Ball : BulletBase {
|
||||
airFriction=-0.00019268;
|
||||
airFriction=-0.00019568;
|
||||
tracerScale = 1.3;//
|
||||
ACE_caliber=12.954;
|
||||
ACE_bulletLength=64.516;
|
||||
@ -493,11 +509,12 @@ class CfgAmmo {
|
||||
};
|
||||
class B_127x99_Ball : BulletBase {
|
||||
timeToLive=10;
|
||||
airFriction=-0.00057503;
|
||||
airFriction=-0.00058679;
|
||||
tracerScale = 1.3; //1.2;
|
||||
ACE_caliber=12.954;
|
||||
ACE_bulletLength=58.674;
|
||||
ACE_bulletMass=41.9256;
|
||||
ACE_muzzleVelocityVariationSD=0.35;
|
||||
ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19};
|
||||
ACE_ballisticCoefficients[]={0.670};
|
||||
ACE_velocityBoundaries[]={};
|
||||
@ -508,13 +525,14 @@ class CfgAmmo {
|
||||
};
|
||||
class ACE_127x99_API : B_127x99_Ball {
|
||||
timeToLive=10;
|
||||
airFriction=-0.00057503;
|
||||
airFriction=-0.00058679;
|
||||
tracerScale = 1.3;//
|
||||
hit=25;
|
||||
caliber=4.0;
|
||||
ACE_caliber=12.954;
|
||||
ACE_bulletLength=58.674;
|
||||
ACE_bulletMass=41.9904;
|
||||
ACE_muzzleVelocityVariationSD=0.4;
|
||||
ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19};
|
||||
ACE_ballisticCoefficients[]={0.670};
|
||||
ACE_velocityBoundaries[]={};
|
||||
@ -525,11 +543,12 @@ class CfgAmmo {
|
||||
};
|
||||
class ACE_127x99_Ball_AMAX : B_127x99_Ball {
|
||||
timeToLive=10;
|
||||
airFriction=-0.00036645;
|
||||
airFriction=-0.00037397;
|
||||
caliber=3.0;
|
||||
ACE_caliber=12.954;
|
||||
ACE_bulletLength=64.516;
|
||||
ACE_bulletMass=48.6;
|
||||
ACE_muzzleVelocityVariationSD=0.2;
|
||||
ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19};
|
||||
ACE_ballisticCoefficients[]={1.050};
|
||||
ACE_velocityBoundaries[]={};
|
||||
@ -540,7 +559,7 @@ class CfgAmmo {
|
||||
};
|
||||
class B_127x108_Ball : BulletBase {
|
||||
timeToLive=10;
|
||||
airFriction=-0.00063800;
|
||||
airFriction=-0.00065098;
|
||||
tracerScale = 1.3; //1.5;
|
||||
ACE_caliber=12.979;
|
||||
ACE_bulletLength=64.008;
|
||||
@ -553,8 +572,12 @@ class CfgAmmo {
|
||||
ACE_muzzleVelocities[]={820};
|
||||
ACE_barrelLengths[]={728.98};
|
||||
};
|
||||
class B_127x108_APDS: B_127x108_Ball {
|
||||
typicalSpeed = 820;
|
||||
airFriction = -0.00065098;
|
||||
};
|
||||
class B_45ACP_Ball : BulletBase {
|
||||
airFriction=-0.00081221;
|
||||
airFriction=-0.00082143;
|
||||
tracerScale = 0.6;
|
||||
ACE_caliber=11.481;
|
||||
ACE_bulletLength=17.272;
|
||||
@ -568,7 +591,7 @@ class CfgAmmo {
|
||||
ACE_barrelLengths[]={101.6, 127.0, 228.6};
|
||||
};
|
||||
class B_50BW_Ball_F : BulletBase {
|
||||
airFriction=-0.00202645;
|
||||
airFriction=-0.00205896;
|
||||
ACE_caliber=12.7;
|
||||
ACE_bulletLength=24.13;
|
||||
ACE_bulletMass=21.7076;
|
||||
|
@ -2,24 +2,24 @@
|
||||
class CfgMagazines {
|
||||
|
||||
class CA_Magazine;
|
||||
class VehicleMagazine;
|
||||
|
||||
class 30Rnd_580x42_Mag_F: CA_Magazine {
|
||||
initSpeed = 930;
|
||||
};
|
||||
class 100Rnd_580x42_Mag_F: 30Rnd_580x42_Mag_F {
|
||||
initSpeed = 930;
|
||||
initSpeed = 950;
|
||||
};
|
||||
class 20Rnd_650x39_Cased_Mag_F: CA_Magazine {
|
||||
initSpeed = 760;
|
||||
initSpeed = 806;
|
||||
};
|
||||
class 30Rnd_65x39_caseless_mag: CA_Magazine {
|
||||
initSpeed = 760;
|
||||
initSpeed = 774;
|
||||
};
|
||||
class 30Rnd_65x39_caseless_green: 30Rnd_65x39_caseless_mag {
|
||||
initSpeed = 788;
|
||||
};
|
||||
class 100Rnd_65x39_caseless_mag: CA_Magazine {
|
||||
initSpeed = 760;
|
||||
};
|
||||
class 100Rnd_65x39_caseless_mag_Tracer: 100Rnd_65x39_caseless_mag {
|
||||
initSpeed = 760;
|
||||
initSpeed = 774;
|
||||
};
|
||||
class 100Rnd_65x39_caseless_mag_Tracer;
|
||||
class ACE_100Rnd_65x39_caseless_mag_Tracer_Dim: 100Rnd_65x39_caseless_mag_Tracer {
|
||||
author = ECSTRING(common,ACETeam);
|
||||
ammo = "ACE_65x39_Caseless_Tracer_Dim";
|
||||
@ -29,7 +29,7 @@ class CfgMagazines {
|
||||
picture = "\A3\weapons_f\data\ui\m_100rnd_65x39_yellow_ca.paa";
|
||||
};
|
||||
class 200Rnd_65x39_cased_Box: 100Rnd_65x39_caseless_mag {
|
||||
initSpeed = 760;
|
||||
initSpeed = 743;
|
||||
};
|
||||
class ACE_200Rnd_65x39_cased_Box_Tracer_Dim: 200Rnd_65x39_cased_Box {
|
||||
author = ECSTRING(common,ACETeam);
|
||||
@ -38,6 +38,7 @@ class CfgMagazines {
|
||||
displayNameShort = CSTRING(200Rnd_65x39_cased_Box_Tracer_DimNameShort);
|
||||
descriptionShort = CSTRING(200Rnd_65x39_cased_Box_Tracer_DimDescription);
|
||||
picture = "\A3\weapons_f\data\ui\m_200rnd_65x39_yellow_ca.paa";
|
||||
initSpeed = 774;
|
||||
};
|
||||
class 30Rnd_65x39_caseless_mag_Tracer;
|
||||
class ACE_30Rnd_65x39_caseless_mag_Tracer_Dim: 30Rnd_65x39_caseless_mag_Tracer {
|
||||
@ -61,6 +62,22 @@ class CfgMagazines {
|
||||
};
|
||||
|
||||
class 30Rnd_556x45_Stanag: CA_Magazine {
|
||||
initSpeed = 909;
|
||||
};
|
||||
class 30Rnd_556x45_Stanag_green: 30Rnd_556x45_Stanag {
|
||||
initSpeed = 869;
|
||||
};
|
||||
class 30Rnd_556x45_Stanag_red: 30Rnd_556x45_Stanag {
|
||||
initSpeed = 869;
|
||||
};
|
||||
class 30Rnd_556x45_Stanag_Tracer_Red: 30Rnd_556x45_Stanag {
|
||||
initSpeed = 869;
|
||||
};
|
||||
class 30Rnd_556x45_Stanag_Tracer_Green: 30Rnd_556x45_Stanag {
|
||||
initSpeed = 869;
|
||||
};
|
||||
class 30Rnd_556x45_Stanag_Tracer_Yellow: 30Rnd_556x45_Stanag {
|
||||
initSpeed = 889;
|
||||
};
|
||||
class ACE_30Rnd_556x45_Stanag_M995_AP_mag: 30Rnd_556x45_Stanag {
|
||||
author = ECSTRING(common,ACETeam);
|
||||
@ -68,7 +85,7 @@ class CfgMagazines {
|
||||
displayName = CSTRING(30Rnd_556x45_Stanag_M995_AP_mag_Name);
|
||||
displayNameShort = CSTRING(30Rnd_556x45_Stanag_M995_AP_mag_NameShort);
|
||||
descriptionShort = CSTRING(30Rnd_556x45_Stanag_M995_AP_mag_Description);
|
||||
initSpeed = 865;
|
||||
initSpeed = 875;
|
||||
};
|
||||
class ACE_30Rnd_556x45_Stanag_Mk262_mag: 30Rnd_556x45_Stanag {
|
||||
author = ECSTRING(common,ACETeam);
|
||||
@ -84,9 +101,7 @@ class CfgMagazines {
|
||||
displayName = CSTRING(30Rnd_556x45_Stanag_Mk318_mag_Name);
|
||||
displayNameShort = CSTRING(30Rnd_556x45_Stanag_Mk318_mag_NameShort);
|
||||
descriptionShort = CSTRING(30Rnd_556x45_Stanag_Mk318_mag_Description);
|
||||
initSpeed = 922;
|
||||
};
|
||||
class 30Rnd_556x45_Stanag_Tracer_Red: 30Rnd_556x45_Stanag {
|
||||
initSpeed = 923;
|
||||
};
|
||||
class ACE_30Rnd_556x45_Stanag_Tracer_Dim: 30Rnd_556x45_Stanag_Tracer_Red {
|
||||
author = ECSTRING(common,ACETeam);
|
||||
@ -98,15 +113,18 @@ class CfgMagazines {
|
||||
};
|
||||
|
||||
class 200Rnd_556x45_Box_F: CA_Magazine {
|
||||
initSpeed = 872;
|
||||
initSpeed = 889;
|
||||
};
|
||||
class 200Rnd_556x45_Box_Red_F: 200Rnd_556x45_Box_F {
|
||||
initSpeed = 869;
|
||||
};
|
||||
|
||||
class 30Rnd_762x39_Mag_F: CA_Magazine {
|
||||
initSpeed = 715;
|
||||
initSpeed = 716;
|
||||
};
|
||||
|
||||
class 20Rnd_762x51_Mag: CA_Magazine {
|
||||
initSpeed = 833;
|
||||
initSpeed = 827;
|
||||
};
|
||||
class 10Rnd_762x51_Mag: 20Rnd_762x51_Mag {
|
||||
initSpeed = 833;
|
||||
@ -140,7 +158,7 @@ class CfgMagazines {
|
||||
displayName = CSTRING(20Rnd_762x51_mag_SDName);
|
||||
displayNameShort = CSTRING(20Rnd_762x51_mag_SDNameShort);
|
||||
descriptionShort = CSTRING(20Rnd_762x51_mag_SDDescription);
|
||||
initSpeed = 325;
|
||||
initSpeed = 330;
|
||||
};
|
||||
|
||||
class ACE_10Rnd_762x51_M118LR_Mag: 10Rnd_762x51_Mag {
|
||||
@ -185,7 +203,7 @@ class CfgMagazines {
|
||||
displayName = CSTRING(20Rnd_762x51_M118LR_Mag_Name);
|
||||
displayNameShort = CSTRING(20Rnd_762x51_M118LR_Mag_NameShort);
|
||||
descriptionShort = CSTRING(20Rnd_762x51_M118LR_Mag_Description);
|
||||
initSpeed = 780;
|
||||
initSpeed = 785;
|
||||
};
|
||||
class ACE_20Rnd_762x51_Mk316_Mod_0_Mag: 20Rnd_762x51_Mag {
|
||||
author = ECSTRING(common,ACETeam);
|
||||
@ -194,7 +212,7 @@ class CfgMagazines {
|
||||
displayName = CSTRING(20Rnd_762x51_Mk316_Mod_0_Mag_Name);
|
||||
displayNameShort = CSTRING(20Rnd_762x51_Mk316_Mod_0_Mag_NameShort);
|
||||
descriptionShort = CSTRING(20Rnd_762x51_Mk316_Mod_0_Mag_Description);
|
||||
initSpeed = 790;
|
||||
initSpeed = 798;
|
||||
};
|
||||
class ACE_20Rnd_762x51_Mk319_Mod_0_Mag: 20Rnd_762x51_Mag {
|
||||
author = ECSTRING(common,ACETeam);
|
||||
@ -202,7 +220,7 @@ class CfgMagazines {
|
||||
displayName = CSTRING(20Rnd_762x51_Mk319_Mod_0_Mag_Name);
|
||||
displayNameShort = CSTRING(20Rnd_762x51_Mk319_Mod_0_Mag_NameShort);
|
||||
descriptionShort = CSTRING(20Rnd_762x51_Mk319_Mod_0_Mag_Description);
|
||||
initSpeed = 900;
|
||||
initSpeed = 910;
|
||||
};
|
||||
class ACE_20Rnd_762x51_M993_AP_Mag: 20Rnd_762x51_Mag {
|
||||
author = ECSTRING(common,ACETeam);
|
||||
@ -211,7 +229,7 @@ class CfgMagazines {
|
||||
displayName = CSTRING(20Rnd_762x51_M993_AP_Mag_Name);
|
||||
displayNameShort = CSTRING(20Rnd_762x51_M993_AP_Mag_NameShort);
|
||||
descriptionShort = CSTRING(20Rnd_762x51_M993_AP_Mag_Description);
|
||||
initSpeed = 920;
|
||||
initSpeed = 930;
|
||||
};
|
||||
class ACE_20Rnd_762x67_Mk248_Mod_0_Mag: 20Rnd_762x51_Mag {
|
||||
author = ECSTRING(common,ACETeam);
|
||||
@ -219,7 +237,7 @@ class CfgMagazines {
|
||||
displayName = CSTRING(20Rnd_762x67_Mk248_Mod_0_Mag_Name);
|
||||
displayNameShort = CSTRING(20Rnd_762x67_Mk248_Mod_0_Mag_NameShort);
|
||||
descriptionShort = CSTRING(20Rnd_762x67_Mk248_Mod_0_Mag_Description);
|
||||
initSpeed = 900;
|
||||
initSpeed = 865;
|
||||
};
|
||||
class ACE_20Rnd_762x67_Mk248_Mod_1_Mag: 20Rnd_762x51_Mag {
|
||||
author = ECSTRING(common,ACETeam);
|
||||
@ -227,7 +245,7 @@ class CfgMagazines {
|
||||
displayName = CSTRING(20Rnd_762x67_Mk248_Mod_1_Mag_Name);
|
||||
displayNameShort = CSTRING(20Rnd_762x67_Mk248_Mod_1_Mag_NameShort);
|
||||
descriptionShort = CSTRING(20Rnd_762x67_Mk248_Mod_1_Mag_Description);
|
||||
initSpeed = 880;
|
||||
initSpeed = 847;
|
||||
};
|
||||
class ACE_20Rnd_762x67_Berger_Hybrid_OTM_Mag: 20Rnd_762x51_Mag {
|
||||
author = ECSTRING(common,ACETeam);
|
||||
@ -235,12 +253,12 @@ class CfgMagazines {
|
||||
displayName = CSTRING(20Rnd_762x67_Berger_Hybrid_OTM_Mag_Name);
|
||||
displayNameShort = CSTRING(20Rnd_762x67_Berger_Hybrid_OTM_Mag_NameShort);
|
||||
descriptionShort = CSTRING(20Rnd_762x67_Berger_Hybrid_OTM_Mag_Description);
|
||||
initSpeed = 832;
|
||||
initSpeed = 800;
|
||||
};
|
||||
class ACE_30Rnd_65x47_Scenar_mag: 30Rnd_65x39_caseless_mag {
|
||||
author = ECSTRING(common,ACETeam);
|
||||
ammo = "ACE_65x47_Ball_Scenar";
|
||||
initSpeed = 761;
|
||||
initSpeed = 826;
|
||||
displayName = CSTRING(30Rnd_65x47_Scenar_mag_Name);
|
||||
displayNameShort = CSTRING(30Rnd_65x47_Scenar_mag_NameShort);
|
||||
descriptionShort = CSTRING(30Rnd_65x47_Scenar_mag_Description);
|
||||
@ -248,7 +266,7 @@ class CfgMagazines {
|
||||
class ACE_20Rnd_65x47_Scenar_mag: 20Rnd_650x39_Cased_Mag_F {
|
||||
author = ECSTRING(common,ACETeam);
|
||||
ammo = "ACE_65x47_Ball_Scenar";
|
||||
initSpeed = 779;
|
||||
initSpeed = 826;
|
||||
displayName = CSTRING(20Rnd_65x47_Scenar_mag_Name);
|
||||
displayNameShort = CSTRING(20Rnd_65x47_Scenar_mag_NameShort);
|
||||
descriptionShort = CSTRING(20Rnd_65x47_Scenar_mag_Description);
|
||||
@ -256,7 +274,7 @@ class CfgMagazines {
|
||||
class ACE_30Rnd_65_Creedmor_mag: 30Rnd_65x39_caseless_mag {
|
||||
author = ECSTRING(common,ACETeam);
|
||||
ammo = "ACE_65_Creedmor_Ball";
|
||||
initSpeed = 815;
|
||||
initSpeed = 857;
|
||||
displayName = CSTRING(30Rnd_65_Creedmor_mag_Name);
|
||||
displayNameShort = CSTRING(30Rnd_65_Creedmor_mag_NameShort);
|
||||
descriptionShort = CSTRING(30Rnd_65_Creedmor_mag_Description);
|
||||
@ -264,12 +282,14 @@ class CfgMagazines {
|
||||
class ACE_20Rnd_65_Creedmor_mag: 20Rnd_650x39_Cased_Mag_F {
|
||||
author = ECSTRING(common,ACETeam);
|
||||
ammo = "ACE_65_Creedmor_Ball";
|
||||
initSpeed = 808;
|
||||
initSpeed = 857;
|
||||
displayName = CSTRING(20Rnd_65_Creedmor_mag_Name);
|
||||
displayNameShort = CSTRING(20Rnd_65_Creedmor_mag_NameShort);
|
||||
descriptionShort = CSTRING(20Rnd_65_Creedmor_mag_Description);
|
||||
};
|
||||
class 10Rnd_338_Mag;
|
||||
class 10Rnd_338_Mag: CA_Magazine {
|
||||
initSpeed = 880;
|
||||
};
|
||||
class ACE_10Rnd_338_300gr_HPBT_Mag: 10Rnd_338_Mag {
|
||||
author = ECSTRING(common,ACETeam);
|
||||
ammo = "ACE_338_Ball";
|
||||
@ -300,6 +320,9 @@ class CfgMagazines {
|
||||
};
|
||||
|
||||
class 5Rnd_127x108_Mag;
|
||||
class 5Rnd_127x108_APDS_Mag: 5Rnd_127x108_Mag {
|
||||
initSpeed = 820;
|
||||
};
|
||||
class ACE_5Rnd_127x99_Mag: 5Rnd_127x108_Mag {
|
||||
author = ECSTRING(common,ACETeam);
|
||||
ammo = "B_127x99_Ball";
|
||||
@ -327,46 +350,47 @@ class CfgMagazines {
|
||||
|
||||
|
||||
class 30Rnd_9x21_Mag: CA_Magazine {
|
||||
initSpeed = 390;
|
||||
initSpeed = 430;
|
||||
};
|
||||
class ACE_30Rnd_9x19_mag: 30Rnd_9x21_Mag {
|
||||
author = ECSTRING(common,ACETeam);
|
||||
ammo = "ACE_9x19_Ball";
|
||||
displayName = CSTRING(30Rnd_9x19_mag_Name);
|
||||
displayNameShort = CSTRING(30Rnd_9x19_mag_NameShort);
|
||||
descriptionShort = CSTRING(30Rnd_9x19_mag_Description);
|
||||
initSpeed = 370;
|
||||
class 30Rnd_9x21_Green_Mag: 30Rnd_9x21_Mag {
|
||||
initSpeed = 402;
|
||||
};
|
||||
class 30Rnd_9x21_Mag_SMG_02: 30Rnd_9x21_Mag {
|
||||
initSpeed = 430;
|
||||
};
|
||||
class 30Rnd_9x21_Mag_SMG_02_Tracer_Green: 30Rnd_9x21_Mag_SMG_02 {
|
||||
initSpeed = 402;
|
||||
};
|
||||
|
||||
class 10Rnd_50BW_Mag_F: CA_Magazine {
|
||||
initSpeed = 552;
|
||||
};
|
||||
|
||||
|
||||
class 11Rnd_45ACP_Mag: CA_Magazine {
|
||||
initSpeed = 250;
|
||||
initSpeed = 254;
|
||||
};
|
||||
|
||||
class 6Rnd_45ACP_Cylinder : 11Rnd_45ACP_Mag {
|
||||
initSpeed = 250;
|
||||
initSpeed = 254;
|
||||
};
|
||||
|
||||
class 30Rnd_45ACP_Mag_SMG_01: 30Rnd_9x21_Mag {
|
||||
initSpeed = 250;
|
||||
initSpeed = 254;
|
||||
};
|
||||
|
||||
class 9Rnd_45ACP_Mag: 30Rnd_45ACP_Mag_SMG_01 {
|
||||
initSpeed = 250;
|
||||
initSpeed = 254;
|
||||
};
|
||||
|
||||
class 30Rnd_45ACP_Mag_SMG_01_Tracer_Green: 30Rnd_45ACP_Mag_SMG_01 {
|
||||
initSpeed = 250;
|
||||
initSpeed = 254;
|
||||
};
|
||||
|
||||
class 16Rnd_9x21_Mag: 30Rnd_9x21_Mag {
|
||||
initSpeed = 390;
|
||||
initSpeed = 430;
|
||||
};
|
||||
class 10Rnd_9x21_Mag: 16Rnd_9x21_Mag {
|
||||
initSpeed = 390;
|
||||
initSpeed = 430;
|
||||
};
|
||||
class ACE_16Rnd_9x19_mag: 16Rnd_9x21_Mag {
|
||||
author = ECSTRING(common,ACETeam);
|
||||
@ -378,7 +402,7 @@ class CfgMagazines {
|
||||
};
|
||||
|
||||
class 10Rnd_762x54_Mag: 10Rnd_762x51_Mag {
|
||||
initSpeed = 800;
|
||||
initSpeed = 836;
|
||||
};
|
||||
class ACE_10Rnd_762x54_Tracer_mag: 10Rnd_762x54_Mag {
|
||||
author = ECSTRING(common,ACETeam);
|
||||
@ -386,19 +410,38 @@ class CfgMagazines {
|
||||
displayName = CSTRING(10Rnd_762x54_Tracer_mag_Name);
|
||||
displayNameShort = CSTRING(10Rnd_762x54_Tracer_mag_NameShort);
|
||||
descriptionShort = CSTRING(10Rnd_762x54_Tracer_mag_Description);
|
||||
initSpeed = 800;
|
||||
initSpeed = 810;
|
||||
tracersEvery = 1;
|
||||
};
|
||||
|
||||
class 150Rnd_762x54_Box: 150Rnd_762x51_Box {
|
||||
initSpeed = 750;
|
||||
};
|
||||
|
||||
class 150Rnd_93x64_Mag: CA_Magazine {
|
||||
initSpeed = 860;
|
||||
initSpeed = 778;
|
||||
};
|
||||
|
||||
class 10Rnd_127x54_Mag: CA_Magazine {
|
||||
initSpeed = 300;
|
||||
};
|
||||
|
||||
class 150Rnd_556x45_Drum_Mag_F: CA_Magazine {
|
||||
initSpeed = 869;
|
||||
};
|
||||
|
||||
class 130Rnd_338_Mag: CA_Magazine {
|
||||
initSpeed = 807;
|
||||
};
|
||||
|
||||
class 200Rnd_65x39_Belt: VehicleMagazine {
|
||||
initSpeed = 806;
|
||||
};
|
||||
|
||||
class 20Rnd_556x45_UW_mag: 30Rnd_556x45_Stanag {
|
||||
initSpeed = 267;
|
||||
};
|
||||
|
||||
class 150Rnd_93x64_Mag: CA_Magazine {
|
||||
initSpeed = 870;
|
||||
};
|
||||
class 10Rnd_93x64_DMR_05_Mag: 150Rnd_93x64_Mag {
|
||||
initSpeed = 870;
|
||||
};
|
||||
};
|
||||
|
@ -11,97 +11,135 @@ class CfgWeapons {
|
||||
class Rifle_Base_F;
|
||||
class Rifle_Short_Base_F: Rifle_Base_F {};
|
||||
class Rifle_Long_Base_F: Rifle_Base_F {};
|
||||
class MuzzleSlot;
|
||||
|
||||
/* Long Rifles */
|
||||
|
||||
// GM6 Lynx
|
||||
class GM6_base_F: Rifle_Long_Base_F {
|
||||
class Single: Mode_SemiAuto {
|
||||
dispersion = 0.00029; // radians. Equal to 1.00 MOA.
|
||||
dispersion = MOA_TO_RAD(0.45);
|
||||
};
|
||||
};
|
||||
|
||||
// M200 Intervention
|
||||
class LRR_base_F: Rifle_Long_Base_F {
|
||||
class Single: Mode_SemiAuto {
|
||||
dispersion = 0.00020; // radians. Equal to 0.70 MOA.
|
||||
dispersion = MOA_TO_RAD(0.50);
|
||||
};
|
||||
};
|
||||
|
||||
class DMR_07_base_F: Rifle_Long_Base_F {
|
||||
initSpeed = -1.06051;
|
||||
ACE_barrelTwist = 228.6;
|
||||
ACE_barrelLength = 640.0;
|
||||
magazines[] = {
|
||||
"20Rnd_650x39_Cased_Mag_F",
|
||||
"ACE_20Rnd_65x47_Scenar_mag",
|
||||
"ACE_20Rnd_65_Creedmor_mag"
|
||||
// MX
|
||||
class arifle_MX_Base_F: Rifle_Base_F {
|
||||
class Single: Mode_SemiAuto {
|
||||
dispersion = MOA_TO_RAD(0.90);
|
||||
};
|
||||
|
||||
class FullAuto: Mode_FullAuto {
|
||||
dispersion = MOA_TO_RAD(0.90);
|
||||
};
|
||||
};
|
||||
|
||||
// KH2002 Sama
|
||||
class arifle_katiba_Base_F: Rifle_Base_F {
|
||||
class Single: Mode_SemiAuto {
|
||||
dispersion = MOA_TO_RAD(0.90);
|
||||
};
|
||||
|
||||
class FullAuto: Mode_FullAuto {
|
||||
dispersion = MOA_TO_RAD(0.90);
|
||||
};
|
||||
};
|
||||
|
||||
// CTAR-21
|
||||
class Tavor_base_F: Rifle_Base_F {
|
||||
class Single: Mode_SemiAuto {
|
||||
dispersion = MOA_TO_RAD(1.12);
|
||||
};
|
||||
|
||||
class FullAuto: Mode_FullAuto {
|
||||
dispersion = MOA_TO_RAD(1.12);
|
||||
};
|
||||
};
|
||||
|
||||
class DMR_06_base_F: Rifle_Long_Base_F {
|
||||
// F2000
|
||||
class mk20_base_F: Rifle_Base_F {
|
||||
class Single: Mode_SemiAuto {
|
||||
dispersion = 0.00029; // radians. Equal to 1.00 MOA.
|
||||
dispersion = MOA_TO_RAD(1.12);
|
||||
};
|
||||
|
||||
class FullAuto: Mode_FullAuto {
|
||||
dispersion = 0.00029; // radians. Equal to 1.00 MOA.
|
||||
};
|
||||
};
|
||||
|
||||
class DMR_05_base_F: Rifle_Long_Base_F {
|
||||
class Single: Mode_SemiAuto {
|
||||
dispersion = 0.00029; // radians. Equal to 1.00 MOA.
|
||||
};
|
||||
|
||||
class FullAuto: Mode_FullAuto {
|
||||
dispersion = 0.00029; // radians. Equal to 1.00 MOA.
|
||||
};
|
||||
};
|
||||
|
||||
class DMR_04_base_F: Rifle_Long_Base_F {
|
||||
class Single: Mode_SemiAuto {
|
||||
dispersion = 0.00029; // radians. Equal to 1.00 MOA.
|
||||
};
|
||||
};
|
||||
|
||||
class DMR_03_base_F: Rifle_Long_Base_F {
|
||||
class Single: Mode_SemiAuto {
|
||||
dispersion = 0.00032; // radians. Equal to 1.10 MOA.
|
||||
};
|
||||
|
||||
class FullAuto: Mode_FullAuto {
|
||||
dispersion = 0.00032; // radians. Equal to 1.10 MOA.
|
||||
dispersion = MOA_TO_RAD(1.12);
|
||||
};
|
||||
};
|
||||
|
||||
// Noreen "Bad News" ULR
|
||||
class DMR_02_base_F: Rifle_Long_Base_F {
|
||||
class Single: Mode_SemiAuto {
|
||||
dispersion = 0.000262; // radians. Equal to 0.90 MOA.
|
||||
dispersion = MOA_TO_RAD(0.61);
|
||||
};
|
||||
};
|
||||
|
||||
// VS-121
|
||||
class DMR_01_base_F: Rifle_Long_Base_F {
|
||||
class Single: Mode_SemiAuto {
|
||||
dispersion = 0.0004; // radians. Equal to 1.375 MOA.
|
||||
};
|
||||
};
|
||||
|
||||
class EBR_base_F: Rifle_Long_Base_F {
|
||||
class Single: Mode_SemiAuto {
|
||||
dispersion = 0.00029; // radians. Equal to 1.00 MOA.
|
||||
dispersion = MOA_TO_RAD(0.81);
|
||||
};
|
||||
|
||||
class FullAuto: Mode_FullAuto {
|
||||
dispersion = 0.00029; // radians. Equal to 1.00 MOA.
|
||||
dispersion = MOA_TO_RAD(0.81);
|
||||
};
|
||||
};
|
||||
|
||||
/* MX */
|
||||
// Mk14 Mod 1 EBR
|
||||
class EBR_base_F: Rifle_Long_Base_F {
|
||||
class Single: Mode_SemiAuto {
|
||||
dispersion = MOA_TO_RAD(0.81);
|
||||
};
|
||||
|
||||
class arifle_MX_Base_F: Rifle_Base_F {
|
||||
class Single: Mode_SemiAuto {};
|
||||
class FullAuto: Mode_FullAuto {};
|
||||
class FullAuto: Mode_FullAuto {
|
||||
dispersion = MOA_TO_RAD(0.81);
|
||||
};
|
||||
};
|
||||
|
||||
// SIG 556
|
||||
class DMR_03_base_F: Rifle_Long_Base_F {
|
||||
class Single: Mode_SemiAuto {
|
||||
dispersion = MOA_TO_RAD(0.81);
|
||||
};
|
||||
|
||||
class FullAuto: Mode_FullAuto {
|
||||
dispersion = MOA_TO_RAD(0.81);
|
||||
};
|
||||
};
|
||||
|
||||
// ASP-1 Kir
|
||||
class DMR_04_base_F: Rifle_Long_Base_F {
|
||||
class Single: Mode_SemiAuto {
|
||||
dispersion = MOA_TO_RAD(1.0);
|
||||
};
|
||||
};
|
||||
|
||||
// Cyrus
|
||||
class DMR_05_base_F: Rifle_Long_Base_F {
|
||||
class Single: Mode_SemiAuto {
|
||||
dispersion = MOA_TO_RAD(0.67);
|
||||
};
|
||||
|
||||
class FullAuto: Mode_FullAuto {
|
||||
dispersion = MOA_TO_RAD(0.67);
|
||||
};
|
||||
};
|
||||
|
||||
// M14
|
||||
class DMR_06_base_F: Rifle_Long_Base_F {
|
||||
class Single: Mode_SemiAuto {
|
||||
dispersion = MOA_TO_RAD(0.81);
|
||||
};
|
||||
|
||||
class FullAuto: Mode_FullAuto {
|
||||
dispersion = MOA_TO_RAD(0.81);
|
||||
};
|
||||
};
|
||||
|
||||
// MX LSW
|
||||
class arifle_MX_SW_F: arifle_MX_Base_F {
|
||||
magazines[] = {
|
||||
"100Rnd_65x39_caseless_mag_Tracer",
|
||||
@ -111,10 +149,19 @@ class CfgWeapons {
|
||||
"ACE_100Rnd_65x39_caseless_mag_Tracer_Dim",
|
||||
"ACE_30Rnd_65x39_caseless_mag_Tracer_Dim"
|
||||
};
|
||||
initSpeed = -1.0;
|
||||
initSpeed = -0.981912;
|
||||
ACE_barrelTwist = 228.6;
|
||||
ACE_barrelLength = 406.4;
|
||||
class Single: Mode_SemiAuto {
|
||||
dispersion = MOA_TO_RAD(0.90);
|
||||
};
|
||||
|
||||
class FullAuto: Mode_FullAuto {
|
||||
dispersion = MOA_TO_RAD(0.90);
|
||||
};
|
||||
};
|
||||
|
||||
// MXM
|
||||
class arifle_MXM_F: arifle_MX_Base_F {
|
||||
magazines[] = {
|
||||
"30Rnd_65x39_caseless_mag",
|
||||
@ -123,23 +170,19 @@ class CfgWeapons {
|
||||
"ACE_30Rnd_65x47_Scenar_mag",
|
||||
"ACE_30Rnd_65_Creedmor_mag"
|
||||
};
|
||||
initSpeed = -1.01842;
|
||||
initSpeed = -1.0;
|
||||
ACE_barrelTwist = 228.6;
|
||||
ACE_barrelLength = 457.2;
|
||||
class Single: Single {
|
||||
dispersion = 0.000436; // radians. Equal to 1.50 MOA.
|
||||
dispersion = MOA_TO_RAD(0.90);
|
||||
};
|
||||
|
||||
class FullAuto: FullAuto {
|
||||
dispersion = 0.000436; // radians. Equal to 1.50 MOA.
|
||||
dispersion = MOA_TO_RAD(0.90);
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
/* Katiba */
|
||||
class arifle_katiba_Base_F: Rifle_Base_F {};
|
||||
|
||||
/* SPAR */
|
||||
// HK416A5 11"
|
||||
class arifle_SPAR_01_base_F: Rifle_Base_F {
|
||||
magazines[] = {
|
||||
"30Rnd_556x45_Stanag",
|
||||
@ -153,15 +196,33 @@ class CfgWeapons {
|
||||
"ACE_30Rnd_556x45_Stanag_Mk318_mag",
|
||||
"ACE_30Rnd_556x45_Stanag_Tracer_Dim"
|
||||
};
|
||||
initSpeed = -0.859238;
|
||||
initSpeed = -0.869636;
|
||||
ACE_barrelTwist = 177.8;
|
||||
ACE_barrelLength = 264.0;
|
||||
class Single: Mode_SemiAuto {
|
||||
dispersion = MOA_TO_RAD(1.12);
|
||||
};
|
||||
|
||||
class FullAuto: Mode_FullAuto {
|
||||
dispersion = MOA_TO_RAD(1.12);
|
||||
};
|
||||
};
|
||||
|
||||
// HK416A5 14.5"
|
||||
class arifle_SPAR_02_base_F: Rifle_Base_F {
|
||||
initSpeed = -0.934282;
|
||||
initSpeed = -0.999864;
|
||||
ACE_barrelTwist = 177.8;
|
||||
ACE_barrelLength = 368.0;
|
||||
class Single: Mode_SemiAuto {
|
||||
dispersion = MOA_TO_RAD(1.12);
|
||||
};
|
||||
|
||||
class FullAuto: Mode_FullAuto {
|
||||
dispersion = MOA_TO_RAD(1.12);
|
||||
};
|
||||
};
|
||||
|
||||
// HK417A2 20"
|
||||
class arifle_SPAR_03_base_F: Rifle_Base_F {
|
||||
magazines[] = {
|
||||
"20Rnd_762x51_Mag",
|
||||
@ -173,201 +234,278 @@ class CfgWeapons {
|
||||
"ACE_20Rnd_762x51_M993_AP_Mag",
|
||||
"ACE_20Rnd_762x51_Mag_SD"
|
||||
};
|
||||
initSpeed = -0.984394;
|
||||
initSpeed = -0.991536;
|
||||
ACE_barrelTwist = 279.4;
|
||||
ACE_barrelLength = 508.0;
|
||||
class Single: Mode_SemiAuto {
|
||||
dispersion = MOA_TO_RAD(0.81);
|
||||
};
|
||||
|
||||
class FullAuto: Mode_FullAuto {
|
||||
dispersion = MOA_TO_RAD(0.81);
|
||||
};
|
||||
};
|
||||
|
||||
/* Other */
|
||||
// Stoner 99 LMG
|
||||
class LMG_Mk200_F: Rifle_Long_Base_F {
|
||||
magazines[] = {
|
||||
"200Rnd_65x39_cased_Box",
|
||||
"200Rnd_65x39_cased_Box_Tracer",
|
||||
"ACE_200Rnd_65x39_cased_Box_Tracer_Dim"
|
||||
};
|
||||
initSpeed = -0.976974;
|
||||
initSpeed = -0.999327;
|
||||
ACE_barrelTwist = 177.8;
|
||||
ACE_barrelLength = 317.5;
|
||||
};
|
||||
|
||||
// Negev NG7
|
||||
class LMG_Zafir_F: Rifle_Long_Base_F {
|
||||
initSpeed = -1.00333;
|
||||
initSpeed = -1.00048;
|
||||
ACE_barrelTwist = 304.8;
|
||||
ACE_barrelLength = 459.74;
|
||||
};
|
||||
|
||||
// M249 SPW
|
||||
class LMG_03_base_F: Rifle_Long_Base_F {
|
||||
initSpeed = -1.02002;
|
||||
initSpeed = -1.00051;
|
||||
ACE_barrelTwist = 177.8;
|
||||
ACE_barrelLength = 414.02;
|
||||
};
|
||||
class Tavor_base_F: Rifle_Base_F {};
|
||||
class mk20_base_F: Rifle_Base_F {};
|
||||
|
||||
/* SMGs */
|
||||
// RFB SDAR
|
||||
class SDAR_base_F: Rifle_Base_F {
|
||||
initSpeed = -1.211;
|
||||
class Single: Mode_SemiAuto {
|
||||
dispersion = 0.0008727; // radians. Equal to 3 MOA.
|
||||
dispersion = MOA_TO_RAD(3.0);
|
||||
};
|
||||
|
||||
class Burst: Mode_Burst {
|
||||
dispersion = 0.0008727; // radians. Equal to 3 MOA.
|
||||
dispersion = MOA_TO_RAD(3.0);
|
||||
};
|
||||
|
||||
class FullAuto: Mode_FullAuto {
|
||||
dispersion = 0.0008727; // radians. Equal to 3 MOA.
|
||||
dispersion = MOA_TO_RAD(3.0);
|
||||
};
|
||||
};
|
||||
|
||||
/* Pistols */
|
||||
|
||||
class Pistol;
|
||||
class Pistol_Base_F: Pistol {};
|
||||
|
||||
// P99
|
||||
class hgun_P07_F: Pistol_Base_F {
|
||||
initSpeed = -1.0;
|
||||
initSpeed = -0.906977;
|
||||
ACE_barrelTwist = 254.0;
|
||||
ACE_barrelLength = 101.6;
|
||||
};
|
||||
|
||||
// MP-443 Grach
|
||||
class hgun_Rook40_F: Pistol_Base_F {
|
||||
initSpeed = -1.03077;
|
||||
initSpeed = -0.934884;
|
||||
ACE_barrelTwist = 254.0;
|
||||
ACE_barrelLength = 111.76;
|
||||
};
|
||||
|
||||
// Custom Covert II
|
||||
class hgun_ACPC2_F: Pistol_Base_F {
|
||||
initSpeed = -1.0;
|
||||
initSpeed = -0.984252;
|
||||
ACE_barrelTwist = 406.4;
|
||||
ACE_barrelLength = 127.0;
|
||||
};
|
||||
|
||||
// FNX-45 Tactical
|
||||
class hgun_Pistol_heavy_01_F: Pistol_Base_F {
|
||||
initSpeed = -0.96;
|
||||
initSpeed = -0.944882;
|
||||
ACE_barrelTwist = 406.4;
|
||||
ACE_barrelLength = 114.3;
|
||||
};
|
||||
|
||||
// Chiappa Rhino 60DS
|
||||
class hgun_Pistol_heavy_02_F: Pistol_Base_F {
|
||||
initSpeed = -0.92;
|
||||
initSpeed = -0.905512;
|
||||
ACE_barrelTwist = 406.4;
|
||||
ACE_barrelLength = 76.2;
|
||||
};
|
||||
|
||||
|
||||
// Makarov PM
|
||||
class hgun_Pistol_01_F: Pistol_Base_F {
|
||||
initSpeed = -0.974359;
|
||||
initSpeed = -0.883721;
|
||||
ACE_barrelTwist = 254.0;
|
||||
ACE_barrelLength = 93.5;
|
||||
};
|
||||
|
||||
class pdw2000_base_F: Rifle_Short_Base_F {
|
||||
initSpeed = -1.09615;
|
||||
|
||||
class pdw2000_base_F: Rifle_Short_Base_F {};
|
||||
|
||||
// CPW
|
||||
class hgun_PDW2000_F: pdw2000_base_F {
|
||||
initSpeed = -0.994186;
|
||||
ACE_barrelTwist = 228.6;
|
||||
ACE_barrelLength = 177.8;
|
||||
};
|
||||
|
||||
/* Rifles */
|
||||
// AKS
|
||||
class arifle_AKS_base_F: Rifle_Base_F {
|
||||
initSpeed = -1.0;
|
||||
ACE_barrelTwist = 160.02;
|
||||
ACE_barrelLength = 206.5;
|
||||
};
|
||||
|
||||
// AKM
|
||||
class arifle_AKM_base_F: Rifle_Base_F {
|
||||
initSpeed = -1.0014;
|
||||
initSpeed = -1.0;
|
||||
ACE_barrelTwist = 199.898;
|
||||
ACE_barrelLength = 414.02;
|
||||
};
|
||||
|
||||
// AK12
|
||||
class arifle_AK12_base_F: Rifle_Base_F {
|
||||
initSpeed = -1.0014;
|
||||
initSpeed = -1.0;
|
||||
ACE_barrelTwist = 199.898;
|
||||
ACE_barrelLength = 414.02;
|
||||
};
|
||||
|
||||
// QBZ-95-1
|
||||
class arifle_CTAR_base_F: Rifle_Base_F {
|
||||
initSpeed = -0.978947;
|
||||
ACE_barrelTwist = 244.0;
|
||||
ACE_barrelLength = 463.0;
|
||||
class Single: Mode_SemiAuto {
|
||||
dispersion = MOA_TO_RAD(1.12);
|
||||
};
|
||||
|
||||
class FullAuto: Mode_FullAuto {
|
||||
dispersion = MOA_TO_RAD(1.12);
|
||||
};
|
||||
};
|
||||
|
||||
// QBU-88
|
||||
class DMR_07_base_F: Rifle_Long_Base_F {
|
||||
initSpeed = -0.99998;
|
||||
ACE_barrelTwist = 228.6;
|
||||
ACE_barrelLength = 640.0;
|
||||
magazines[] = {
|
||||
"20Rnd_650x39_Cased_Mag_F",
|
||||
"ACE_20Rnd_65x47_Scenar_mag",
|
||||
"ACE_20Rnd_65_Creedmor_mag"
|
||||
};
|
||||
class Single: Mode_SemiAuto {
|
||||
dispersion = MOA_TO_RAD(1.01);
|
||||
};
|
||||
};
|
||||
|
||||
// QBZ-95-1 LSW
|
||||
class arifle_CTARS_base_F: Rifle_Base_F {
|
||||
initSpeed = -1.0;
|
||||
ACE_barrelTwist = 244.0;
|
||||
ACE_barrelLength = 463.0;
|
||||
};
|
||||
class arifle_CTARS_base_F: Rifle_Base_F {
|
||||
initSpeed = -1.04301;
|
||||
ACE_barrelTwist = 244.0;
|
||||
ACE_barrelLength = 600.0;
|
||||
class Single: Mode_SemiAuto {
|
||||
dispersion = MOA_TO_RAD(1.12);
|
||||
};
|
||||
|
||||
class FullAuto: Mode_FullAuto {
|
||||
dispersion = MOA_TO_RAD(1.12);
|
||||
};
|
||||
};
|
||||
|
||||
// Type 115
|
||||
class arifle_ARX_base_F: Rifle_Base_F {
|
||||
initSpeed = -1.02052;
|
||||
initSpeed = -0.984262;
|
||||
ACE_barrelTwist = 228.6;
|
||||
ACE_barrelLength = 463.0;
|
||||
class Single: Mode_SemiAuto {
|
||||
dispersion = MOA_TO_RAD(0.90);
|
||||
};
|
||||
|
||||
class FullAuto: Mode_FullAuto {
|
||||
dispersion = MOA_TO_RAD(0.90);
|
||||
};
|
||||
};
|
||||
|
||||
// KH2002 Sama
|
||||
class arifle_Katiba_F: arifle_katiba_Base_F {
|
||||
magazines[] = {
|
||||
"30Rnd_65x39_caseless_green",
|
||||
"30Rnd_65x39_caseless_green_mag_Tracer",
|
||||
"ACE_30Rnd_65x39_caseless_green_mag_Tracer_Dim"
|
||||
};
|
||||
initSpeed = -1.08355;
|
||||
initSpeed = -1.0;
|
||||
ACE_barrelTwist = 203.2;
|
||||
ACE_barrelLength = 508.0;
|
||||
};
|
||||
|
||||
// KH2002C Sama
|
||||
class arifle_Katiba_C_F: arifle_katiba_Base_F {
|
||||
magazines[] = {
|
||||
"30Rnd_65x39_caseless_green",
|
||||
"30Rnd_65x39_caseless_green_mag_Tracer",
|
||||
"ACE_30Rnd_65x39_caseless_green_mag_Tracer_Dim"
|
||||
};
|
||||
initSpeed = -1.07105;
|
||||
initSpeed = -0.961294;
|
||||
ACE_barrelTwist = 203.2;
|
||||
ACE_barrelLength = 393.7;
|
||||
class Single: Single {
|
||||
dispersion = MOA_TO_RAD(0.90);
|
||||
};
|
||||
|
||||
class FullAuto: FullAuto {
|
||||
dispersion = MOA_TO_RAD(0.90);
|
||||
};
|
||||
};
|
||||
|
||||
// KH2002 Sama KGL
|
||||
class arifle_Katiba_GL_F: arifle_katiba_Base_F {
|
||||
magazines[] = {
|
||||
"30Rnd_65x39_caseless_green",
|
||||
"30Rnd_65x39_caseless_green_mag_Tracer",
|
||||
"ACE_30Rnd_65x39_caseless_green_mag_Tracer_Dim"
|
||||
};
|
||||
initSpeed = -1.08355;
|
||||
initSpeed = -1.0;
|
||||
ACE_barrelTwist = 203.2;
|
||||
ACE_barrelLength = 508.0;
|
||||
};
|
||||
|
||||
// MX
|
||||
class arifle_MX_F: arifle_MX_Base_F {
|
||||
magazines[] = {
|
||||
"30Rnd_65x39_caseless_mag",
|
||||
"30Rnd_65x39_caseless_mag_Tracer",
|
||||
"ACE_30Rnd_65x39_caseless_mag_Tracer_Dim"
|
||||
};
|
||||
initSpeed = -0.990132;
|
||||
initSpeed = -0.972222;
|
||||
ACE_barrelTwist = 228.6;
|
||||
ACE_barrelLength = 368.3;
|
||||
};
|
||||
|
||||
// MX 3GL
|
||||
class arifle_MX_GL_F: arifle_MX_Base_F {
|
||||
magazines[] = {
|
||||
"30Rnd_65x39_caseless_mag",
|
||||
"30Rnd_65x39_caseless_mag_Tracer",
|
||||
"ACE_30Rnd_65x39_caseless_mag_Tracer_Dim"
|
||||
};
|
||||
initSpeed = -0.99;
|
||||
initSpeed = -0.972222;
|
||||
ACE_barrelTwist = 228.6;
|
||||
ACE_barrelLength = 368.3;
|
||||
};
|
||||
/*
|
||||
class arifle_MX_SW_F: arifle_MX_Base_F {
|
||||
ACE_barrelTwist=228.6;
|
||||
ACE_barrelLength=406.4;
|
||||
};
|
||||
*/
|
||||
|
||||
// MXC
|
||||
class arifle_MXC_F: arifle_MX_Base_F {
|
||||
magazines[] = {
|
||||
"30Rnd_65x39_caseless_mag",
|
||||
"30Rnd_65x39_caseless_mag_Tracer",
|
||||
"ACE_30Rnd_65x39_caseless_mag_Tracer_Dim"
|
||||
};
|
||||
initSpeed = -0.963816;
|
||||
initSpeed = -0.946382;
|
||||
ACE_barrelTwist = 203.2;
|
||||
ACE_barrelLength = 266.7;
|
||||
class Single: Single {
|
||||
dispersion = MOA_TO_RAD(0.90);
|
||||
};
|
||||
|
||||
class FullAuto: FullAuto {
|
||||
dispersion = MOA_TO_RAD(0.90);
|
||||
};
|
||||
};
|
||||
/*
|
||||
class arifle_MXM_F: arifle_MX_Base_F {
|
||||
ACE_barrelTwist=228.6;
|
||||
ACE_barrelLength=457.2;
|
||||
};
|
||||
*/
|
||||
|
||||
// RFB SDAR
|
||||
class arifle_SDAR_F: SDAR_base_F {
|
||||
magazines[] = {
|
||||
"20Rnd_556x45_UW_mag",
|
||||
@ -382,20 +520,28 @@ class CfgWeapons {
|
||||
"ACE_30Rnd_556x45_Stanag_Mk318_mag",
|
||||
"ACE_30Rnd_556x45_Stanag_Tracer_Dim"
|
||||
};
|
||||
initSpeed = -0.989;
|
||||
initSpeed = -0.998321;
|
||||
ACE_barrelTwist = 285.75;
|
||||
ACE_barrelLength = 457.2;
|
||||
};
|
||||
class SMG_02_base_F: Rifle_Short_Base_F {
|
||||
initSpeed = -1.10288;
|
||||
|
||||
class SMG_02_base_F: Rifle_Short_Base_F {};
|
||||
|
||||
// Scorpion Evo 3 A1
|
||||
class SMG_02_F: SMG_02_base_F {
|
||||
initSpeed = -1.00029;
|
||||
ACE_barrelTwist = 254.0;
|
||||
ACE_barrelLength = 195.58;
|
||||
};
|
||||
|
||||
// MP5K
|
||||
class SMG_05_base_F: Rifle_Short_Base_F {
|
||||
initSpeed = -1.04058;
|
||||
initSpeed = -0.943783;
|
||||
ACE_barrelTwist = 254.0;
|
||||
ACE_barrelLength = 115.0;
|
||||
};
|
||||
|
||||
// CTAR-21
|
||||
class arifle_TRG20_F: Tavor_base_F {
|
||||
magazines[] = {
|
||||
"30Rnd_556x45_Stanag",
|
||||
@ -409,10 +555,12 @@ class CfgWeapons {
|
||||
"ACE_30Rnd_556x45_Stanag_Mk318_mag",
|
||||
"ACE_30Rnd_556x45_Stanag_Tracer_Dim"
|
||||
};
|
||||
initSpeed = -0.95;
|
||||
initSpeed = -0.961496;
|
||||
ACE_barrelTwist = 177.8;
|
||||
ACE_barrelLength = 381.0;
|
||||
};
|
||||
|
||||
// TAR-21
|
||||
class arifle_TRG21_F: Tavor_base_F {
|
||||
magazines[] = {
|
||||
"30Rnd_556x45_Stanag",
|
||||
@ -426,10 +574,19 @@ class CfgWeapons {
|
||||
"ACE_30Rnd_556x45_Stanag_Mk318_mag",
|
||||
"ACE_30Rnd_556x45_Stanag_Tracer_Dim"
|
||||
};
|
||||
initSpeed = -0.988043;
|
||||
initSpeed = -1.0;
|
||||
ACE_barrelTwist = 177.8;
|
||||
ACE_barrelLength = 459.74;
|
||||
class Single: Single {
|
||||
dispersion = MOA_TO_RAD(1.12);
|
||||
};
|
||||
|
||||
class FullAuto: FullAuto {
|
||||
dispersion = MOA_TO_RAD(1.12);
|
||||
};
|
||||
};
|
||||
|
||||
// TAR-21 EGLM
|
||||
class arifle_TRG21_GL_F: arifle_TRG21_F {
|
||||
magazines[] = {
|
||||
"30Rnd_556x45_Stanag",
|
||||
@ -443,16 +600,12 @@ class CfgWeapons {
|
||||
"ACE_30Rnd_556x45_Stanag_Mk318_mag",
|
||||
"ACE_30Rnd_556x45_Stanag_Tracer_Dim"
|
||||
};
|
||||
initSpeed = -0.988043;
|
||||
initSpeed = -1.0;
|
||||
ACE_barrelTwist = 177.8;
|
||||
ACE_barrelLength = 459.74;
|
||||
};
|
||||
/*
|
||||
class LMG_Zafir_F: Rifle_Long_Base_F {
|
||||
ACE_barrelTwist=304.8;
|
||||
ACE_barrelLength=459.74;
|
||||
};
|
||||
*/
|
||||
|
||||
// F2000
|
||||
class arifle_Mk20_F: mk20_base_F {
|
||||
magazines[] = {
|
||||
"30Rnd_556x45_Stanag",
|
||||
@ -466,10 +619,12 @@ class CfgWeapons {
|
||||
"ACE_30Rnd_556x45_Stanag_Mk318_mag",
|
||||
"ACE_30Rnd_556x45_Stanag_Tracer_Dim"
|
||||
};
|
||||
initSpeed = -0.980978;
|
||||
initSpeed = -0.992849;
|
||||
ACE_barrelTwist = 177.8;
|
||||
ACE_barrelLength = 441.96;
|
||||
};
|
||||
|
||||
// F2000 Tactical
|
||||
class arifle_Mk20C_F: mk20_base_F {
|
||||
magazines[] = {
|
||||
"30Rnd_556x45_Stanag",
|
||||
@ -483,10 +638,19 @@ class CfgWeapons {
|
||||
"ACE_30Rnd_556x45_Stanag_Mk318_mag",
|
||||
"ACE_30Rnd_556x45_Stanag_Tracer_Dim"
|
||||
};
|
||||
initSpeed = -0.962648;
|
||||
initSpeed = -0.974297;
|
||||
ACE_barrelTwist = 177.8;
|
||||
ACE_barrelLength = 406.4;
|
||||
class Single: Single {
|
||||
dispersion = MOA_TO_RAD(1.12);
|
||||
};
|
||||
|
||||
class FullAuto: FullAuto {
|
||||
dispersion = MOA_TO_RAD(1.12);
|
||||
};
|
||||
};
|
||||
|
||||
// F2000 EGLM
|
||||
class arifle_Mk20_GL_F: mk20_base_F {
|
||||
magazines[] = {
|
||||
"30Rnd_556x45_Stanag",
|
||||
@ -500,24 +664,32 @@ class CfgWeapons {
|
||||
"ACE_30Rnd_556x45_Stanag_Mk318_mag",
|
||||
"ACE_30Rnd_556x45_Stanag_Tracer_Dim"
|
||||
};
|
||||
initSpeed = -0.962648;
|
||||
initSpeed = -0.974297;
|
||||
ACE_barrelTwist = 177.8;
|
||||
ACE_barrelLength = 406.4;
|
||||
};
|
||||
class SMG_01_Base: Rifle_Short_Base_F {
|
||||
initSpeed = -1.0175;
|
||||
|
||||
class SMG_01_Base: Rifle_Short_Base_F {};
|
||||
|
||||
// Vector SMG
|
||||
class SMG_01_F: SMG_01_Base {
|
||||
initSpeed = -1.00148;
|
||||
ACE_barrelTwist = 406.4;
|
||||
ACE_barrelLength = 139.7;
|
||||
};
|
||||
|
||||
// VS-121
|
||||
class srifle_DMR_01_F: DMR_01_base_F {
|
||||
magazines[] = {
|
||||
"10Rnd_762x54_Mag",
|
||||
"ACE_10Rnd_762x54_Tracer_mag"
|
||||
};
|
||||
initSpeed = -1.025;
|
||||
initSpeed = -1.00019;
|
||||
ACE_barrelTwist = 241.3;
|
||||
ACE_barrelLength = 609.6;
|
||||
};
|
||||
|
||||
// Mk14 Mod 1 EBR
|
||||
class srifle_EBR_F: EBR_base_F {
|
||||
magazines[] = {
|
||||
"20Rnd_762x51_Mag",
|
||||
@ -529,17 +701,12 @@ class CfgWeapons {
|
||||
"ACE_20Rnd_762x51_M993_AP_Mag",
|
||||
"ACE_20Rnd_762x51_Mag_SD"
|
||||
};
|
||||
initSpeed = -0.972389;
|
||||
initSpeed = -0.979444;
|
||||
ACE_barrelTwist = 304.8;
|
||||
ACE_barrelLength = 457.2;
|
||||
};
|
||||
/*
|
||||
class LMG_Mk200_F: Rifle_Long_Base_F {
|
||||
initSpeed = -1.0;
|
||||
ACE_barrelTwist=177.8;
|
||||
ACE_barrelLength=317.5;
|
||||
};
|
||||
*/
|
||||
|
||||
// M200 Intervention
|
||||
class srifle_LRR_F: LRR_base_F {
|
||||
magazines[] = {
|
||||
"7Rnd_408_Mag",
|
||||
@ -549,6 +716,8 @@ class CfgWeapons {
|
||||
ACE_barrelTwist = 330.2;
|
||||
ACE_barrelLength = 736.6;
|
||||
};
|
||||
|
||||
// GM6 Lynx
|
||||
class srifle_GM6_F: GM6_base_F {
|
||||
magazines[] = {
|
||||
"5Rnd_127x108_Mag",
|
||||
@ -561,6 +730,8 @@ class CfgWeapons {
|
||||
ACE_barrelTwist = 381.0;
|
||||
ACE_barrelLength = 730;
|
||||
};
|
||||
|
||||
// Noreen "Bad News" ULR
|
||||
class srifle_DMR_02_F: DMR_02_base_F {
|
||||
magazines[] = {
|
||||
"10Rnd_338_Mag",
|
||||
@ -570,10 +741,12 @@ class CfgWeapons {
|
||||
"ACE_20Rnd_762x67_Mk248_Mod_1_Mag",
|
||||
"ACE_20Rnd_762x67_Berger_Hybrid_OTM_Mag"
|
||||
};
|
||||
initSpeed = -0.961749;
|
||||
initSpeed = -1.0;
|
||||
ACE_barrelTwist = 254.0;
|
||||
ACE_barrelLength = 508.0;
|
||||
};
|
||||
|
||||
// SIG 556
|
||||
class srifle_DMR_03_F: DMR_03_base_F {
|
||||
magazines[] = {
|
||||
"20Rnd_762x51_Mag",
|
||||
@ -585,20 +758,26 @@ class CfgWeapons {
|
||||
"ACE_20Rnd_762x51_M993_AP_Mag",
|
||||
"ACE_20Rnd_762x51_Mag_SD"
|
||||
};
|
||||
initSpeed = -0.984394;
|
||||
initSpeed = -0.991536;
|
||||
ACE_barrelTwist = 254.0;
|
||||
ACE_barrelLength = 508.0;
|
||||
};
|
||||
|
||||
// ASP-1 Kir
|
||||
class srifle_DMR_04_F: DMR_04_base_F {
|
||||
initSpeed = -1.0;
|
||||
ACE_barrelTwist = 203.2;
|
||||
ACE_barrelLength = 450.088;
|
||||
};
|
||||
|
||||
// Cyrus
|
||||
class srifle_DMR_05_blk_F: DMR_05_base_F {
|
||||
initSpeed = -1.0;
|
||||
ACE_barrelTwist = 359.918;
|
||||
ACE_barrelLength = 620.014;
|
||||
};
|
||||
|
||||
// M14
|
||||
class srifle_DMR_06_camo_F: DMR_06_base_F {
|
||||
magazines[] = {
|
||||
"20Rnd_762x51_Mag",
|
||||
@ -610,15 +789,19 @@ class CfgWeapons {
|
||||
"ACE_20Rnd_762x51_M993_AP_Mag",
|
||||
"ACE_20Rnd_762x51_Mag_SD"
|
||||
};
|
||||
initSpeed = -0.992197;
|
||||
initSpeed = -0.999395;
|
||||
ACE_barrelTwist = 304.8;
|
||||
ACE_barrelLength = 558.8;
|
||||
};
|
||||
|
||||
// HK121
|
||||
class MMG_01_hex_F: MMG_01_base_F {
|
||||
initSpeed = -0.997073;
|
||||
initSpeed = -0.985613;
|
||||
ACE_barrelTwist = 359.918;
|
||||
ACE_barrelLength = 549.91;
|
||||
};
|
||||
|
||||
// LWMMG
|
||||
class MMG_02_camo_F: MMG_02_base_F {
|
||||
initSpeed = -1.0;
|
||||
ACE_barrelTwist = 234.95;
|
||||
|
@ -1,11 +1,13 @@
|
||||
class ACE_Settings {
|
||||
class GVAR(allowHandcuffOwnSide) {
|
||||
category = CSTRING(DisplayName);
|
||||
displayName = CSTRING(ModuleSettings_handcuffSide_name);
|
||||
description = CSTRING(ModuleSettings_handcuffSide_description);
|
||||
typeName = "BOOL";
|
||||
value = 1;
|
||||
};
|
||||
class GVAR(requireSurrender) {
|
||||
category = CSTRING(DisplayName);
|
||||
displayName = CSTRING(ModuleSettings_requireSurrender_name);
|
||||
description = CSTRING(ModuleSettings_requireSurrender_description);
|
||||
typeName = "SCALAR";
|
||||
@ -13,9 +15,17 @@ class ACE_Settings {
|
||||
value = 1;
|
||||
};
|
||||
class GVAR(allowSurrender) {
|
||||
category = CSTRING(DisplayName);
|
||||
displayName = CSTRING(ModuleSettings_allowSurrender_name);
|
||||
description = CSTRING(ModuleSettings_allowSurrender_description);
|
||||
typeName = "BOOL";
|
||||
value = 1;
|
||||
};
|
||||
class GVAR(requireSurrenderAi) {
|
||||
category = CSTRING(DisplayName);
|
||||
displayName = CSTRING(ModuleSettings_requireSurrenderAi_name);
|
||||
description = CSTRING(ModuleSettings_requireSurrenderAi_description);
|
||||
typeName = "BOOL";
|
||||
value = 0;
|
||||
};
|
||||
};
|
||||
|
@ -63,3 +63,11 @@ class Extended_Local_EventHandlers {
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_Killed_EventHandlers {
|
||||
class CAManBase {
|
||||
class ADDON {
|
||||
killed = QUOTE(_this call FUNC(handleKilled));
|
||||
};
|
||||
};
|
||||
};
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user