diff --git a/LICENSE b/LICENSE
index 0f013a10b9..b76b90e8fb 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright (C) 2014 Felix "KoffeinFlummi" Wiegand
+Copyright (C) 2015 Felix "KoffeinFlummi" Wiegand
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/README.md b/README.md
index 3ec6fe0683..4ed84011bf 100644
--- a/README.md
+++ b/README.md
@@ -1,48 +1,83 @@
-
+
-
+
-
-
+
+
-
+
+
+
+
-
+
-Requires the latest version of CBA A3 | BIF thread
+Requires the latest version of CBA A3 . Visit us on Facebook | YouTube | Twitter | Reddit
**ACE3** is a joint effort by the teams behind **ACE2**, **AGM** and **CSE** to improve the realism and authenticity of Arma 3.
-This mod is entirely **open-source**, and everyone is free to propose changes or maintain their own, customized version as long as they make their changes open to the public in accordance with the GNU General Public License (for more information check the license file attached to this project).
+The project is entirely **open-source** and all contributions are welcome. Feel free to maintain your own custom version, so long as the changes you make are open to the public in accordance with the GNU General Public License ([GPLv2](https://github.com/acemod/ACE3/blob/master/LICENSE)).
-The mod is **built modularly** — almost any PBO can be removed, thus a team can maintain its own tailored version of ACE, which excludes a select number of components that they don't like, or which conflict with other add-ons. Components themselves, like e.g. the medical system, also include various customization options, allowing mission designers to tweak the overall experience.
+The mod is **built modularly**, so almost any included PBO can be easily removed from the configuration. This way, a team can maintain its own tailored version of ACE by simply excluding any components they don't need, or those possibly in conflict with other add-ons. Modules themselves, e.g. the medical system, also include various customization options, allowing mission designers to tweak the overall experience.
-### Features
-* Improved medical system
-* Logistics system including cargo transport and vehicle maintenance
-* Explosives system including different trigger types
-* Captivity system
-* Realistic names for vehicles and weapons
-* Realistic ballistics including wind and humidity
-* Backblast simulation
-* A fire control system for armored vehicles and helicopters
- ***and more...***
+### Core features
+* Brand new 3D interaction/action system
+* Performance and reliability framework
+* Focus on modularity and customization
+* New flexible client and server settings & configuration
+* Improved medical system with various levels (basic/advanced) focus on gameplay/realism
+* Proper & consistent network-synced weather
+* Wind and weather-based ballistics
+* Captivity system
+* Explosives system, including different trigger types
+* Map screen improvements – marker placement and map tools
+* Advanced missile guidance and laser designation
-#### Guides & How-Tos
-If you installed ACE3, but have trouble understanding how it all works, or where to start — see [Getting Started](https://github.com/acemod/ACE3/blob/master/documentation/user/getting-started.md).
+#### Additional features
+* Carrying and dragging
+* Realistic names for vehicles and weapons
+* A fire control system (FCS) for armored vehicles and helicopters
+* Realistic ballistics/FCS calculated in C/C++ extensions
+* Backblast area and overpressure simulation
+* Disposable launchers
+* Realistic G-forces
+* Vehicle locking
+* Realistic night and thermal vision modes
+* Magazine repacking
+* Realistic weapon overheating mechanic
+* Combat deafness (temporary loss of hearing) simulation
+* Improved ragdoll physics
+* Improved interactions for AARs and ammo bearers
+* Adjustable sniper scopes
+* No idle animation with lowered weapon
+* No talking player avatar
+* Jumping over obstacles, climbing over walls and cutting down fences
+* Vector, MicroDAGR and Kestrel devices
+***and much more...***
+
+### Guides & how-tos
+If you installed ACE3 but have trouble understanding how it all works, or where to start, read this first:
+* [Getting started](http://ace3mod.com/wiki/user/getting-started.html)
#### Contributing
-If you want to help put with the ongoing development, you can do so by looking for possible bugs or by contributing new features. To contribute something to ACE, simply fork this repository and submit your pull requests for review by other collaborators. In the process, please add yourself to the author array of any .pbo you will be editing and the AUTHORS.txt file; including a valid email address.
+You can help out with the ongoing development by looking for potential bugs in our code base, or by contributing new features. To contribute something to ACE, simply fork this repository and submit your pull requests for review by other collaborators. Remember to add yourself to the author array of any PBO you will be editing and the [`AUTHORS.txt`](https://github.com/acemod/ACE3/blob/master/AUTHORS.txt) file; including a valid email address.
-To report a bug, propose a feature, or suggest a change to the existing one — please, use our [Issue Tracker](https://github.com/acemod/ACE3/issues). See [this link](http://ace3mod.com/wiki/user/how-to-report-an-issue.html) for details.
+Please, use our [Issue Tracker](https://github.com/acemod/ACE3/issues) to report a bug, propose a feature, or suggest changes to the existing ones. See also:
+* [How to report an issue](http://ace3mod.com/wiki/user/how-to-report-an-issue.html)
+* [How to make a feature request](http://ace3mod.com/wiki/user/how-to-make-a-feature-request.html)
-#### Testing & Building
-If you want to help us test the latest development changes, feel free to download our master branch, using either git — if familiar with the process — or directly, by following [this link](https://github.com/acemod/ACE3/archive/master.zip).
-
-To find out how to set up your development environment and build a version of ACE for testing, follow [these instructions](https://github.com/acemod/ACE3/blob/master/documentation/development/setting-up-the-development-environment.md).
+#### Testing & building
+To help us test the latest development changes, download our master branch ([directly](https://github.com/acemod/ACE3/archive/master.zip), or [with git](https://help.github.com/articles/fetching-a-remote/)), then assemble a test build:
+* [Setting up the development environment](http://ace3mod.com/wiki/development/setting-up-the-development-environment.html) – step-by-step instructions on how to properly setup and build a version of ACE for testing purposes.
diff --git a/addons/advanced_ballistics/XEH_postInit.sqf b/addons/advanced_ballistics/XEH_postInit.sqf
index 8273859033..3f0e101d3b 100644
--- a/addons/advanced_ballistics/XEH_postInit.sqf
+++ b/addons/advanced_ballistics/XEH_postInit.sqf
@@ -20,19 +20,10 @@ GVAR(WindInfoStart) = time;
GVAR(Protractor) = false;
GVAR(ProtractorStart) = time;
-// Those are only used in the pure sqf version (extension free PFH)
-GVAR(SimulationPrecision) = 2;
-GVAR(WindEnabled) = true;
-GVAR(SpinDriftEnabled) = true;
-GVAR(CoriolisEnabled) = true;
-GVAR(EoetvoesEnabled) = true;
-GVAR(AdvancedAirDragEnabled) = true;
-GVAR(TransonicRegionEnabled) = true;
-GVAR(AtmosphericDensitySimulationEnabled) = true;
-
GVAR(currentGrid) = 0;
GVAR(INIT_MESSAGE_ENABLED) = false;
+GVAR(extensionAvailable) = true;
/* @TODO: Remove this until verisoning is in sync with cmake/build versioning
GVAR(extensionVersion) = ("ace_advanced_ballistics" callExtension "version");
GVAR(extensionAvailable) = (GVAR(extensionVersion) == EXTENSION_REQUIRED_VERSION);
diff --git a/addons/advanced_ballistics/functions/fnc_calculateAirDensity.sqf b/addons/advanced_ballistics/functions/fnc_calculateAirDensity.sqf
deleted file mode 100644
index 298049e51d..0000000000
--- a/addons/advanced_ballistics/functions/fnc_calculateAirDensity.sqf
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Author: Ruthberg
- *
- * Calculates the air density
- *
- * Arguments:
- * 0: temperature - degrees celcius
- * 1: pressure - hPa
- * 2: relativeHumidity - value between 0.0 and 1.0
- *
- * Return Value:
- * 0: density of air - kg * m^(-3)
- *
- * Return value:
- * None
- */
-#include "script_component.hpp"
-
-private ["_temperature", "_pressure", "_relativeHumidity"];
-_temperature = _this select 0; // in C
-_pressure = _this select 1; // in hPa
-_relativeHumidity = _this select 2; // as ratio 0-1
-
-_pressure = _pressure * 100;
-
-if (_relativeHumidity > 0) then {
- private ["_pSat", "_vaporPressure", "_partialPressure"];
- // Saturation vapor pressure calculated according to: http://wahiduddin.net/calc/density_algorithms.htm
- _pSat = 6.1078 * 10 ^ ((7.5 * _temperature) / (_temperature + 237.3));
- _vaporPressure = _relativeHumidity * _pSat;
- _partialPressure = _pressure - _vaporPressure;
-
- (_partialPressure * DRY_AIR_MOLAR_MASS + _vaporPressure * WATER_VAPOR_MOLAR_MASS) / (UNIVERSAL_GAS_CONSTANT * KELVIN(_temperature))
-} else {
- _pressure / (SPECIFIC_GAS_CONSTANT_DRY_AIR * KELVIN(_temperature))
-};
diff --git a/addons/advanced_ballistics/functions/fnc_handleFired.sqf b/addons/advanced_ballistics/functions/fnc_handleFired.sqf
index 54a7f2d5b0..b6aae2c740 100644
--- a/addons/advanced_ballistics/functions/fnc_handleFired.sqf
+++ b/addons/advanced_ballistics/functions/fnc_handleFired.sqf
@@ -19,7 +19,7 @@
*/
#include "script_component.hpp"
-private ["_unit", "_weapon", "_mode", "_ammo", "_magazine", "_caliber", "_bullet", "_abort", "_index", "_opticsName", "_opticType", "_bulletTraceVisible", "_temperature", "_barometricPressure", "_atmosphereModel", "_bulletMass", "_bulletLength", "_airFriction", "_dragModel", "_muzzleVelocity", "_muzzleVelocityCoef", "_muzzleAccessory", "_initSpeedCoef", "_muzzleVelocityShift", "_bulletVelocity", "_bulletSpeed", "_bulletLength", "_bulletWeight", "_barrelTwist", "_twistDirection", "_stabilityFactor", "_transonicStabilityCoef"];
+private ["_unit", "_weapon", "_mode", "_ammo", "_magazine", "_caliber", "_bullet", "_abort", "_index", "_opticsName", "_opticType", "_bulletTraceVisible", "_temperature", "_barometricPressure", "_atmosphereModel", "_bulletMass", "_bulletLength", "_airFriction", "_dragModel", "_muzzleVelocity", "_muzzleVelocityShift", "_bulletVelocity", "_bulletSpeed", "_bulletLength", "_barrelTwist", "_twistDirection", "_stabilityFactor", "_transonicStabilityCoef", "_ballisticCoefficients", "_velocityBoundaries"];
_unit = _this select 0;
_weapon = _this select 1;
_mode = _this select 3;
@@ -35,49 +35,34 @@ if (!([_unit] call EFUNC(common,isPlayer))) exitWith {};
if (underwater _unit) exitWith {};
if (!(_ammo isKindOf "BulletBase")) exitWith {};
if (_unit distance ACE_player > GVAR(simulationRadius)) exitWith {};
-if (GVAR(onlyActiveForLocalPlayers) && _unit != ACE_player) then { _abort = true; };
+if (GVAR(onlyActiveForLocalPlayers) && !(local _unit)) then {
+ if (GVAR(alwaysSimulateForSnipers)) then {
+ // The shooter is non local
+ if (currentWeapon _unit == primaryWeapon _unit && count primaryWeaponItems _unit > 2) then {
+ _opticsName = (primaryWeaponItems _unit) select 2;
+ _opticType = getNumber(configFile >> "cfgWeapons" >> _opticsName >> "ItemInfo" >> "opticType");
+ _abort = _opticType != 2; // We only abort if the non local shooter is not a sniper
+ };
+ } else {
+ _abort = true;
+ };
+};
//if (!GVAR(vehicleGunnerEnabled) && !(_unit isKindOf "Man")) then { _abort = true; }; // TODO: We currently do not have firedEHs on vehicles
if (GVAR(disabledInFullAutoMode) && getNumber(configFile >> "cfgWeapons" >> _weapon >> _mode >> "autoFire") == 1) then { _abort = true; };
-if (_abort && alwaysSimulateForSnipers) then {
- // The shooter is non local
- if (currentWeapon _unit == primaryWeapon _unit && count primaryWeaponItems _unit > 2) then {
- _opticsName = (primaryWeaponItems _unit) select 2;
- _opticType = getNumber(configFile >> "cfgWeapons" >> _opticsName >> "ItemInfo" >> "opticType");
- _abort = _opticType != 2; // We only abort if the non local shooter is not a sniper
- };
-};
if (_abort || !(GVAR(extensionAvailable))) exitWith {
[_bullet, getNumber(configFile >> "cfgAmmo" >> _ammo >> "airFriction")] call EFUNC(winddeflection,updateTrajectoryPFH);
};
_airFriction = getNumber(configFile >> "cfgAmmo" >> _ammo >> "airFriction");
-_muzzleVelocity = getNumber(configFile >> "cfgMagazines" >> _magazine >> "initSpeed");
-_muzzleVelocityCoef = getNumber(configFile >> "cfgWeapons" >> _weapon >> "initSpeed");
-if (_muzzleVelocityCoef > 0) then {
- _muzzleVelocity = _muzzleVelocityCoef;
-};
-if (_muzzleVelocityCoef < 0) then {
- _muzzleVelocity = _muzzleVelocity * (-1 * _muzzleVelocityCoef);
-};
-_muzzleAccessory = "";
-switch (currentWeapon _unit) do {
- case primaryWeapon _unit: { _muzzleAccessory = (primaryWeaponItems _unit) select 0; };
- case handgunWeapon _unit: { _muzzleAccessory = (handgunItems _unit) select 0; };
-};
-
-if (_muzzleAccessory != "" && isNumber(configFile >> "cfgWeapons" >> _muzzleAccessory >> "ItemInfo" >> "MagazineCoef" >> "initSpeed")) then {
- _initSpeedCoef = getNumber(configFile >> "cfgWeapons" >> _muzzleAccessory >> "ItemInfo" >> "MagazineCoef" >> "initSpeed");
- _muzzleVelocity = _muzzleVelocity * _initSpeedCoef;
-};
+_bulletVelocity = velocity _bullet;
+_muzzleVelocity = vectorMagnitude _bulletVelocity;
if (GVAR(barrelLengthInfluenceEnabled)) then {
_muzzleVelocityShift = [_ammo, _weapon, _muzzleVelocity] call FUNC(calculateBarrelLengthVelocityShift);
if (_muzzleVelocityShift != 0) then {
- _bulletVelocity = velocity _bullet;
- _bulletSpeed = vectorMagnitude _bulletVelocity;
- _bulletVelocity = _bulletVelocity vectorAdd ((vectorNormalized _bulletVelocity) vectorMultiply (_muzzleVelocityShift * (_bulletSpeed / _muzzleVelocity)));
+ _bulletVelocity = _bulletVelocity vectorAdd ((vectorNormalized _bulletVelocity) vectorMultiply (_muzzleVelocityShift));
_bullet setVelocity _bulletVelocity;
_muzzleVelocity = _muzzleVelocity + _muzzleVelocityShift;
};
@@ -87,19 +72,23 @@ if (GVAR(ammoTemperatureEnabled)) then {
_temperature = GET_TEMPERATURE_AT_HEIGHT((getPosASL _unit) select 2);
_muzzleVelocityShift = [_ammo, _temperature] call FUNC(calculateAmmoTemperatureVelocityShift);
if (_muzzleVelocityShift != 0) then {
- _bulletVelocity = velocity _bullet;
- _bulletSpeed = vectorMagnitude _bulletVelocity;
- _bulletVelocity = _bulletVelocity vectorAdd ((vectorNormalized _bulletVelocity) vectorMultiply (_muzzleVelocityShift * (_bulletSpeed / _muzzleVelocity)));
+ _bulletVelocity = _bulletVelocity vectorAdd ((vectorNormalized _bulletVelocity) vectorMultiply (_muzzleVelocityShift));
_bullet setVelocity _bulletVelocity;
_muzzleVelocity = _muzzleVelocity + _muzzleVelocityShift;
};
};
_bulletTraceVisible = false;
-if (GVAR(bulletTraceEnabled) && cameraView == "GUNNER" && currentWeapon ACE_player == primaryWeapon ACE_player && count primaryWeaponItems ACE_player > 2) then {
- _opticsName = (primaryWeaponItems ACE_player) select 2;
- _opticType = getNumber(configFile >> "cfgWeapons" >> _opticsName >> "ItemInfo" >> "opticType");
- _bulletTraceVisible = (_opticType == 2 || currentWeapon ACE_player in ["ACE_Vector", "Binocular", "Rangefinder", "Laserdesignator"]);
+if (GVAR(bulletTraceEnabled) && cameraView == "GUNNER") then {
+ if (currentWeapon ACE_player in ["ACE_Vector", "Binocular", "Rangefinder", "Laserdesignator"]) then {
+ _bulletTraceVisible = true;
+ } else {
+ if (currentWeapon ACE_player == primaryWeapon ACE_player && count primaryWeaponItems ACE_player > 2) then {
+ _opticsName = (primaryWeaponItems ACE_player) select 2;
+ _opticType = getNumber(configFile >> "cfgWeapons" >> _opticsName >> "ItemInfo" >> "opticType");
+ _bulletTraceVisible = _opticType == 2;
+ };
+ };
};
_caliber = getNumber(configFile >> "cfgAmmo" >> _ammo >> "ACE_caliber");
@@ -131,253 +120,47 @@ _dragModel = 1;
_ballisticCoefficients = [];
_velocityBoundaries = [];
_atmosphereModel = "ICAO";
-if (GVAR(AdvancedAirDragEnabled)) then {
- if (isNumber(configFile >> "cfgAmmo" >> _ammo >> "ACE_dragModel")) then {
- _dragModel = getNumber(configFile >> "cfgAmmo" >> _ammo >> "ACE_dragModel");
- if (!(_dragModel in [1, 2, 5, 6, 7, 8])) then {
- _dragModel = 1;
- };
- };
- if (isArray(configFile >> "cfgAmmo" >> _ammo >> "ACE_ballisticCoefficients")) then {
- _ballisticCoefficients = getArray(configFile >> "cfgAmmo" >> _ammo >> "ACE_ballisticCoefficients");
- };
- if (isArray(configFile >> "cfgAmmo" >> _ammo >> "ACE_velocityBoundaries")) then {
- _velocityBoundaries = getArray(configFile >> "cfgAmmo" >> _ammo >> "ACE_velocityBoundaries");
- };
- if (isText(configFile >> "cfgAmmo" >> _ammo >> "ACE_standardAtmosphere")) then {
- _atmosphereModel = getText(configFile >> "cfgAmmo" >> _ammo >> "ACE_standardAtmosphere");
+if (isNumber(configFile >> "cfgAmmo" >> _ammo >> "ACE_dragModel")) then {
+ _dragModel = getNumber(configFile >> "cfgAmmo" >> _ammo >> "ACE_dragModel");
+ if (!(_dragModel in [1, 2, 5, 6, 7, 8])) then {
+ _dragModel = 1;
};
};
+if (isArray(configFile >> "cfgAmmo" >> _ammo >> "ACE_ballisticCoefficients")) then {
+ _ballisticCoefficients = getArray(configFile >> "cfgAmmo" >> _ammo >> "ACE_ballisticCoefficients");
+};
+if (isArray(configFile >> "cfgAmmo" >> _ammo >> "ACE_velocityBoundaries")) then {
+ _velocityBoundaries = getArray(configFile >> "cfgAmmo" >> _ammo >> "ACE_velocityBoundaries");
+};
+if (isText(configFile >> "cfgAmmo" >> _ammo >> "ACE_standardAtmosphere")) then {
+ _atmosphereModel = getText(configFile >> "cfgAmmo" >> _ammo >> "ACE_standardAtmosphere");
+};
-#ifdef USE_ADVANCEDBALLISTICS_DLL
- GVAR(currentbulletID) = (GVAR(currentbulletID) + 1) % 10000;
+GVAR(currentbulletID) = (GVAR(currentbulletID) + 1) % 10000;
- "ace_advanced_ballistics" callExtension format["new:%1:%2:%3:%4:%5:%6:%7:%8:%9:%10:%11:%12:%13:%14:%15:%16:%17:%18", GVAR(currentbulletID), _airFriction, _ballisticCoefficients, _velocityBoundaries, _atmosphereModel, _dragModel, _stabilityFactor, _twistDirection, _muzzleVelocity, _transonicStabilityCoef, getPosASL _bullet, EGVAR(weather,Latitude), EGVAR(weather,currentTemperature), EGVAR(weather,Altitude), EGVAR(weather,currentHumidity), overcast, floor(time), time - floor(time)];
+"ace_advanced_ballistics" callExtension format["new:%1:%2:%3:%4:%5:%6:%7:%8:%9:%10:%11:%12:%13:%14:%15:%16:%17:%18", GVAR(currentbulletID), _airFriction, _ballisticCoefficients, _velocityBoundaries, _atmosphereModel, _dragModel, _stabilityFactor, _twistDirection, _muzzleVelocity, _transonicStabilityCoef, getPosASL _bullet, EGVAR(weather,Latitude), EGVAR(weather,currentTemperature), EGVAR(weather,Altitude), EGVAR(weather,currentHumidity), overcast, floor(time), time - floor(time)];
- [{
- private ["_index", "_bullet", "_caliber", "_bulletTraceVisible", "_bulletVelocity", "_bulletPosition"];
- EXPLODE_4_PVT(_this select 0,_bullet,_caliber,_bulletTraceVisible,_index);
-
- _bulletVelocity = velocity _bullet;
- _bulletPosition = getPosASL _bullet;
-
- _bulletSpeed = vectorMagnitude _bulletVelocity;
-
- if (!alive _bullet || _bulletSpeed < 100) exitWith {
- [_this select 1] call cba_fnc_removePerFrameHandler;
- };
-
- if (_bulletTraceVisible && _bulletSpeed > 600) then {
- drop ["\A3\data_f\ParticleEffects\Universal\Refract","","Billboard",1,0.1,getPos _bullet,[0,0,0],0,1.275,1,0,[0.4*_caliber,0.2*_caliber],[[0,0,0,0.6],[0,0,0,0.4]],[1,0],0,0,"","",""];
- };
-
- call compile ("ace_advanced_ballistics" callExtension format["simulate:%1:%2:%3:%4:%5:%6:%7", _index, _bulletVelocity, _bulletPosition, ACE_wind, ASLToATL(_bulletPosition) select 2, floor(time), time - floor(time)]);
-
- }, GVAR(simulationInterval), [_bullet, _caliber, _bulletTraceVisible, GVAR(currentbulletID)]] call CBA_fnc_addPerFrameHandler;
-#else
- _index = count GVAR(bulletDatabase);
- if (count GVAR(bulletDatabaseFreeIndices) > 0) then {
- _index = GVAR(bulletDatabaseFreeIndices) select 0;
- GVAR(bulletDatabaseFreeIndices) = GVAR(bulletDatabaseFreeIndices) - [_index];
+[{
+ private ["_args", "_index", "_bullet", "_caliber", "_bulletTraceVisible", "_bulletVelocity", "_bulletPosition"];
+ _args = _this select 0;
+ _bullet = _args select 0;
+ _caliber = _args select 1;
+ _bulletTraceVisible = _args select 2;
+ _index = _args select 3;
+
+ _bulletVelocity = velocity _bullet;
+ _bulletPosition = getPosASL _bullet;
+
+ _bulletSpeed = vectorMagnitude _bulletVelocity;
+
+ if (!alive _bullet || _bulletSpeed < 100) exitWith {
+ [_this select 1] call cba_fnc_removePerFrameHandler;
+ };
+
+ if (_bulletTraceVisible && _bulletSpeed > 600) then {
+ drop ["\A3\data_f\ParticleEffects\Universal\Refract","","Billboard",1,0.1,getPos _bullet,[0,0,0],0,1.275,1,0,[0.4*_caliber,0.2*_caliber],[[0,0,0,0.6],[0,0,0,0.4]],[1,0],0,0,"","",""];
};
- GVAR(bulletDatabase) set[_index, [_bullet, _caliber, _airFriction, _muzzleVelocity, _stabilityFactor, _transonicStabilityCoef, _twistDirection, _unit, _bulletTraceVisible, _ballisticCoefficients, _velocityBoundaries, _atmosphereModel, _dragModel, _index]];
- GVAR(bulletDatabaseStartTime) set[_index, time];
- GVAR(bulletDatabaseSpeed) set[_index, 0];
- GVAR(bulletDatabaseFrames) set[_index, 1];
- GVAR(bulletDatabaseLastFrame) set[_index, time];
- GVAR(bulletDatabaseHDeflect) set[_index, 0];
- GVAR(bulletDatabaseSpinDrift) set[_index, 0];
+ call compile ("ace_advanced_ballistics" callExtension format["simulate:%1:%2:%3:%4:%5:%6:%7", _index, _bulletVelocity, _bulletPosition, ACE_wind, ASLToATL(_bulletPosition) select 2, floor(time), time - floor(time)]);
- if ((GVAR(bulletDatabaseOccupiedIndices) pushBack _index) == 0) then {
- [{
- private ["_bulletDatabaseEntry", "_bullet", "_caliber", "_muzzleVelocity", "_frames", "_speed", "_airFriction", "_airFrictionRef", "_dragModel", "_atmosphereModel", "_ballisticCoefficient", "_ballisticCoefficients", "_velocityBoundaries", "_airDensity", "_stabilityFactor", "_transonicStabilityCoef", "_twistDirection", "_unit", "_bulletTraceVisible", "_index", "_temperature", "_humidity", "_deltaT", "_TOF", "_bulletPosition", "_bulletVelocity", "_bulletSpeed", "_trueVelocity", "_trueSpeed", "_bulletSpeedAvg", "_wind", "_drag", "_dragRef", "_vect", "_accel", "_accelRef", "_centripetalAccel", "_pressure", "_pressureDeviation", "_windSourceObstacle", "_windSourceTerrain", "_height", "_roughnessLength", "_bulletDir", "_horizontalDeflection", "_horizontalDeflectionPartial", "_spinDrift", "_spinDriftPartial"];
-
- {
- _bulletDatabaseEntry = (GVAR(bulletDatabase) select _x);
- if (!alive (_bulletDatabaseEntry select 0)) then {
- _index = _bulletDatabaseEntry select 13;
- GVAR(bulletDatabaseOccupiedIndices) = GVAR(bulletDatabaseOccupiedIndices) - [_index];
- GVAR(bulletDatabaseFreeIndices) pushBack _index;
- };
- true
- } count GVAR(bulletDatabaseOccupiedIndices);
-
- if (count GVAR(bulletDatabaseOccupiedIndices) == 0) exitWith {
- GVAR(bulletDatabase) = [];
- GVAR(bulletDatabaseStartTime) = [];
- GVAR(bulletDatabaseSpeed) = [];
- GVAR(bulletDatabaseFrames) = [];
- GVAR(bulletDatabaseLastFrame) = [];
- GVAR(bulletDatabaseHDeflect) = [];
- GVAR(bulletDatabaseSpinDrift) = [];
- GVAR(bulletDatabaseOccupiedIndices) = [];
- GVAR(bulletDatabaseFreeIndices) = [];
- [_this select 1] call cba_fnc_removePerFrameHandler;
- };
-
- {
- _bulletDatabaseEntry = GVAR(bulletDatabase) select _x;
- _bullet = _bulletDatabaseEntry select 0;
- _caliber = _bulletDatabaseEntry select 1;
- _airFriction = _bulletDatabaseEntry select 2;
- _muzzleVelocity = _bulletDatabaseEntry select 3;
- _stabilityFactor = _bulletDatabaseEntry select 4;
- _transonicStabilityCoef = _bulletDatabaseEntry select 5;
- _twistDirection = _bulletDatabaseEntry select 6;
- _unit = _bulletDatabaseEntry select 7;
- _bulletTraceVisible = _bulletDatabaseEntry select 8;
- _ballisticCoefficients = _bulletDatabaseEntry select 9;
- _velocityBoundaries = _bulletDatabaseEntry select 10;
- _atmosphereModel = _bulletDatabaseEntry select 11;
- _dragModel = _bulletDatabaseEntry select 12;
- _index = _bulletDatabaseEntry select 13;
-
- _TOF = time - (GVAR(bulletDatabaseStartTime) select _index);
-
- _bulletVelocity = velocity _bullet;
- _bulletPosition = getPosASL _bullet;
-
- _bulletSpeed = vectorMagnitude _bulletVelocity;
- _bulletDir = (_bulletVelocity select 0) atan2 (_bulletVelocity select 1);
-
- _speed = (GVAR(bulletDatabaseSpeed) select _index);
- GVAR(bulletDatabaseSpeed) set[_index, _speed + _bulletSpeed];
-
- _frames = (GVAR(bulletDatabaseFrames) select _index);
- GVAR(bulletDatabaseFrames) set[_index, _frames + 1];
-
- _bulletSpeedAvg = (_speed / _frames);
-
- if ((GVAR(SimulationPrecision) < 2) || {_frames % GVAR(SimulationPrecision) == _index % GVAR(SimulationPrecision)}) then {
- _deltaT = time - (GVAR(bulletDatabaseLastFrame) select _index);
- GVAR(bulletDatabaseLastFrame) set[_index, time];
-
- _trueVelocity = _bulletVelocity;
- _trueSpeed = _bulletSpeed;
- _wind = [0, 0, 0];
- if (GVAR(WindEnabled) && (vectorMagnitude ACE_wind) > 0) then {
- _windSourceObstacle = _bulletPosition vectorDiff ((vectorNormalized ACE_wind) vectorMultiply 10);
- _windSourceTerrain = _bulletPosition vectorDiff ((vectorNormalized ACE_wind) vectorMultiply 100);
-
- if (!(lineIntersects [_bulletPosition, _windSourceObstacle]) && !(terrainIntersectASL [_bulletPosition, _windSourceTerrain])) then {
- _wind = ACE_wind;
- _height = ASLToATL(_bulletPosition) select 2;
- _height = 0 max _height min 20;
- if (_height < 20) then {
- _roughnessLength = _bulletPosition call FUNC(calculateRoughnessLength);
- _wind = _wind vectorMultiply (ln(_height / _roughnessLength) / ln(20 / _roughnessLength));
- };
-
- _trueVelocity = _bulletVelocity vectorDiff _wind;
- _trueSpeed = vectorMagnitude _trueVelocity;
- };
- };
-
- _airFrictionRef = _airFriction;
- if (GVAR(AdvancedAirDragEnabled) && (count _ballisticCoefficients) == (count _velocityBoundaries) + 1) then {
- _dragRef = _deltaT * _airFrictionRef * _bulletSpeed * _bulletSpeed;
- _accelRef = (vectorNormalized _bulletVelocity) vectorMultiply (_dragRef);
- _bulletVelocity = _bulletVelocity vectorDiff _accelRef;
-
- _ballisticCoefficient = (_ballisticCoefficients select 0);
- for "_i" from (count _velocityBoundaries) - 1 to 0 step -1 do {
- if (_bulletSpeed < (_velocityBoundaries select _i)) exitWith {
- _ballisticCoefficient = (_ballisticCoefficients select (_i + 1));
- };
- };
-
- if (GVAR(AtmosphericDensitySimulationEnabled)) then {
- _pressure = (_bulletPosition select 2) call EFUNC(weather,calculateBarometricPressure);
- _temperature = GET_TEMPERATURE_AT_HEIGHT(_bulletPosition select 2);
- _humidity = EGVAR(weather,currentHumidity);
- _airDensity = STD_AIR_DENSITY_ICAO;
- if (_humidity > 0) then {
- private ["_pSat", "_vaporPressure", "_partialPressure"];
- // Saturation vapor pressure calculated according to: http://wahiduddin.net/calc/density_algorithms.htm
- _pSat = 6.1078 * 10 ^ ((7.5 * _temperature) / (_temperature + 237.3));
- _vaporPressure = _humidity * _pSat;
- _partialPressure = (_pressure * 100)- _vaporPressure;
-
- _airDensity = (_partialPressure * DRY_AIR_MOLAR_MASS + _vaporPressure * WATER_VAPOR_MOLAR_MASS) / (UNIVERSAL_GAS_CONSTANT * KELVIN(_temperature));
- } else {
- _airDensity = (_pressure * 100) / (SPECIFIC_GAS_CONSTANT_DRY_AIR * KELVIN(_temperature));
- };
- if (_atmosphereModel == "ICAO") then {
- _ballisticCoefficient = (STD_AIR_DENSITY_ICAO / _airDensity) * _ballisticCoefficient;
- } else {
- _ballisticCoefficient = (STD_AIR_DENSITY_ASM / _airDensity) * _ballisticCoefficient;
- };
- };
-
- _drag = _deltaT * ([_dragModel, _ballisticCoefficient, _trueSpeed] call FUNC(calculateRetardation));
- _accel = (vectorNormalized _trueVelocity) vectorMultiply (_drag);
- _bulletVelocity = _bulletVelocity vectorDiff _accel;
- } else {
- if (GVAR(AtmosphericDensitySimulationEnabled)) then {
- _pressureDeviation = (_bulletPosition select 2) call EFUNC(weather,calculateBarometricPressure) - 1013.25;
- _temperature = GET_TEMPERATURE_AT_HEIGHT(_bulletPosition select 2);
- _humidity = EGVAR(weather,currentHumidity);
- _airFriction = _airFriction + ((_temperature - 15) * 0.0000015 + _humidity * 0.0000040 + _pressureDeviation * -0.0000009);
- };
-
- if (_airFriction != _airFrictionRef || vectorMagnitude _wind > 0) then {
- _dragRef = _deltaT * _airFrictionRef * _bulletSpeed * _bulletSpeed;
- _accelRef = (vectorNormalized _bulletVelocity) vectorMultiply (_dragRef);
- _bulletVelocity = _bulletVelocity vectorDiff _accelRef;
-
- _drag = _deltaT * _airFriction * _trueSpeed * _trueSpeed;
- _accel = (vectorNormalized _trueVelocity) vectorMultiply (_drag);
- _bulletVelocity = _bulletVelocity vectorAdd _accel;
- };
- };
-
- if (GVAR(CoriolisEnabled) && _bulletSpeedAvg > 0) then {
- _horizontalDeflection = 0.0000729 * (_unit distanceSqr _bullet) * sin(EGVAR(weather,Latitude)) / _bulletSpeedAvg;
- _horizontalDeflectionPartial = _horizontalDeflection - (GVAR(bulletDatabaseHDeflect) select _index);
- GVAR(bulletDatabaseHDeflect) set[_index, _horizontalDeflection];
- _vect = [sin(_bulletDir + 90) * _horizontalDeflectionPartial, cos(_bulletDir + 90) * _horizontalDeflectionPartial, 0];
-
- _bulletPosition = _bulletPosition vectorAdd _vect;
- };
-
- /*
- // Negligible effect on the trajectory
- if (GVAR(EoetvoesEnabled)) then {
- _centripetalAccel = 2 * 0.0000729 * (_muzzleVelocity / -32.2) * cos(EGVAR(weather,Latitude)) * sin(_bulletDir);
- _accel = [0, 0, -(_centripetalAccel * _deltaT)];
-
- _bulletVelocity = _bulletVelocity vectorAdd _accel;
- };
- //*/
-
- if (GVAR(SpinDriftEnabled)) then {
- _spinDrift = _twistDirection * 0.0254 * 1.25 * (_stabilityFactor + 1.2) * _TOF ^ 1.83;
- _spinDriftPartial = _spinDrift - (GVAR(bulletDatabaseSpinDrift) select _index);
- GVAR(bulletDatabaseSpinDrift) set[_index, _spinDrift];
- _vect = [sin(_bulletDir + 90) * _spinDriftPartial, cos(_bulletDir + 90) * _spinDriftPartial, 0];
-
- _bulletPosition = _bulletPosition vectorAdd _vect;
- };
- };
-
- if (GVAR(TransonicRegionEnabled) && _transonicStabilityCoef < 1) then {
- if (_bulletSpeed < 345 && _bulletSpeedAvg > 340 && _bulletSpeed > 335) then {
- _accel = [(random 0.8) - 0.4, (random 0.8) - 0.4, (random 0.8) - 0.4];
- _accel = _accel vectorMultiply (1 - _transonicStabilityCoef);
- _bulletVelocity = _bulletVelocity vectorAdd _accel;
- };
- };
-
- if (_bulletTraceVisible && _bulletSpeed > 600 && _bullet distanceSqr _unit > 400) then {
- drop ["\A3\data_f\ParticleEffects\Universal\Refract","","Billboard",1,0.1,getPos _bullet,[0,0,0],0,1.275,1,0,[0.4*_caliber,0.2*_caliber],[[0,0,0,0.6],[0,0,0,0.4]],[1,0],0,0,"","",""];
- };
-
- _bullet setVelocity _bulletVelocity;
- _bullet setPosASL _bulletPosition;
- true
- } count GVAR(bulletDatabaseOccupiedIndices);
-
- }, GVAR(simulationInterval), []] call CBA_fnc_addPerFrameHandler;
- };
-#endif
+}, GVAR(simulationInterval), [_bullet, _caliber, _bulletTraceVisible, GVAR(currentbulletID)]] call CBA_fnc_addPerFrameHandler;
diff --git a/addons/advanced_ballistics/script_component.hpp b/addons/advanced_ballistics/script_component.hpp
index 70c2f47990..3334bb3207 100644
--- a/addons/advanced_ballistics/script_component.hpp
+++ b/addons/advanced_ballistics/script_component.hpp
@@ -1,8 +1,6 @@
#define COMPONENT advanced_ballistics
#include "\z\ace\addons\main\script_mod.hpp"
-#define USE_ADVANCEDBALLISTICS_DLL
-
#ifdef DEBUG_ENABLED_ADVANCEDBALLISTICS
#define DEBUG_MODE_FULL
#endif
diff --git a/addons/atragmx/XEH_postInit.sqf b/addons/atragmx/XEH_postInit.sqf
index 7f047834e2..e2e3cb254c 100644
--- a/addons/atragmx/XEH_postInit.sqf
+++ b/addons/atragmx/XEH_postInit.sqf
@@ -9,7 +9,7 @@ if ((profileNamespace getVariable ["ACE_ATragMX_profileNamespaceVersion", 0]) ==
GVAR(gunList) = [["12.7x108mm" , 820, 100, 0.0657, -0.0006400, 3.81, 0, 2, 10, 120, 0, 0, 48.28, 12.7, 38.10, 0.630, 1, "ASM" ],
["12.7x99mm AMAX" , 860, 100, 0.0612, -0.0003740, 3.81, 0, 2, 10, 120, 0, 0, 48.60, 12.7, 38.10, 1.050, 1, "ASM" ],
- ["12.7x99mm" , 853, 100, 0.0623, -0.0006000, 3.81, 0, 2, 10, 120, 0, 0, 41.92, 12.7, 38.10, 0.670, 1, "ASM" ],
+ ["12.7x99mm" , 900, 100, 0.0623, -0.0006000, 3.81, 0, 2, 10, 120, 0, 0, 41.92, 12.7, 38.10, 0.670, 1, "ASM" ],
["12.7x54mm" , 300, 100, 0.3395, -0.0001400, 3.81, 0, 2, 10, 120, 0, 0, 48.60, 12.7, 24.13, 1.050, 1, "ASM" ],
@@ -34,6 +34,7 @@ if ((profileNamespace getVariable ["ACE_ATragMX_profileNamespaceVersion", 0]) ==
["6.5x39mm" , 800, 100, 0.0683, -0.0007850, 3.81, 0, 2, 10, 120, 0, 0, 7.970, 6.71, 22.86, 0.263, 7, "ICAO"],
["6.5x47mm Lapua" , 800, 100, 0.0682, -0.0007710, 3.81, 0, 2, 10, 120, 0, 0, 9.007, 6.71, 22.86, 0.290, 7, "ICAO"],
+ ["6.5mm Creedmor" , 840, 100, 0.0637, -0.0006510, 3.81, 0, 2, 10, 120, 0, 0, 9.072, 6.71, 22.86, 0.317, 7, "ICAO"],
["5.56x45mm M855" , 870, 100, 0.0626, -0.0012650, 3.81, 0, 2, 10, 120, 0, 0, 4.018, 5.70, 17.78, 0.151, 7, "ASM" ],
["5.56x45mm Mk262" , 820, 100, 0.0671, -0.0011250, 3.81, 0, 2, 10, 120, 0, 0, 4.990, 5.70, 17.78, 0.361, 1, "ASM" ],
diff --git a/addons/atragmx/functions/fnc_calculate_range_card.sqf b/addons/atragmx/functions/fnc_calculate_range_card.sqf
index f3f27f7d3e..cfaf7441f8 100644
--- a/addons/atragmx/functions/fnc_calculate_range_card.sqf
+++ b/addons/atragmx/functions/fnc_calculate_range_card.sqf
@@ -54,7 +54,7 @@ if (!GVAR(atmosphereModeTBH)) then {
private ["_bulletLength", "_stabilityFactor"];
_bulletLength = 1.8;
_stabilityFactor = 1.5;
-if ((missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) && (missionNamespace getVariable [QEGVAR(advanced_ballistics,SpinDriftEnabled), false])) then {
+if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then {
if (_bulletDiameter > 0 && _bulletLength > 0 && _bulletMass > 0 && _barrelTwist > 0) then {
_stabilityFactor = [_bulletDiameter / 10 / 2.54, _bulletLength, _bulletMass * 15.4323584, _barrelTwist / 2.54, _muzzleVelocity, _temperature, _barometricPressure] call EFUNC(advanced_ballistics,calculateStabilityFactor);
};
diff --git a/addons/atragmx/functions/fnc_calculate_solution.sqf b/addons/atragmx/functions/fnc_calculate_solution.sqf
index f90b299ce9..2049398a9c 100644
--- a/addons/atragmx/functions/fnc_calculate_solution.sqf
+++ b/addons/atragmx/functions/fnc_calculate_solution.sqf
@@ -106,7 +106,7 @@ private ["_wind1", "_wind2", "_windDrift"];
_wind1 = [cos(270 - _windDirection * 30) * _windSpeed1, sin(270 - _windDirection * 30) * _windSpeed1, 0];
_wind2 = [cos(270 - _windDirection * 30) * _windSpeed2, sin(270 - _windDirection * 30) * _windSpeed2, 0];
_windDrift = 0;
-if ((missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) && (missionNamespace getVariable [QEGVAR(advanced_ballistics,AdvancedAirDragEnabled), false])) then {
+if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then {
_bc = [_bc, _temperature, _barometricPressure, _relativeHumidity, _atmosphereModel] call EFUNC(advanced_ballistics,calculateAtmosphericCorrection);
};
@@ -117,7 +117,7 @@ _speedAverage = 0;
private ["_eoetvoesMultiplier"];
_eoetvoesMultiplier = 0;
-if (missionNamespace getVariable [QEGVAR(advanced_ballistics,EoetvoesEnabled), false]) then {
+if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then {
_eoetvoesMultiplier = 2 * (0.0000729 * _muzzleVelocity / -9.80665) * cos(_latitude) * sin(_directionOfFire);
};
@@ -142,14 +142,12 @@ while {_TOF < 15 && (_bulletPos select 1) < _targetRange} do {
_trueSpeed = vectorMagnitude _trueVelocity;
if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then {
- if (missionNamespace getVariable [QEGVAR(advanced_ballistics,AdvancedAirDragEnabled), false]) then {
- _drag = if (missionNamespace getVariable [QEGVAR(advanced_ballistics,extensionAvailable), false]) then {
- parseNumber(("ace_advanced_ballistics" callExtension format["retard:%1:%2:%3", _dragModel, _bc, _trueSpeed]))
- } else {
- ([_dragModel, _bc, _trueSpeed] call EFUNC(advanced_ballistics,calculateRetardation))
- };
- _bulletAccel = (vectorNormalized _trueVelocity) vectorMultiply (-1 * _drag);
+ _drag = if (missionNamespace getVariable [QEGVAR(advanced_ballistics,extensionAvailable), false]) then {
+ parseNumber(("ace_advanced_ballistics" callExtension format["retard:%1:%2:%3", _dragModel, _bc, _trueSpeed]))
+ } else {
+ ([_dragModel, _bc, _trueSpeed] call EFUNC(advanced_ballistics,calculateRetardation))
};
+ _bulletAccel = (vectorNormalized _trueVelocity) vectorMultiply (-1 * _drag);
} else {
_bulletAccel = _trueVelocity vectorMultiply (_trueSpeed * _airFriction);
};
@@ -177,23 +175,20 @@ while {_TOF < 15 && (_bulletPos select 1) < _targetRange} do {
_kineticEnergy = _kineticEnergy * 0.737562149;
if ((missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) && (_bulletPos select 1) > 0) then {
- if (missionNamespace getVariable [QEGVAR(advanced_ballistics,CoriolisEnabled), false]) then {
- _horizontalDeflection = 0.0000729 * ((_bulletPos select 1) ^ 2) * sin(_latitude) / _speedAverage;
- _horizontalCoriolis = - atan(_horizontalDeflection / (_bulletPos select 1));
- _windage1 = _windage1 + _horizontalCoriolis;
- _windage2 = _windage2 + _horizontalCoriolis;
- };
- if (missionNamespace getVariable [QEGVAR(advanced_ballistics,EoetvoesEnabled), false]) then {
- _verticalDeflection = (_bulletPos select 2) * _eoetvoesMultiplier;
- _verticalCoriolis = - atan(_verticalDeflection / (_bulletPos select 1));
- _elevation = _elevation + _verticalCoriolis;
- };
- if (missionNamespace getVariable [QEGVAR(advanced_ballistics,SpinDriftEnabled), false]) then {
- _spinDeflection = _twistDirection * 0.0254 * 1.25 * (_stabilityFactor + 1.2) * _TOF ^ 1.83;
- _spinDrift = - atan(_spinDeflection / (_bulletPos select 1));
- _windage1 = _windage1 + _spinDrift;
- _windage2 = _windage2 + _spinDrift;
- };
+ // Coriolis
+ _horizontalDeflection = 0.0000729 * ((_bulletPos select 1) ^ 2) * sin(_latitude) / _speedAverage;
+ _horizontalCoriolis = - atan(_horizontalDeflection / (_bulletPos select 1));
+ _windage1 = _windage1 + _horizontalCoriolis;
+ _windage2 = _windage2 + _horizontalCoriolis;
+ // Eoetvoes
+ _verticalDeflection = (_bulletPos select 2) * _eoetvoesMultiplier;
+ _verticalCoriolis = - atan(_verticalDeflection / (_bulletPos select 1));
+ _elevation = _elevation + _verticalCoriolis;
+ // Spin drift
+ _spinDeflection = _twistDirection * 0.0254 * 1.25 * (_stabilityFactor + 1.2) * _TOF ^ 1.83;
+ _spinDrift = - atan(_spinDeflection / (_bulletPos select 1));
+ _windage1 = _windage1 + _spinDrift;
+ _windage2 = _windage2 + _spinDrift;
};
GVAR(rangeCardData) set [_n, [_range, _elevation * 60, [_windage1 * 60, _windage2 * 60], _lead, _TOF, _bulletSpeed, _kineticEnergy]];
@@ -217,23 +212,20 @@ _kineticEnergy = 0.5 * (_bulletMass / 1000 * (_bulletSpeed ^ 2));
_kineticEnergy = _kineticEnergy * 0.737562149;
if ((missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) && (_bulletPos select 1) > 0) then {
- if (missionNamespace getVariable [QEGVAR(advanced_ballistics,CoriolisEnabled), false]) then {
- _horizontalDeflection = 0.0000729 * ((_bulletPos select 1) ^ 2) * sin(_latitude) / _speedAverage;
- _horizontalCoriolis = - atan(_horizontalDeflection / (_bulletPos select 1));
- _windage1 = _windage1 + _horizontalCoriolis;
- _windage2 = _windage2 + _horizontalCoriolis;
- };
- if (missionNamespace getVariable [QEGVAR(advanced_ballistics,EoetvoesEnabled), false]) then {
- _verticalDeflection = (_bulletPos select 2) * _eoetvoesMultiplier;
- _verticalCoriolis = - atan(_verticalDeflection / (_bulletPos select 1));
- _elevation = _elevation + _verticalCoriolis;
- };
- if (missionNamespace getVariable [QEGVAR(advanced_ballistics,SpinDriftEnabled), false]) then {
- _spinDeflection = _twistDirection * 0.0254 * 1.25 * (_stabilityFactor + 1.2) * _TOF ^ 1.83;
- _spinDrift = - atan(_spinDeflection / (_bulletPos select 1));
- _windage1 = _windage1 + _spinDrift;
- _windage2 = _windage2 + _spinDrift;
- };
+ // Coriolis
+ _horizontalDeflection = 0.0000729 * ((_bulletPos select 1) ^ 2) * sin(_latitude) / _speedAverage;
+ _horizontalCoriolis = - atan(_horizontalDeflection / (_bulletPos select 1));
+ _windage1 = _windage1 + _horizontalCoriolis;
+ _windage2 = _windage2 + _horizontalCoriolis;
+ // Eoetvoes
+ _verticalDeflection = (_bulletPos select 2) * _eoetvoesMultiplier;
+ _verticalCoriolis = - atan(_verticalDeflection / (_bulletPos select 1));
+ _elevation = _elevation + _verticalCoriolis;
+ // Spin drift
+ _spinDeflection = _twistDirection * 0.0254 * 1.25 * (_stabilityFactor + 1.2) * _TOF ^ 1.83;
+ _spinDrift = - atan(_spinDeflection / (_bulletPos select 1));
+ _windage1 = _windage1 + _spinDrift;
+ _windage2 = _windage2 + _spinDrift;
};
[_elevation * 60, [_windage1 * 60, _windage2 * 60], _lead, _TOF, _bulletSpeed, _kineticEnergy, _verticalCoriolis * 60, _horizontalCoriolis * 60, _spinDrift * 60]
diff --git a/addons/atragmx/functions/fnc_calculate_target_solution.sqf b/addons/atragmx/functions/fnc_calculate_target_solution.sqf
index 641551fca1..677c4bb793 100644
--- a/addons/atragmx/functions/fnc_calculate_target_solution.sqf
+++ b/addons/atragmx/functions/fnc_calculate_target_solution.sqf
@@ -54,7 +54,7 @@ if (!GVAR(atmosphereModeTBH)) then {
private ["_bulletLength", "_stabilityFactor"];
_bulletLength = 1.8;
_stabilityFactor = 1.5;
-if ((missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) && (missionNamespace getVariable [QEGVAR(advanced_ballistics,SpinDriftEnabled), false])) then {
+if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then {
if (_bulletDiameter > 0 && _bulletLength > 0 && _bulletMass > 0 && _barrelTwist > 0) then {
_stabilityFactor = [_bulletDiameter / 10 / 2.54, _bulletLength, _bulletMass * 15.4323584, _barrelTwist / 2.54, _muzzleVelocity, _temperature, _barometricPressure] call EFUNC(advanced_ballistics,calculateStabilityFactor);
};
diff --git a/addons/atragmx/functions/fnc_parse_input.sqf b/addons/atragmx/functions/fnc_parse_input.sqf
index 504c45fb28..2534c2a319 100644
--- a/addons/atragmx/functions/fnc_parse_input.sqf
+++ b/addons/atragmx/functions/fnc_parse_input.sqf
@@ -60,7 +60,7 @@ private ["_boreHeight", "_bulletMass", "_bulletDiameter", "_airFriction", "_rifl
_boreHeight = parseNumber(ctrlText 120000);
_bulletMass = parseNumber(ctrlText 120010);
_bulletDiameter = parseNumber(ctrlText 120020);
-if ((missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) && (missionNamespace getVariable [QEGVAR(advanced_ballistics,AdvancedAirDragEnabled), false])) then {
+if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then {
_airFriction = 0.1 max parseNumber(ctrlText 120030) min 2;
} else {
_airFriction = parseNumber(ctrlText 120030) / -1000;
@@ -87,7 +87,7 @@ GVAR(workingMemory) set [5, _boreHeight];
GVAR(workingMemory) set [12, _bulletMass];
GVAR(workingMemory) set [13, _bulletDiameter];
GVAR(workingMemory) set [14, _rifleTwist];
-if ((missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) && (missionNamespace getVariable [QEGVAR(advanced_ballistics,AdvancedAirDragEnabled), false])) then {
+if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then {
GVAR(workingMemory) set [15, _airFriction];
} else {
GVAR(workingMemory) set [4, _airFriction];
diff --git a/addons/atragmx/functions/fnc_update_gun.sqf b/addons/atragmx/functions/fnc_update_gun.sqf
index 4ca7338e57..aa1f8c44bf 100644
--- a/addons/atragmx/functions/fnc_update_gun.sqf
+++ b/addons/atragmx/functions/fnc_update_gun.sqf
@@ -26,7 +26,7 @@ if (GVAR(currentUnit) != 2) then {
} else {
ctrlSetText [110, Str(Round(GVAR(workingMemory) select 12))];
};
-if ((missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) && (missionNamespace getVariable [QEGVAR(advanced_ballistics,AdvancedAirDragEnabled), false])) then {
+if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then {
ctrlSetText [120, Str(Round((GVAR(workingMemory) select 15) * 1000) / 1000)];
} else {
ctrlSetText [120, Str(Round((GVAR(workingMemory) select 4) * -1000 * 1000) / 1000)];
diff --git a/addons/atragmx/functions/fnc_update_gun_ammo_data.sqf b/addons/atragmx/functions/fnc_update_gun_ammo_data.sqf
index 4ccae287e7..b11b214500 100644
--- a/addons/atragmx/functions/fnc_update_gun_ammo_data.sqf
+++ b/addons/atragmx/functions/fnc_update_gun_ammo_data.sqf
@@ -32,7 +32,7 @@ if (GVAR(currentUnit) != 2) then {
} else {
ctrlSetText [120020, Str(Round((GVAR(workingMemory) select 13) * 1000) / 1000)];
};
-if ((missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) && (missionNamespace getVariable [QEGVAR(advanced_ballistics,AdvancedAirDragEnabled), false])) then {
+if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then {
ctrlSetText [120030, Str(Round((GVAR(workingMemory) select 15) * 1000) / 1000)];
} else {
ctrlSetText [120030, Str(Round((GVAR(workingMemory) select 4) * -1000 * 1000) / 1000)];
diff --git a/addons/atragmx/script_component.hpp b/addons/atragmx/script_component.hpp
index 6e81f79493..c201925147 100644
--- a/addons/atragmx/script_component.hpp
+++ b/addons/atragmx/script_component.hpp
@@ -11,4 +11,4 @@
#include "\z\ace\addons\main\script_macros.hpp"
-#define ATRAGMX_PROFILE_NAMESPACE_VERSION 1.2
+#define ATRAGMX_PROFILE_NAMESPACE_VERSION 1.3
diff --git a/addons/ballistics/CfgAmmo.hpp b/addons/ballistics/CfgAmmo.hpp
index 3ccc84a7bc..02df51e891 100644
--- a/addons/ballistics/CfgAmmo.hpp
+++ b/addons/ballistics/CfgAmmo.hpp
@@ -23,6 +23,8 @@ class CfgAmmo {
airFriction=-0.001265;
hit=8;
typicalSpeed=750;
+ tracerStartTime = 0.073; //M856 tracer burns out to 800m
+ tracerEndTime = 1.579; //Time in seconds calculated with ballistics calculator
ACE_caliber=0.224;
ACE_bulletLength=0.906;
ACE_bulletMass=62;
@@ -36,7 +38,7 @@ class CfgAmmo {
};
class ACE_556x45_Ball_Mk262 : B_556x45_Ball {
airFriction=-0.001125;
- caliber=0.6;
+ caliber=0.8;
deflecting=18;
hit=11;
typicalSpeed=836;
@@ -53,7 +55,7 @@ class CfgAmmo {
};
class ACE_556x45_Ball_Mk318 : B_556x45_Ball {
airFriction=-0.001120;
- caliber=0.6;
+ caliber=0.8;
deflecting=18;
hit=9;
typicalSpeed=886;
@@ -68,13 +70,30 @@ class CfgAmmo {
ACE_muzzleVelocities[]={780, 886, 950};
ACE_barrelLengths[]={10, 15.5, 20};
};
+ class ACE_556x45_Ball_M995_AP : B_556x45_Ball {
+ airFriction=-0.001120;
+ caliber=1.6;
+ deflecting=18;
+ hit=6;
+ typicalSpeed=886;
+ ACE_caliber=0.224;
+ ACE_bulletLength=0.906;
+ ACE_bulletMass=46;
+ 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.151};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=7;
+ ACE_muzzleVelocities[]={950, 1030, 1040};
+ ACE_barrelLengths[]={10, 15.5, 20};
+ };
class B_556x45_Ball_Tracer_Red;
class ACE_B_556x45_Ball_Tracer_Dim: B_556x45_Ball_Tracer_Red {
nvgOnly = 1;
};
class ACE_545x39_Ball_7N6M : B_556x45_Ball {
airFriction=-0.001162;
- caliber=0.5;
+ caliber=0.6;
deflecting=18;
hit=7;
typicalSpeed=880;
@@ -89,13 +108,15 @@ class CfgAmmo {
ACE_muzzleVelocities[]={780, 880, 920};
ACE_barrelLengths[]={10, 16.3, 20};
};
- class B_556x45_Ball_Tracer_Yellow;
- class ACE_545x39_Ball_7T3M : B_556x45_Ball_Tracer_Yellow {
+ class B_556x45_Ball_Tracer_Green;
+ class ACE_545x39_Ball_7T3M : B_556x45_Ball_Tracer_Green {
airFriction=-0.001162;
- caliber=0.5;
+ caliber=0.6;
deflecting=18;
hit=7;
typicalSpeed=883;
+ tracerStartTime = 0.073; //7T3M tracer burns out to 850m
+ tracerEndTime = 1.736; //Time in seconds calculated with ballistics calculator
ACE_caliber=0.220;
ACE_bulletLength=0.85;
ACE_bulletMass=49.8;
@@ -132,7 +153,7 @@ class CfgAmmo {
class ACE_65x47_Ball_Scenar: B_65x39_Caseless {
airFriction=-0.00078;
typicalSpeed=820 ;
- caliber=0.6;
+ caliber=0.9;
ACE_caliber=0.264;
ACE_bulletLength=1.364;
ACE_bulletMass=139;
@@ -145,9 +166,9 @@ class CfgAmmo {
ACE_barrelLengths[]={10, 16, 20, 24, 26};
};
class ACE_65_Creedmor_Ball: B_65x39_Caseless {
- airFriction=-0.00078;
+ airFriction=-0.000651;
typicalSpeed=860 ;
- caliber=0.7;
+ caliber=1.1;
ACE_caliber=0.264;
ACE_bulletLength=1.426;
ACE_bulletMass=140;
@@ -156,13 +177,15 @@ class CfgAmmo {
ACE_velocityBoundaries[]={};
ACE_standardAtmosphere="ICAO";
ACE_dragModel=7;
- ACE_muzzleVelocities[]={750, 830, 850, 860, 865};
+ ACE_muzzleVelocities[]={750, 820, 840, 852, 860};
ACE_barrelLengths[]={10, 16, 20, 24, 26};
};
class B_762x51_Ball : BulletBase {
airFriction=-0.001035;
typicalSpeed=833;
hit=9;
+ tracerStartTime = 0.073; //Based on the British L5A1 which burns out to 1000m
+ tracerEndTime = 2.058; //Time in seconds calculated with ballistics calculator
ACE_caliber=0.308;
ACE_bulletLength=1.14;
ACE_bulletMass=146;
@@ -180,7 +203,7 @@ class CfgAmmo {
};
class ACE_762x51_Ball_M118LR : B_762x51_Ball {
airFriction=-0.0008525;
- caliber=1.05;
+ caliber=1.8;
hit=16;
typicalSpeed=790;
ACE_caliber=0.308;
@@ -194,11 +217,27 @@ class CfgAmmo {
ACE_muzzleVelocities[]={750, 780, 790, 794};
ACE_barrelLengths[]={16, 20, 24, 26};
};
+ class ACE_762x51_Ball_Mk316_Mod_0 : B_762x51_Ball {
+ airFriction=-0.0008525;
+ caliber=1.8;
+ hit=16;
+ typicalSpeed=790;
+ ACE_caliber=0.308;
+ ACE_bulletLength=1.24;
+ ACE_bulletMass=175;
+ 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[]={};
+ ACE_standardAtmosphere="ICAO";
+ ACE_dragModel=7;
+ ACE_muzzleVelocities[]={775, 790, 805, 810};
+ ACE_barrelLengths[]={16, 20, 24, 26};
+ };
class ACE_762x51_Ball_Mk319_Mod_0 : B_762x51_Ball {
airFriction=-0.00103;
- caliber=0.85;
+ caliber=1.5;
hit=14;
- typicalSpeed=890;
+ typicalSpeed=900;
ACE_caliber=0.308;
ACE_bulletLength=1.24;
ACE_bulletMass=130;
@@ -210,11 +249,27 @@ class CfgAmmo {
ACE_muzzleVelocities[]={838, 892, 910};
ACE_barrelLengths[]={13, 16, 20};
};
+ class ACE_762x51_Ball_M993_AP : B_762x51_Ball {
+ airFriction=-0.00103;
+ caliber=2.2;
+ hit=11;
+ typicalSpeed=930;
+ ACE_caliber=0.308;
+ ACE_bulletLength=1.24;
+ ACE_bulletMass=127;
+ 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.377};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ICAO";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={875, 910, 930};
+ ACE_barrelLengths[]={13, 16, 20};
+ };
class ACE_762x51_Ball_Subsonic : B_762x51_Ball {
airFriction=-0.000535;
- caliber=0.5;
+ caliber=1;
hit=6;
- typicalSpeed=790;
+ typicalSpeed=320;
ACE_caliber=0.308;
ACE_bulletLength=1.340;
ACE_bulletMass=200;
@@ -229,7 +284,7 @@ class CfgAmmo {
class ACE_30_06_M1_Ball : B_762x51_Ball {
airFriction=-0.0009;
typicalSpeed=800;
- caliber=1.3;
+ caliber=2.0;
hit=10;
ACE_caliber=0.308;
ACE_bulletLength=1.21;
@@ -245,7 +300,7 @@ class CfgAmmo {
class ACE_7_Remington_Magnum_Ball : B_762x51_Ball {
airFriction=-0.0008;
typicalSpeed=820;
- caliber=1.4;
+ caliber=2.1;
hit=8;
ACE_caliber=0.284;
ACE_bulletLength=1.529;
@@ -261,7 +316,7 @@ class CfgAmmo {
class ACE_243_Winchester_Ball : B_762x51_Ball {
airFriction=-0.00095;
typicalSpeed=915;
- caliber=0.8;
+ caliber=2.3;
hit=6;
ACE_caliber=0.243;
ACE_bulletLength=1.282;
@@ -276,13 +331,13 @@ class CfgAmmo {
};
class ACE_762x67_Ball_Mk248_Mod_0 : B_762x51_Ball {
airFriction=-0.000830;
- caliber=1.08;
+ caliber=1.8;
hit=17;
typicalSpeed=900;
ACE_caliber=0.308;
ACE_bulletLength=1.353;
ACE_bulletMass=190;
- 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_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[]={};
ACE_standardAtmosphere="ICAO";
@@ -292,13 +347,13 @@ class CfgAmmo {
};
class ACE_762x67_Ball_Mk248_Mod_1 : B_762x51_Ball {
airFriction=-0.000815;
- caliber=1.12;
+ caliber=1.9;
hit=18;
typicalSpeed=867;
ACE_caliber=0.308;
ACE_bulletLength=1.489;
ACE_bulletMass=220;
- 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_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[]={};
ACE_standardAtmosphere="ICAO";
@@ -308,7 +363,7 @@ class CfgAmmo {
};
class ACE_762x67_Ball_Berger_Hybrid_OTM : B_762x51_Ball {
airFriction=-0.00076;
- caliber=1.15;
+ caliber=2.0;
hit=19;
typicalSpeed=853;
ACE_caliber=0.308;
@@ -338,7 +393,7 @@ class CfgAmmo {
};
class ACE_762x54_Ball_7N14 : B_762x51_Ball {
airFriction=-0.001023;
- caliber=0.95;
+ caliber=1.5;
hit=15;
typicalSpeed=820;
ACE_caliber=0.312;
@@ -355,9 +410,11 @@ class CfgAmmo {
class B_762x54_Tracer_Green;
class ACE_762x54_Ball_7T2 : B_762x54_Tracer_Green {
airFriction=-0.001023;
- caliber=0.9;
+ caliber=1.5;
hit=15;
typicalSpeed=800;
+ tracerStartTime = 0.073; //Based on the 7T2 which burns three seconds
+ tracerEndTime = 3;
ACE_caliber=0.312;
ACE_bulletLength=1.14;
ACE_bulletMass=149;
@@ -371,7 +428,7 @@ class CfgAmmo {
};
class ACE_762x35_Ball : B_762x51_Ball {
airFriction=-0.000821;
- caliber=0.9;
+ caliber=1.5;
hit=11;
typicalSpeed=790;
ACE_caliber=0.308;
@@ -388,6 +445,7 @@ class CfgAmmo {
class ACE_762x39_Ball : B_762x51_Ball {
airFriction=-0.0015168;
hit=12;
+ caliber=1.5;
typicalSpeed=716;
ACE_caliber=0.308;
ACE_bulletLength=1.14;
@@ -400,10 +458,13 @@ class CfgAmmo {
ACE_muzzleVelocities[]={650, 716, 750};
ACE_barrelLengths[]={10, 16.3, 20};
};
- class ACE_762x39_Ball_57N231P : B_762x51_Tracer_Yellow {
+ class ACE_762x39_Ball_57N231P : B_762x54_Tracer_Green {
airFriction=-0.0015168;
hit=12;
+ caliber=1.5;
typicalSpeed=716;
+ tracerStartTime = 0.073; //57N231P tracer burns out to 800m
+ tracerEndTime = 2.082; //Time in seconds calculated with ballistics calculator
ACE_caliber=0.308;
ACE_bulletLength=1.14;
ACE_bulletMass=117;
@@ -493,6 +554,7 @@ class CfgAmmo {
class ACE_303_Ball : ACE_762x51_Ball_M118LR {
airFriction=-0.00083;
typicalSpeed=761;
+ caliber=2.0;
ACE_caliber=0.311;
ACE_bulletLength=1.227;
ACE_bulletMass=174;
@@ -510,7 +572,6 @@ class CfgAmmo {
ACE_caliber=0.366;
ACE_bulletLength=1.350;
ACE_bulletMass=230;
- ACE_transonicStabilityCoef=1;
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[]={};
@@ -580,7 +641,6 @@ class CfgAmmo {
class ACE_338_Ball : B_338_Ball {
timeToLive=10;
airFriction=-0.000535;
- caliber=1.55;
typicalSpeed=826;
ACE_caliber=0.338;
ACE_bulletLength=1.70;
@@ -596,7 +656,7 @@ class CfgAmmo {
class ACE_338_Ball_API526 : B_338_Ball {
timeToLive=10;
airFriction=-0.000673;
- caliber=2.4;
+ caliber=2.8;
typicalSpeed=826;
ACE_caliber=0.338;
ACE_bulletLength=1.535;
@@ -626,7 +686,7 @@ class CfgAmmo {
class B_127x99_Ball : BulletBase {
timeToLive=10;
airFriction=-0.0006;
- typicalSpeed=853;
+ typicalSpeed=900;
ACE_caliber=0.510;
ACE_bulletLength=2.310;
ACE_bulletMass=647;
@@ -635,13 +695,31 @@ class CfgAmmo {
ACE_velocityBoundaries[]={};
ACE_standardAtmosphere="ASM";
ACE_dragModel=1;
- ACE_muzzleVelocities[]={853};
+ ACE_muzzleVelocities[]={900};
+ ACE_barrelLengths[]={29};
+ };
+ class ACE_127x99_API : BulletBase {
+ timeToLive=10;
+ airFriction=-0.0006;
+ typicalSpeed=900;
+ hit=25;
+ caliber=4.0;
+ ACE_caliber=0.510;
+ ACE_bulletLength=2.310;
+ ACE_bulletMass=648;
+ 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[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={900};
ACE_barrelLengths[]={29};
};
class ACE_127x99_Ball_AMAX : B_127x99_Ball {
timeToLive=10;
airFriction=-0.000374;
typicalSpeed=860;
+ caliber=3.0;
ACE_caliber=0.510;
ACE_bulletLength=2.540;
ACE_bulletMass=750;
diff --git a/addons/ballistics/CfgMagazines.hpp b/addons/ballistics/CfgMagazines.hpp
index 5e3f48c369..9ead13c962 100644
--- a/addons/ballistics/CfgMagazines.hpp
+++ b/addons/ballistics/CfgMagazines.hpp
@@ -49,6 +49,14 @@ class CfgMagazines {
class 30Rnd_556x45_Stanag: CA_Magazine {
};
+ class ACE_30Rnd_556x45_Stanag_M995_AP_mag: 30Rnd_556x45_Stanag {
+ author = "$STR_ACE_Common_ACETeam";
+ ammo = "ACE_556x45_Ball_M995_AP";
+ displayName = "$STR_ACE_30Rnd_556x45_Stanag_M995_AP_mag_Name";
+ displayNameShort = "$STR_ACE_30Rnd_556x45_Stanag_M995_AP_mag_NameShort";
+ descriptionShort = "$STR_ACE_30Rnd_556x45_Stanag_M995_AP_mag_Description";
+ initSpeed = 1046;
+ };
class ACE_30Rnd_556x45_Stanag_Mk262_mag: 30Rnd_556x45_Stanag {
author = "$STR_ACE_Common_ACETeam";
ammo = "ACE_556x45_Ball_Mk262";
@@ -123,6 +131,15 @@ class CfgMagazines {
descriptionShort = "$STR_ACE_10Rnd_762x51_M118LR_Mag_Description";
initSpeed = 780;
};
+ class ACE_10Rnd_762x51_Mk316_Mod_0_Mag: 10Rnd_762x51_Mag {
+ author = "$STR_ACE_Common_ACETeam";
+ ammo = "ACE_762x51_Ball_Mk316_Mod_0";
+ count = 10;
+ displayName = "$STR_ACE_10Rnd_762x51_Mk316_Mod_0_Mag_Name";
+ displayNameShort = "$STR_ACE_10Rnd_762x51_Mk316_Mod_0_Mag_NameShort";
+ descriptionShort = "$STR_ACE_10Rnd_762x51_Mk316_Mod_0_Mag_Description";
+ initSpeed = 790;
+ };
class ACE_10Rnd_762x51_Mk319_Mod_0_Mag: 10Rnd_762x51_Mag {
author = "$STR_ACE_Common_ACETeam";
ammo = "ACE_762x51_Ball_Mk319_Mod_0";
@@ -132,6 +149,15 @@ class CfgMagazines {
descriptionShort = "$STR_ACE_10Rnd_762x51_Mk319_Mod_0_Mag_Description";
initSpeed = 900;
};
+ class ACE_10Rnd_762x51_M993_AP_Mag: 10Rnd_762x51_Mag {
+ author = "$STR_ACE_Common_ACETeam";
+ ammo = "ACE_762x51_Ball_M993_AP";
+ count = 10;
+ displayName = "$STR_ACE_10Rnd_762x51_M993_AP_Mag_Name";
+ displayNameShort = "$STR_ACE_10Rnd_762x51_M993_AP_Mag_NameShort";
+ descriptionShort = "$STR_ACE_10Rnd_762x51_M993_AP_Mag_Description";
+ initSpeed = 920;
+ };
class ACE_20Rnd_762x51_M118LR_Mag: 20Rnd_762x51_Mag {
author = "$STR_ACE_Common_ACETeam";
ammo = "ACE_762x51_Ball_M118LR";
@@ -140,6 +166,15 @@ class CfgMagazines {
descriptionShort = "$STR_ACE_20Rnd_762x51_M118LR_Mag_Description";
initSpeed = 780;
};
+ class ACE_20Rnd_762x51_Mk316_Mod_0_Mag: 20Rnd_762x51_Mag {
+ author = "$STR_ACE_Common_ACETeam";
+ ammo = "ACE_762x51_Ball_Mk316_Mod_0";
+ count = 20;
+ displayName = "$STR_ACE_20Rnd_762x51_Mk316_Mod_0_Mag_Name";
+ displayNameShort = "$STR_ACE_20Rnd_762x51_Mk316_Mod_0_Mag_NameShort";
+ descriptionShort = "$STR_ACE_20Rnd_762x51_Mk316_Mod_0_Mag_Description";
+ initSpeed = 790;
+ };
class ACE_20Rnd_762x51_Mk319_Mod_0_Mag: 20Rnd_762x51_Mag {
author = "$STR_ACE_Common_ACETeam";
ammo = "ACE_762x51_Ball_Mk319_Mod_0";
@@ -148,6 +183,15 @@ class CfgMagazines {
descriptionShort = "$STR_ACE_20Rnd_762x51_Mk319_Mod_0_Mag_Description";
initSpeed = 900;
};
+ class ACE_20Rnd_762x51_M993_AP_Mag: 20Rnd_762x51_Mag {
+ author = "$STR_ACE_Common_ACETeam";
+ ammo = "ACE_762x51_Ball_M993_AP";
+ count = 20;
+ displayName = "$STR_ACE_20Rnd_762x51_M993_AP_Mag_Name";
+ displayNameShort = "$STR_ACE_20Rnd_762x51_M993_AP_Mag_NameShort";
+ descriptionShort = "$STR_ACE_20Rnd_762x51_M993_AP_Mag_Description";
+ initSpeed = 920;
+ };
class ACE_20Rnd_762x67_Mk248_Mod_0_Mag: 20Rnd_762x51_Mag {
author = "$STR_ACE_Common_ACETeam";
ammo = "ACE_762x67_Ball_Mk248_Mod_0";
@@ -211,7 +255,15 @@ class CfgMagazines {
displayName = "$STR_ACE_5Rnd_127x99_Mag_Name";
displayNameShort = "$STR_ACE_5Rnd_127x99_Mag_NameShort";
descriptionShort = "$STR_ACE_5Rnd_127x99_Mag_Description";
- initSpeed = 853;
+ initSpeed = 900;
+ };
+ class ACE_5Rnd_127x99_API_Mag: 5Rnd_127x108_Mag {
+ author = "$STR_ACE_Common_ACETeam";
+ ammo = "ACE_127x99_API";
+ displayName = "$STR_ACE_5Rnd_127x99_API_Mag_Name";
+ displayNameShort = "$STR_ACE_5Rnd_127x99_API_Mag_NameShort";
+ descriptionShort = "$STR_ACE_5Rnd_127x99_API_Mag_Description";
+ initSpeed = 900;
};
class ACE_5Rnd_127x99_AMAX_Mag: 5Rnd_127x108_Mag {
author = "$STR_ACE_Common_ACETeam";
diff --git a/addons/ballistics/CfgVehicles.hpp b/addons/ballistics/CfgVehicles.hpp
index b40ee12a72..89f5c26652 100644
--- a/addons/ballistics/CfgVehicles.hpp
+++ b/addons/ballistics/CfgVehicles.hpp
@@ -27,6 +27,7 @@ class CfgVehicles {
MACRO_ADDMAGAZINE(ACE_10Rnd_338_300gr_HPBT_Mag,4);
MACRO_ADDMAGAZINE(ACE_10Rnd_338_API526_Mag,4);
MACRO_ADDMAGAZINE(ACE_5Rnd_127x99_Mag,4);
+ MACRO_ADDMAGAZINE(ACE_5Rnd_127x99_API_Mag,4);
MACRO_ADDMAGAZINE(ACE_5Rnd_127x99_AMAX_Mag,4);
};
};
@@ -37,12 +38,15 @@ class CfgVehicles {
MACRO_ADDMAGAZINE(ACE_30Rnd_65_Creedmor_mag,4);
MACRO_ADDMAGAZINE(ACE_10Rnd_762x51_M118LR_Mag,4);
MACRO_ADDMAGAZINE(ACE_20Rnd_762x51_M118LR_Mag,4);
+ MACRO_ADDMAGAZINE(ACE_10Rnd_762x51_Mk316_Mod_0_Mag,4);
+ MACRO_ADDMAGAZINE(ACE_20Rnd_762x51_Mk316_Mod_0_Mag,4);
MACRO_ADDMAGAZINE(ACE_10Rnd_762x51_Mk319_Mod_0_Mag,4);
MACRO_ADDMAGAZINE(ACE_20Rnd_762x51_Mk319_Mod_0_Mag,4);
MACRO_ADDMAGAZINE(ACE_20Rnd_762x51_Mag_Tracer_Dim,4);
MACRO_ADDMAGAZINE(ACE_10Rnd_338_300gr_HPBT_Mag,4);
MACRO_ADDMAGAZINE(ACE_10Rnd_338_API526_Mag,4);
MACRO_ADDMAGAZINE(ACE_5Rnd_127x99_Mag,4);
+ MACRO_ADDMAGAZINE(ACE_5Rnd_127x99_API_Mag,4);
MACRO_ADDMAGAZINE(ACE_5Rnd_127x99_AMAX_Mag,4);
};
};
@@ -51,13 +55,18 @@ class CfgVehicles {
class TransportMagazines {
MACRO_ADDMAGAZINE(ACE_10Rnd_762x51_M118LR_Mag,4);
MACRO_ADDMAGAZINE(ACE_20Rnd_762x51_M118LR_Mag,4);
+ MACRO_ADDMAGAZINE(ACE_10Rnd_762x51_Mk316_Mod_0_Mag,4);
+ MACRO_ADDMAGAZINE(ACE_20Rnd_762x51_Mk316_Mod_0_Mag,4);
MACRO_ADDMAGAZINE(ACE_10Rnd_762x51_Mk319_Mod_0_Mag,4);
MACRO_ADDMAGAZINE(ACE_20Rnd_762x51_Mk319_Mod_0_Mag,4);
MACRO_ADDMAGAZINE(ACE_20Rnd_762x51_Mag_Tracer_Dim,4);
MACRO_ADDMAGAZINE(ACE_20Rnd_762x51_Mag_SD,3);
+ MACRO_ADDMAGAZINE(ACE_10Rnd_762x51_M993_AP_Mag,4);
+ MACRO_ADDMAGAZINE(ACE_20Rnd_762x51_M993_AP_Mag,4);
MACRO_ADDMAGAZINE(ACE_10Rnd_338_300gr_HPBT_Mag,4);
MACRO_ADDMAGAZINE(ACE_10Rnd_338_API526_Mag,4);
MACRO_ADDMAGAZINE(ACE_5Rnd_127x99_Mag,4);
+ MACRO_ADDMAGAZINE(ACE_5Rnd_127x99_API_Mag,4);
MACRO_ADDMAGAZINE(ACE_5Rnd_127x99_AMAX_Mag,4);
};
};
@@ -69,6 +78,8 @@ class CfgVehicles {
MACRO_ADDMAGAZINE(ACE_30Rnd_65_Creedmor_mag,4);
MACRO_ADDMAGAZINE(ACE_10Rnd_762x51_M118LR_Mag,4);
MACRO_ADDMAGAZINE(ACE_20Rnd_762x51_M118LR_Mag,4);
+ MACRO_ADDMAGAZINE(ACE_10Rnd_762x51_Mk316_Mod_0_Mag,4);
+ MACRO_ADDMAGAZINE(ACE_20Rnd_762x51_Mk316_Mod_0_Mag,4);
MACRO_ADDMAGAZINE(ACE_10Rnd_762x51_Mk319_Mod_0_Mag,4);
MACRO_ADDMAGAZINE(ACE_20Rnd_762x51_Mk319_Mod_0_Mag,4);
MACRO_ADDMAGAZINE(ACE_20Rnd_762x51_Mag_Tracer_Dim,4);
@@ -106,7 +117,6 @@ class CfgVehicles {
class TransportMagazines {
MACRO_ADDMAGAZINE(ACE_30Rnd_65x47_Scenar_mag,6);
MACRO_ADDMAGAZINE(ACE_30Rnd_65_Creedmor_mag,4);
- MACRO_ADDMAGAZINE(ACE_20Rnd_762x51_Mag_SD,3);
MACRO_ADDMAGAZINE(ACE_10Rnd_762x54_Tracer_mag,4);
};
};
@@ -114,6 +124,7 @@ class CfgVehicles {
class IND_Box_Base;
class Box_IND_Wps_F: IND_Box_Base {
class TransportMagazines {
+ MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_M995_AP_mag,4);
MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_Mk262_mag,4);
MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_Mk318_mag,4);
};
@@ -127,6 +138,7 @@ class CfgVehicles {
class Box_IND_Ammo_F: IND_Box_Base {
class TransportMagazines {
+ MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_M995_AP_mag,4);
MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_Mk262_mag,4);
MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_Mk318_mag,4);
};
@@ -135,6 +147,7 @@ class CfgVehicles {
class FIA_Box_Base_F;
class Box_FIA_Wps_F: FIA_Box_Base_F {
class TransportMagazines {
+ MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_M995_AP_mag,4);
MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_Mk262_mag,4);
MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_Mk318_mag,4);
};
@@ -142,6 +155,7 @@ class CfgVehicles {
class Box_FIA_Ammo_F: FIA_Box_Base_F {
class TransportMagazines {
+ MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_M995_AP_mag,4);
MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_Mk262_mag,4);
MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_Mk318_mag,4);
};
@@ -149,6 +163,7 @@ class CfgVehicles {
class I_supplyCrate_F: B_supplyCrate_F {
class TransportMagazines {
+ MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_M995_AP_mag,4);
MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_Mk262_mag,4);
MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_Mk318_mag,4);
};
@@ -156,6 +171,7 @@ class CfgVehicles {
class IG_supplyCrate_F: ReammoBox_F {
class TransportMagazines {
+ MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_M995_AP_mag,4);
MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_Mk262_mag,4);
MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_Mk318_mag,4);
};
@@ -176,8 +192,12 @@ class CfgVehicles {
author = "$STR_ACE_Common_ACETeam";
class TransportMagazines {
MACRO_ADDMAGAZINE(ACE_20Rnd_762x51_Mag_SD,4);
+ MACRO_ADDMAGAZINE(ACE_10Rnd_762x51_M993_AP_Mag,4);
+ MACRO_ADDMAGAZINE(ACE_20Rnd_762x51_M993_AP_Mag,4);
MACRO_ADDMAGAZINE(ACE_10Rnd_762x51_M118LR_Mag,4);
MACRO_ADDMAGAZINE(ACE_20Rnd_762x51_M118LR_Mag,4);
+ MACRO_ADDMAGAZINE(ACE_10Rnd_762x51_Mk316_Mod_0_Mag,4);
+ MACRO_ADDMAGAZINE(ACE_20Rnd_762x51_Mk316_Mod_0_Mag,4);
MACRO_ADDMAGAZINE(ACE_10Rnd_762x51_Mk319_Mod_0_Mag,4);
MACRO_ADDMAGAZINE(ACE_20Rnd_762x51_Mk319_Mod_0_Mag,4);
MACRO_ADDMAGAZINE(ACE_20Rnd_762x51_Mag_Tracer_Dim,4);
@@ -185,6 +205,7 @@ class CfgVehicles {
MACRO_ADDMAGAZINE(ACE_20Rnd_762x67_Mk248_Mod_1_Mag,4);
MACRO_ADDMAGAZINE(ACE_20Rnd_762x67_Berger_Hybrid_OTM_Mag,4);
MACRO_ADDMAGAZINE(ACE_10Rnd_762x54_Tracer_mag,4);
+ MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_M995_AP_mag,4);
MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_Mk262_mag,4);
MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_Mk318_mag,4);
MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_Tracer_Dim,4);
@@ -197,6 +218,7 @@ class CfgVehicles {
MACRO_ADDMAGAZINE(ACE_10Rnd_338_300gr_HPBT_Mag,4);
MACRO_ADDMAGAZINE(ACE_10Rnd_338_API526_Mag,4);
MACRO_ADDMAGAZINE(ACE_5Rnd_127x99_Mag,4);
+ MACRO_ADDMAGAZINE(ACE_5Rnd_127x99_API_Mag,4);
MACRO_ADDMAGAZINE(ACE_5Rnd_127x99_AMAX_Mag,4);
};
};
diff --git a/addons/ballistics/CfgWeapons.hpp b/addons/ballistics/CfgWeapons.hpp
index e6ce5d4bfd..7e647d2605 100644
--- a/addons/ballistics/CfgWeapons.hpp
+++ b/addons/ballistics/CfgWeapons.hpp
@@ -382,6 +382,7 @@ class CfgWeapons {
"30Rnd_556x45_Stanag_Tracer_Red",
"30Rnd_556x45_Stanag_Tracer_Green",
"30Rnd_556x45_Stanag_Tracer_Yellow",
+ "ACE_30Rnd_556x45_Stanag_M995_AP_mag",
"ACE_30Rnd_556x45_Stanag_Mk262_mag",
"ACE_30Rnd_556x45_Stanag_Mk318_mag",
"ACE_30Rnd_556x45_Stanag_Tracer_Dim"
@@ -401,6 +402,7 @@ class CfgWeapons {
"30Rnd_556x45_Stanag_Tracer_Red",
"30Rnd_556x45_Stanag_Tracer_Green",
"30Rnd_556x45_Stanag_Tracer_Yellow",
+ "ACE_30Rnd_556x45_Stanag_M995_AP_mag",
"ACE_30Rnd_556x45_Stanag_Mk262_mag",
"ACE_30Rnd_556x45_Stanag_Mk318_mag",
"ACE_30Rnd_556x45_Stanag_Tracer_Dim"
@@ -415,6 +417,7 @@ class CfgWeapons {
"30Rnd_556x45_Stanag_Tracer_Red",
"30Rnd_556x45_Stanag_Tracer_Green",
"30Rnd_556x45_Stanag_Tracer_Yellow",
+ "ACE_30Rnd_556x45_Stanag_M995_AP_mag",
"ACE_30Rnd_556x45_Stanag_Mk262_mag",
"ACE_30Rnd_556x45_Stanag_Mk318_mag",
"ACE_30Rnd_556x45_Stanag_Tracer_Dim"
@@ -429,6 +432,7 @@ class CfgWeapons {
"30Rnd_556x45_Stanag_Tracer_Red",
"30Rnd_556x45_Stanag_Tracer_Green",
"30Rnd_556x45_Stanag_Tracer_Yellow",
+ "ACE_30Rnd_556x45_Stanag_M995_AP_mag",
"ACE_30Rnd_556x45_Stanag_Mk262_mag",
"ACE_30Rnd_556x45_Stanag_Mk318_mag",
"ACE_30Rnd_556x45_Stanag_Tracer_Dim"
@@ -449,6 +453,7 @@ class CfgWeapons {
"30Rnd_556x45_Stanag_Tracer_Red",
"30Rnd_556x45_Stanag_Tracer_Green",
"30Rnd_556x45_Stanag_Tracer_Yellow",
+ "ACE_30Rnd_556x45_Stanag_M995_AP_mag",
"ACE_30Rnd_556x45_Stanag_Mk262_mag",
"ACE_30Rnd_556x45_Stanag_Mk318_mag",
"ACE_30Rnd_556x45_Stanag_Tracer_Dim"
@@ -463,6 +468,7 @@ class CfgWeapons {
"30Rnd_556x45_Stanag_Tracer_Red",
"30Rnd_556x45_Stanag_Tracer_Green",
"30Rnd_556x45_Stanag_Tracer_Yellow",
+ "ACE_30Rnd_556x45_Stanag_M995_AP_mag",
"ACE_30Rnd_556x45_Stanag_Mk262_mag",
"ACE_30Rnd_556x45_Stanag_Mk318_mag",
"ACE_30Rnd_556x45_Stanag_Tracer_Dim"
@@ -477,6 +483,7 @@ class CfgWeapons {
"30Rnd_556x45_Stanag_Tracer_Red",
"30Rnd_556x45_Stanag_Tracer_Green",
"30Rnd_556x45_Stanag_Tracer_Yellow",
+ "ACE_30Rnd_556x45_Stanag_M995_AP_mag",
"ACE_30Rnd_556x45_Stanag_Mk262_mag",
"ACE_30Rnd_556x45_Stanag_Mk318_mag",
"ACE_30Rnd_556x45_Stanag_Tracer_Dim"
@@ -503,8 +510,10 @@ class CfgWeapons {
magazines[] = {
"20Rnd_762x51_Mag",
"ACE_20Rnd_762x51_Mag_Tracer_Dim",
+ "ACE_20Rnd_762x51_Mk316_Mod_0_Mag",
"ACE_20Rnd_762x51_M118LR_Mag",
"ACE_20Rnd_762x51_Mk319_Mod_0_Mag",
+ "ACE_20Rnd_762x51_M993_AP_Mag",
"ACE_20Rnd_762x51_Mag_SD"
};
initSpeed = -0.9724;
@@ -528,6 +537,7 @@ class CfgWeapons {
"5Rnd_127x108_Mag",
"5Rnd_127x108_APDS_Mag",
"ACE_5Rnd_127x99_Mag",
+ "ACE_5Rnd_127x99_API_Mag",
"ACE_5Rnd_127x99_AMAX_Mag"
};
initSpeed = -1.0;
@@ -551,8 +561,10 @@ class CfgWeapons {
magazines[] = {
"20Rnd_762x51_Mag",
"ACE_20Rnd_762x51_Mag_Tracer_Dim",
+ "ACE_20Rnd_762x51_Mk316_Mod_0_Mag",
"ACE_20Rnd_762x51_M118LR_Mag",
"ACE_20Rnd_762x51_Mk319_Mod_0_Mag",
+ "ACE_20Rnd_762x51_M993_AP_Mag",
"ACE_20Rnd_762x51_Mag_SD"
};
initSpeed = -0.9843;
@@ -573,8 +585,10 @@ class CfgWeapons {
magazines[] = {
"20Rnd_762x51_Mag",
"ACE_20Rnd_762x51_Mag_Tracer_Dim",
+ "ACE_20Rnd_762x51_Mk316_Mod_0_Mag",
"ACE_20Rnd_762x51_M118LR_Mag",
"ACE_20Rnd_762x51_Mk319_Mod_0_Mag",
+ "ACE_20Rnd_762x51_M993_AP_Mag",
"ACE_20Rnd_762x51_Mag_SD"
};
initSpeed = -0.9916;
diff --git a/addons/ballistics/stringtable.xml b/addons/ballistics/stringtable.xml
index 48394f898f..4dc27fd2fc 100644
--- a/addons/ballistics/stringtable.xml
+++ b/addons/ballistics/stringtable.xml
@@ -256,42 +256,6 @@
Calibro: 5.56x45 mm Traccianti IR-DIM<br />Munizioni: 30<br />In uso su: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR
Калибр: 5,56x45 мм ИК-трассирующие<br />Патронов: 30<br />Используются с: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR
-
- 5.56mm 30Rnd AP Mag
- 5,56 mm Páncéltörő 30-as Tár
- 5,56 mm 30-Schuss-Magazin AP
- Cargador de 30 balas AP de 5,56mm
- Ch. 5,56mm 30Cps AP
- Magazynek 5,56mm 30rd AP
- 5.56mm 30ks AP Zásobník
- Carregador de 30 projéteis AP de 5,56mm
- Caricatore 5.56mm 30Rnd AP
- Магазин из 30-ти 5,56 мм бронебойных
-
-
- 5.56mm AP
- 5,56 mm Páncéltörő
- 5,56mm AP
- 5,56mm AP
- 5,56mm AP
- 5,56mm AP
- 5.56mm AP
- 5,56mm AP
- 5.56mm AP
- 5,56 мм бронебойные
-
-
- Caliber: 5.56x45 mm AP<br />Rounds: 30<br />Used in: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR
- Kaliber: 5,56x45 mm Páncéltörő<br />Lövedékek: 30<br />Használható: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR
- Kaliber: 5,56x45 mm AP<br />Patronen: 30<br />Eingesetzt von: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR
- Calibre: 5,56x45 mm AP<br />Balas: 30<br />Se usa en: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR
- Calibre: 5,56x45 mm AP<br />Cartouches: 30<br />Utilisé dans: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR
- Kaliber: 5,56x45 mm AP<br />Pociski: 30<br />Używane w: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR
- Ráže: 5.56x45 mm AP<br />Munice: 30<br />Použití: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR
- Calibre: 5,56x45 mm AP<br />Projéteis: 30<br />Usado em: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR
- Calibro: 5.56x45 mm AP<br />Munizioni: 30<br />In uso su: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR
- Калибр: 5,56x45 мм бронебойные<br />Патронов: 30<br />Используются с: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR
-
7.62mm 20rnd Tracer Mag
@@ -401,42 +365,6 @@
Calibro: 7.62x51 mm Sil.<br />Munizioni: 20<br />In uso su: Mk18 ABR
Калибр: 7,62x51 мм дозвуковые<br />Патронов: 20<br />Используются с: Mk18 ABR
-
- 7.62mm 20Rnd AP Mag
- 7,62 mm Páncéltörő 20-as Tár
- 7,62 mm 20-Schuss-Magazin AP
- Cargador de 20 balas AP de 7,62mm
- Ch. 7,62mm 20Cps AP
- Magazynek 7,62mm 20rd AP
- 7.62mm 20ks AP Zásobník
- Carregador de 20 projéteis AP de 7,62mm
- Caricatore 7.62mm 20Rnd AP
- Магазин из 20-ти 7,62 мм бронебойных
-
-
- 7.62mm AP
- 7,62 mm Páncéltörő
- 7,62mm AP
- 7,62mm AP
- 7,62mm AP
- 7,62mm AP
- 7.62mm AP
- 7,62mm AP
- 7.62mm AP
- 7,62 мм бронебойные
-
-
- Caliber: 7.62x51 mm AP<br />Rounds: 20<br />Used in: Mk18 ABR
- Kaliber: 7,62x51 mm Páncéltörő<br />Lövedékek: 20<br />Használható: Mk18 ABR
- Kaliber: 7,62x51 mm AP<br />Patronen: 20<br />Eingesetzt von: EBR
- Calibre: 7,62x51 mm AP<br />Balas: 20<br />Se usa en: Mk18 ABR
- Calibre: 7,62x51 mm AP<br />Cartouches: 20<br />Utilisé dans: EBR
- Kaliber: 7,62x51 mm AP<br />Pociski: 20<br />Używane w: Mk18 ABR
- Ráže: 7.62x51 mm AP<br />Munice: 20<br />Použití: Mk18 ABR
- Calibre: 7,62x51 mm AP<br />Projéteis: 20<br />Usado em: Mk18 ABR
- Calibro: 7.62x51 mm AP<br />Munizioni: 20<br />In uso su: Mk18 ABR
- Калибр: 7,62x51 мм дозвуковые<br />Патронов: 20<br />Используются с: Mk18 ABR
-
.338 NM 130Rnd Tracer Belt
@@ -564,31 +492,6 @@
Calibre: 9.3x64mm trazadora IR-DIM<br />Balas: 10<br />Se usa en: Cyrus
Калибр: 9,3x64 мм ИК-трассирующие<br />Патронов: 10<br />Используются с: Cyrus
-
- 9.3mm 10Rnd AP Mag
- 9,3mm 10-Schuss-Magazin Hartkern
- Magazynek 9,3mm 10rd AP
- Chargeur 9.3mm 10Cps AP
- Cargador de 10 balas AP de 9.3mm
- Магазин из 10-ти 9,3 мм бронебойных
-
-
- 9.3mm AP
- 9,3mm AP
- 9,3mm AP
- 9.3mm AP
- 9.3mm AP
- 9.3mm AP
- 9,3 мм бронебойные
-
-
- Caliber: 9.3x64mm AP<br />Rounds: 10<br />Used in: Cyrus
- Kaliber: 9,3x64mm Hartkern<br />Schuss: 10<br />Verwendet für: Cyrus
- Kaliber: 9,3x64 mm AP<br />Pociski: 10<br />Używany w: Cyrus
- Calibre: 9.3x64mm AP<br />Cartouches: 10<br />Utilisé dans: Cyrus
- Calibre: 9.3x64mm AP<br />Balas: 10<br />Se usa en: Cyrus
- Калибр: 9,3x64 мм бронебойные<br />Патронов: 10<br />Используются с: Cyrus
-
9.3mm 150Rnd Tracer Belt
@@ -781,7 +684,7 @@
5.56mm Mk262
5,56mm Mk262
5.56mm Mk262
- 5.56mm (Mk262)
+ 5.56mm Mk262
5,56 мм Mk262
@@ -793,16 +696,16 @@
5.56mm 30Rnd Mag (Mk318)
- Magazynek 5,56mm 30rd Mk318
+ Magazynek 5,56mm 30rd (Mk318)
5.56mm 30Cps (Mk318)
Cargador de 30 balas de 5.56mm (Mk318)
- Магазин из 30-ти 5.56 мм Mk318
+ Магазин из 30-ти 5.56 мм (Mk318)
5.56mm Mk318
5,56mm Mk318
5.56mm Mk318
- 5.56mm (Mk318)
+ 5.56mm Mk318
5.56 мм Mk318
@@ -812,6 +715,27 @@
Calibre: 5.56x45 mm NATO (Mk318)<br />Balas: 30
Калибр: 5,56x45 мм NATO (Mk318)<br />Патронов: 30
+
+ 5.56mm 30Rnd Mag (M995 AP)
+ Magazynek 5,56mm 30rd (M995 AP)
+ 5.56mm 30Cps (M995 AP)
+ Cargador de 30 balas de 5.56mm (M995 AP)
+ Магазин из 30-ти 5.56 мм (M995 AP)
+
+
+ 5.56mm AP
+ 5,56mm AP
+ 5.56mm AP
+ 5.56mm AP
+ 5.56 мм AP
+
+
+ Caliber: 5.56x45 mm NATO (M995 AP)<br />Rounds: 30
+ Kaliber: 5,56x45 mm NATO (M995 AP)<br />Pociski: 30
+ Calibre: 5.56x45 mm NATO (M995 AP)<br />Cartouches: 30
+ Calibre: 5.56x45 mm NATO (M995 AP)<br />Balas: 30
+ Калибр: 5,56x45 мм NATO (M995 AP)<br />Патронов: 30
+
7.62mm 10Rnd Mag (M118LR)
Magazynek 7,62mm 10rd (M118LR)
@@ -854,6 +778,48 @@
Calibre: 7.62x51 mm NATO (M118LR)<br />Balas: 20
Калибр: 7,62x51 мм NATO (M118LR)<br />Патронов: 20
+
+ 7.62mm 10Rnd Mag (Mk316 Mod 0)
+ Magazynek 7,62mm 10rd (Mk316 Mod 0)
+ 7.62mm 10Cps (Mk316 Mod 0)
+ Cargador de 10 balas de 7.62mm (Mk316 Mod 0)
+ Магазин из 10-ти 7,62 мм (Mk316 Mod 0)
+
+
+ 7.62mm Mk316
+ 7,62mm Mk316
+ 7.62mm Mk316
+ 7.62mm Mk316
+ 7,62 мм Mk316
+
+
+ Caliber: 7.62x51 mm NATO (Mk316 Mod 0)<br />Rounds: 10
+ Kaliber: 7,62x51 mm NATO (Mk316 Mod 0)<br />Pociski: 10
+ Calibre: 7.62x51 mm NATO (Mk316 Mod 0)<br />Cartouches: 10
+ Calibre: 7.62x51 mm NATO (Mk316 Mod 0)<br />Balas: 10
+ Калибр: 7,62x51 мм NATO (Mk316 Mod 0)<br />Патронов: 10
+
+
+ 7.62mm 20Rnd Mag (Mk316 Mod 0)
+ Magazynek 7,62mm 20rd (Mk316 Mod 0)
+ 7.62mm 20Cps (Mk316 Mod 0)
+ Cargador de 20 balas de 7.62mm (Mk316 Mod 0)
+ Магазин из 20-ти 7,62 мм (Mk316 Mod 0)
+
+
+ 7.62mm Mk316
+ 7,62mm Mk316
+ 7.62mm Mk316
+ 7.62mm Mk316
+ 7,62 мм Mk316
+
+
+ Caliber: 7.62x51 mm NATO (Mk316 Mod 0)<br />Rounds: 20
+ Kaliber: 7,62x51 mm NATO (Mk316 Mod 0)<br />Pociski: 20
+ Calibre: 7.62x51 mm NATO (Mk316 Mod 0)<br />Cartouches: 20
+ Calibre: 7.62x51 mm NATO (Mk316 Mod 0)<br />Balas: 20
+ Калибр: 7,62x51 мм NATO (Mk316 Mod 0)<br />Патронов: 20
+
7.62mm 10Rnd Mag (Mk319 Mod 0)
Magazynek 7,62mm 10rd (Mk319 Mod 0)
@@ -896,6 +862,48 @@
Calibre: 7.62x51 mm NATO (Mk319 Mod 0)<br />Balas: 20
Калибр: 7,62x51 мм NATO (Mk319 Mod 0)<br />Патронов: 20
+
+ 7.62mm 10Rnd Mag (M993 AP)
+ Magazynek 7,62mm 10rd (M993 AP)
+ 7.62mm 10Cps (M993 AP)
+ Cargador de 10 balas de 7.62mm (M993 AP)
+ Магазин из 10-ти 7,62 мм (M993 AP)
+
+
+ 7.62mm AP
+ 7,62mm AP
+ 7.62mm AP
+ 7.62mm AP
+ 7,62mm AP
+
+
+ Caliber: 7.62x51 mm NATO (M993 AP)<br />Rounds: 10
+ Kaliber: 7,62x51 mm NATO (M993 AP)<br />Pociski: 10
+ Calibre: 7.62x51 mm NATO (M993 AP)<br />Cartouches: 10
+ Calibre: 7.62x51 mm NATO (M993 AP)<br />Balas: 10
+ Калибр: 7,62x51 мм NATO (M993 AP)<br />Патронов: 10
+
+
+ 7.62mm 20Rnd Mag (M993 AP)
+ Magazynek 7,62mm 20rd (M993 AP)
+ 7.62mm 20Cps (M993 AP)
+ Cargador de 20 balas de 7.62mm (M993 AP)
+ Магазин из 20-ти 7,62 мм (M993 AP)
+
+
+ 7.62mm AP
+ 7,62mm AP
+ 7.62mm AP
+ 7.62mm AP
+ 7,62 мм AP
+
+
+ Caliber: 7.62x51 mm NATO (M993 AP)<br />Rounds: 20
+ Kaliber: 7,62x51 mm NATO (M993 AP)<br />Pociski: 20
+ Calibre: 7.62x51 mm NATO (M993 AP)<br />Cartouches: 20
+ Calibre: 7.62x51 mm NATO (M993 AP)<br />Balas: 20
+ Калибр: 7,62x51 мм NATO (M993 AP)<br />Патронов: 20
+
7.62mm 20Rnd Mag (Mk248 Mod 0)
Magazynek 7,62mm 20rd (Mk248 Mod 0)
@@ -1058,6 +1066,24 @@
Kaliber: 12,7x99 mm<br />Pociski: 5
Калибр: 12,7x99 мм<br />Патронов: 5
+
+ 12.7x99mm API 5Rnd Mag
+ 12.7x99mm API 5Cps
+ Cargador de 5 balas de 12.7x99mm API
+ Magazynek 12,7x99mm API 5rd
+
+
+ 12.7mm API
+ 12.7mm API
+ 12.7mm API
+ 12,7mm API
+
+
+ Caliber: 12.7x99mm API<br />Rounds: 5
+ Calibre: 12.7x99mm API<br />Cartouches: 5
+ Calibre: 12.7x99mm API<br />Balas: 5
+ Kaliber: 12,7x99 mm API<br />Pociski: 5
+
12.7x99mm 5Rnd Mag (AMAX)
12.7x99mm 5Rnd Mag (AMAX)
diff --git a/addons/captives/CfgVehicles.hpp b/addons/captives/CfgVehicles.hpp
index 10b2d0285f..1e2eb3f201 100644
--- a/addons/captives/CfgVehicles.hpp
+++ b/addons/captives/CfgVehicles.hpp
@@ -101,25 +101,20 @@ class CfgVehicles {
#define MACRO_LOADUNLOADCAPTIVE \
class ACE_Actions { \
class ACE_MainActions { \
- selection = ""; \
- class ACE_LoadCaptive { \
+ class GVAR(LoadCaptive) { \
displayName = "$STR_ACE_Captives_LoadCaptive"; \
distance = 4; \
condition = QUOTE([ARR_3(_player, objNull, _target)] call FUNC(canLoadCaptive)); \
statement = QUOTE([ARR_3(_player, objNull, _target)] call FUNC(doLoadCaptive)); \
exceptions[] = {"isNotEscorting"}; \
- showDisabled = 0; \
priority = 1.2; \
- hotkey = "L"; \
}; \
- class ACE_UnloadCaptive { \
+ class GVAR(UnloadCaptive) { \
displayName = "$STR_ACE_Captives_UnloadCaptive"; \
distance = 4; \
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canUnloadCaptive)); \
statement = QUOTE([ARR_2(_player, _target)] call FUNC(doUnloadCaptive)); \
- showDisabled = 0; \
priority = 1.2; \
- hotkey = "C"; \
}; \
}; \
};
diff --git a/addons/captives/functions/fnc_doEscortCaptive.sqf b/addons/captives/functions/fnc_doEscortCaptive.sqf
index 08f44a1437..b8758065d8 100644
--- a/addons/captives/functions/fnc_doEscortCaptive.sqf
+++ b/addons/captives/functions/fnc_doEscortCaptive.sqf
@@ -22,7 +22,7 @@ PARAMS_3(_unit,_target,_state);
if (_state) then {
if (_unit getVariable [QGVAR(isEscorting), false]) exitWith {};
- [_unit, _target] call EFUNC(common,claim);
+ [_unit, _target, false] call EFUNC(common,claim);
_unit setVariable [QGVAR(isEscorting), true, true];
_target attachTo [_unit, [0, 1, 0]];
@@ -34,8 +34,7 @@ if (_state) then {
{[(_this select 0), ((_this select 0) getVariable [QGVAR(escortedUnit), objNull]), false] call FUNC(doEscortCaptive);},
nil, 20, false, true, "", QUOTE(!isNull (GETVAR(_target,QGVAR(escortedUnit),objNull)))];
- private "_escortFnc";
- _escortFnc = {
+ [{
EXPLODE_3_PVT((_this select 0),_unit,_target,_actionID);
if (_unit getVariable [QGVAR(isEscorting), false]) then {
if (!alive _target || {!alive _unit} || {!canStand _target} || {!canStand _unit} || {_target getVariable ["ACE_isUnconscious", false]} || {_unit getVariable ["ACE_isUnconscious", false]} || {!isNull (attachedTo _unit)}) then {
@@ -45,13 +44,12 @@ if (_state) then {
if (!(_unit getVariable [QGVAR(isEscorting), false])) then {
[(_this select 1)] call cba_fnc_removePerFrameHandler;
- [objNull, _target] call EFUNC(common,claim);
+ [objNull, _target, false] call EFUNC(common,claim);
detach _target;
_unit removeAction _actionID;
_unit setVariable [QGVAR(escortedUnit), objNull, true];
};
- };
- [_escortFnc, 0, [_unit, _target, _actionID]] call CBA_fnc_addPerFrameHandler;
+ }, 0, [_unit, _target, _actionID]] call CBA_fnc_addPerFrameHandler;
} else {
_unit setVariable [QGVAR(isEscorting), false, true];
diff --git a/addons/common/XEH_postInit.sqf b/addons/common/XEH_postInit.sqf
index 3a16ac9d43..7dc07743ed 100644
--- a/addons/common/XEH_postInit.sqf
+++ b/addons/common/XEH_postInit.sqf
@@ -97,14 +97,16 @@ if (!hasInterface) exitWith {};
call COMPILE_FILE(scripts\assignedItemFix);
call COMPILE_FILE(scripts\initScrollWheel);
-0 spawn {
- while {true} do {
- waitUntil {!isNull (findDisplay 46)}; sleep 0.1;
- findDisplay 46 displayAddEventHandler ["MouseZChanged", QUOTE( _this call GVAR(onScrollWheel) )];
- [false] call FUNC(disableUserInput);
- waitUntil {isNull (findDisplay 46)};
- };
+DFUNC(mouseZHandler) = {
+ waitUntil {!isNull (findDisplay 46)}; sleep 0.1;
+ findDisplay 46 displayAddEventHandler ["MouseZChanged", QUOTE( _this call GVAR(onScrollWheel) )];
+ [false] call FUNC(disableUserInput);
};
+
+addMissionEventHandler ["Loaded", {[] spawn FUNC(mouseZHandler)}];
+[] spawn FUNC(mouseZHandler);
+
+
enableCamShake true;
// Set the name for the current player
diff --git a/addons/fcs/initKeybinds.sqf b/addons/fcs/initKeybinds.sqf
index 3f1a5707a8..8e79bc8056 100644
--- a/addons/fcs/initKeybinds.sqf
+++ b/addons/fcs/initKeybinds.sqf
@@ -35,7 +35,7 @@
// Conditions: canInteract
if !([ACE_player, vehicle ACE_player, []] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
- if !(call FUNC(canUseRangefinder) || FUNC(canUseFCS)) exitWith {false};
+ if !(call FUNC(canUseFCS)) exitWith {false};
// Statement
[vehicle ACE_player, [ACE_player] call EFUNC(common,getTurretIndex), 50] call FUNC(adjustRange);
@@ -49,7 +49,7 @@
// Conditions: canInteract
if !([ACE_player, vehicle ACE_player, []] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
- if !(call FUNC(canUseRangefinder) || FUNC(canUseFCS)) exitWith {false};
+ if !(call FUNC(canUseFCS)) exitWith {false};
// Statement
[vehicle ACE_player, [ACE_player] call EFUNC(common,getTurretIndex), -50] call FUNC(adjustRange);
diff --git a/addons/frag/CfgAmmo.hpp b/addons/frag/CfgAmmo.hpp
index 8ad76e6ae8..3cfb27dfaf 100644
--- a/addons/frag/CfgAmmo.hpp
+++ b/addons/frag/CfgAmmo.hpp
@@ -6,99 +6,137 @@ class CfgAmmo {
//class ace_arty_105mm_m1_m782_time;
//class ace_arty_105mm_m1_m782_prox: ace_arty_105mm_m1_m782_time {};
//class ace_arty_105mm_m1_m782_delay: ace_arty_105mm_m1_m782_prox {
- // ACE_FRAG_SKIP = 1;
+ // GVAR(skip) = 1;
//};
class Bo_GBU12_LGB;
class Nou_GBU12 : Bo_GBU12_LGB {
- ACE_FRAG_CLASSES[] = {"ACE_frag_large", "ACE_frag_large", "ACE_frag_large_HD", "ACE_frag_large", "ACE_frag_huge", "ACE_frag_huge_HD", "ACE_frag_huge"};
- ACE_FRAG_METAL = 140000;
- ACE_FRAG_CHARGE = 87000;
- ACE_FRAG_GURNEY_C = 2320;
- ACE_FRAG_GURNEY_K = 1/2;
+ GVAR(classes)[] = {"ACE_frag_large", "ACE_frag_large", "ACE_frag_large_HD", "ACE_frag_large", "ACE_frag_huge", "ACE_frag_huge_HD", "ACE_frag_huge"};
+ GVAR(metal) = 140000;
+ GVAR(charge) = 87000;
+ GVAR(gurney_c) = 2320;
+ GVAR(gurney_k) = 1/2;
sideAirFriction = 0.04;
airFriction = 0.04;
laserLock = 0;
};
-
+
class GrenadeBase;
class Grenade;
class GrenadeHand: Grenade {
- ACE_FRAG_SKIP = 0;
- ACE_FRAG_FORCE = 1;
+ GVAR(skip) = 0;
+ GVAR(force) = 1;
// This is a good high-drag frag type for grenades.
- ACE_FRAG_CLASSES[] = {"ACE_frag_tiny_HD"};
+ GVAR(classes)[] = {"ACE_frag_tiny_HD"};
/*
These values are based on the M67 Grenade, should be tweaked for
individual grenades.
*/
- ACE_FRAG_METAL = 210; // metal in grams
- ACE_FRAG_CHARGE = 185; // explosive in grams
- ACE_FRAG_GURNEY_C = 2843; // Gurney velocity constant for explosive type. See: http://en.wikipedia.org/wiki/Gurney_equations
- ACE_FRAG_GURNEY_K = 3/5; // Gurney shape factor, in this case a sphere. See: http://en.wikipedia.org/wiki/Gurney_equations
+ GVAR(metal) = 210; // metal in grams
+ GVAR(charge) = 185; // explosive in grams
+ GVAR(gurney_c) = 2843; // Gurney velocity constant for explosive type. See: http://en.wikipedia.org/wiki/Gurney_equations
+ GVAR(gurney_k) = 3/5; // Gurney shape factor, in this case a sphere. See: http://en.wikipedia.org/wiki/Gurney_equations
};
class GrenadeHand_stone: GrenadeHand {
- ACE_FRAG_SKIP = 1;
+ GVAR(skip) = 1;
};
class SmokeShell: GrenadeHand {
- ACE_FRAG_SKIP = 1;
+ GVAR(skip) = 1;
};
-
+
class RocketBase;
//class R_Hydra_HE: RocketBase {
- // ACE_FRAG_SKIP = 1;
+ // GVAR(skip) = 1;
//};
-
+
//class R_57mm_HE: RocketBase {
- // ACE_FRAG_SKIP = 1;
+ // GVAR(skip) = 1;
//};
-
+
class R_80mm_HE: RocketBase {
- ACE_FRAG_SKIP = 1;
+ GVAR(skip) = 1;
};
-
+
//class R_S8T_AT: RocketBase {
- // ACE_FRAG_SKIP = 1;
+ // GVAR(skip) = 1;
//};
-
+
class BombCore;
class Bo_Mk82: BombCore {
- ACE_FRAG_CLASSES[] = {"ACE_frag_large", "ACE_frag_large", "ACE_frag_large_HD", "ACE_frag_large", "ACE_frag_huge", "ACE_frag_huge_HD", "ACE_frag_huge"};
- ACE_FRAG_METAL = 140000;
- ACE_FRAG_CHARGE = 87000;
- ACE_FRAG_GURNEY_C = 2320;
- ACE_FRAG_GURNEY_K = 1/2;
+ GVAR(classes)[] = {"ACE_frag_large", "ACE_frag_large", "ACE_frag_large_HD", "ACE_frag_large", "ACE_frag_huge", "ACE_frag_huge_HD", "ACE_frag_huge"};
+ GVAR(metal) = 140000;
+ GVAR(charge) = 87000;
+ GVAR(gurney_c) = 2320;
+ GVAR(gurney_k) = 1/2;
};
-
-
+
+
class G_40mm_HE: GrenadeBase {
- ACE_FRAG_SKIP = 0;
- ACE_FRAG_FORCE = 1;
+ GVAR(skip) = 0;
+ GVAR(force) = 1;
};
-
+
class ACE_G_40mm_HEDP: G_40mm_HE {
+ GVAR(classes)[] = {"ACE_frag_tiny_HD"};
+ GVAR(metal) = 200;
+ GVAR(charge) = 45;
+ GVAR(gurney_c) = 2830;
+ GVAR(gurney_k) = 3/5;
};
class ACE_G_40mm_HE: ACE_G_40mm_HEDP {
+ GVAR(classes)[] = {"ACE_frag_tiny_HD"};
+ GVAR(metal) = 200;
+ GVAR(charge) = 32;
+ GVAR(gurney_c) = 2700;
+ GVAR(gurney_k) = 3/5;
};
class ACE_G_40mm_Practice: ACE_G_40mm_HE {
- ACE_FRAG_SKIP = 1;
+ GVAR(skip) = 1;
};
class ACE_G40mm_HE_VOG25P: G_40mm_HE {
- ACE_FRAG_SKIP = 0;
- ACE_FRAG_FORCE = 1;
+ GVAR(skip) = 0;
+ GVAR(force) = 1;
};
-
+
+ // curator ammo entries
+ class Sh_82mm_AMOS;
+ class ModuleOrdnanceMortar_F_Ammo: Sh_82mm_AMOS {
+ GVAR(classes)[] = {"ACE_frag_medium", "ACE_frag_medium_HD"};
+ GVAR(metal) = 800;
+ GVAR(charge) = 4200;
+ GVAR(gurney_c) = 2320;
+ GVAR(gurney_k) = 1/2;
+ };
+
+ class Sh_155mm_AMOS;
+ class ModuleOrdnanceHowitzer_F_ammo: Sh_155mm_AMOS {
+ GVAR(classes)[] = {"ACE_frag_large", "ACE_frag_large", "ACE_frag_large_HD", "ACE_frag_large", "ACE_frag_huge", "ACE_frag_huge_HD", "ACE_frag_huge"};
+ GVAR(metal) = 1950;
+ GVAR(charge) = 15800;
+ GVAR(gurney_c) = 2320;
+ GVAR(gurney_k) = 1/2;
+ };
+
+ //class R_230mm_HE;
+ //class ModuleOrdnanceRocket_F_ammo: R_230mm_HE {
+ //};
+
+ //class R_230mm_fly;
+ //class ModuleOrdnanceRocket_F_subammo: R_230mm_fly {
+ //};
+ // end of curator ammo entries
+
//class R_SMAW_HEDP;
//class R_MEEWS_HEDP : R_SMAW_HEDP {
- // ACE_FRAG_FORCE = 1;
- // ACE_FRAG_MULTIPLIER = 1.2;
+ // GVAR(force) = 1;
+ // GVAR(multiplier) = 1.2;
//};
-
+
//class MissileBase;
//class M_Hellfire_AT: MissileBase {
- // ACE_FRAG_FORCE = 1;
- // ACE_FRAG_MULTIPLIER = 1.75;
+ // GVAR(force) = 1;
+ // GVAR(multiplier) = 1.75;
//};
-
+
/*
class B_762x51_Ball;
class ACE_frag_base: B_762x51_Ball { ////TODO: B_762x45_Ball no longer exists, is this a valid replacement?
@@ -253,51 +291,51 @@ class CfgAmmo {
bulletFly8[] = {"A3\sounds_f\weapons\hits\bullet_by_8.wav",1,1,35};
bulletFly[] = {"bulletFly1",0.166,"bulletFly2",0.166,"bulletFly3",0.166,"bulletFly4",0.166,"bulletFly5",0.166,"bulletFly6",0.167,"bulletFly7",0.166,"bulletFly8",0.167};
supersonicCrackNear[] = {"A3\sounds_f\weapons\hits\sscrack1.wav",1,1,35};
- supersonicCrackFar[] = {"A3\sounds_f\weapons\hits\sscrack2.wav",1,1,135};
+ supersonicCrackFar[] = {"A3\sounds_f\weapons\hits\sscrack2.wav",1,1,135};
};
*/
-
+
class B_65x39_Caseless;
class ACE_frag_base: B_65x39_Caseless {
timeToLive = 12;
typicalSpeed = 1500;
deflecting = 65;
};
-
+
class ACE_frag_tiny: ACE_frag_base {
hit = 6;
airFriction = BASE_DRAG;
caliber = 0.75;
};
-
+
class ACE_frag_tiny_HD: ACE_frag_base {
hit = 6;
airFriction = BASE_DRAG_HD;
caliber = 0.75;
};
-
+
class ACE_frag_small: ACE_frag_base {
hit = 12;
airFriction = BASE_DRAG*0.9;
};
-
+
class ACE_frag_small_HD: ACE_frag_base {
hit = 12;
airFriction = BASE_DRAG_HD*0.9;
};
-
+
class ACE_frag_medium: ACE_frag_base {
hit = 14;
airFriction = BASE_DRAG*0.75;
caliber = 1.2;
};
-
+
class ACE_frag_medium_HD: ACE_frag_base {
hit = 14;
airFriction = BASE_DRAG_HD*0.75;
caliber = 1.2;
};
-
+
class ACE_frag_large: ACE_frag_base {
hit = 28;
indirectHit = 2;
@@ -305,19 +343,19 @@ class CfgAmmo {
airFriction = BASE_DRAG*0.65;
caliber = 2;
explosive = 0;
-
+
};
-
+
class ACE_frag_large_HD: ACE_frag_large {
hit = 28;
indirectHit = 2;
indirectHitRange = 0.25;
airFriction = BASE_DRAG_HD*0.65;
caliber = 2;
-
-
+
+
};
-
+
class ACE_frag_huge: ACE_frag_large {
hit = 40;
indirectHit = 4;
@@ -325,7 +363,7 @@ class CfgAmmo {
airFriction = BASE_DRAG*0.5;
caliber = 2.8;
};
-
+
class ACE_frag_huge_HD: ACE_frag_large {
hit = 40;
indirectHit = 4;
@@ -333,19 +371,19 @@ class CfgAmmo {
airFriction = BASE_DRAG_HD*0.5;
caliber = 2.8;
};
-
+
class ACE_frag_spall_small: ACE_frag_small {
timeToLive = 0.1;
};
-
+
class ACE_frag_spall_medium: ACE_frag_medium {
timeToLive = 0.15;
};
-
+
class ACE_frag_spall_large: ACE_frag_large {
timeToLive = 0.25;
};
-
+
class ACE_frag_spall_huge: ACE_frag_huge {
timeToLive = 0.3;
};
diff --git a/addons/frag/XEH_pre_Init.sqf b/addons/frag/XEH_pre_Init.sqf
index 5b3aa36b18..5fb261cc05 100644
--- a/addons/frag/XEH_pre_Init.sqf
+++ b/addons/frag/XEH_pre_Init.sqf
@@ -26,6 +26,9 @@ GVAR(tracesStarted) = false;
GVAR(traceID) = -1;
GVAR(autoTrace) = true;
+// TODO setting
+GVAR(enabled) = true;
+
// * Other Shit */
PREP(frag_trace);
diff --git a/addons/frag/functions/fnc_doSpall.sqf b/addons/frag/functions/fnc_doSpall.sqf
index 761490fa90..cb54cb776b 100644
--- a/addons/frag/functions/fnc_doSpall.sqf
+++ b/addons/frag/functions/fnc_doSpall.sqf
@@ -3,11 +3,11 @@
#ifdef DEBUG_MODE_FULL
GVAR(traceFrags) = true;
#endif
-// player sideChat "WAAAAAAAAAAAAAAAAAAAAA";
-private ["_params", "_initialData", "_hpData", "_roundType", "_round", "_object", "_caliber", "_explosive",
- "_idh", "_alive", "_exit", "_vm", "_velocity", "_unitDir", "_oldVelocity", "_curVelocity", "_diff", "_polar",
- "_pos", "_spallPos", "_i", "_pos1", "_pos2", "_blah", "_data", "_spallPolar", "_c", "_warn", "_m", "_k",
- "_gC", "_shellType", "_fragPower", "_spread", "_spallCount", "_elev", "_dir", "_vel", "_spallFragVect",
+// ACE_player sideChat "WAAAAAAAAAAAAAAAAAAAAA";
+private ["_params", "_initialData", "_hpData", "_roundType", "_round", "_object", "_caliber", "_explosive",
+ "_idh", "_alive", "_exit", "_vm", "_velocity", "_unitDir", "_oldVelocity", "_curVelocity", "_diff", "_polar",
+ "_pos", "_spallPos", "_i", "_pos1", "_pos2", "_blah", "_data", "_spallPolar", "_c", "_warn", "_m", "_k",
+ "_gC", "_shellType", "_fragPower", "_spread", "_spallCount", "_elev", "_dir", "_vel", "_spallFragVect",
"_fragment"];
@@ -40,21 +40,21 @@ if(!alive _round && (_initialData select 6) == 1) then {
};
if(_alive || {_caliber >= 2.5} || {(_explosive > 0 && {_idh >= 1})}) then {
- // player sideChat format["BBBB"];
+ // ACE_player sideChat format["BBBB"];
_exit = false;
_vm = 1;
_velocity = _initialData select 5;
-
+
_oldVelocity = _velocity call BIS_fnc_magnitude;
_curVelocity = (velocity _round) call BIS_fnc_magnitude;
-
+
if(alive _round) then {
_diff = _velocity vectorDiff (velocity _round);
_polar = _diff call CBA_fnc_vect2polar;
- // player sideChat format["polar: %1", _polar];
+ // ACE_player sideChat format["polar: %1", _polar];
if((abs(_polar select 1) > 45 || abs(_polar select 2) > 45)) then {
if(_caliber < 2.5) then {
- // player sideChat format["exit!"];
+ // ACE_player sideChat format["exit!"];
_exit = true;
} else {
_vm = 1-(_curVelocity/_oldVelocity);
@@ -78,20 +78,20 @@ if(_alive || {_caliber >= 2.5} || {(_explosive > 0 && {_idh >= 1})}) then {
];
// _blah = [_object, "FIRE"] intersect [_object worldToModel (ASLtoATL _pos1), _object worldToModel (ASLtoATL _pos2)];
// diag_log text format["b: %1", _blah];
-
+
// _data = [nil, nil, nil, 1, [[ASLtoATL _pos1, 1], [ASLtoATL _pos2, 1]]];
// NOU_TRACES set[(count NOU_TRACES), _data];
-
+
if(!lineIntersects [_pos1, _pos2]) exitWith {
- // player sideChat format["FOUND!"];
+ // ACE_player sideChat format["FOUND!"];
_spallPos = _pos2;
};
};
if(!isNil "_spallPos") then {
_spallPolar = _velocity call CBA_fnc_vect2polar;
-
+
if(_explosive > 0) then {
- // player sideChat format["EXPLOSIVE!"];
+ // ACE_player sideChat format["EXPLOSIVE!"];
_warn = false;
_c = getNumber(configFile >> "CfgAmmo" >> _roundType >> "ACE_frag_CHARGE");
if(_c == 0) then { _c = 1; _warn = true;};
@@ -109,7 +109,7 @@ if(_alive || {_caliber >= 2.5} || {(_explosive > 0 && {_idh >= 1})}) then {
_fragPower = (((_m/_c)+_k)^-(1/2))*_gC;
_spallPolar set[0, _fragPower*0.66];
};
-
+
_fragTypes = [
"ACE_frag_spall_small", "ACE_frag_spall_small", "ACE_frag_spall_small",
"ACE_frag_spall_small","ACE_frag_spall_medium","ACE_frag_spall_medium","ACE_frag_spall_medium",
@@ -117,7 +117,7 @@ if(_alive || {_caliber >= 2.5} || {(_explosive > 0 && {_idh >= 1})}) then {
"ACE_frag_spall_huge"
];
-
+
// diag_log text format["SPALL POWER: %1", _spallPolar select 0];
_spread = 15+(random 25);
_spallCount = 5+(random 10);
@@ -130,14 +130,14 @@ if(_alive || {_caliber >= 2.5} || {(_explosive > 0 && {_idh >= 1})}) then {
_dir = _dir % 360;
_vel = (_spallPolar select 0)*0.33*_vm;
_vel = (_vel-(_vel*0.25))+(random (_vel*0.5));
-
+
_spallFragVect = [_vel, _dir, _elev] call CBA_fnc_polar2vect;
_fragType = round (random ((count _fragTypes)-1));
_fragment = (_fragTypes select _fragType) createVehicleLocal [0,0,10000];
_fragment setPosASL _spallPos;
_fragment setVelocity _spallFragVect;
if(GVAR(traceFrags)) then {
- [player, _fragment, [1,0.5,0,1]] call FUNC(addTrack);
+ [ACE_player, _fragment, [1,0.5,0,1]] call FUNC(addTrack);
};
};
_spread = 5+(random 5);
@@ -151,14 +151,14 @@ if(_alive || {_caliber >= 2.5} || {(_explosive > 0 && {_idh >= 1})}) then {
_dir = _dir % 360;
_vel = (_spallPolar select 0)*0.55*_vm;
_vel = (_vel-(_vel*0.25))+(random (_vel*0.5));
-
+
_spallFragVect = [_vel, _dir, _elev] call CBA_fnc_polar2vect;
_fragType = round (random ((count _fragTypes)-1));
_fragment = (_fragTypes select _fragType) createVehicleLocal [0,0,10000];
_fragment setPosASL _spallPos;
_fragment setVelocity _spallFragVect;
if(GVAR(traceFrags)) then {
- [player, _fragment, [1,0,0,1]] call FUNC(addTrack);
+ [ACE_player, _fragment, [1,0,0,1]] call FUNC(addTrack);
};
};
};
diff --git a/addons/frag/functions/fnc_fired.sqf b/addons/frag/functions/fnc_fired.sqf
index e7d7d09682..85f5f45c0a 100644
--- a/addons/frag/functions/fnc_fired.sqf
+++ b/addons/frag/functions/fnc_fired.sqf
@@ -1,6 +1,6 @@
#include "script_component.hpp"
private ["_gun", "_type", "_round", "_doFragTrack", "_doSpall"];
-if !(isNil QGVAR(enabled) && {GVAR(enabled)}) exitWith {};
+if !(!isNil QGVAR(enabled) && {GVAR(enabled)}) exitWith {};
_gun = _this select 0;
_type = _this select 4;
@@ -11,10 +11,10 @@ if(_round in GVAR(blackList)) exitWith {
};
_doFragTrack = false;
-if(_gun == player) then {
+if(_gun == ACE_player) then {
_doFragTrack = true;
} else {
- if((gunner _gun) == player) then {
+ if((gunner _gun) == ACE_player) then {
_doFragTrack = true;
} else {
if(local _gun && {!(isPlayer (gunner _gun))} && {!(isPlayer _gun)}) then {
@@ -28,14 +28,18 @@ if(_doSpall) then {
GVAR(spallHPData) = [];
};
if(GVAR(spallIsTrackingCount) > 5) then {
- // player sideChat "LIMT!";
+ // ACE_player sideChat "LIMT!";
_doSpall = false;
} else {
GVAR(spallIsTrackingCount) = GVAR(spallIsTrackingCount) + 1;
};
};
-// player sideChat format["c: %1", GVAR(spallIsTrackingCount)];
-[player, _round, [1,0,0,1]] call nou_fnc_addTrack;
+// ACE_player sideChat format["c: %1", GVAR(spallIsTrackingCount)];
+
+#ifdef DEBUG_MODE_FULL
+[ACE_player, _round, [1,0,0,1]] call FUNC(addTrack);
+#endif
+
if(_doFragTrack && alive _round) then {
GVAR(trackedObjects) pushBack _round;
_spallTrack = [];
@@ -44,5 +48,5 @@ if(_doFragTrack && alive _round) then {
if(_doSpall) then {
[_round, 2, _spallTrack, _spallTrackID] call FUNC(spallTrack);
};
- // player sideChat "WTF2";
+ // ACE_player sideChat "WTF2";
};
diff --git a/addons/frag/functions/fnc_frago.sqf b/addons/frag/functions/fnc_frago.sqf
index 1b737dc70d..a396de04e8 100644
--- a/addons/frag/functions/fnc_frago.sqf
+++ b/addons/frag/functions/fnc_frago.sqf
@@ -9,14 +9,14 @@
if(!isServer) exitWith { };
// _startTime = diag_tickTime;
-private ["_round", "_lastPos", "_lastVel", "_shellType", "_gun", "_fragTypes", "_warn", "_atlPos", "_isArmed",
- "_fuseDist", "_indirectHitRange", "_fragRange", "_c", "_m", "_k", "_gC", "_fragPower", "_fragPowerRandom",
- "_manObjects", "_objects", "_crew", "_fragCount", "_fragArcs", "_doRandom", "_target", "_boundingBox",
- "_targetPos", "_distance", "_add", "_bbX", "_bbY", "_bbZ", "_cubic", "_targetVel", "_baseVec", "_dir",
- "_currentCount", "_count", "_vecVar", "_i", "_vec", "_fp", "_vel", "_fragType", "_fragObj", "_randomCount",
+private ["_round", "_lastPos", "_lastVel", "_shellType", "_gun", "_fragTypes", "_warn", "_atlPos", "_isArmed",
+ "_fuseDist", "_indirectHitRange", "_fragRange", "_c", "_m", "_k", "_gC", "_fragPower", "_fragPowerRandom",
+ "_manObjects", "_objects", "_crew", "_fragCount", "_fragArcs", "_doRandom", "_target", "_boundingBox",
+ "_targetPos", "_distance", "_add", "_bbX", "_bbY", "_bbZ", "_cubic", "_targetVel", "_baseVec", "_dir",
+ "_currentCount", "_count", "_vecVar", "_i", "_vec", "_fp", "_vel", "_fragType", "_fragObj", "_randomCount",
"_sectorSize", "_sectorOffset", "_randomDir"];
-
-
+
+
_round = _this select 0;
_lastPos = _this select 1;
_lastVel = _this select 2;
@@ -108,8 +108,8 @@ _fragArcs = [];
_fragArcs set[360, 0];
#ifdef DEBUG_MODE_FULL
- player sideChat format["_fragRange: %1", _fragRange];
- player sideChat format["_objects: %1", _objects];
+ ACE_player sideChat format["_fragRange: %1", _fragRange];
+ ACE_player sideChat format["_objects: %1", _objects];
#endif
_doRandom = false;
if(_isArmed && (count _objects) > 0) then {
@@ -127,16 +127,16 @@ if(_isArmed && (count _objects) > 0) then {
_cubic = _bbX*_bbY*_bbZ;
if(_cubic > 1) then {
_doRandom = true;
-
+
_targetVel = (velocity _target);
-
-
+
+
_targetPos set[0, (_targetPos select 0)+((_targetVel select 0)*(_distance/_fragPower))];
_targetPos set[1, (_targetPos select 1)+((_targetVel select 1)*(_distance/_fragPower))];
_targetPos set[2, (_targetPos select 2)+_add];
-
+
_baseVec = _lastPos vectorFromTo _targetPos;
-
+
_dir = floor(_baseVec call CBA_fnc_vectDir);
_currentCount = _fragArcs select _dir;
if(isNil "_currentCount") then {
@@ -153,18 +153,18 @@ if(_isArmed && (count _objects) > 0) then {
};
for "_i" from 1 to _count do {
_vec = +_baseVec;
-
+
_vec set[0, (_vec select 0)-(_vecVar/2)+(random _vecVar)];
_vec set[1, (_vec select 1)-(_vecVar/2)+(random _vecVar)];
_vec set[2, (_vec select 2)-(_vecVar/2)+(random _vecVar)];
-
+
_fp = (_fragPower-(random (_fragPowerRandom)));
_vel = [
(_vec select 0)*_fp,
(_vec select 1)*_fp,
(_vec select 2)*_fp
];
-
+
_fragType = round (random ((count _fragTypes)-1));
_fragObj = (_fragTypes select _fragType) createVehicleLocal [0,0,10000];
// diag_log text format["fp: %1 %2", _fp, typeOf _fragObj];
@@ -176,7 +176,7 @@ if(_isArmed && (count _objects) > 0) then {
GVAR(traceFrags) = true;
#endif
if(GVAR(traceFrags)) then {
- [player, _fragObj, [1,0,0,1]] call FUNC(addTrack);
+ [ACE_player, _fragObj, [1,0,0,1]] call FUNC(addTrack);
};
_fragCount = _fragCount + 1;
_currentCount = _currentCount + 1;
@@ -198,15 +198,15 @@ if(_isArmed && (count _objects) > 0) then {
_sectorOffset = 360 * (_i - 1) / (_randomCount max 1);
_randomDir = random(_sectorSize);
_vec = [cos(_sectorOffset + _randomDir), sin(_sectorOffset + _randomDir), sin(30 - (random 45))];
-
+
_fp = (_fragPower-(random (_fragPowerRandom)));
-
+
_vel = [
(_vec select 0)*_fp,
(_vec select 1)*_fp,
(_vec select 2)*_fp
];
-
+
_fragType = round (random ((count _fragTypes)-1));
_fragObj = (_fragTypes select _fragType) createVehicleLocal [0,0,10000];
_fragObj setPosASL _lastPos;
@@ -217,14 +217,14 @@ if(_isArmed && (count _objects) > 0) then {
GVAR(traceFrags) = true;
#endif
if(GVAR(traceFrags)) then {
- [player, _fragObj, [1,0.5,0,1]] call FUNC(addTrack);
+ [ACE_player, _fragObj, [1,0.5,0,1]] call FUNC(addTrack);
};
_fragCount = _fragCount + 1;
};
};
};
// #ifdef DEBUG_MODE_FULL
- // player sideChat format["total frags: %1", GVAR(TOTALFRAGS)];
- // player sideChat format["tracks: %1", (count GVAR(trackedObjects))];
+ // ACE_player sideChat format["total frags: %1", GVAR(TOTALFRAGS)];
+ // ACE_player sideChat format["tracks: %1", (count GVAR(trackedObjects))];
// #endif
// _endTime = diag_tickTime;
diff --git a/addons/frag/functions/fnc_trackFragRound.sqf b/addons/frag/functions/fnc_trackFragRound.sqf
index 586bbc0166..4358448188 100644
--- a/addons/frag/functions/fnc_trackFragRound.sqf
+++ b/addons/frag/functions/fnc_trackFragRound.sqf
@@ -15,11 +15,11 @@ if (!alive _round) then {
[_this select 1] call cba_fnc_removePerFrameHandler;
if(_time != time && {_round in GVAR(trackedObjects)} && {!(_round in GVAR(blackList))}) then {
GVAR(trackedObjects) = GVAR(trackedObjects) - [_round];
- _skip = getNumber (configFile >> "CfgAmmo" >> _type >> "ACE_FRAG_SKIP");
+ _skip = getNumber (configFile >> "CfgAmmo" >> _type >> QGVAR(skip));
if(_skip == 0) then {
_explosive = getNumber (configFile >> "CfgAmmo" >> _type >> "explosive");
_indirectRange = getNumber (configFile >> "CfgAmmo" >> _type >> "indirectHitRange");
- _force = getNumber (configFile >> "CfgAmmo" >> _type >> "ACE_FRAG_FORCE");
+ _force = getNumber (configFile >> "CfgAmmo" >> _type >> QGVAR(force));
_fragPower = getNumber(configFile >> "CfgAmmo" >> _type >> "indirecthit")*(sqrt(_indirectRange));
if((_explosive > 0.5 && {_indirectRange >= 4.5} && {_fragPower >= 35}) || {_force == 1} ) then {
[QGVAR(frag_eh), _params] call ace_common_fnc_serverEvent;
diff --git a/addons/hearing/CfgEventHandlers.hpp b/addons/hearing/CfgEventHandlers.hpp
index 94b1ab0703..ce968ed2ca 100644
--- a/addons/hearing/CfgEventHandlers.hpp
+++ b/addons/hearing/CfgEventHandlers.hpp
@@ -1,4 +1,3 @@
-
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit) );
@@ -20,9 +19,9 @@ class Extended_Init_EventHandlers {
};
class Extended_FiredNear_EventHandlers {
- class CAManBase {
+ class AllVehicles {
class GVAR(FiredNear) {
- clientFiredNear = QUOTE( if (GVAR(enableCombatDeafness) && {_this select 0 == ACE_player}) then {_this call FUNC(firedNear)}; );
+ clientFiredNear = QUOTE(_this call FUNC(firedNear););
};
};
};
diff --git a/addons/hearing/XEH_postInit.sqf b/addons/hearing/XEH_postInit.sqf
index adb7827ce7..7b584f8397 100644
--- a/addons/hearing/XEH_postInit.sqf
+++ b/addons/hearing/XEH_postInit.sqf
@@ -1,7 +1,14 @@
#include "script_component.hpp"
+if (!hasInterface) exitWith {};
+
GVAR(currentDeafness) = 0;
GVAR(newStrength) = 0;
+GVAR(playerVehAttenuation) = 1;
// Spawn volume updating process
[FUNC(updateVolume), 0.1, [] ] call CBA_fnc_addPerFrameHandler;
+
+//Update veh attunation when player veh changes
+["playerVehicleChanged", {_this call FUNC(updatePlayerVehAttenuation);}] call EFUNC(common,addEventHandler);
+["playerTurretChanged", {_this call FUNC(updatePlayerVehAttenuation);}] call EFUNC(common,addEventHandler);
diff --git a/addons/hearing/XEH_preInit.sqf b/addons/hearing/XEH_preInit.sqf
index 0785a32aff..16b9f35f80 100644
--- a/addons/hearing/XEH_preInit.sqf
+++ b/addons/hearing/XEH_preInit.sqf
@@ -10,6 +10,7 @@ PREP(hasEarPlugsIn);
PREP(moduleHearing);
PREP(putInEarPlugs);
PREP(removeEarPlugs);
+PREP(updatePlayerVehAttenuation);
PREP(updateVolume);
ADDON = true;
diff --git a/addons/hearing/functions/fnc_firedNear.sqf b/addons/hearing/functions/fnc_firedNear.sqf
index 7e9472e72a..6a603c3c3a 100644
--- a/addons/hearing/functions/fnc_firedNear.sqf
+++ b/addons/hearing/functions/fnc_firedNear.sqf
@@ -21,18 +21,19 @@
*/
#include "script_component.hpp"
-private ["_unit", "_firer", "_distance", "_weapon", "_muzzle", "_mode", "_ammo", "_silencer", "_audibleFireCoef", "_loudness", "_strength", "_audibleFire", "_audibleFireTime", "_audibleFireTimeCoef"];
+private ["_silencer", "_audibleFireCoef", "_loudness", "_strength", "_vehAttenuation"];
-_unit = _this select 0;
-_firer = _this select 1;
-_distance = (_this select 2) max 1;
-_weapon = _this select 3;
-_muzzle = _this select 4;
-_mode = _this select 5;
-_ammo = _this select 6;
+PARAMS_7(_object,_firer,_distance,_weapon,_muzzle,_mode,_ammo);
-if (toLower _weapon in ["throw", "put"]) exitWith {};
-if (_unit != vehicle _unit && {!([_unit] call EFUNC(common,isTurnedOut))}) exitWith {};
+//Only run if combatDeafness enabled:
+if (!GVAR(enableCombatDeafness)) exitWith {};
+//Only run if firedNear object is player or player's vehicle:
+if ((ACE_player != _object) && {(vehicle ACE_player) != _object}) exitWith {};
+if (_weapon in ["Throw", "Put"]) exitWith {};
+
+_vehAttenuation = if ((ACE_player == (vehicle ACE_player)) || {isTurnedOut ACE_player}) then {1} else {GVAR(playerVehAttenuation)};
+
+if (_distance < 1) then {_distance = 1;};
_silencer = switch (_weapon) do {
case (primaryWeapon _firer) : {(primaryWeaponItems _firer) select 0};
@@ -42,18 +43,15 @@ _silencer = switch (_weapon) do {
};
_audibleFireCoef = 1;
-//_audibleFireTimeCoef = 1;
if (_silencer != "") then {
_audibleFireCoef = getNumber (configFile >> "CfgWeapons" >> _silencer >> "ItemInfo" >> "AmmoCoef" >> "audibleFire");
- //_audibleFireTimeCoef = getNumber (configFile >> "CfgWeapons" >> _silencer >> "ItemInfo" >> "AmmoCoef" >> "audibleFireTime");
};
_audibleFire = getNumber (configFile >> "CfgAmmo" >> _ammo >> "audibleFire");
-//_audibleFireTime = getNumber (configFile >> "CfgAmmo" >> _ammo >> "audibleFireTime");
_loudness = _audibleFireCoef * _audibleFire / 64;
-_strength = _loudness - (_loudness/50 * _distance); // linear drop off
+_strength = _vehAttenuation * (_loudness - (_loudness/50 * _distance)); // linear drop off
if (_strength < 0.01) exitWith {};
-[{_this call FUNC(earRinging)}, [_unit, _strength], 0.2, 0] call EFUNC(common,waitAndExecute);
+[{_this call FUNC(earRinging)}, [ACE_player, _strength], 0.2, 0] call EFUNC(common,waitAndExecute);
diff --git a/addons/hearing/functions/fnc_updatePlayerVehAttenuation.sqf b/addons/hearing/functions/fnc_updatePlayerVehAttenuation.sqf
new file mode 100644
index 0000000000..a7285d5e2b
--- /dev/null
+++ b/addons/hearing/functions/fnc_updatePlayerVehAttenuation.sqf
@@ -0,0 +1,57 @@
+/*
+ * Author: PabstMirror
+ * Gets the sound attenuation of a player to the outside.
+ *
+ * Arguments:
+ * None
+ *
+ * Return Value:
+ * Ammount that unit can hear outside
+ *
+ * Example:
+ * [] call ace_hearing_fnc_updatePlayerVehAttenuation
+ *
+ * Public: No
+ */
+#include "script_component.hpp"
+
+_vehicle = vehicle ACE_player;
+
+if (isNull _vehicle) exitWith {};
+
+_newAttenuation = 1;
+if (ACE_player != _vehicle) then {
+ _effectType = "";
+ _turretPath = [ACE_player] call EFUNC(common,getTurretIndex);
+ _effectType = getText (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "attenuationEffectType");
+
+ if (!(_turretPath isEqualTo [])) then {
+ _turretConfig = [(configFile >> "CfgVehicles" >> (typeOf _vehicle)), _turretPath] call EFUNC(common,getTurretConfigPath);
+
+ if ((getNumber (_turretConfig >> "disableSoundAttenuation")) == 1) then {
+ _effectType = "";
+ } else {
+ if (isText (_turretConfig >> "soundAttenuationTurret")) then {
+ _effectType = getText (_turretConfig >> "soundAttenuationTurret");
+ };
+ };
+ };
+
+ _newAttenuation = switch (true) do {
+ case (_effectType == ""): {1};
+ case (_effectType == "CarAttenuation"): {0.5};
+ case (_effectType == "RHS_CarAttenuation"): {0.5};
+ case (_effectType == "OpenCarAttenuation"): {1};
+ case (_effectType == "TankAttenuation"): {0.1};
+ case (_effectType == "HeliAttenuation"): {0.3};
+ case (_effectType == "OpenHeliAttenuation"): {0.9};
+ case (_effectType == "SemiOpenHeliAttenuation"): {0.6};
+ case (_effectType == "HeliAttenuationGunner"): {0.85};
+ case (_effectType == "HeliAttenuationRamp"): {0.85};
+ default {1};
+ };
+};
+
+TRACE_2("New vehicle attenuation",_vehicle,_newAttenuation);
+
+GVAR(playerVehAttenuation) = _newAttenuation;
diff --git a/addons/interact_menu/XEH_clientInit.sqf b/addons/interact_menu/XEH_clientInit.sqf
index b8a8fc899b..faabf773f4 100644
--- a/addons/interact_menu/XEH_clientInit.sqf
+++ b/addons/interact_menu/XEH_clientInit.sqf
@@ -3,6 +3,8 @@
if (!hasInterface) exitWith {};
+GVAR(ParsedTextCached) = [];
+
//Setup text/shadow color matrix
[] call FUNC(setupTextColors);
["SettingChanged", {
diff --git a/addons/interact_menu/XEH_preInit.sqf b/addons/interact_menu/XEH_preInit.sqf
index 65d5dd4305..7e86646b79 100644
--- a/addons/interact_menu/XEH_preInit.sqf
+++ b/addons/interact_menu/XEH_preInit.sqf
@@ -8,6 +8,7 @@ PREP(compileMenu);
PREP(compileMenuSelfAction);
PREP(collectActiveActionTree);
PREP(createAction);
+PREP(ctrlSetParsedTextCached);
PREP(findActionNode);
PREP(handlePlayerChanged);
PREP(isSubPath);
diff --git a/addons/interact_menu/config.cpp b/addons/interact_menu/config.cpp
index 433c2388c2..c79c9cd6d1 100644
--- a/addons/interact_menu/config.cpp
+++ b/addons/interact_menu/config.cpp
@@ -50,13 +50,13 @@ class ACE_Settings {
displayName = "$STR_ACE_Interact_Menu_ColorTextMin";
};
class GVAR(colorShadowMax) {
- value[] = {1, 1, 1, 1};
+ value[] = {0, 0, 0, 1};
typeName = "COLOR";
isClientSettable = 1;
displayName = "$STR_ACE_Interact_Menu_ColorShadowMax";
};
class GVAR(colorShadowMin) {
- value[] = {1, 1, 1, 0.25};
+ value[] = {0, 0, 0, 0.25};
typeName = "COLOR";
isClientSettable = 1;
displayName = "$STR_ACE_Interact_Menu_ColorShadowMin";
diff --git a/addons/interact_menu/functions/fnc_compileMenu.sqf b/addons/interact_menu/functions/fnc_compileMenu.sqf
index 7983c493e1..bd2023a90d 100644
--- a/addons/interact_menu/functions/fnc_compileMenu.sqf
+++ b/addons/interact_menu/functions/fnc_compileMenu.sqf
@@ -53,7 +53,9 @@ _recurseFnc = {
if (_condition == "") then {_condition = "true"};
// Add canInteract (including exceptions) and canInteractWith to condition
- _condition = _condition + format [QUOTE( && {[ARR_3(ACE_player, _target, %1)] call EFUNC(common,canInteractWith)} ), getArray (_entryCfg >> "exceptions")];
+ if ((configName _entryCfg) != "ACE_MainActions") then {
+ _condition = _condition + format [QUOTE( && {[ARR_3(ACE_player, _target, %1)] call EFUNC(common,canInteractWith)} ), getArray (_entryCfg >> "exceptions")];
+ };
_insertChildren = compile (getText (_entryCfg >> "insertChildren"));
_modifierFunction = compile (getText (_entryCfg >> "modifierFunction"));
diff --git a/addons/interact_menu/functions/fnc_ctrlSetParsedTextCached.sqf b/addons/interact_menu/functions/fnc_ctrlSetParsedTextCached.sqf
new file mode 100644
index 0000000000..f538807ffe
--- /dev/null
+++ b/addons/interact_menu/functions/fnc_ctrlSetParsedTextCached.sqf
@@ -0,0 +1,13 @@
+// by commy2
+#include "script_component.hpp"
+
+private ["_ctrl", "_index", "_text"];
+
+_ctrl = _this select 0;
+_index = _this select 1;
+_text = _this select 2;
+
+if (_text != ARR_SELECT(GVAR(ParsedTextCached),_index,"-1")) then {
+ GVAR(ParsedTextCached) set [_index, _text];
+ _ctrl ctrlSetStructuredText parseText _text;
+};
diff --git a/addons/interact_menu/functions/fnc_keyDown.sqf b/addons/interact_menu/functions/fnc_keyDown.sqf
index 1bd4d04474..37e5bc3797 100644
--- a/addons/interact_menu/functions/fnc_keyDown.sqf
+++ b/addons/interact_menu/functions/fnc_keyDown.sqf
@@ -30,6 +30,7 @@ if (_menuType == 0) then {
GVAR(keyDownTime) = diag_tickTime;
GVAR(openedMenuType) = _menuType;
GVAR(lastTimeSearchedActions) = -1000;
+GVAR(ParsedTextCached) = [];
GVAR(useCursorMenu) = (vehicle ACE_player != ACE_player) ||
visibleMap ||
diff --git a/addons/interact_menu/functions/fnc_render.sqf b/addons/interact_menu/functions/fnc_render.sqf
index b9afa75616..0c0635f8a4 100644
--- a/addons/interact_menu/functions/fnc_render.sqf
+++ b/addons/interact_menu/functions/fnc_render.sqf
@@ -77,6 +77,7 @@ if (GVAR(openedMenuType) >= 0) then {
GVAR(startHoverTime) = diag_tickTime;
GVAR(lastPath) = _hoverPath;
GVAR(expanded) = false;
+ GVAR(ParsedTextCached) = [];
} else {
if(!GVAR(expanded) && diag_tickTime-GVAR(startHoverTime) > 0.25) then {
GVAR(expanded) = true;
diff --git a/addons/interact_menu/functions/fnc_renderBaseMenu.sqf b/addons/interact_menu/functions/fnc_renderBaseMenu.sqf
index 9a20962a8f..a5214ddcbe 100644
--- a/addons/interact_menu/functions/fnc_renderBaseMenu.sqf
+++ b/addons/interact_menu/functions/fnc_renderBaseMenu.sqf
@@ -41,9 +41,21 @@ if((count _this) > 2) then {
};
};
-// For non-self actions, exit if the action is too far away
+// For non-self actions, exit if the action is too far away or ocluded
if (GVAR(openedMenuType) == 0 && vehicle ACE_player == ACE_player &&
- {(ACE_player modelToWorldVisual (ACE_player selectionPosition "pilot")) distance _pos >= _distance}) exitWith {false};
+ {
+ private ["_headPos","_actualDistance"];
+ _headPos = ACE_player modelToWorldVisual (ACE_player selectionPosition "pilot");
+ _actualDistance = _headPos distance _pos;
+
+ if (_actualDistance > _distance) exitWith {true};
+
+ if (_distance > 1.0) exitWith {
+ // If distance to action is greater than 1.0 m, check LOS
+ _line = [_headPos call EFUNC(common,positionToASL), _pos call EFUNC(common,positionToASL), _object, ACE_player];
+ lineIntersects _line
+ };
+ }) exitWith {false};
// Exit if the action is behind you
_sPos = if (count _pos != 2) then {
diff --git a/addons/interact_menu/functions/fnc_renderIcon.sqf b/addons/interact_menu/functions/fnc_renderIcon.sqf
index 9107b6d998..32e8aa1a63 100644
--- a/addons/interact_menu/functions/fnc_renderIcon.sqf
+++ b/addons/interact_menu/functions/fnc_renderIcon.sqf
@@ -27,7 +27,6 @@ if(GVAR(iconCount) > (count GVAR(iconCtrls))-1) then {
GVAR(iconCtrls) pushBack ((findDisplay _displayNum) ctrlCreate ["RscStructuredText", 54021+GVAR(iconCount)]);
};
_ctrl = GVAR(iconCtrls) select GVAR(iconCount);
-GVAR(iconCount) = GVAR(iconCount) + 1;
if(_icon == "") then {
_icon = DEFAULT_ICON;
};
@@ -38,8 +37,11 @@ _text = if (GVAR(UseListMenu)) then {
format ["%5 ", _icon, _iconColor, _textColor, _shadowColor, "ace_breakLine" callExtension _text];
};
-_ctrl ctrlSetStructuredText (parseText _text);
-_text = if (GVAR(UseListMenu)) then {
+//_ctrl ctrlSetStructuredText parseText _text;
+[_ctrl, GVAR(iconCount), _text] call FUNC(ctrlSetParsedTextCached);
+GVAR(iconCount) = GVAR(iconCount) + 1;
+
+if (GVAR(UseListMenu)) then {
_ctrl ctrlSetPosition [(_sPos select 0)-(0.0095*SafeZoneW), (_sPos select 1)-(0.0095*SafeZoneW), 0.20*SafeZoneW, 0.035*SafeZoneW];
} else {
_ctrl ctrlSetPosition [(_sPos select 0)-(0.0750*SafeZoneW), (_sPos select 1)-(0.0095*SafeZoneW), 0.15*SafeZoneW, 0.100*SafeZoneW];
diff --git a/addons/interact_menu/functions/fnc_renderSelector.sqf b/addons/interact_menu/functions/fnc_renderSelector.sqf
index 5afcf63cc6..7d5a3359f7 100644
--- a/addons/interact_menu/functions/fnc_renderSelector.sqf
+++ b/addons/interact_menu/functions/fnc_renderSelector.sqf
@@ -22,14 +22,14 @@ if(GVAR(iconCount) > (count GVAR(iconCtrls))-1) then {
private "_ctrl";
_ctrl = GVAR(iconCtrls) select GVAR(iconCount);
-GVAR(iconCount) = GVAR(iconCount) + 1;
if (GVAR(UseListMenu)) then {
- _ctrl ctrlSetStructuredText (parseText format [" ", _icon]);
+ [_ctrl, GVAR(iconCount), format [" ", _icon]] call FUNC(ctrlSetParsedTextCached);
_ctrl ctrlSetPosition [(_sPos select 0)-(0.014*SafeZoneW), (_sPos select 1)-(0.014*SafeZoneW), 0.05*SafeZoneW, 0.035*SafeZoneW];
} else {
- _ctrl ctrlSetStructuredText (parseText format [" ", _icon]);
+ [_ctrl, GVAR(iconCount), format [" ", _icon]] call FUNC(ctrlSetParsedTextCached);
_ctrl ctrlSetPosition [(_sPos select 0)-(0.050*SafeZoneW), (_sPos select 1)-(0.014*SafeZoneW), 0.1*SafeZoneW, 0.035*SafeZoneW];
};
//_ctrl ctrlSetBackgroundColor [1, 0, 0, 0.1];
+GVAR(iconCount) = GVAR(iconCount) + 1;
_ctrl ctrlCommit 0;
diff --git a/addons/interaction/CfgVehicles.hpp b/addons/interaction/CfgVehicles.hpp
index bd36f42703..0408192919 100644
--- a/addons/interaction/CfgVehicles.hpp
+++ b/addons/interaction/CfgVehicles.hpp
@@ -27,7 +27,7 @@ class CfgVehicles {
class ACE_Actions {
class ACE_MainActions {
displayName = "$STR_ACE_Interaction_MainAction";
- distance = 5;
+ distance = 4;
condition = QUOTE(true);
statement = "";
icon = "\a3\ui_f\data\IGUI\Cfg\Actions\eject_ca.paa";
@@ -35,7 +35,6 @@ class CfgVehicles {
class ACE_TeamManagement {
displayName = "$STR_ACE_Interaction_TeamManagement";
- distance = 5;
condition = QUOTE(alive _target && {!isPlayer _target} && {_target in units group _player} && {GVAR(EnableTeamManagement)});
statement = "";
showDisabled = 0;
@@ -45,7 +44,6 @@ class CfgVehicles {
class ACE_JoinTeamRed {
displayName = "$STR_ACE_Interaction_JoinTeamRed";
- distance = 5;
condition = QUOTE(alive _target && {!isPlayer _target} && {_target in units group _player});
statement = QUOTE([ARR_2(_target,'RED')] call DFUNC(joinTeam));
showDisabled = 1;
@@ -55,7 +53,6 @@ class CfgVehicles {
};
class ACE_JoinTeamGreen {
displayName = "$STR_ACE_Interaction_JoinTeamGreen";
- distance = 5;
condition = QUOTE(alive _target && {!isPlayer _target} && {_target in units group _player});
statement = QUOTE([ARR_2(_target,'GREEN')] call DFUNC(joinTeam));
showDisabled = 1;
@@ -65,7 +62,6 @@ class CfgVehicles {
};
class ACE_JoinTeamBlue {
displayName = "$STR_ACE_Interaction_JoinTeamBlue";
- distance = 5;
condition = QUOTE(alive _target && {!isPlayer _target} && {_target in units group _player});
statement = QUOTE([ARR_2(_target,'BLUE')] call DFUNC(joinTeam));
showDisabled = 1;
@@ -75,7 +71,6 @@ class CfgVehicles {
};
class ACE_JoinTeamYellow {
displayName = "$STR_ACE_Interaction_JoinTeamYellow";
- distance = 5;
condition = QUOTE(alive _target && {!isPlayer _target} && {_target in units group _player});
statement = QUOTE([ARR_2(_target,'YELLOW')] call DFUNC(joinTeam));
showDisabled = 1;
@@ -86,7 +81,6 @@ class CfgVehicles {
class ACE_LeaveTeam {
displayName = "$STR_ACE_Interaction_LeaveTeam";
- distance = 5;
condition = QUOTE(alive _target && {!isPlayer _target} && {_target in units group _player} && {assignedTeam _player != 'MAIN'});
statement = QUOTE([ARR_2(_target,'MAIN')] call DFUNC(joinTeam));
showDisabled = 1;
@@ -98,7 +92,6 @@ class CfgVehicles {
class ACE_JoinGroup {
displayName = "$STR_ACE_Interaction_JoinGroup";
- distance = 5;
condition = QUOTE(side group _player == side group _target && {group _player != group _target});
statement = QUOTE([_player] joinSilent group _target;);
showDisabled = 0;
@@ -109,7 +102,6 @@ class CfgVehicles {
class ACE_GetDown {
displayName = "$STR_ACE_Interaction_GetDown";
- distance = 5;
condition = QUOTE([_target] call DFUNC(canInteractWithCivilian));
statement = QUOTE([_target] call DFUNC(getDown));
showDisabled = 0;
@@ -117,7 +109,6 @@ class CfgVehicles {
};
class ACE_SendAway {
displayName = "$STR_ACE_Interaction_SendAway";
- distance = 5;
condition = QUOTE([_target] call DFUNC(canInteractWithCivilian));
statement = QUOTE([_target] call DFUNC(sendAway));
showDisabled = 0;
@@ -125,7 +116,6 @@ class CfgVehicles {
};
class ACE_Pardon {
displayName = "$STR_ACE_Interaction_Pardon";
- distance = 5;
condition = QUOTE(rating _target < -2000 && {alive _target} && {side group _player == side group _target});
statement = QUOTE([ARR_3(_target,'{_this addRating -rating _this}',_target)] call DEFUNC(common,execRemoteFnc));
showDisabled = 0;
diff --git a/addons/javelin/functions/fnc_onOpticDraw.sqf b/addons/javelin/functions/fnc_onOpticDraw.sqf
index 74f7c49746..8fa96c036a 100644
--- a/addons/javelin/functions/fnc_onOpticDraw.sqf
+++ b/addons/javelin/functions/fnc_onOpticDraw.sqf
@@ -9,7 +9,9 @@ private["_apos", "_aposX", "_aposY", "_args", "_boundsInput", "_bpos", "_canFire
private["_constraintLeft", "_constraintRight", "_constraintTop", "_currentTarget", "_fireDisabledEH"];
private["_firedEH", "_fov", "_lastTick", "_lockTime", "_maxX", "_maxY", "_minX", "_minY", "_newTarget"];
private["_offsetX", "_offsetY", "_pos", "_randomLockInterval", "_randomPosWithinBounds", "_range"];
-private["_runTime", "_soundTime", "_targetArray", "_zamerny"];
+private["_runTime", "_soundTime", "_targetArray", "_zamerny", "_currentShooter"];
+
+_currentShooter = (vehicle ACE_player);
#define __OffsetX ((ctrlPosition __JavelinIGUITargetingLineV) select 0) - 0.5
#define __OffsetY ((ctrlPosition __JavelinIGUITargetingLineH) select 1) - 0.5
@@ -128,7 +130,7 @@ FUNC(disableFire) = {
if(_firedEH < 0 && difficulty > 0) then {
_firedEH = [ACE_player, "DefaultAction", {true}, {
- _canFire = ACE_player getVariable["ace_missileguidance_target", nil];
+ _canFire = _this getVariable["ace_missileguidance_target", nil];
if(!isNil "_canFire") exitWith { false };
true
}] call EFUNC(common,addActionEventHandler);
@@ -155,7 +157,7 @@ if (isNull _newTarget) then {
__JavelinIGUITargetingLines ctrlShow false;
__JavelinIGUITargetingConstraints ctrlShow false;
- ACE_player setVariable ["ace_missileguidance_target",nil, false];
+ _currentShooter setVariable ["ace_missileguidance_target",nil, false];
// Disallow fire
_fireDisabledEH = [_fireDisabledEH] call FUNC(disableFire);
@@ -212,7 +214,7 @@ if (isNull _newTarget) then {
{_x ctrlCommit __TRACKINTERVAL} forEach [__JavelinIGUITargetingGateTL,__JavelinIGUITargetingGateTR,__JavelinIGUITargetingGateBL,__JavelinIGUITargetingGateBR];
- ACE_player setVariable["ace_missileguidance_target", _currentTarget, false];
+ _currentShooter setVariable["ace_missileguidance_target", _currentTarget, false];
// Allow fire
_fireDisabledEH = [_fireDisabledEH] call FUNC(enableFire);
@@ -227,7 +229,7 @@ if (isNull _newTarget) then {
__JavelinIGUITargetingConstrains ctrlShow true;
__JavelinIGUITargetingLines ctrlShow false;
- ACE_player setVariable["ace_missileguidance_target", nil, false];
+ _currentShooter setVariable["ace_missileguidance_target", nil, false];
_boundsInput = if (_currentTarget isKindOf "CAManBase") then {
[_newTarget,[-1,-1,-2],_currentTarget selectionPosition "body"];
@@ -270,7 +272,7 @@ if (isNull _newTarget) then {
__JavelinIGUITargetingLines ctrlShow false;
__JavelinIGUITargetingConstraints ctrlShow false;
- ACE_player setVariable ["ace_missileguidance_target",nil, false];
+ _currentShooter setVariable ["ace_missileguidance_target",nil, false];
// Disallow fire
_fireDisabledEH = [_fireDisabledEH] call FUNC(disableFire);
@@ -287,4 +289,4 @@ _args set[3, _lockTime];
_args set[4, _soundTime];
_args set[6, _fireDisabledEH];
-uiNamespace setVariable[QGVAR(arguments), _args ];
\ No newline at end of file
+uiNamespace setVariable[QGVAR(arguments), _args ];
diff --git a/addons/javelin/functions/fnc_onOpticLoad.sqf b/addons/javelin/functions/fnc_onOpticLoad.sqf
index a2b2692859..8e26806162 100644
--- a/addons/javelin/functions/fnc_onOpticLoad.sqf
+++ b/addons/javelin/functions/fnc_onOpticLoad.sqf
@@ -33,7 +33,8 @@ uiNameSpace setVariable [QGVAR(arguments),
_pfh_handle = uiNamespace getVariable ["ACE_RscOptics_javelin_PFH", nil];
-if(isNil "_pfh_handle") then {
- _pfh_handle = [FUNC(onOpticDraw), 0, []] call CBA_fnc_addPerFrameHandler;
- uiNamespace setVariable["ACE_RscOptics_javelin_PFH", _pfh_handle];
-};
\ No newline at end of file
+if(!isNil "_pfh_handle") then {
+ [] call FUNC(onOpticUnload); // Unload optic if it was already loaded
+};
+_pfh_handle = [FUNC(onOpticDraw), 0, []] call CBA_fnc_addPerFrameHandler;
+uiNamespace setVariable["ACE_RscOptics_javelin_PFH", _pfh_handle];
diff --git a/addons/kestrel4500/functions/fnc_collectData.sqf b/addons/kestrel4500/functions/fnc_collectData.sqf
index bbad8619bc..a812ad0f7c 100644
--- a/addons/kestrel4500/functions/fnc_collectData.sqf
+++ b/addons/kestrel4500/functions/fnc_collectData.sqf
@@ -14,7 +14,7 @@
*/
#include "script_component.hpp"
-private ["_playerDir", "_windSpeed", "_windDir", "_crosswind", "_headwind", "_humidity", "_temperature", "_humidity", "_barometricPressure", "_altitude"];
+private ["_playerDir", "_windSpeed", "_crosswind", "_headwind", "_humidity", "_temperature", "_humidity", "_barometricPressure", "_altitude"];
if (isNil QGVAR(MIN) || isNil QGVAR(MAX)) then {
_temperature = GET_TEMPERATURE_AT_HEIGHT((getPosASL ACE_player) select 2);
diff --git a/addons/kestrel4500/functions/fnc_displayKestrel.sqf b/addons/kestrel4500/functions/fnc_displayKestrel.sqf
index 2c1241bb6c..8eb2cea0ad 100644
--- a/addons/kestrel4500/functions/fnc_displayKestrel.sqf
+++ b/addons/kestrel4500/functions/fnc_displayKestrel.sqf
@@ -42,9 +42,7 @@ if (GVAR(Kestrel4500) && dialog) then {
GVAR(Overlay) = true;
-[{
- private ["_outputData", "_updateTimer"];
-
+[{
// abort condition
if (!GVAR(Overlay) || {!(("ACE_Kestrel4500" in (uniformItems ACE_player)) || ("ACE_Kestrel4500" in (vestItems ACE_player)))}) exitWith {
GVAR(Overlay) = false;
@@ -55,6 +53,7 @@ GVAR(Overlay) = true;
if (diag_tickTime > GVAR(updateTimer)) then {
GVAR(updateTimer) = diag_tickTime + 1;
+ private ["_outputData"];
_outputData = [] call FUNC(generateOutputData);
3 cutRsc ["RscKestrel4500", "PLAIN", 1, false];
diff --git a/addons/kestrel4500/functions/fnc_generateOutputData.sqf b/addons/kestrel4500/functions/fnc_generateOutputData.sqf
index 3f5e77b748..6b139fe72e 100644
--- a/addons/kestrel4500/functions/fnc_generateOutputData.sqf
+++ b/addons/kestrel4500/functions/fnc_generateOutputData.sqf
@@ -14,7 +14,7 @@
*/
#include "script_component.hpp"
-private ["_playerDir", "_textTop", "_textCenterBig", "_textCenterLine1Left", "_textCenterLine2Left", "_textCenterLine3Left", "_textCenterLine1Right", "_textCenterLine2Right", "_textCenterLine3Right", "_textInfoLine1", "_textInfoLine2", "_temperature", "_humidity", "_windSpeed", "_windDir", "_newWindSpeed", "_windSource", "_height"];
+private ["_playerDir", "_textTop", "_textCenterBig", "_textCenterLine1Left", "_textCenterLine2Left", "_textCenterLine3Left", "_textCenterLine1Right", "_textCenterLine2Right", "_textCenterLine3Right", "_textInfoLine1", "_textInfoLine2", "_temperature", "_humidity", "_windSpeed", "_windDir"];
[] call FUNC(collectData);
diff --git a/addons/magazinerepack/functions/fnc_magazineRepackFinish.sqf b/addons/magazinerepack/functions/fnc_magazineRepackFinish.sqf
index e677cccdce..c4ddb2d93d 100644
--- a/addons/magazinerepack/functions/fnc_magazineRepackFinish.sqf
+++ b/addons/magazinerepack/functions/fnc_magazineRepackFinish.sqf
@@ -53,4 +53,4 @@ _structuredOutputText = _structuredOutputText + format [" " + (localize "STR_ACE_MagazineRepack_RepackedMagazinesCount") + ""), _fullMags, _partialMags];
-[parseText _structuredOutputText] call EFUNC(common,displayTextStructured);
+[parseText _structuredOutputText, 2] call EFUNC(common,displayTextStructured);
diff --git a/addons/main/script_macros.hpp b/addons/main/script_macros.hpp
index fce9ec526a..d4b6739918 100644
--- a/addons/main/script_macros.hpp
+++ b/addons/main/script_macros.hpp
@@ -1,6 +1,11 @@
#include "\x\cba\addons\main\script_macros_common.hpp"
#include "\x\cba\addons\xeh\script_xeh.hpp"
+//Faster Array Unwraping (skips the IS_ARRAY check normaly found in EXPLODE_1_SYS)
+#undef EXPLODE_2_SYS
+#define EXPLODE_1_SYS_FAST(ARRAY,A) A =(ARRAY) select 0
+#define EXPLODE_2_SYS(ARRAY,A,B) EXPLODE_1_SYS_FAST(ARRAY,A); B = (ARRAY) select 1
+
// Default versioning level
#define DEFAULT_VERSIONING_LEVEL 2
diff --git a/addons/medical/ACE_Medical_Actions.hpp b/addons/medical/ACE_Medical_Actions.hpp
index ed5670f814..a7b76fef44 100644
--- a/addons/medical/ACE_Medical_Actions.hpp
+++ b/addons/medical/ACE_Medical_Actions.hpp
@@ -3,6 +3,7 @@ class ACE_Head {
displayName = "$STR_ACE_Interaction_Head";
runOnHover = 1;
statement = QUOTE([ARR_3(_target, true, 0)] call DFUNC(displayPatientInformation));
+ modifierFunction = QUOTE([ARR_4(_target,_player,0,_this select 3)] call FUNC(modifyMedicalAction));
condition = "true";
EXCEPTIONS
icon = PATHTOF(UI\icons\medical_cross.paa);
@@ -70,11 +71,18 @@ class ACE_Head {
statement = QUOTE([ARR_4(_player, _target, 'head', 'CheckResponse')] call DFUNC(treatment));
EXCEPTIONS
};
+ class Diagnose: CheckPulse {
+ displayName = "Diagnose";
+ condition = QUOTE([ARR_4(_player, _target, 'head', 'Diagnose')] call DFUNC(canTreatCached));
+ statement = QUOTE([ARR_4(_player, _target, 'head', 'Diagnose')] call DFUNC(treatment));
+ EXCEPTIONS
+ };
};
class ACE_Torso {
displayName = "$STR_ACE_Interaction_Torso";
runOnHover = 1;
statement = QUOTE([ARR_3(_target, true, 1)] call DFUNC(displayPatientInformation));
+ modifierFunction = QUOTE([ARR_4(_target,_player,1,_this select 3)] call FUNC(modifyMedicalAction));
condition = "true";
EXCEPTIONS
icon = PATHTOF(UI\icons\medical_cross.paa);
@@ -175,6 +183,7 @@ class ACE_ArmLeft {
displayName = "$STR_ACE_Interaction_ArmLeft";
runOnHover = 1;
statement = QUOTE([ARR_3(_target, true, 2)] call DFUNC(displayPatientInformation));
+ modifierFunction = QUOTE([ARR_4(_target,_player,2,_this select 3)] call FUNC(modifyMedicalAction));
condition = "true";
EXCEPTIONS
icon = PATHTOF(UI\icons\medical_cross.paa);
@@ -332,6 +341,7 @@ class ACE_ArmRight {
displayName = "$STR_ACE_Interaction_ArmRight";
runOnHover = 1;
statement = QUOTE([ARR_3(_target, true, 3)] call DFUNC(displayPatientInformation));
+ modifierFunction = QUOTE([ARR_4(_target,_player,3,_this select 3)] call FUNC(modifyMedicalAction));
condition = "true";
EXCEPTIONS
icon = PATHTOF(UI\icons\medical_cross.paa);
@@ -486,6 +496,7 @@ class ACE_LegLeft {
displayName = "$STR_ACE_Interaction_LegLeft";
runOnHover = 1;
statement = QUOTE([ARR_3(_target, true, 4)] call DFUNC(displayPatientInformation));
+ modifierFunction = QUOTE([ARR_4(_target,_player,4,_this select 3)] call FUNC(modifyMedicalAction));
condition = "true";
EXCEPTIONS
icon = PATHTOF(UI\icons\medical_cross.paa);
@@ -628,6 +639,7 @@ class ACE_LegRight {
displayName = "$STR_ACE_Interaction_LegRight";
runOnHover = 1;
statement = QUOTE([ARR_3(_target, true, 5)] call DFUNC(displayPatientInformation));
+ modifierFunction = QUOTE([ARR_4(_target,_player,5,_this select 3)] call FUNC(modifyMedicalAction));
condition = "true";
EXCEPTIONS
icon = PATHTOF(UI\icons\medical_cross.paa);
diff --git a/addons/medical/ACE_Medical_SelfActions.hpp b/addons/medical/ACE_Medical_SelfActions.hpp
index 9c79503f3d..add07c8262 100644
--- a/addons/medical/ACE_Medical_SelfActions.hpp
+++ b/addons/medical/ACE_Medical_SelfActions.hpp
@@ -12,6 +12,7 @@ class Medical {
icon = PATHTOF(UI\icons\medical_cross.paa);
exceptions[] = {"isNotInside"};
statement = QUOTE([ARR_3(_target, true, 0)] call DFUNC(displayPatientInformation));
+ modifierFunction = QUOTE([ARR_4(_target,_player,0,_this select 3)] call FUNC(modifyMedicalAction));
condition = "true";
runOnHover = 1;
@@ -80,6 +81,7 @@ class Medical {
runOnHover = 1;
exceptions[] = {"isNotInside"};
statement = QUOTE([ARR_3(_target, true, 1)] call DFUNC(displayPatientInformation));
+ modifierFunction = QUOTE([ARR_4(_target,_player,1,_this select 3)] call FUNC(modifyMedicalAction));
showDisabled = 1;
priority = 2;
hotkey = "";
@@ -148,6 +150,7 @@ class Medical {
runOnHover = 1;
exceptions[] = {"isNotInside"};
statement = QUOTE([ARR_3(_target, true, 2)] call DFUNC(displayPatientInformation));
+ modifierFunction = QUOTE([ARR_4(_target,_player,2,_this select 3)] call FUNC(modifyMedicalAction));
condition = "true";
icon = PATHTOF(UI\icons\medical_cross.paa);
@@ -249,6 +252,7 @@ class Medical {
runOnHover = 1;
exceptions[] = {"isNotInside"};
statement = QUOTE([ARR_3(_target, true, 3)] call DFUNC(displayPatientInformation));
+ modifierFunction = QUOTE([ARR_4(_target,_player,3,_this select 3)] call FUNC(modifyMedicalAction));
condition = "true";
icon = PATHTOF(UI\icons\medical_cross.paa);
@@ -346,6 +350,7 @@ class Medical {
runOnHover = 1;
exceptions[] = {"isNotInside"};
statement = QUOTE([ARR_3(_target, true, 4)] call DFUNC(displayPatientInformation));
+ modifierFunction = QUOTE([ARR_4(_target,_player,4,_this select 3)] call FUNC(modifyMedicalAction));
condition = "true";
icon = PATHTOF(UI\icons\medical_cross.paa);
@@ -432,6 +437,7 @@ class Medical {
runOnHover = 1;
exceptions[] = {"isNotInside"};
statement = QUOTE([ARR_3(_target, true, 5)] call DFUNC(displayPatientInformation));
+ modifierFunction = QUOTE([ARR_4(_target,_player,5,_this select 3)] call FUNC(modifyMedicalAction));
condition = "true";
icon = PATHTOF(UI\icons\medical_cross.paa);
diff --git a/addons/medical/ACE_Medical_Treatments.hpp b/addons/medical/ACE_Medical_Treatments.hpp
index 5b5e0b6abd..03b9def612 100644
--- a/addons/medical/ACE_Medical_Treatments.hpp
+++ b/addons/medical/ACE_Medical_Treatments.hpp
@@ -71,14 +71,14 @@ class ACE_Medical_Actions {
itemConsumed = 1;
litter[] = {};
};
- class CheckPulse: Bandage {
- displayName = "";
- displayNameProgress = "";
+ class Diagnose: Bandage {
+ displayName = "Diagnose";
+ displayNameProgress = "Diagnosing...";
treatmentLocations[] = {"All"};
requiredMedic = 0;
- treatmentTime = 2;
+ treatmentTime = 1;
items[] = {};
- callbackSuccess = QUOTE(DFUNC(actionCheckPulse));
+ callbackSuccess = QUOTE(DFUNC(actionDiagnose));
callbackFailure = "";
callbackProgress = "";
animationPatient = "";
@@ -86,12 +86,6 @@ class ACE_Medical_Actions {
itemConsumed = 0;
litter[] = {};
};
- class CheckBloodPressure: CheckPulse {
- callbackSuccess = QUOTE(DFUNC(actionCheckBloodPressure));
- };
- class CheckResponse: CheckPulse {
- callbackSuccess = QUOTE(DFUNC(actionCheckResponse));
- };
};
class Advanced {
diff --git a/addons/medical/XEH_preInit.sqf b/addons/medical/XEH_preInit.sqf
index 107952c54b..b6deca4033 100644
--- a/addons/medical/XEH_preInit.sqf
+++ b/addons/medical/XEH_preInit.sqf
@@ -7,6 +7,7 @@ PREP(actionCheckBloodPressureLocal);
PREP(actionCheckPulse);
PREP(actionCheckPulseLocal);
PREP(actionCheckResponse);
+PREP(actionDiagnose);
PREP(actionPlaceInBodyBag);
PREP(actionRemoveTourniquet);
PREP(actionLoadUnit);
@@ -55,6 +56,7 @@ PREP(isInMedicalVehicle);
PREP(isMedic);
PREP(isMedicalVehicle);
PREP(itemCheck);
+PREP(modifyMedicalAction);
PREP(onMedicationUsage);
PREP(onWoundUpdateRequest);
PREP(onPropagateWound);
diff --git a/addons/medical/functions/fnc_actionDiagnose.sqf b/addons/medical/functions/fnc_actionDiagnose.sqf
new file mode 100644
index 0000000000..234cc6d303
--- /dev/null
+++ b/addons/medical/functions/fnc_actionDiagnose.sqf
@@ -0,0 +1,41 @@
+/*
+* Author: Glowbal
+* Action for diagnosing in basic medical
+*
+* Arguments:
+* 0: The medic
+* 1: The patient
+*
+* Return Value:
+* NONE
+*
+* Public: No
+*/
+
+#include "script_component.hpp"
+
+private ["_caller","_target","_title","_content"];
+_caller = _this select 0;
+_target = _this select 1;
+
+_genericMessages = ["STR_ACE_MEDICAL_diagnoseMessage"];
+
+_genericMessages pushBack ([_target] call EFUNC(common,getName));
+if (alive _target) then {
+ _genericMessages pushback "STR_ACE_MEDICAL_diagnoseAlive";
+} else {
+ _genericMessages pushback "STR_ACE_MEDICAL_diagnoseDead";
+};
+if (_target getvariable[QGVAR(hasLostBlood), false]) then {
+ _genericMessages pushback "STR_ACE_MEDICAL_lostBlood";
+} else {
+ _genericMessages pushback "STR_ACE_MEDICAL_noBloodloss";
+};
+
+if (_target getvariable[QGVAR(hasPain), false]) then {
+ _genericMessages pushback "STR_ACE_MEDICAL_inPain";
+} else {
+ _genericMessages pushback "STR_ACE_MEDICAL_noPain";
+};
+
+["displayTextStructured", [_caller], [_genericMessages, 3.0, _caller]] call EFUNC(common,targetEvent);
diff --git a/addons/medical/functions/fnc_displayPatientInformation.sqf b/addons/medical/functions/fnc_displayPatientInformation.sqf
index ecd2218c2b..65c98c4b85 100644
--- a/addons/medical/functions/fnc_displayPatientInformation.sqf
+++ b/addons/medical/functions/fnc_displayPatientInformation.sqf
@@ -14,6 +14,8 @@
#include "script_component.hpp"
+// Exit for basic medical
+if (GVAR(level) < 2) exitWith {};
private ["_target", "_show", "_selectionN"];
_target = _this select 0;
_show = if (count _this > 1) then {_this select 1} else {true};
diff --git a/addons/medical/functions/fnc_modifyMedicalAction.sqf b/addons/medical/functions/fnc_modifyMedicalAction.sqf
new file mode 100644
index 0000000000..66398a2590
--- /dev/null
+++ b/addons/medical/functions/fnc_modifyMedicalAction.sqf
@@ -0,0 +1,40 @@
+/*
+ * Author: esteldunedain
+ * Modify the visuals of a medical action point.
+ * On Basic medical: modify the icon color based on damage on that body part.
+ *
+ * Arguments:
+ * 0: The Patient Unit
+ * 1: The Diagnosing Unit
+ * 2: Selection Number
+ * 3: The action to modify
+ *
+ * ReturnValue:
+ * nil
+ *
+ * Public: No
+ */
+
+#include "script_component.hpp"
+
+EXPLODE_4_PVT(_this,_target,_player,_selectionN,_actionData);
+if (GVAR(level) < 2) exitwith {
+ private ["_pointDamage"];
+ _pointDamage = _target getHitPointDamage (["HitHead", "HitBody", "HitLeftArm", "HitRightArm", "HitLeftLeg", "HitRightLeg"] select _selectionN);
+
+ if (_pointDamage >= 0.8) exitWith {
+ _actionData set [2, QUOTE(PATHTOF(UI\icons\medical_crossRed.paa))];
+ };
+ if (_pointDamage > 0) exitWith {
+ _actionData set [2, QUOTE(PATHTOF(UI\icons\medical_crossYellow.paa))];
+ };
+};
+
+private ["_openWounds", "_amountOf"];
+_openWounds = _target getvariable [QGVAR(openWounds), []];
+{
+ _amountOf = _x select 3;
+ if (_amountOf > 0 && {(_selectionN == (_x select 2))}) exitwith {
+ _actionData set [2, QUOTE(PATHTOF(UI\icons\medical_crossRed.paa))];
+ };
+}foreach _openWounds;
diff --git a/addons/medical/stringtable.xml b/addons/medical/stringtable.xml
index 53c587bec0..7ff4d9d4b3 100644
--- a/addons/medical/stringtable.xml
+++ b/addons/medical/stringtable.xml
@@ -5,11 +5,13 @@
Litter Simulation Detail
Detale zużytych medykamentów
Detalle de simulación de basura
+ Количество мусора от медицины
Litter simulation detail level sets the number of litter items which will be locally spawned in the client. Excessive amounts in local areas could cause FPS lag, so this is a client only setting.
Opcja ta ustawia liczbę zużytych medykamentów, jakie pojawiają się lokalnie wokół gracza. Ich zbyt duża ilość może spowodować spadki FPS, dlatego jest to ustawienie tylko po stronie klienta.
Detalle simulación de basura establece el número de artículos de basura que se generan a nivel local en el cliente. Las cantidades excesivas en áreas locales podrían causar caída de rendimiento, así que esto es un ajuste de cliente únicamente.
+ Устанавливает количество мусора, который появляется после использования мед. препаратов. Большое количество мусора может уменьшить производительность, поэтому данная настройка локальна для клиента.
Inject Atropine
@@ -1322,6 +1324,28 @@
Megnézted %1-t
Hai controllato %1
+
+ Patient %1<br/>is %2.<br/>%3.<br/>%4
+
+
+ alive
+
+
+ dead
+
+
+ He's lost some blood
+
+
+ He hasn't lost blood
+
+
+ He is in pain
+
+
+ He is not in pain
+
+
Bandaged
Bandé
@@ -1636,4 +1660,4 @@
Aberration chromatique
-
\ No newline at end of file
+
diff --git a/addons/medical/ui/icons/medical_crossRed.paa b/addons/medical/ui/icons/medical_crossRed.paa
new file mode 100644
index 0000000000..5a0c8e9f9c
Binary files /dev/null and b/addons/medical/ui/icons/medical_crossRed.paa differ
diff --git a/addons/medical/ui/icons/medical_crossYellow.paa b/addons/medical/ui/icons/medical_crossYellow.paa
new file mode 100644
index 0000000000..74ddefd837
Binary files /dev/null and b/addons/medical/ui/icons/medical_crossYellow.paa differ
diff --git a/addons/mk6mortar/$PBOPREFIX$ b/addons/mk6mortar/$PBOPREFIX$
new file mode 100644
index 0000000000..a21eaf95f0
--- /dev/null
+++ b/addons/mk6mortar/$PBOPREFIX$
@@ -0,0 +1 @@
+z\ace\Addons\mk6mortar
\ No newline at end of file
diff --git a/addons/mk6mortar/CfgEventHandlers.hpp b/addons/mk6mortar/CfgEventHandlers.hpp
new file mode 100644
index 0000000000..34c6ecc22c
--- /dev/null
+++ b/addons/mk6mortar/CfgEventHandlers.hpp
@@ -0,0 +1,17 @@
+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_clientInit) );
+ };
+};
+class Extended_FiredBIS_EventHandlers {
+ class Mortar_01_base_F {
+ class ADDON {
+ firedBIS = QUOTE(_this call FUNC(handleFired));
+ };
+ };
+};
diff --git a/addons/mk6mortar/CfgVehicles.hpp b/addons/mk6mortar/CfgVehicles.hpp
new file mode 100644
index 0000000000..1c90842d5f
--- /dev/null
+++ b/addons/mk6mortar/CfgVehicles.hpp
@@ -0,0 +1,83 @@
+class CfgVehicles {
+ class Man;
+ class CAManBase: Man {
+ class ACE_SelfActions {
+ class ACE_Equipment {
+ class GVAR(rangetable) {
+ displayName = "$STR_ACE_MK6MORTAR_rangetable_action";
+ condition = QUOTE(_this call FUNC(rangeTableCanUse));
+ statement = QUOTE(_this call FUNC(rangeTableOpen));
+ priority = 0;
+ icon = QUOTE(PATHTOF(UI\icon_rangeTable.paa));
+ exceptions[] = {"notOnMap", "isNotInside"};
+ };
+ };
+ };
+ };
+
+ class LandVehicle;
+ class StaticWeapon: LandVehicle {
+ class Turrets {
+ class MainTurret;
+ };
+ };
+ class StaticMortar: StaticWeapon {
+ class Turrets: Turrets {
+ class MainTurret: MainTurret {
+ };
+ };
+ };
+ class Mortar_01_base_F: StaticMortar {
+ class Turrets: Turrets {
+ class MainTurret: MainTurret {
+ turretInfoType = "ACE_Mk6_RscWeaponRangeArtillery";
+ };
+ };
+ class ACE_SelfActions {
+ class GVAR(toggleMils) {
+ displayName = "Toggle MILS";
+ condition = QUOTE(true);
+ statement = QUOTE(_this call FUNC(toggleMils));
+ exceptions[] = {};
+ };
+ };
+ };
+
+ class Logic;
+ class Module_F: Logic {
+ class ModuleDescription {};
+ };
+ class GVAR(module): Module_F {
+ author = "$STR_ACE_Common_ACETeam";
+ category = "ACE";
+ displayName = "MK6 Settings";
+ function = QFUNC(moduleInit);
+ scope = 2;
+ isGlobal = 0;
+ icon = QUOTE(PATHTOF(UI\Icon_Module_mk6_ca.paa));
+ functionPriority = 0;
+ class Arguments {
+ class airResistanceEnabled {
+ displayName = "Air Resitance";
+ description = "For Player Shots, Model Air Restiance and Wind Effects";
+ typeName = "BOOL";
+ defaultValue = 1;
+ };
+ class allowComputerRangefinder {
+ displayName = "Allow MK6 Computer";
+ description = "Show the Computer and Rangefinder (these NEED to be removed if you enable air resistance)";
+ typeName = "BOOL";
+ defaultValue = 0;
+ };
+ class allowCompass {
+ displayName = "Allow MK6 Compass";
+ description = "Show the MK6 Digital Compass";
+ typeName = "BOOL";
+ defaultValue = 1;
+ };
+ };
+ class ModuleDescription: ModuleDescription {
+ description = "";
+ };
+ };
+};
diff --git a/addons/mk6mortar/CfgWeapons.hpp b/addons/mk6mortar/CfgWeapons.hpp
new file mode 100644
index 0000000000..7d5153e9ad
--- /dev/null
+++ b/addons/mk6mortar/CfgWeapons.hpp
@@ -0,0 +1,15 @@
+class CfgWeapons {
+ class ACE_ItemCore;
+ class InventoryItem_Base_F;
+
+ class ACE_RangeTable_82mm: ACE_ItemCore {
+ author = "$STR_ACE_Common_ACETeam";
+ scope = 2;
+ displayName = "$STR_ACE_MK6MORTAR_rangetable_name";
+ descriptionShort = "$STR_ACE_MK6MORTAR_rangetable_description";
+ picture = QUOTE(PATHTOF(UI\icon_rangeTable.paa));
+ class ItemInfo: InventoryItem_Base_F {
+ mass = 0.5;
+ };
+ };
+};
diff --git a/addons/mk6mortar/README.md b/addons/mk6mortar/README.md
new file mode 100644
index 0000000000..84c7a6e984
--- /dev/null
+++ b/addons/mk6mortar/README.md
@@ -0,0 +1,10 @@
+ace_mk6mortar
+==========
+
+Tweaks the mk6 mortar from Arma3
+
+## Maintainers
+
+The people responsible for merging changes to this component or answering potential questions.
+
+- [PabstMirror](https://github.com/PabstMirror)
diff --git a/addons/mk6mortar/RscInGameUI.hpp b/addons/mk6mortar/RscInGameUI.hpp
new file mode 100644
index 0000000000..102362216a
--- /dev/null
+++ b/addons/mk6mortar/RscInGameUI.hpp
@@ -0,0 +1,44 @@
+class RscInGameUI {
+ class RscWeaponRangeArtillery {
+ class CA_IGUI_elements_group: RscControlsGroup {};
+ };
+ class ACE_Mk6_RscWeaponRangeArtillery: RscWeaponRangeArtillery {
+ onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_Mk6_RscWeaponRangeArtillery',(_this select 0))]; _this call FUNC(turretDisplayLoaded););
+ controls[] = {"ACE_MILS_GROUP", "CA_IGUI_elements_group","CA_RangeElements_group"};
+ class ACE_MILS_GROUP: CA_IGUI_elements_group {
+ idc = 80170;
+ class controls {
+ class CA_Heading_MILS: RscText {
+ idc = 80156;
+ style = 2;
+ colorText[] = {0.706,0.0745,0.0196,1};
+ sizeEx = "0.028*SafezoneH";
+ shadow = 0;
+ font = "EtelkaMonospacePro";
+ text = "015";
+ x = "25.0 * (0.01875 * SafezoneH)";
+ y = "6.3 * (0.025 * SafezoneH)";
+ w = "3.3333 * (0.01875 * SafezoneH)";
+ h = "1 * (0.025 * SafezoneH)";
+ };
+ class CA_Elev_MILS: RscText {
+ idc = 80175;
+ style = 1;
+ sizeEx = "0.038*SafezoneH";
+ colorText[] = {0.706,0.0745,0.0196,1};
+ shadow = 0;
+ font = "EtelkaMonospacePro";
+ text = "80.5";
+ x = "36.8 * (0.01875 * SafezoneH)";
+ y = "29.3 * (0.025 * SafezoneH)";
+ w = "5.2 * (0.01875 * SafezoneH)";
+ h = "1.2 * (0.025 * SafezoneH)";
+ };
+ class CA_Elev_Need_MILS: CA_Elev_MILS {
+ idc = 80176;
+ y = "30.8 * (0.025 * SafezoneH)";
+ };
+ };
+ };
+ };
+};
diff --git a/addons/mk6mortar/RscRangeTable.hpp b/addons/mk6mortar/RscRangeTable.hpp
new file mode 100644
index 0000000000..6bf0e51619
--- /dev/null
+++ b/addons/mk6mortar/RscRangeTable.hpp
@@ -0,0 +1,87 @@
+class ACE_82mm_RangeTable_Dialog {
+ idd = -1;
+ movingEnable = 1;
+ onLoad = "uiNamespace setVariable ['ACE_82mm_RangeTable_Dialog', _this select 0];";
+ objects[] = {};
+
+ class ControlsBackground {
+ class TableBackground: RscPicture {
+ idc = -1;
+ text = QUOTE(PATHTOF(UI\RangeTable_background.paa));
+ x = "18 *(safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
+ y = "1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
+ w = "16.2634559672906 * (safeZoneH / 40)";
+ h = "23 * ((safeZoneH / 1.2) / 25)";
+ colorBackground[] = {1,1,1,1};
+ };
+ class ChargeBackground: RscText {
+ idc = -1;
+ x = "14 *(safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
+ y = "1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
+ w = "4 * (safeZoneH / 40)";
+ h = "5 * ((safeZoneH / 1.2) / 25)";
+ colorBackground[] = {0,0,0,1};
+ };
+ };
+ class controls {
+ class TheTable: RscListNBox {
+ idc = 20001;
+ // style = ST_CENTER + ST_MULTI + LB_TEXTURES;
+ // style = ST_LEFT + ST_MULTI + LB_TEXTURES;
+ // style = LB_MULTI + ST_LEFT; // Style
+ x = "18 *(safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
+ y = "3.76 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
+ w = "16.2634559672906 * (safeZoneH / 40)";
+ h = "20.24 * ((safeZoneH / 1.2) / 25)";
+ columns[] = {(10/867),(86/867),(171/867),(238/867),(320/867),(405/867),
+ (485/867),(546/867),(607/867),(668/867),(729/867),(790/867)};
+ rowHeight = 0.015 * safeZoneH;
+ sizeEx = "0.014 * safeZoneH";
+ font = "EtelkaMonospacePro";
+ drawSideArrows = 1;
+ idcLeft = 14124;
+ idcRight = 412343243;
+ colorText[] = {0, 0, 0, 1};
+ shadow = "0";
+ // colorBorder[] = {1,0,0,1};
+ // colorBackground[] = {1, 0, 0, 1};
+ colorSelectBackground[] = {0, 0, 0, 0.025};
+ colorSelectBackground2[] = {0, 0, 0, 0.025};
+ colorScrollbar[] = {0.95,0,0.95,1};
+ class ListScrollBar: ScrollBar{
+ color[] = {0,0,0,0.6};
+ };
+ };
+ class ChargeListBox: RscListbox {
+ idc = 1501;
+ style = ST_RIGHT;
+ x = "14 *(safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
+ y = "1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
+ w = "4 * (safeZoneH / 40)";
+ h = "5 * ((safeZoneH / 1.2) / 25)";
+ onLBSelChanged = QUOTE(_this call FUNC(rangeTablePageChange));
+ };
+ class CloseBackground: RscText {
+ idc = -1;
+ x = "33.7634559672906 *(safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
+ y = "1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
+ w = "0.5 * (safeZoneH / 40)";
+ h = "0.5 * ((safeZoneH / 1.2) / 25)";
+ colorBackground[] = {0,0,0,0.5};
+ };
+ class CloseActiveText: RscActiveText {
+ idc = -1;
+ style = 48;
+ color[] = {1,1,1,0.7};
+ text = "A3\Ui_f\data\GUI\Rsc\RscDisplayArcadeMap\icon_exit_cross_ca.paa";
+ x = "33.7634559672906 *(safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
+ y = "1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
+ w = "0.5 * (safeZoneH / 40)";
+ h = "0.5 * ((safeZoneH / 1.2) / 25)";
+ colorText[] = {1,1,1,0.7};
+ colorActive[] = {1,1,1,1};
+ tooltip = "Close";
+ onButtonClick = "closeDialog 0";
+ };
+ };
+};
diff --git a/addons/mk6mortar/UI/Icon_Module_mk6_ca.paa b/addons/mk6mortar/UI/Icon_Module_mk6_ca.paa
new file mode 100644
index 0000000000..8abfb4bdd3
Binary files /dev/null and b/addons/mk6mortar/UI/Icon_Module_mk6_ca.paa differ
diff --git a/addons/mk6mortar/UI/RangeTable_background.paa b/addons/mk6mortar/UI/RangeTable_background.paa
new file mode 100644
index 0000000000..bf4b5ee044
Binary files /dev/null and b/addons/mk6mortar/UI/RangeTable_background.paa differ
diff --git a/addons/mk6mortar/UI/icon_rangeTable.paa b/addons/mk6mortar/UI/icon_rangeTable.paa
new file mode 100644
index 0000000000..9273b849d7
Binary files /dev/null and b/addons/mk6mortar/UI/icon_rangeTable.paa differ
diff --git a/addons/mk6mortar/UI/ui_charges.paa b/addons/mk6mortar/UI/ui_charges.paa
new file mode 100644
index 0000000000..7041c654e0
Binary files /dev/null and b/addons/mk6mortar/UI/ui_charges.paa differ
diff --git a/addons/mk6mortar/XEH_clientInit.sqf b/addons/mk6mortar/XEH_clientInit.sqf
new file mode 100644
index 0000000000..973772c96a
--- /dev/null
+++ b/addons/mk6mortar/XEH_clientInit.sqf
@@ -0,0 +1,5 @@
+#include "script_component.hpp"
+
+if (!hasInterface) exitWith {};
+
+["playerVehicleChanged", {_this call FUNC(handlePlayerVehicleChanged);}] call EFUNC(common,addEventHandler);
diff --git a/addons/mk6mortar/XEH_preInit.sqf b/addons/mk6mortar/XEH_preInit.sqf
new file mode 100644
index 0000000000..9af89ccb35
--- /dev/null
+++ b/addons/mk6mortar/XEH_preInit.sqf
@@ -0,0 +1,21 @@
+#include "script_component.hpp"
+
+ADDON = false;
+
+PREP(dev_buildTable);
+PREP(dev_formatNumber);
+PREP(dev_simulateCalcRangeTableLine);
+PREP(dev_simulateFindSolution);
+PREP(dev_simulateShot);
+
+PREP(handleFired);
+PREP(handlePlayerVehicleChanged);
+PREP(moduleInit);
+PREP(rangeTableCanUse);
+PREP(rangeTableOpen);
+PREP(rangeTablePageChange);
+PREP(rangeTablePreCalculatedValues);
+PREP(toggleMils);
+PREP(turretDisplayLoaded);
+
+ADDON = true;
diff --git a/addons/mk6mortar/config.cpp b/addons/mk6mortar/config.cpp
new file mode 100644
index 0000000000..6751cea5fb
--- /dev/null
+++ b/addons/mk6mortar/config.cpp
@@ -0,0 +1,47 @@
+#include "script_component.hpp"
+
+class CfgPatches {
+ class ADDON {
+ units[] = {};
+ weapons[] = {"ACE_RangeTable_82mm"};
+ requiredVersion = REQUIRED_VERSION;
+ requiredAddons[] = {"ace_interaction"};
+ author[] = {"PabstMirror"};
+ authorUrl = "https://github.com/acemod";
+ VERSION_CONFIG;
+ };
+};
+
+#include "CfgEventHandlers.hpp"
+#include "CfgVehicles.hpp"
+#include "CfgWeapons.hpp"
+
+class RscText;
+class RscListbox;
+class RscListNBox;
+class RscPicture;
+class RscControlsGroup;
+class ScrollBar;
+class RscActiveText;
+
+#include "RscInGameUI.hpp"
+#include "RscRangeTable.hpp"
+
+class ACE_Settings {
+ //These settings effect gameplay difficutly: defaults will leave the mortar the same as vanilla
+ class GVAR(airResistanceEnabled) {
+ value = 0;
+ typeName = "BOOL";
+ isClientSetable = 0;
+ };
+ class GVAR(allowComputerRangefinder) {
+ value = 1;
+ typeName = "BOOL";
+ isClientSetable = 0;
+ };
+ class GVAR(allowCompass) {
+ value = 1;
+ typeName = "BOOL";
+ isClientSetable = 0;
+ };
+};
diff --git a/addons/mk6mortar/functions/fnc_dev_buildTable.sqf b/addons/mk6mortar/functions/fnc_dev_buildTable.sqf
new file mode 100644
index 0000000000..7a60e91e68
--- /dev/null
+++ b/addons/mk6mortar/functions/fnc_dev_buildTable.sqf
@@ -0,0 +1,87 @@
+/*
+ * Author: PabstMirror
+ * DEV function to build mortar tables, very cpu intensive (never used durring normal gameplay)
+ *
+ * Arguments:
+ * 0: Muzzle Velocity
+ * 1: Air Friction
+ *
+ * Return Value:
+ *
+ *
+ * Example:
+ * [100, -0.0001] spawn ace_mk6mortar_fnc_dev_buildTable; //spawn (scheduled) is slower
+ * [100, -0.0001] call ace_mk6mortar_fnc_dev_buildTable; //faster, but will lock while processing
+ *
+ * Public: No
+ */
+#include "script_component.hpp"
+
+
+private ["_muzzleVelocity", "_airFriction", "_stillInRange", "_currentRange", "_increasePerRow", "_outputArray", "_rangeToHit", "_lineElevation", "_lineHeightElevation", "_lineTimeOfFlight", "_lineCrosswindDeg", "_lineHeadwindMeters", "_lineTailWindMeters", "_lineTempDec", "_lineTempInc", "_lineAirDensDec", "_lineAirDensInc", "_result", "_outputString"];
+
+_muzzleVelocity = _this select 0;
+_airFriction = _this select 1;
+_stillInRange = true;
+_currentRange = 100;
+_increasePerRow = 50;
+_outputArray = [];
+
+
+//[_rangeToHit, _lineElevation, _lineHeightElevation, _lineHeightTimeDelta, _lineTimeOfFlight, _lineCrosswindDeg, _lineHeadwindMeters, _lineTailWindMeters, _lineTempDec, _lineTempInc, _lineAirDensDec, _lineAirDensInc]
+
+while {_stillInRange} do {
+ _result = [_muzzleVelocity, _currentRange, _airFriction] call FUNC(dev_simulateCalcRangeTableLine);
+ if (_result isEqualTo []) then {
+ _stillInRange = false;
+ } else {
+ if (_airFriction == 0) then {
+ _result set [4, 0];
+ _result set [5, 0];
+ _result set [6, 0];
+ _result set [7, 0];
+ _result set [8, 0];
+ _result set [9, 0];
+ _result set [10, 0];
+ };
+ if ((_result select 1) < 88) then {
+ _outputArray pushBack [
+ ([(_result select 0), "meters", false] call FUNC(dev_formatNumber)),
+ ([(_result select 1), "mil", true] call FUNC(dev_formatNumber)),
+ ([(_result select 2), "mil", true] call FUNC(dev_formatNumber)),
+ ([(_result select 3), "sec", false] call FUNC(dev_formatNumber)),
+ ([(_result select 4), "sec", false] call FUNC(dev_formatNumber)),
+ ([(_result select 5), "milPrecise", true] call FUNC(dev_formatNumber)),
+ ([(_result select 6), "metersprecise", false] call FUNC(dev_formatNumber)),
+ ([(_result select 7), "metersprecise", false] call FUNC(dev_formatNumber)),
+ ([(_result select 8), "metersprecise", false] call FUNC(dev_formatNumber)),
+ ([(_result select 9), "metersprecise", false] call FUNC(dev_formatNumber)),
+ ([(_result select 10), "metersprecise", false] call FUNC(dev_formatNumber)),
+ ([(_result select 11), "metersprecise", false] call FUNC(dev_formatNumber))
+ ];
+ };
+ _currentRange = _currentRange + _increasePerRow;
+ };
+ hintSilent str _currentRange;
+};
+
+//handle floating point rounding errors
+_outputString = format ["case ((abs(_muzzleVelocity - %1) < 0.00001) && {(abs(_airFriction - %2) < 0.00001)}): {
+[
+", _muzzleVelocity, _airFriction];
+
+{
+ if (_forEachIndex < ((count _outputArray) - 1)) then {
+ _outputString = _outputString + format ["%1,
+ ", _x];
+ } else {
+ _outputString = _outputString + format ["%1
+ ]
+ };", _x];
+ };
+} forEach _outputArray;
+
+copyToClipboard _outputString;
+rangeTableOutput = _outputString;
+
+hint "done";
\ No newline at end of file
diff --git a/addons/mk6mortar/functions/fnc_dev_formatNumber.sqf b/addons/mk6mortar/functions/fnc_dev_formatNumber.sqf
new file mode 100644
index 0000000000..f89c3a1b8f
--- /dev/null
+++ b/addons/mk6mortar/functions/fnc_dev_formatNumber.sqf
@@ -0,0 +1,80 @@
+/*
+Author: Pabst Mirror
+
+Description:
+Converts numbers into nicely formated strings.
+
+Parameters:
+0: NUMBER - Input number
+1: STRING - Output type (see case statement)
+2: BOOL - If output type is mil, convert input type from deg->mil
+
+Returns:
+STRING - Formatted number
+
+Example:
+[45, "mil4", true] call ace_mk6mortar_fnc_dev_formatNumber = "0800"
+ */
+#include "script_component.hpp"
+
+private ["_theNumber", "_inputType", "_convertToMils", "_decimalPlaces", "_integerPlaces", "_prefix", "_return"];
+
+_theNumber = _this select 0;
+_inputType = _this select 1;
+_convertToMils = _this select 2;
+
+_decimalPlaces = -1;
+_integerPlaces = -1;
+
+switch (toLower _inputType) do {
+case ("meters"): {
+ _decimalPlaces = 0;
+ _integerPlaces = 1;
+ };
+case ("metersprecise"): {
+ _decimalPlaces = 1;
+ _integerPlaces = 1;
+ };
+case ("meters4"): {
+ _decimalPlaces = 0;
+ _integerPlaces = 4;
+ };
+case ("deg3precise"): {
+ _decimalPlaces = 2;
+ _integerPlaces = 3;
+ };
+case ("mil"): {
+ _decimalPlaces = 0;
+ _integerPlaces = 1;
+ if (_convertToMils) then {
+ _theNumber = _theNumber * (6400 / 360);
+ };
+ };
+case ("mil4"): {
+ _decimalPlaces = 0;
+ _integerPlaces = 4;
+ if (_convertToMils) then {
+ _theNumber = _theNumber * (6400 / 360);
+ };
+ };
+case ("milprecise"): {
+ _decimalPlaces = 1;
+ _integerPlaces = 1;
+ if (_convertToMils) then {
+ _theNumber = _theNumber * (6400 / 360);
+ };
+ };
+case ("sec"): {
+ _decimalPlaces = 1;
+ _integerPlaces = 1;
+ };
+ default {systemChat format ["badtype %1", _inputType];};
+};
+
+//CBA_fnc_formatNumber is silly: [-9.58545, 1, 1, false] call CBA_fnc_formatNumber == "-9.-6"
+
+_prefix = if (_theNumber < 0) then {"-"} else {""};
+
+_return = [abs (_theNumber), _integerPlaces, _decimalPlaces, false] call CBA_fnc_formatNumber;
+
+(_prefix + _return)
diff --git a/addons/mk6mortar/functions/fnc_dev_simulateCalcRangeTableLine.sqf b/addons/mk6mortar/functions/fnc_dev_simulateCalcRangeTableLine.sqf
new file mode 100644
index 0000000000..d1e0a8dd05
--- /dev/null
+++ b/addons/mk6mortar/functions/fnc_dev_simulateCalcRangeTableLine.sqf
@@ -0,0 +1,79 @@
+/*
+Author: Pabst Mirror
+
+Description:
+Builds a rangeTable line for a certian range, given muzzle velocity and air friction, returns [] if out of range.
+
+Parameters:
+0: NUMBER - Muzzle Velocity
+1: NUMBER - Air Friction
+2: NUMBER - Range To Hit
+
+Returns:
+ARRAY - Range Table Line Data (see return line)
+
+Example:
+[300, -0.0001, 3000] call ace_mk6mortar_fnc_simulateCalcRangeTableLine
+ */
+#include "script_component.hpp"
+
+#define TIME_STEP (1/50)
+
+private ["_startTime", "_muzzleVelocity", "_rangeToHit", "_airFriction", "_vacElevation", "_radicand", "_maxElev", "_minElev", "_error", "_solutionElevation", "_lastTestResult", "_numberOfAttempts", "_lineElevation", "_lineTimeOfFlight", "_lineHeightElevation", "_lineHeightTimeDelta", "_lineCrosswindDeg", "_lineHeadwindMeters", "_lineTailWindMeters", "_result"];
+
+_startTime = diag_tickTime;
+
+_muzzleVelocity = _this select 0;
+_rangeToHit = _this select 1;
+_airFriction = _this select 2;
+
+//Run Binary search for correct elevation
+_solution = [_rangeToHit, 0, _muzzleVelocity, _airFriction, TIME_STEP] call FUNC(dev_simulateFindSolution);
+if (_solution isEqualTo []) exitWith {[]};
+
+//Real Elevation
+_lineElevation = _solution select 0;
+
+//Time Of Flight:
+_lineTimeOfFlight = _solution select 1;
+
+//Height Adjustment for -100m (another binary search)
+_solution = [_rangeToHit, -100, _muzzleVelocity, _airFriction, TIME_STEP] call FUNC(dev_simulateFindSolution);
+if (_solution isEqualTo []) exitWith {[]};//should never be triggered (lower elevation easier to hit)
+
+_lineHeightElevation = ((_solution select 0) - _lineElevation);
+_lineHeightTimeDelta = (_solution select 1) - _lineTimeOfFlight;
+
+//Compute for 10x and divide to minimize rounding errors
+
+//Crosswind
+_lastTestResult = [_lineElevation, _muzzleVelocity, _airFriction, 15, 1, 0, 10, 0, TIME_STEP] call FUNC(dev_simulateShot);
+_lineCrosswindDeg = (_lastTestResult select 2) / 10;
+
+//Headwind:
+_lastTestResult = [_lineElevation, _muzzleVelocity, _airFriction, 15, 1, -10, 0, 0, TIME_STEP] call FUNC(dev_simulateShot);
+_lineHeadwindMeters = (_rangeToHit - (_lastTestResult select 0)) / 10;
+
+//TailWind:
+_lastTestResult = [_lineElevation, _muzzleVelocity, _airFriction, 15, 1, 10, 0, 0, TIME_STEP] call FUNC(dev_simulateShot);
+_lineTailWindMeters = (_rangeToHit - (_lastTestResult select 0)) / 10;
+
+//Air Temp Dec
+_lastTestResult = [_lineElevation, _muzzleVelocity, _airFriction, (15 - 10), 1, 0, 0, 0, TIME_STEP] call FUNC(dev_simulateShot);
+_lineTempDec = (_rangeToHit - (_lastTestResult select 0)) / 10;
+
+//Air Temp Inc
+_lastTestResult = [_lineElevation, _muzzleVelocity, _airFriction, (15 + 10), 1, 0, 0, 0, TIME_STEP] call FUNC(dev_simulateShot);
+_lineTempInc = (_rangeToHit - (_lastTestResult select 0)) / 10;
+
+//Air Density Dec
+_lastTestResult = [_lineElevation, _muzzleVelocity, _airFriction, 15, 0.9, 0, 0, 0, TIME_STEP] call FUNC(dev_simulateShot);
+_lineAirDensDec = (_rangeToHit - (_lastTestResult select 0)) / 10;
+
+//Air Density Inc
+_lastTestResult = [_lineElevation, _muzzleVelocity, _airFriction, 15, 1.1, 0, 0, 0, TIME_STEP] call FUNC(dev_simulateShot);
+_lineAirDensInc = (_rangeToHit - (_lastTestResult select 0)) / 10;
+
+// systemChat format ["debug: Range %1 - in %2 sec", _rangeToHit, (diag_tickTime - _startTime)];
+
+[_rangeToHit, _lineElevation, _lineHeightElevation, _lineHeightTimeDelta, _lineTimeOfFlight, _lineCrosswindDeg, _lineHeadwindMeters, _lineTailWindMeters, _lineTempDec, _lineTempInc, _lineAirDensDec, _lineAirDensInc]
diff --git a/addons/mk6mortar/functions/fnc_dev_simulateFindSolution.sqf b/addons/mk6mortar/functions/fnc_dev_simulateFindSolution.sqf
new file mode 100644
index 0000000000..a45c415b40
--- /dev/null
+++ b/addons/mk6mortar/functions/fnc_dev_simulateFindSolution.sqf
@@ -0,0 +1,55 @@
+/*
+ * Author: PabstMirror
+ * DEV to find a firing solution for a given range
+ *
+ * Arguments:
+ * 0: Range to Hit (Meters)
+ * 1: Height To Hit (Meters)
+ * 2: Muzzle Velocity (M/S)
+ * 3: Air Friction
+ * 4: Time Step (seconds) (eg 1/50 will simulate 50 cycles per second)
+ *
+ * Return Value:
+ * ARRAY - [NUMBER - Elevation In Degrees, NUMBER - Shot Durration]
+ *
+ * Example:
+ * [_rangeToHit, _heightToHit, _muzzleVelocity, _airFriction, TIME_STEP] call FUNC(simulateFindSolution);
+ *
+ * Public: No
+ */
+#include "script_component.hpp"
+
+private ["_rangeToHit", "_heightToHit", "_muzzleVelocity", "_airFriction", "_maxElev", "_minElev", "_error", "_solutionElevation", "_lastTestResult", "_numberOfAttempts"];
+
+#define MAX_ATTEMPTS 22
+
+_rangeToHit = _this select 0;
+_heightToHit = _this select 1;
+_muzzleVelocity = _this select 2;
+_airFriction = _this select 3;
+_timeStep = _this select 4;
+
+_maxElev = 90;
+_minElev = 45; //todo - Low Angle Howitzers???
+
+_error = 10000;
+_solutionElevation = -1;
+_lastTestResult = [];
+_numberOfAttempts = 0;
+
+//(binary search)
+while {(_numberOfAttempts < MAX_ATTEMPTS) && {(abs _error) > 0.2}} do {
+ _numberOfAttempts = _numberOfAttempts + 1;
+ _solutionElevation = (_maxElev + _minElev) / 2;
+ _lastTestResult = [_solutionElevation, _muzzleVelocity, _airFriction, 15, 1, 0, 0, _heightToHit, _timeStep] call FUNC(dev_simulateShot);
+ _error = _rangeToHit - (_lastTestResult select 0);
+ if (_error > 0) then {
+ _maxElev = _solutionElevation; //test range was short
+ } else {
+ _minElev = _solutionElevation; //test range was long
+ };
+};
+if (_numberOfAttempts >= MAX_ATTEMPTS) exitWith {[]};
+
+//return the elevation and time required
+[_solutionElevation, (_lastTestResult select 1)]
diff --git a/addons/mk6mortar/functions/fnc_dev_simulateShot.sqf b/addons/mk6mortar/functions/fnc_dev_simulateShot.sqf
new file mode 100644
index 0000000000..0e53807a6b
--- /dev/null
+++ b/addons/mk6mortar/functions/fnc_dev_simulateShot.sqf
@@ -0,0 +1,73 @@
+/*
+ * Author: PabstMirror
+ * DEV function to build mortar tables, very cpu intensive (never used durring normal gameplay)
+ *
+ * Arguments:
+ * 0: Shot Angle (degrees)
+ * 1: Muzzle Velocity (m/s)
+ * 2: Air Friction
+ * 3: Tempeture (degres celcius)
+ * 4: Relative Air Denisty
+ * 5: Tail Wind (m/s)
+ * 6: Cross Wind (m/s)
+ * 7: Height Of Target (M)
+ * 8: Time Step (fraction of a second)
+ *
+ * Return Value:
+ * [Distance Traveled, Shot Time, Offset (degrees)]
+ *
+ * Example:
+ * [45, 180, -0.0001, 15, 1, 10, 0, 0, 1/50] call ace_mk6mortar_fnc_dev_simulateShot;
+ *
+ * Public: No
+ */
+#include "script_component.hpp"
+
+private ["_angleDeg", "_muzzleVelocity", "_airFriction", "_temp", "_relDensity", "_tailWind", "_crosswind", "_heightOfTarget", "_timeStep", "_wind", "_gravity", "_currentPos", "_currentVelocity", "_currentTime", "_lastPos", "_kCoefficent", "_aparentWind", "_changeInVelocity", "_linConversion", "_middlePos", "_middlePosOld", "_middleTotalTravelTime", "_offsetDeg"];
+
+_angleDeg = _this select 0;
+_muzzleVelocity = _this select 1;
+_airFriction = _this select 2;
+_temp = _this select 3;
+_relDensity = _this select 4;
+_tailWind = _this select 5;
+_crosswind = _this select 6;
+_heightOfTarget = _this select 7;
+_timeStep = _this select 8;
+
+_wind = [_crosswind, _tailWind, 0];
+_gravity = [0,0,-9.8];
+
+_currentPos = [0,0,0];
+_muzzleVelocity = _muzzleVelocity * (((_temp + 273.13) / 288.13 - 1) / 40 + 1);
+_currentVelocity = [0, (_muzzleVelocity * cos _angleDeg), (_muzzleVelocity * sin _angleDeg)];
+
+_currentTime = 0;
+_lastPos = _currentPos;
+
+_kCoefficent = -1 * _relDensity * _airFriction; //save time in the loop and compute once
+
+while {((_currentVelocity select 2) > 0) || ((_currentPos select 2) >= _heightOfTarget)} do {
+ _lastPos = _currentPos;
+
+ _aparentWind = _wind vectorDiff _currentVelocity;
+ _changeInVelocity = _gravity vectorAdd (_aparentWind vectorMultiply ((vectorMagnitude _aparentWind) * _kCoefficent));
+
+ _currentVelocity = _currentVelocity vectorAdd (_changeInVelocity vectorMultiply _timeStep);
+
+ _currentPos = _currentPos vectorAdd (_currentVelocity vectorMultiply _timeStep);
+ _currentTime = _currentTime + _timeStep;
+};
+
+//Uses linearConversion to get a weighted average betwen points before and after dropping below target height
+_linConversion = linearConversion [(_lastPos select 2), (_currentPos select 2), _heightOfTarget, 0, 1, true];
+_middlePos = (_lastPos vectorMultiply (1 - _linConversion)) vectorAdd (_currentPos vectorMultiply (_linConversion));
+// _middlePosOld = (_lastPos vectorAdd _currentPos) vectorMultiply 0.5;
+
+//Same to find travel time
+_middleTotalTravelTime = _currentTime - (_timeStep * (1-_linConversion));
+
+//Find shot offset (from crosswind), in degrees
+_offsetDeg = (_middlePos select 0) aTan2 (_middlePos select 1);
+
+[(_middlePos select 1), _middleTotalTravelTime, _offsetDeg]
diff --git a/addons/mk6mortar/functions/fnc_handleFired.sqf b/addons/mk6mortar/functions/fnc_handleFired.sqf
new file mode 100644
index 0000000000..e2b440c520
--- /dev/null
+++ b/addons/mk6mortar/functions/fnc_handleFired.sqf
@@ -0,0 +1,89 @@
+/*
+ * Author: PabstMirror
+ * Called when the mortar is fired.
+ *
+ * Arguments:
+ * 0: mortar - Object the event handler is assigned to
+ * 1: weapon - Fired weapon
+ * 2: muzzle - Muzzle that was used
+ * 3: mode - Current mode of the fired weapon
+ * 4: ammo - Ammo used
+ * 5: magazine - magazine name which was used
+ * 6: projectile - Object of the projectile that was shot
+ *
+ * Return Value:
+ * Nothing
+ *
+ * Example:
+ * [clientFiredBIS-XEH] call ace_mk6mortar_fnc_handleFired
+ *
+ * Public: No
+ */
+#include "script_component.hpp"
+
+private ["_shooterMan", "_bisAirFriction", "_temperature", "_newMuzzleVelocityCoefficent", "_bulletVelocity", "_bulletSpeed", "_muzzleVelocity", "_muzzleVelocityShift"];
+
+disableSerialization;
+
+PARAMS_7(_vehicle,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
+
+if (!GVAR(airResistanceEnabled)) exitWith {};
+// Large enough distance to not simulate any wind deflection
+if (_vehicle distance ACE_player > 8000) exitWith {false};
+
+//AI will have no clue how to use:
+_shooterMan = gunner _vehicle;
+if (!([_shooterMan] call EFUNC(common,isPlayer))) exitWith {false};
+
+//Should be zero, just make sure:
+_bisAirFriction = getNumber (configFile >> "CfgAmmo" >> _ammo >> "airFriction");
+if (_bisAirFriction != 0) exitWith {ERROR("Non zero base airFriction");};
+
+
+//Calculate air density:
+_altitude = (getPosASL _vehicle) select 2;
+#define GET_TEMPERATURE_AT_HEIGHT(h) (EGVAR(weather,currentTemperature) - 0.0065 * (h))
+_temperature = GET_TEMPERATURE_AT_HEIGHT(_altitude);
+_pressure = _altitude call EFUNC(weather,calculateBarometricPressure);
+_relativeHumidity = EGVAR(weather,currentHumidity);
+_airDensity = [_temperature, _pressure, _relativeHumidity] call EFUNC(weather,calculateAirDensity);
+_relativeDensity = _airDensity / 1.225;
+
+TRACE_5("FiredWeather",_temperature,_pressure,_relativeHumidity,_airDensity,_relativeDensity);
+
+//powder effects:
+_newMuzzleVelocityCoefficent = (((_temperature + 273.13) / 288.13 - 1) / 40 + 1);
+if (_newMuzzleVelocityCoefficent != 1) then {
+ _bulletVelocity = velocity _projectile;
+ _bulletSpeed = vectorMagnitude _bulletVelocity;
+ _bulletVelocity = (vectorNormalized _bulletVelocity) vectorMultiply (_bulletSpeed * _newMuzzleVelocityCoefficent);
+ _projectile setVelocity _bulletVelocity;
+ _muzzleVelocity = _muzzleVelocity + _muzzleVelocityShift;
+};
+
+
+[{
+ private ["_deltaT", "_bulletVelocity", "_bulletSpeed", "_trueVelocity", "_trueSpeed", "_dragRef", "_accelRef", "_drag", "_accel"];
+ PARAMS_2(_args,_pfID);
+ EXPLODE_4_PVT(_args,_shell,_airFriction,_time,_relativeDensity);
+
+ if (isNull _shell || {!alive _shell}) exitwith {
+ [_pfID] call cba_fnc_removePerFrameHandler;
+ };
+
+ _deltaT = time - _time;
+ _args set[2, time];
+
+ _bulletVelocity = velocity _shell;
+ _bulletSpeed = vectorMagnitude _bulletVelocity;
+
+ _trueVelocity = _bulletVelocity vectorDiff ACE_wind;
+ _trueSpeed = vectorMagnitude _trueVelocity;
+
+ _drag = _deltaT * _airFriction * _trueSpeed * _relativeDensity;
+ _accel = _trueVelocity vectorMultiply (_drag);
+ _bulletVelocity = _bulletVelocity vectorAdd _accel;
+
+ _shell setVelocity _bulletVelocity;
+
+}, 0, [_projectile, MK6_82mm_AIR_FRICTION, time, _relativeDensity]] call CBA_fnc_addPerFrameHandler;
diff --git a/addons/mk6mortar/functions/fnc_handlePlayerVehicleChanged.sqf b/addons/mk6mortar/functions/fnc_handlePlayerVehicleChanged.sqf
new file mode 100644
index 0000000000..91657fdbe2
--- /dev/null
+++ b/addons/mk6mortar/functions/fnc_handlePlayerVehicleChanged.sqf
@@ -0,0 +1,108 @@
+/*
+ * Author: PabstMirror
+ * Handles player getting into new vehicle. Loads PFEG for mortar display if it is a mortar.
+ *
+ * Arguments:
+ * 0:Player
+ * 1: New Vehicle
+ *
+ * Return Value:
+ * No
+ *
+ * Example:
+ * [bob, mortar] call ace_mk6mortar_fnc_handlePlayerVehicleChanged;
+ *
+ * Public: No
+ */
+#include "script_component.hpp"
+
+private ["_chargeText", "_xPos", "_yPos", "_wPos", "_hPos", "_tubeWeaponName", "_fireModes"];
+
+PARAMS_2(_player,_newVehicle);
+
+if (isNull _newVehicle) exitWith {};
+if (!(_newVehicle isKindOf "Mortar_01_base_F")) exitWith {};
+
+_chargeText = (findDisplay 46) ctrlCreate ["RscStructuredText", 80085];
+
+_xPos = (profilenamespace getvariable ["IGUI_GRID_WEAPON_X", ((safezoneX + safezoneW) - (12.4 * (((safezoneW / safezoneH) min 1.2) / 40)) - 0.5 * (((safezoneW / safezoneH) min 1.2) / 40))]);
+_yPos = 2.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (profilenamespace getvariable ["IGUI_GRID_WEAPON_Y", (safezoneY + 0.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))]);
+_wPos = 10 * (((safezoneW / safezoneH) min 1.2) / 40);
+_hPos = 1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25);
+
+_chargeText ctrlSetPosition [_xPos, _yPos, _wPos, _hPos];
+_chargeText ctrlCommit 0;
+
+_tubeWeaponName = (weapons _newVehicle) select 0;
+_fireModes = getArray (configFile >> "CfgWeapons" >> _tubeWeaponName >> "modes");
+
+[{
+ PARAMS_2(_args,_pfID);
+ EXPLODE_3_PVT(_args,_mortarVeh,_chargeText,_fireModes);
+
+ if ((vehicle ACE_player) != _mortarVeh) then {
+ [_pfID] call CBA_fnc_removePerFrameHandler;
+ ctrlDelete _chargeText;
+ } else {
+
+ _useMils = _mortarVeh getVariable [QGVAR(useMils), true];
+
+ //Compute: 'charge' from weaponstate
+ _currentFireMode = (weaponState [_mortarVeh, [0]]) select 2;
+ _currentChargeMode = _fireModes find _currentFireMode;
+
+ _text = format ["%1: %2 ", (localize "STR_ACE_MK6MORTAR_rangetable_charge"), _currentChargeMode, QUOTE(PATHTOF(UI\ui_charges.paa))];
+ _chargeText ctrlSetStructuredText parseText _text;
+ if (shownArtilleryComputer && {!GVAR(allowComputerRangefinder)}) then {
+ //Don't like this solution, but it works
+ closeDialog 0;
+ [parseText "Computer Disabled"] call EFUNC(common,displayTextStructured);
+ };
+
+ _display = uiNamespace getVariable ["ACE_Mk6_RscWeaponRangeArtillery", displayNull];
+ if (isNull _display) exitWith {}; //It may be null for the first frame
+
+ //Hud should hidden in 3rd person
+ _notGunnerView = cameraView != "GUNNER";
+
+ //Update CurrentElevation Display:
+ if (_notGunnerView) then {
+ (_display displayCtrl 80175) ctrlSetText "";
+ } else {
+ _elevDeg = parseNumber ctrlText (_display displayCtrl 175);
+ if (_useMils) then {
+ (_display displayCtrl 80175) ctrlSetText str round (_elevDeg * 6400 / 360);
+ } else {
+ (_display displayCtrl 80175) ctrlSetText str _elevDeg;
+ };
+ };
+
+ //Update ElevationNeeded Display:
+ if (_notGunnerView || (!GVAR(allowComputerRangefinder))) then {
+ (_display displayCtrl 80176) ctrlSetText "";
+ } else {
+ _elevDeg = parseNumber ctrlText (_display displayCtrl 176);
+ if (_elevDeg <= 0) then { //Bad data means "----" out of range
+ (_display displayCtrl 80176) ctrlSetText (ctrlText (_display displayCtrl 176));
+ } else {
+ if (_useMils) then {
+ (_display displayCtrl 80176) ctrlSetText str round (_elevDeg * 6400 / 360);
+ } else {
+ (_display displayCtrl 80176) ctrlSetText str _elevDeg;
+ };
+ };
+ };
+
+ //Update Heading Display:
+ if (_notGunnerView || (!GVAR(allowCompass))) then {
+ (_display displayCtrl 80156) ctrlSetText "";
+ } else {
+ _rotationDegrees = ((getDir _mortarVeh) + (((-180 / PI) * (_mortarVeh animationPhase "mainTurret")) + 360)) % 360;
+ if (_useMils) then {
+ (_display displayCtrl 80156) ctrlSetText str round (_rotationDegrees * 6400 / 360);
+ } else {
+ (_display displayCtrl 80156) ctrlSetText (ctrlText (_display displayCtrl 156));
+ };
+ };
+ };
+}, 0, [_newVehicle, _chargeText,_fireModes]] call CBA_fnc_addPerFrameHandler;
diff --git a/addons/mk6mortar/functions/fnc_moduleInit.sqf b/addons/mk6mortar/functions/fnc_moduleInit.sqf
new file mode 100644
index 0000000000..75bab4cee9
--- /dev/null
+++ b/addons/mk6mortar/functions/fnc_moduleInit.sqf
@@ -0,0 +1,27 @@
+/*
+ * Author: PabstMirror
+ * Loads settings from the module.
+ *
+ * Arguments:
+ * 0: The Module Logic Object
+ * 1: synced objects
+ * 2: Activated
+ *
+ * Return Value:
+ * None
+ *
+ * Example:
+ * [fromModule] call ace_mk6mortar_fnc_moduleInit
+ *
+ * Public: No
+ */
+#include "script_component.hpp"
+
+PARAMS_3(_logic,_syncedUnits,_activated);
+
+if (!_activated) exitWith {WARNING("Module - placed but not active");};
+if (!isServer) exitWith {};
+
+[_logic, QGVAR(airResistanceEnabled), "airResistanceEnabled"] call EFUNC(common,readSettingFromModule);
+[_logic, QGVAR(allowComputerRangefinder), "allowComputerRangefinder"] call EFUNC(common,readSettingFromModule);
+[_logic, QGVAR(allowCompass), "allowCompass"] call EFUNC(common,readSettingFromModule);
diff --git a/addons/mk6mortar/functions/fnc_rangeTableCanUse.sqf b/addons/mk6mortar/functions/fnc_rangeTableCanUse.sqf
new file mode 100644
index 0000000000..04ca9c3278
--- /dev/null
+++ b/addons/mk6mortar/functions/fnc_rangeTableCanUse.sqf
@@ -0,0 +1,21 @@
+/*
+ * Author: PabstMirror
+ * Can player open 82mm rangetable.
+ *
+ * Arguments:
+ * 0: Vehicle
+ * 1: Player
+ *
+ * Return Value:
+ * Can Open
+ *
+ * Example:
+ * [bob, bob] call ace_mk6mortar_fnc_rangeTableCanUse
+ *
+ * Public: No
+ */
+#include "script_component.hpp"
+
+PARAMS_2(_vehicle,_player);
+
+"ACE_RangeTable_82mm" in (items _player);
\ No newline at end of file
diff --git a/addons/mk6mortar/functions/fnc_rangeTableOpen.sqf b/addons/mk6mortar/functions/fnc_rangeTableOpen.sqf
new file mode 100644
index 0000000000..dfb53842ab
--- /dev/null
+++ b/addons/mk6mortar/functions/fnc_rangeTableOpen.sqf
@@ -0,0 +1,48 @@
+/*
+ * Author: PabstMirror
+ * Opens the rangetable and fills the charge listbox.
+ *
+ * Arguments:
+ * No
+ *
+ * Return Value:
+ * No
+ *
+ * Example:
+ * [] call ace_mk6mortar_fnc_rangeTableOpen
+ *
+ * Public: No
+ */
+#include "script_component.hpp"
+
+#define LIST_CHARGE ((uiNamespace getVariable "ACE_82mm_RangeTable_Dialog") displayCtrl 1501)
+
+private ["_weaponName", "_magazines", "_initSpeed", "_fireModes", "_muzzleVelocities", "_showToPlayer", "_artilleryCharge"];
+
+_weaponName = "mortar_82mm"; //todo: work on other weapons
+
+createDialog "ACE_82mm_RangeTable_Dialog";
+if (isNull (uiNamespace getVariable ["ACE_82mm_RangeTable_Dialog", displayNull])) exitWith {ERROR("Dialog failed to open");};
+
+//Get Magazine Types
+_magazines = getArray (configFile >> "CfgWeapons" >> _weaponName >> "magazines");
+
+//For now just get settings from first mag, all rounds have same flight characteristics:
+if ((count _magazines) < 1) exitWith {ERROR("No Magazines for weapon");};
+_initSpeed = getNumber (configFile >> "CfgMagazines" >> (_magazines select 0) >> "initSpeed");
+
+//Get Charge Modes
+_fireModes = getArray (configFile >> "CfgWeapons" >> _weaponName >> "modes");
+
+_muzzleVelocities = [];
+{
+ _showToPlayer = getNumber (configFile >> "CfgWeapons" >> _weaponName >> _x >> "showToPlayer");
+ if (_showToPlayer == 1) then {
+ _artilleryCharge = getNumber (configFile >> "CfgWeapons" >> _weaponName >> _x >> "artilleryCharge");
+ LIST_CHARGE lbAdd format ["%1: %2", (localize "STR_ACE_MK6MORTAR_rangetable_charge"), (count _muzzleVelocities)];
+ LIST_CHARGE lbSetData [(count _muzzleVelocities), str (_artilleryCharge * _initSpeed)];
+ _muzzleVelocities pushBack _artilleryCharge;
+ };
+} forEach _fireModes;
+
+LIST_CHARGE lbSetCurSel 0;
diff --git a/addons/mk6mortar/functions/fnc_rangeTablePageChange.sqf b/addons/mk6mortar/functions/fnc_rangeTablePageChange.sqf
new file mode 100644
index 0000000000..c0cc40ccdc
--- /dev/null
+++ b/addons/mk6mortar/functions/fnc_rangeTablePageChange.sqf
@@ -0,0 +1,37 @@
+/*
+ * Author: PabstMirror
+ * Called when listbox selection changes. Updates the rangetable with new values.
+ *
+ * Arguments:
+ * No
+ *
+ * Return Value:
+ * No
+ *
+ * Example:
+ * [] call ace_mk6mortar_fnc_rangeTablePageChange
+ *
+ * Public: No
+ */
+#include "script_component.hpp"
+
+#define RANGE_TABLE ((uiNamespace getVariable "ACE_82mm_RangeTable_Dialog") displayCtrl 20001)
+#define LIST_CHARGE ((uiNamespace getVariable "ACE_82mm_RangeTable_Dialog") displayCtrl 1501)
+
+private ["_listBoxData", "_muzzleVelocity", "_airFriction", "_precalcArray"];
+
+_listBoxData = LIST_CHARGE lbData (lbCurSel LIST_CHARGE);
+if (isNil "_listBoxData" || {_listBoxData == ""}) exitWith {ERROR("lbCurSel out of bounds or no data");};
+_muzzleVelocity = parseNumber _listBoxData;
+
+_airFriction = if (GVAR(airResistanceEnabled)) then {MK6_82mm_AIR_FRICTION} else {0};
+
+_precalcArray = [_muzzleVelocity, _airFriction] call FUNC(rangeTablePreCalculatedValues);
+
+lnbClear RANGE_TABLE;
+{
+ RANGE_TABLE lnbAddRow _x;
+} forEach _precalcArray;
+
+//put dummy line at end because scrolling is fucked and can't see last line
+RANGE_TABLE lnbAddRow ["", "", "", "", "", "", "", "", "", "", ""];
diff --git a/addons/mk6mortar/functions/fnc_rangeTablePreCalculatedValues.sqf b/addons/mk6mortar/functions/fnc_rangeTablePreCalculatedValues.sqf
new file mode 100644
index 0000000000..d775b87365
--- /dev/null
+++ b/addons/mk6mortar/functions/fnc_rangeTablePreCalculatedValues.sqf
@@ -0,0 +1,271 @@
+/*
+ * Author: PabstMirror
+ * Simple Lookup Table for various muzzle velocities and air frictions.
+ * Use ace_mk6mortar_fnc_dev_buildTable to build
+ *
+ * Arguments:
+ * 0: Muzzle Velocity
+ * 1: Air Friction
+ *
+ * Return Value:
+ *
+ *
+ * Example:
+ * [200, 0] call ace_mk6mortar_fnc_rangeTablePreCalculatedValues
+ *
+ * Public: No
+ */
+#include "script_component.hpp"
+
+PARAMS_2(_muzzleVelocity,_airFriction);
+
+switch (true) do {
+
+case ((abs(_muzzleVelocity - 70) < 0.00001) && {(abs(_airFriction - -0.0001) < 0.00001)}): {
+ [
+ ["100","1493","9","1.4","14.0","3.7","0.4","-0.3","0.0","-0.0","-0.0","0.0"],
+ ["150","1438","14","1.4","13.9","2.5","0.4","-0.4","0.0","-0.0","-0.1","0.0"],
+ ["200","1381","20","1.4","13.8","1.9","0.5","-0.4","0.0","-0.0","-0.1","0.1"],
+ ["250","1321","27","1.5","13.6","1.5","0.5","-0.4","0.0","-0.0","-0.1","0.1"],
+ ["300","1256","36","1.6","13.3","1.3","0.6","-0.5","0.0","-0.1","-0.1","0.1"],
+ ["350","1183","49","1.7","12.9","1.1","0.6","-0.5","0.1","-0.1","-0.1","0.1"],
+ ["400","1097","70","1.9","12.4","0.9","0.6","-0.5","0.1","-0.1","-0.2","0.1"],
+ ["450","979","113","2.3","11.6","0.8","0.6","-0.5","0.1","-0.1","-0.2","0.2"]
+ ]
+ };
+case ((abs(_muzzleVelocity - 140) < 0.00001) && {(abs(_airFriction - -0.0001) < 0.00001)}): {
+ [
+ ["150","1556","1","0.8","27.2","16.3","2.5","-2.4","0.0","-0.0","-0.2","0.2"],
+ ["200","1541","1","0.8","27.2","12.3","2.5","-2.4","0.0","-0.0","-0.3","0.2"],
+ ["250","1527","2","0.8","27.2","9.9","2.6","-2.4","0.0","-0.0","-0.3","0.3"],
+ ["300","1512","2","0.8","27.2","8.3","2.7","-2.4","0.1","-0.0","-0.4","0.4"],
+ ["350","1497","3","0.8","27.1","7.1","2.7","-2.5","0.0","-0.1","-0.5","0.4"],
+ ["400","1482","3","0.8","27.1","6.2","2.7","-2.5","0.1","-0.1","-0.5","0.5"],
+ ["450","1467","3","0.8","27.0","5.6","2.8","-2.5","0.1","-0.1","-0.6","0.6"],
+ ["500","1451","4","0.8","27.0","5.0","2.9","-2.6","0.1","-0.1","-0.6","0.6"],
+ ["550","1436","4","0.8","26.9","4.6","2.9","-2.6","0.1","-0.1","-0.7","0.7"],
+ ["600","1420","5","0.8","26.8","4.2","3.0","-2.7","0.1","-0.1","-0.8","0.8"],
+ ["650","1404","5","0.8","26.8","3.9","3.0","-2.7","0.1","-0.1","-0.9","0.8"],
+ ["700","1388","6","0.8","26.7","3.6","3.1","-2.8","0.1","-0.1","-0.9","0.9"],
+ ["750","1372","6","0.8","26.6","3.4","3.2","-2.8","0.1","-0.1","-1.0","1.0"],
+ ["800","1355","7","0.8","26.5","3.2","3.2","-2.9","0.1","-0.1","-1.1","1.1"],
+ ["850","1338","8","0.8","26.4","3.0","3.3","-2.9","0.1","-0.1","-1.1","1.1"],
+ ["900","1321","8","0.8","26.2","2.8","3.4","-3.0","0.1","-0.1","-1.2","1.2"],
+ ["950","1303","9","0.9","26.1","2.7","3.4","-3.1","0.1","-0.2","-1.3","1.2"],
+ ["1000","1285","10","0.9","26.0","2.6","3.5","-3.1","0.2","-0.1","-1.4","1.3"],
+ ["1050","1266","11","0.9","25.8","2.4","3.5","-3.2","0.1","-0.2","-1.4","1.4"],
+ ["1100","1247","12","0.9","25.7","2.3","3.6","-3.3","0.1","-0.2","-1.5","1.4"],
+ ["1150","1228","13","0.9","25.5","2.2","3.7","-3.3","0.2","-0.2","-1.6","1.5"],
+ ["1200","1207","14","1.0","25.3","2.1","3.7","-3.4","0.2","-0.2","-1.7","1.6"],
+ ["1250","1186","15","1.0","25.1","2.0","3.8","-3.4","0.2","-0.2","-1.7","1.7"],
+ ["1300","1163","17","1.0","24.8","1.9","3.8","-3.5","0.2","-0.2","-1.8","1.7"],
+ ["1350","1140","19","1.0","24.6","1.9","3.9","-3.5","0.2","-0.2","-1.9","1.8"],
+ ["1400","1115","21","1.1","24.3","1.8","3.9","-3.6","0.2","-0.2","-1.9","1.9"],
+ ["1450","1088","24","1.1","23.9","1.7","4.0","-3.6","0.2","-0.2","-2.0","1.9"],
+ ["1500","1060","27","1.2","23.6","1.6","4.0","-3.7","0.2","-0.2","-2.1","2.0"],
+ ["1550","1028","32","1.3","23.1","1.5","4.0","-3.7","0.2","-0.2","-2.1","2.1"],
+ ["1600","991","38","1.4","22.6","1.5","4.0","-3.7","0.2","-0.2","-2.2","2.1"],
+ ["1650","947","49","1.7","21.9","1.4","4.0","-3.7","0.2","-0.3","-2.3","2.2"],
+ ["1700","888","71","2.1","21.0","1.3","3.9","-3.6","0.3","-0.3","-2.3","2.2"]
+ ]
+ };
+case ((abs(_muzzleVelocity - 200) < 0.00001) && {(abs(_airFriction - -0.0001) < 0.00001)}): {
+ [
+ ["250","1559","1","0.6","37.3","23.8","6.1","-5.9","0.0","-0.0","-0.6","0.5"],
+ ["300","1551","1","0.6","37.3","20.0","6.1","-5.9","0.1","-0.0","-0.7","0.7"],
+ ["350","1543","1","0.6","37.3","17.2","6.2","-5.9","0.0","-0.1","-0.8","0.7"],
+ ["400","1535","1","0.6","37.3","15.1","6.2","-5.9","0.1","-0.0","-0.9","0.9"],
+ ["450","1527","1","0.6","37.3","13.4","6.3","-6.0","0.1","-0.1","-1.0","1.0"],
+ ["500","1519","1","0.6","37.2","12.1","6.3","-6.0","0.1","-0.1","-1.1","1.1"],
+ ["550","1510","1","0.6","37.2","11.0","6.4","-6.0","0.1","-0.1","-1.3","1.2"],
+ ["600","1502","1","0.6","37.2","10.1","6.4","-6.1","0.1","-0.1","-1.4","1.3"],
+ ["650","1494","1","0.6","37.2","9.4","6.5","-6.1","0.1","-0.1","-1.5","1.4"],
+ ["700","1485","2","0.6","37.1","8.7","6.5","-6.2","0.1","-0.1","-1.6","1.5"],
+ ["750","1477","2","0.6","37.1","8.2","6.6","-6.2","0.1","-0.1","-1.7","1.6"],
+ ["800","1468","2","0.6","37.0","7.7","6.7","-6.3","0.1","-0.1","-1.8","1.8"],
+ ["850","1460","2","0.6","37.0","7.2","6.7","-6.3","0.1","-0.1","-2.0","1.9"],
+ ["900","1451","2","0.6","37.0","6.8","6.8","-6.4","0.1","-0.1","-2.1","2.0"],
+ ["950","1443","2","0.6","36.9","6.5","6.9","-6.4","0.1","-0.1","-2.2","2.1"],
+ ["1000","1434","2","0.6","36.9","6.2","6.9","-6.5","0.1","-0.1","-2.3","2.2"],
+ ["1050","1425","2","0.6","36.8","5.9","7.0","-6.6","0.1","-0.2","-2.5","2.3"],
+ ["1100","1417","3","0.6","36.8","5.6","7.1","-6.6","0.1","-0.2","-2.6","2.4"],
+ ["1150","1408","3","0.6","36.7","5.4","7.1","-6.7","0.2","-0.2","-2.7","2.5"],
+ ["1200","1399","3","0.6","36.6","5.2","7.2","-6.7","0.2","-0.2","-2.8","2.7"],
+ ["1250","1390","3","0.6","36.6","5.0","7.3","-6.8","0.2","-0.2","-2.9","2.8"],
+ ["1300","1381","3","0.6","36.5","4.8","7.4","-6.9","0.2","-0.2","-3.0","2.9"],
+ ["1350","1372","3","0.6","36.4","4.6","7.4","-6.9","0.2","-0.2","-3.2","3.0"],
+ ["1400","1362","4","0.6","36.4","4.4","7.5","-7.0","0.2","-0.2","-3.3","3.1"],
+ ["1450","1353","4","0.6","36.3","4.3","7.6","-7.1","0.2","-0.2","-3.4","3.2"],
+ ["1500","1344","4","0.6","36.2","4.2","7.7","-7.1","0.2","-0.2","-3.5","3.4"],
+ ["1550","1334","4","0.6","36.1","4.0","7.7","-7.2","0.2","-0.2","-3.7","3.5"],
+ ["1600","1324","4","0.6","36.0","3.9","7.8","-7.3","0.2","-0.2","-3.8","3.6"],
+ ["1650","1314","4","0.7","35.9","3.8","7.9","-7.3","0.2","-0.2","-3.9","3.7"],
+ ["1700","1304","5","0.7","35.8","3.7","7.9","-7.4","0.2","-0.2","-4.0","3.8"],
+ ["1750","1294","5","0.7","35.7","3.6","8.0","-7.5","0.2","-0.2","-4.2","3.9"],
+ ["1800","1284","5","0.7","35.6","3.5","8.1","-7.6","0.2","-0.3","-4.3","4.0"],
+ ["1850","1274","5","0.7","35.5","3.4","8.2","-7.6","0.2","-0.3","-4.4","4.2"],
+ ["1900","1263","6","0.7","35.4","3.3","8.2","-7.7","0.2","-0.3","-4.5","4.3"],
+ ["1950","1253","6","0.7","35.2","3.2","8.3","-7.8","0.2","-0.3","-4.7","4.4"],
+ ["2000","1242","6","0.7","35.1","3.1","8.4","-7.8","0.3","-0.3","-4.8","4.5"],
+ ["2050","1231","7","0.7","35.0","3.0","8.4","-7.9","0.3","-0.3","-4.9","4.7"],
+ ["2100","1219","7","0.7","34.8","2.9","8.5","-8.0","0.3","-0.3","-5.0","4.8"],
+ ["2150","1208","7","0.7","34.7","2.9","8.5","-8.0","0.3","-0.3","-5.2","4.9"],
+ ["2200","1196","8","0.7","34.5","2.8","8.6","-8.1","0.3","-0.3","-5.3","5.0"],
+ ["2250","1184","8","0.7","34.3","2.7","8.7","-8.2","0.3","-0.3","-5.4","5.1"],
+ ["2300","1171","9","0.8","34.2","2.7","8.7","-8.2","0.3","-0.3","-5.5","5.2"],
+ ["2350","1158","9","0.8","34.0","2.6","8.8","-8.3","0.3","-0.3","-5.7","5.4"],
+ ["2400","1145","10","0.8","33.8","2.5","8.8","-8.3","0.3","-0.3","-5.8","5.5"],
+ ["2450","1132","10","0.8","33.6","2.5","8.9","-8.4","0.3","-0.3","-5.9","5.6"],
+ ["2500","1118","11","0.8","33.3","2.4","8.9","-8.4","0.3","-0.3","-6.0","5.7"],
+ ["2550","1103","12","0.8","33.1","2.4","9.0","-8.5","0.3","-0.3","-6.1","5.8"],
+ ["2600","1088","13","0.9","32.8","2.3","9.0","-8.5","0.4","-0.3","-6.2","5.9"],
+ ["2650","1072","14","0.9","32.6","2.2","9.0","-8.6","0.4","-0.4","-6.4","6.0"],
+ ["2700","1056","15","0.9","32.3","2.2","9.0","-8.6","0.3","-0.4","-6.5","6.1"],
+ ["2750","1038","16","1.0","31.9","2.1","9.1","-8.6","0.4","-0.4","-6.6","6.3"],
+ ["2800","1020","18","1.0","31.6","2.1","9.1","-8.6","0.4","-0.4","-6.7","6.4"],
+ ["2850","1000","20","1.1","31.2","2.0","9.1","-8.6","0.4","-0.4","-6.8","6.5"],
+ ["2900","978","22","1.1","30.8","1.9","9.0","-8.6","0.4","-0.4","-6.9","6.5"],
+ ["2950","954","26","1.2","30.3","1.9","9.0","-8.6","0.4","-0.4","-7.0","6.6"],
+ ["3000","927","31","1.4","29.7","1.8","8.9","-8.5","0.4","-0.4","-7.1","6.7"],
+ ["3050","894","38","1.6","29.0","1.7","8.8","-8.4","0.4","-0.4","-7.2","6.8"],
+ ["3100","849","54","2.0","27.9","1.6","8.5","-8.3","0.4","-0.4","-7.2","6.8"]
+ ]
+ };
+case ((abs(_muzzleVelocity - 70) < 0.00001) && {(abs(_airFriction - 0) < 0.00001)}): {
+ [
+ ["100","1497","9","1.3","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["150","1445","14","1.3","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["200","1390","19","1.4","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["250","1333","26","1.4","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["300","1272","34","1.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["350","1204","45","1.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["400","1127","61","1.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["450","1028","91","2.1","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"]
+ ]
+ };
+case ((abs(_muzzleVelocity - 140) < 0.00001) && {(abs(_airFriction - 0) < 0.00001)}): {
+ [
+ ["150","1562","1","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["200","1549","1","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["250","1536","2","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["300","1523","2","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["350","1510","2","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["400","1497","3","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["450","1484","3","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["500","1471","3","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["550","1458","4","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["600","1445","4","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["650","1431","4","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["700","1418","5","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["750","1404","5","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["800","1390","6","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["850","1376","6","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["900","1362","6","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["950","1348","7","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["1000","1333","7","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["1050","1318","8","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["1100","1303","9","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["1150","1288","9","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["1200","1272","10","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["1250","1256","11","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["1300","1239","12","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["1350","1222","13","0.9","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["1400","1205","13","0.9","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["1450","1187","15","0.9","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["1500","1168","16","0.9","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["1550","1148","18","1.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["1600","1127","19","1.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["1650","1105","21","1.1","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["1700","1082","24","1.1","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["1750","1057","27","1.2","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["1800","1029","31","1.3","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["1850","997","37","1.4","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["1900","960","46","1.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["1950","912","63","1.9","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"]
+ ]
+ };
+case ((abs(_muzzleVelocity - 200) < 0.00001) && {(abs(_airFriction - 0) < 0.00001)}): {
+ [
+ ["300","1563","0","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["350","1556","1","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["400","1550","1","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["450","1544","1","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["500","1537","1","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["550","1531","1","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["600","1525","1","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["650","1519","1","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["700","1512","1","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["750","1506","1","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["800","1499","1","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["850","1493","1","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["900","1487","1","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["950","1480","1","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["1000","1474","2","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["1050","1467","2","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["1100","1461","2","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["1150","1454","2","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["1200","1448","2","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["1250","1441","2","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["1300","1435","2","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["1350","1428","2","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["1400","1422","2","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["1450","1415","2","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["1500","1408","2","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["1550","1402","3","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["1600","1395","3","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["1650","1388","3","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["1700","1381","3","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["1750","1374","3","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["1800","1367","3","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["1850","1360","3","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["1900","1353","3","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["1950","1346","4","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["2000","1339","4","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["2050","1332","4","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["2100","1325","4","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["2150","1317","4","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["2200","1310","4","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["2250","1302","4","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["2300","1295","5","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["2350","1287","5","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["2400","1280","5","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["2450","1272","5","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["2500","1264","5","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["2550","1256","5","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["2600","1248","6","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["2650","1240","6","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["2700","1232","6","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["2750","1223","6","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["2800","1215","7","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["2850","1206","7","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["2900","1197","7","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["2950","1188","7","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["3000","1179","8","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["3050","1170","8","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["3100","1160","8","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["3150","1151","9","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["3200","1141","9","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["3250","1131","10","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["3300","1120","10","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["3350","1109","11","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["3400","1098","11","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["3450","1087","12","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["3500","1075","13","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["3550","1062","14","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["3600","1049","15","0.9","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["3650","1036","16","0.9","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["3700","1021","17","0.9","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["3750","1006","19","1.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["3800","990","21","1.1","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["3850","971","24","1.1","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["3900","952","27","1.2","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["3950","929","32","1.4","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
+ ["4000","900","40","1.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"],
+ ["4050","861","56","2.1","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"]
+ ]
+ };
+ default {
+ ERROR("MuzzleVelocity not found in LUT");
+ []
+ };
+};
\ No newline at end of file
diff --git a/addons/mk6mortar/functions/fnc_toggleMils.sqf b/addons/mk6mortar/functions/fnc_toggleMils.sqf
new file mode 100644
index 0000000000..923a553f43
--- /dev/null
+++ b/addons/mk6mortar/functions/fnc_toggleMils.sqf
@@ -0,0 +1,24 @@
+/*
+ * Author: PabstMirror
+ * Toggles the mortart to show mils or degrees
+ *
+ * Arguments:
+ * 0: Vehicle
+ * 1: Player
+ *
+ * Return Value:
+ * No
+ *
+ * Example:
+ * [mortar,bob] call ace_mk6mortar_fnc_toggleMils;
+ *
+ * Public: No
+ */
+#include "script_component.hpp"
+
+PARAMS_2(_mortarVeh,_unit);
+
+private "_currentSetting";
+
+_currentSetting = _mortarVeh getVariable [QGVAR(useMils), true];
+_mortarVeh setVariable [QGVAR(useMils), (!_currentSetting)];
diff --git a/addons/mk6mortar/functions/fnc_turretDisplayLoaded.sqf b/addons/mk6mortar/functions/fnc_turretDisplayLoaded.sqf
new file mode 100644
index 0000000000..c81ff32132
--- /dev/null
+++ b/addons/mk6mortar/functions/fnc_turretDisplayLoaded.sqf
@@ -0,0 +1,67 @@
+/*
+ * Author: PabstMirror
+ * Called when the mk6's in game UI is loaded. Hides rangefinder data if it is disabled.
+ *
+ * Arguments:
+ * None
+ *
+ * Return Value:
+ * None
+ *
+ * Example:
+ * [] call ace_mk6mortar_fnc_turretDisplayLoaded
+ *
+ * Public: No
+ */
+#include "script_component.hpp"
+
+#define CTRL_CA_OPTICSPITCH (configFile >> "RscInGameUI" >> "ACE_Mk6_RscWeaponRangeArtillery" >> "CA_IGUI_elements_group" >> "controls" >> "CA_OPTICSPITCH")
+#define CTRL_CA_OPTICSZOOM (configFile >> "RscInGameUI" >> "ACE_Mk6_RscWeaponRangeArtillery" >> "CA_IGUI_elements_group" >> "controls" >> "CA_OPTICSZOOM")
+#define CTRL_CA_SOLUTION_TEXT (configFile >> "RscInGameUI" >> "ACE_Mk6_RscWeaponRangeArtillery" >> "CA_IGUI_elements_group" >> "controls" >> "CA_SOLUTION_TEXT")
+#define CTRL_CA_DISTANCE_TEXT (configFile >> "RscInGameUI" >> "ACE_Mk6_RscWeaponRangeArtillery" >> "CA_IGUI_elements_group" >> "controls" >> "CA_DISTANCE_TEXT")
+#define CTRL_CA_DISTANCE (configFile >> "RscInGameUI" >> "ACE_Mk6_RscWeaponRangeArtillery" >> "CA_IGUI_elements_group" >> "controls" >> "CA_DISTANCE")
+#define CTRL_CA_TIME_TEXT (configFile >> "RscInGameUI" >> "ACE_Mk6_RscWeaponRangeArtillery" >> "CA_IGUI_elements_group" >> "controls" >> "CA_TIME_TEXT")
+#define CTRL_CA_TIME (configFile >> "RscInGameUI" >> "ACE_Mk6_RscWeaponRangeArtillery" >> "CA_IGUI_elements_group" >> "controls" >> "CA_TIME")
+#define CTRL_CA_ELEV_NEED_TEXT (configFile >> "RscInGameUI" >> "ACE_Mk6_RscWeaponRangeArtillery" >> "CA_IGUI_elements_group" >> "controls" >> "CA_ELEV_NEED_TEXT")
+#define CTRL_CA_RANGEELEMENTS_GROUP (configFile >> "RscInGameUI" >> "ACE_Mk6_RscWeaponRangeArtillery" >> "CA_RangeElements_group")
+
+#define CTRL_CA_HEADING (configFile >> "RscInGameUI" >> "ACE_Mk6_RscWeaponRangeArtillery" >> "CA_IGUI_elements_group" >> "controls" >> "CA_Heading")
+#define CTRL_CA_ELEV (configFile >> "RscInGameUI" >> "ACE_Mk6_RscWeaponRangeArtillery" >> "CA_IGUI_elements_group" >> "controls" >> "CA_ELEV")
+#define CTRL_CA_ELEV_NEED (configFile >> "RscInGameUI" >> "ACE_Mk6_RscWeaponRangeArtillery" >> "CA_IGUI_elements_group" >> "controls" >> "CA_ELEV_NEED")
+
+private ["_display", "_fnc_hideControl"];
+
+disableSerialization;
+
+_display = uiNamespace getVariable ["ACE_Mk6_RscWeaponRangeArtillery", displayNull];
+if (isNull _display) exitWith {};
+
+_fnc_hideControl = {
+ private "_idc";
+ PARAMS_2(_path,_hideCtrl);
+ _idc = getNumber (_path >> "IDC");
+ _pos = [];
+ if (_hideCtrl) then {
+ _pos = [-9,-9,0,0];
+ } else {
+ {
+ if (isNumber (_path >> _x)) then {
+ _pos pushBack (getNumber (_path >> _x));
+ } else {
+ _pos pushBack (call compile (getText (_path >> _x)));
+ };
+ } forEach ["x", "y", "w", "h"];
+ };
+ (_display displayCtrl _idc) ctrlSetPosition _pos;
+ (_display displayCtrl _idc) ctrlCommit 0;
+};
+
+{
+ [_x, (!GVAR(allowComputerRangefinder))] call _fnc_hideControl;
+} forEach [CTRL_CA_OPTICSPITCH, CTRL_CA_OPTICSZOOM, CTRL_CA_SOLUTION_TEXT, CTRL_CA_DISTANCE_TEXT, CTRL_CA_DISTANCE, CTRL_CA_TIME_TEXT, CTRL_CA_TIME, CTRL_CA_ELEV_NEED_TEXT, CTRL_CA_RANGEELEMENTS_GROUP];
+
+//Always hide these, handled by the mil convertions PFEH in handlePlayerVehChanged
+[CTRL_CA_HEADING, true] call _fnc_hideControl;
+[CTRL_CA_ELEV, true] call _fnc_hideControl;
+[CTRL_CA_ELEV_NEED, true] call _fnc_hideControl;
+
diff --git a/addons/mk6mortar/functions/script_component.hpp b/addons/mk6mortar/functions/script_component.hpp
new file mode 100644
index 0000000000..9980d4fc88
--- /dev/null
+++ b/addons/mk6mortar/functions/script_component.hpp
@@ -0,0 +1 @@
+#include "\z\ace\addons\mk6mortar\script_component.hpp"
\ No newline at end of file
diff --git a/addons/mk6mortar/script_component.hpp b/addons/mk6mortar/script_component.hpp
new file mode 100644
index 0000000000..cb74d552de
--- /dev/null
+++ b/addons/mk6mortar/script_component.hpp
@@ -0,0 +1,14 @@
+#define COMPONENT mk6mortar
+#include "\z\ace\Addons\main\script_mod.hpp"
+
+#ifdef DEBUG_ENABLED_MK6MORTAR
+ #define DEBUG_MODE_FULL
+#endif
+
+#ifdef DEBUG_SETTINGS_MK6MORTAR
+ #define DEBUG_SETTINGS DEBUG_SETTINGS_MK6MORTAR
+#endif
+
+#include "\z\ace\Addons\main\script_macros.hpp"
+
+#define MK6_82mm_AIR_FRICTION -0.0001
\ No newline at end of file
diff --git a/addons/mk6mortar/stringtable.xml b/addons/mk6mortar/stringtable.xml
new file mode 100644
index 0000000000..da61afb03b
--- /dev/null
+++ b/addons/mk6mortar/stringtable.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+ 82mm Rangetable
+
+
+ Range Table for the MK6 82mm Mortar
+
+
+ Open 82mm Rangetable
+
+
+ Charge
+
+
+
\ No newline at end of file
diff --git a/addons/modules/XEH_preInit.sqf b/addons/modules/XEH_preInit.sqf
index a8b9bd061e..dfbbe2c2b9 100644
--- a/addons/modules/XEH_preInit.sqf
+++ b/addons/modules/XEH_preInit.sqf
@@ -3,6 +3,8 @@
ADDON = false;
PREP(moduleInit);
+PREP(bi_moduleProjectile);
+
GVAR(moduleInitCollection) = [];
ADDON = true;
diff --git a/addons/modules/config.cpp b/addons/modules/config.cpp
index bffcec4faf..4fc3b8b60d 100644
--- a/addons/modules/config.cpp
+++ b/addons/modules/config.cpp
@@ -23,6 +23,9 @@ class CfgVehicles {
init = QUOTE(_this call DFUNC(moduleInit));
};
};
+ class ModuleOrdnance_F: Module_F {
+ function = "ace_modules_fnc_bi_moduleProjectile";
+ };
};
#include "CfgEventHandlers.hpp"
diff --git a/addons/modules/functions/fnc_bi_moduleProjectile.sqf b/addons/modules/functions/fnc_bi_moduleProjectile.sqf
new file mode 100644
index 0000000000..56e3eb9883
--- /dev/null
+++ b/addons/modules/functions/fnc_bi_moduleProjectile.sqf
@@ -0,0 +1,191 @@
+/*
+ * Author: Bohemia Interactive
+ * Module function for spawning projectiles
+ * Used by Curator artillery modules etc
+ *
+ * Arguments:
+ * 0: The logic object
+ *
+ * Return Value:
+ * nil
+ *
+ * Public: No
+ */
+
+_fnc_scriptNameParentTemp = if !(isnil '_fnc_scriptName') then {_fnc_scriptName} else {'BIS_fnc_moduleProjectile'};
+private ['_fnc_scriptNameParent'];
+_fnc_scriptNameParent = _fnc_scriptNameParentTemp;
+_fnc_scriptNameParentTemp = nil;
+
+private ['_fnc_scriptName'];
+_fnc_scriptName = 'BIS_fnc_moduleProjectile';
+scriptname _fnc_scriptName;
+
+private ["_logic", "_units", "_activated"];
+_logic = _this select 0;
+_units = _this select 1;
+_activated = _this select 2;
+
+if ({local _x} count (objectcurators _logic) > 0) then {
+ //--- Reveal the circle to curators
+ _logic hideobject false;
+ _logic setpos position _logic;
+};
+if !(isserver) exitwith {};
+
+if (_activated) then {
+ _ammo = _logic getvariable ["type",gettext (configfile >> "cfgvehicles" >> typeof _logic >> "ammo")];
+ if (_ammo != "") then {
+ _cfgAmmo = configfile >> "cfgammo" >> _ammo;
+ //if !(isclass _cfgAmmo) exitwith {["CfgAmmo class '%1' not found.",_ammo] call bis_fnc_error;};
+ _dirVar = _fnc_scriptname + typeof _logic;
+ _logic setdir (missionnamespace getvariable [_dirVar,direction _logic]); //--- Restore custom direction
+ _pos = getposatl _logic;
+ _posAmmo = +_pos;
+ _posAmmo set [2,0];
+ _dir = direction _logic;
+ _simulation = tolower gettext (configfile >> "cfgammo" >> _ammo >> "simulation");
+ _altitude = 0;
+ _velocity = [];
+ _attach = false;
+ _radio = "";
+ _delay = 60;
+ _sound = "";
+ _soundSourceClass = "";
+ _hint = [];
+ _shakeStrength = 0;
+ _shakeRadius = 0;
+ switch (_simulation) do {
+ case "shotshell": {
+ _altitude = 1000;
+ _velocity = [0,0,-100];
+ _radio = "SentGenIncoming";
+ _sounds = if (getnumber (_cfgAmmo >> "hit") < 200) then {["mortar1","mortar2"]} else {["shell1","shell2","shell3","shell4"]};
+ _sound = _sounds call bis_fnc_selectrandom;
+ _hint = ["Curator","PlaceOrdnance"];
+ _shakeStrength = 0.01;
+ _shakeRadius = 300;
+ };
+ case "shotsubmunitions": {
+ _posAmmo = [_posAmmo,500,_dir + 180] call bis_fnc_relpos;
+ _altitude = 1000 - ((getterrainheightasl _posAmmo) - (getterrainheightasl _pos));
+ _posAmmo set [2,_altitude];
+ _velocity = [sin _dir * 68,cos _dir * 68,-100];
+ _radio = "SentGenIncoming";
+ _hint = ["Curator","PlaceOrdnance"];
+ _shakeStrength = 0.02;
+ _shakeRadius = 500;
+ };
+ case "shotilluminating": {
+ _altitude = 66;
+ _velocity = [wind select 0,wind select 1,30];
+ _sound = "SN_Flare_Fired_4";
+ _soundSourceClass = "SoundFlareLoop_F";
+ };
+ case "shotnvgmarker";
+ case "shotsmokex": {
+ _altitude = 0;
+ _velocity = [0,0,0];
+ _attach = true;
+ };
+ default {["Ammo simulation '%1' is not supported",_simulation] call bis_fnc_error;};
+ };
+ _fnc_playRadio = {
+ if (_radio != "") then {
+ _entities = (getposatl _logic) nearentities ["All",100];
+ _sides = [];
+ {
+ if (isplayer _x) then {
+ _side = side group _x;
+ if (_side in [east,west,resistance,civilian]) then {
+ //--- Play radio (only if it wasn't played recently)
+ if (time > _x getvariable ["BIS_fnc_moduleProjectile_radio",-_delay]) then {
+ [[_side,_radio,"side"],"bis_fnc_sayMessage",_x] call bis_fnc_mp;
+ _x setvariable ["BIS_fnc_moduleProjectile_radio",time + _delay];
+ };
+ };
+ };
+ } foreach _entities;
+ };
+ };
+ if (count _hint > 0) then {
+ [[_hint,nil,nil,nil,nil,nil,nil,true],"bis_fnc_advHint",objectcurators _logic] call bis_fnc_mp;
+ };
+ if (count _velocity == 3) then {
+ _altitude = (_logic getvariable ["altitude",_altitude]) call bis_fnc_parsenumber;
+ _radio = _logic getvariable ["radio",_radio];
+
+ //--- Create projectile
+ _posAmmo set [2,_altitude];
+ _projectile = createvehicle [_ammo,_posAmmo,[],0,"none"];
+ _projectile setpos _posAmmo;
+ _projectile setvelocity _velocity;
+ if (_attach) then {_projectile attachto [_logic,[0,0,_altitude]];};
+
+ // This is our addition to this function
+ if (!isnil "ace_frag_fnc_addManualTrack") then {
+ [_projectile] call ace_frag_fnc_addManualTrack
+ };
+
+ //--- Play sound
+ if (_sound != "") then {[[_logic,_sound,"say3D"],"bis_fnc_sayMessage"] call bis_fnc_mp;};
+
+ //--- Create sound source
+ _soundSource = if (_soundSourceClass != "") then {createSoundSource [_soundSourceClass,_pos,[],0]} else {objnull};
+
+ //--- Play radio warning
+ [] call _fnc_playRadio;
+
+ //--- Update
+ if (_attach) then {
+ waituntil {
+ _soundSource setposatl getposatl _projectile;
+ sleep 1;
+ isnull _projectile || isnull _logic
+ };
+ } else {
+ waituntil {
+ _soundSource setposatl getposatl _projectile;
+
+ if (getposatl _logic distance _pos > 0 || direction _logic != _dir) then {
+ _posNew = getposasl _logic;
+ _dirDiff = direction _logic - _dir;
+ _posNew = [_posNew,[getposasl _projectile,_pos] call bis_fnc_distance2d,direction _logic + 180] call bis_fnc_relpos;
+ _posNew set [2,getposasl _projectile select 2];
+ _projectile setvelocity ([velocity _projectile,-_dirDiff] call bis_fnc_rotatevector2d);
+ _projectile setposasl _posNew;
+ _pos = getposatl _logic;
+ _dir = direction _logic;
+ missionnamespace setvariable [_dirVar,_dir];
+ };
+ sleep 0.1;
+ isnull _projectile || isnull _logic
+ };
+ };
+ deletevehicle _projectile;
+ deletevehicle _soundSource;
+ if (count objectcurators _logic > 0) then {
+
+ //--- Delete curator spawned logic
+ if (_shakeStrength > 0) then {
+ if (_simulation == "shotsubmunitions") then {sleep 0.5;};
+ [[_shakeStrength,0.7,[position _logic,_shakeRadius]],"bis_fnc_shakeCuratorCamera"] call bis_fnc_mp;
+ };
+ deletevehicle _logic;
+ } else {
+
+ //--- Repeat to achieve permanent effect
+ _repeat = _logic getvariable ["repeat",0] > 0;
+ if (_repeat) then {
+ [_logic,_units,_activated] call bis_fnc_moduleprojectile;
+ } else {
+ deletevehicle _logic;
+ };
+ };
+ } else {
+ deletevehicle _logic;
+ };
+ } else {
+ ["Cannot create projectile, 'ammo' config attribute is missing in %1",typeof _logic] call bis_fnc_error;
+ };
+};
diff --git a/addons/realisticnames/stringtable.xml b/addons/realisticnames/stringtable.xml
index fd63a74c41..02995def8c 100644
--- a/addons/realisticnames/stringtable.xml
+++ b/addons/realisticnames/stringtable.xml
@@ -519,7 +519,7 @@
Punisher (GMG)
Punisher (GMW)
Punisher (GMG)
- Punisher (CKM)
+ Punisher (GMG)
Punisher (granátomet)
Punisher (GMG)
Kаратель (Гранатомет)
@@ -1135,7 +1135,7 @@
Mini-Spike (AT)
Mini-Spike (PALR)
Mini-Spike (PT)
- Mini-Spike (AA)
+ Mini-Spike (AT)
Mini-Spike (AT)
Mini-Spike (Tankelhárító)
Mini-Spike (AT)
diff --git a/addons/weather/CfgEventhandlers.hpp b/addons/weather/CfgEventhandlers.hpp
index c3f1f2ba0b..842ad8e7bf 100644
--- a/addons/weather/CfgEventhandlers.hpp
+++ b/addons/weather/CfgEventhandlers.hpp
@@ -1,6 +1,5 @@
class Extended_PreInit_EventHandlers {
class ADDON {
- clientInit = QUOTE(call COMPILE_FILE(XEH_preClientInit));
init = QUOTE(call COMPILE_FILE(XEH_preInit));
};
};
diff --git a/addons/weather/CfgWorlds.hpp b/addons/weather/CfgWorlds.hpp
index ed932654f7..1391468fd9 100644
--- a/addons/weather/CfgWorlds.hpp
+++ b/addons/weather/CfgWorlds.hpp
@@ -7,6 +7,22 @@ class CfgWorlds {
ACE_TempNight[] = {4, 4, 6, 8, 13, 17, 20, 20, 16, 12, 8, 6};
// Source: http://www.weather-and-climate.com/average-monthly-Humidity-perc,Limnos,Greece
ACE_Humidity[] = {78, 77, 78, 74, 71, 60, 59, 61, 65, 72, 79, 80};
+ // Source: https://weatherspark.com/averages/32194/Lemnos-Limnos-North-Aegean-Islands-Greece
+ ACE_WindSpeedMax[] = {{8.8, 5.5}, {8.8, 5}, {8.6, 4.8}, {7.6, 3.4}, {7.0, 3.0}, {7.1, 3.0}, {7.5, 3.1}, {8.0, 3.2}, {7.6, 3.5}, {7.8, 4.6}, {7.9, 5.0}, {8.2, 5.5}};
+ ACE_WindSpeedMean[] = {4.8, 4.9, 4.6, 4.1, 3.5, 3.5, 4.3, 4.4, 4.1, 4.5, 4.5, 5.0};
+ ACE_WindSpeedMin[] = {{0.2, 5.0}, {0.1, 5.0}, {0.2, 4.3}, {0.0, 3.0}, {0.0, 2.1}, {0.0, 2.0}, {0.1, 3.1}, {0.3, 3.1}, {0.0, 3.6}, {0.0, 4.2}, {0.1, 5.0}, {0.2, 5.5}};
+ ACE_WindDirectionProbabilities[] = {{0.06, 0.32, 0.05, 0.04, 0.15, 0.06, 0.02, 0.02}, // January
+ {0.08, 0.32, 0.04, 0.04, 0.18, 0.06, 0.02, 0.02}, // February
+ {0.09, 0.30, 0.04, 0.04, 0.20, 0.06, 0.02, 0.03}, // March
+ {0.10, 0.25, 0.03, 0.04, 0.22, 0.06, 0.02, 0.04}, // April
+ {0.18, 0.25, 0.03, 0.04, 0.18, 0.04, 0.01, 0.05}, // May
+ {0.25, 0.25, 0.03, 0.03, 0.15, 0.03, 0.00, 0.08}, // June
+ {0.32, 0.30, 0.02, 0.02, 0.10, 0.01, 0.00, 0.09}, // July
+ {0.28, 0.35, 0.02, 0.01, 0.08, 0.01, 0.00, 0.08}, // August
+ {0.20, 0.37, 0.03, 0.01, 0.11, 0.01, 0.01, 0.05}, // September
+ {0.10, 0.39, 0.04, 0.02, 0.15, 0.02, 0.01, 0.03}, // October
+ {0.08, 0.38, 0.06, 0.04, 0.19, 0.03, 0.02, 0.02}, // November
+ {0.06, 0.37, 0.05, 0.03, 0.18, 0.04, 0.02, 0.02}};// December
};
class Altis: CAWorld {
@@ -15,5 +31,21 @@ class CfgWorlds {
ACE_TempNight[] = {4, 4, 6, 8, 13, 17, 20, 20, 16, 12, 8, 6};
// Source: http://www.weather-and-climate.com/average-monthly-Humidity-perc,Limnos,Greece
ACE_Humidity[] = {78, 77, 78, 74, 71, 60, 59, 61, 65, 72, 79, 80};
+ // Source: https://weatherspark.com/averages/32194/Lemnos-Limnos-North-Aegean-Islands-Greece
+ ACE_WindSpeedMax[] = {{8.8, 5.5}, {8.8, 5}, {8.6, 4.8}, {7.6, 3.4}, {7.0, 3.0}, {7.1, 3.0}, {7.5, 3.1}, {8.0, 3.2}, {7.6, 3.5}, {7.8, 4.6}, {7.9, 5.0}, {8.2, 5.5}};
+ ACE_WindSpeedMean[] = {4.8, 4.9, 4.6, 4.1, 3.5, 3.5, 4.3, 4.4, 4.1, 4.5, 4.5, 5.0};
+ ACE_WindSpeedMin[] = {{0.2, 5.0}, {0.1, 5.0}, {0.2, 4.3}, {0.0, 3.0}, {0.0, 2.1}, {0.0, 2.0}, {0.1, 3.1}, {0.3, 3.1}, {0.0, 3.6}, {0.0, 4.2}, {0.1, 5.0}, {0.2, 5.5}};
+ ACE_WindDirectionProbabilities[] = {{0.06, 0.32, 0.05, 0.04, 0.15, 0.06, 0.02, 0.02}, // January
+ {0.08, 0.32, 0.04, 0.04, 0.18, 0.06, 0.02, 0.02}, // February
+ {0.09, 0.30, 0.04, 0.04, 0.20, 0.06, 0.02, 0.03}, // March
+ {0.10, 0.25, 0.03, 0.04, 0.22, 0.06, 0.02, 0.04}, // April
+ {0.18, 0.25, 0.03, 0.04, 0.18, 0.04, 0.01, 0.05}, // May
+ {0.25, 0.25, 0.03, 0.03, 0.15, 0.03, 0.00, 0.08}, // June
+ {0.32, 0.30, 0.02, 0.02, 0.10, 0.01, 0.00, 0.09}, // July
+ {0.28, 0.35, 0.02, 0.01, 0.08, 0.01, 0.00, 0.08}, // August
+ {0.20, 0.37, 0.03, 0.01, 0.11, 0.01, 0.01, 0.05}, // September
+ {0.10, 0.39, 0.04, 0.02, 0.15, 0.02, 0.01, 0.03}, // October
+ {0.08, 0.38, 0.06, 0.04, 0.19, 0.03, 0.02, 0.02}, // November
+ {0.06, 0.37, 0.05, 0.03, 0.18, 0.04, 0.02, 0.02}};// December
};
-};
+};
\ No newline at end of file
diff --git a/addons/weather/XEH_postInit.sqf b/addons/weather/XEH_postInit.sqf
index e40a061aaf..1427ff59b1 100644
--- a/addons/weather/XEH_postInit.sqf
+++ b/addons/weather/XEH_postInit.sqf
@@ -1,43 +1,27 @@
#include "script_component.hpp"
-// Rain variables
-GVAR(enableRain) = true;
-GVAR(rain_next_period) = -1;
-GVAR(rain_period_count) = 0;
-GVAR(rain_initial_rain) = 0;
-if(overcast >= 0.7) then {
- GVAR(rain_initial_rain) = (random ((overcast-0.7)/0.3));
-};
-GVAR(current_rain) = GVAR(rain_initial_rain);
-GVAR(rain_current_range) = -1+(random 2);
-GVAR(overcast_multiplier) = 1;
+// Randomization
+GVAR(temperatureShift) = 3 - random 6;
+GVAR(badWeatherShift) = (random 1) ^ 2 * 10;
+GVAR(humidityShift) = (5 - random 10) / 100;
-// Wind Variables
-ACE_wind = [0, 0, 0];
-GVAR(wind_initial_dir) = (random 360);
-GVAR(wind_initial_speed) = (overcast*5)+(random (overcast*5)) max 1;
-GVAR(wind_mean_speed) = GVAR(wind_initial_speed);
-GVAR(wind_mean_dir) = GVAR(wind_initial_dir);
-GVAR(wind_current_speed) = GVAR(wind_initial_speed);
-GVAR(wind_current_dir) = GVAR(wind_initial_dir);
-GVAR(wind_current_range_speed) = -1+(random 2);
-GVAR(wind_current_range_dir) = -1+(random 2);
-GVAR(wind_next_period) = -1; //ceil((2+random(5))/(GVAR(overcast_multiplier)/10));
-GVAR(wind_next_major_period) = -1;
-GVAR(wind_period_count) = 0;
-GVAR(wind_major_period_count) = 0;
-GVAR(wind_total_time) = 0;
GVAR(wind_period_start_time) = time;
-
-call FUNC(getMapData);
+GVAR(rain_period_start_time) = time;
"ACE_WIND_PARAMS" addPublicVariableEventHandler { GVAR(wind_period_start_time) = time; };
"ACE_RAIN_PARAMS" addPublicVariableEventHandler { GVAR(rain_period_start_time) = time; };
"ACE_MISC_PARAMS" addPublicVariableEventHandler {
- if !(isServer) then {
- 30 setLightnings (ACE_MISC_PARAMS select 0);
- 30 setRainbow (ACE_MISC_PARAMS select 1);
- 30 setFog (ACE_MISC_PARAMS select 2);
+ if (!isServer) then {
+ if (GVAR(syncMisc)) then {
+ 30 setLightnings (ACE_MISC_PARAMS select 0);
+ 30 setRainbow (ACE_MISC_PARAMS select 1);
+ 30 setFog (ACE_MISC_PARAMS select 2);
+ };
+ GVAR(temperatureShift) = (ACE_MISC_PARAMS select 3);
+ GVAR(badWeatherShift) = (ACE_MISC_PARAMS select 4);
+ GVAR(humidityShift) = (ACE_MISC_PARAMS select 5);
+ call FUNC(updateTemperature);
+ call FUNC(updateHumidity);
};
};
diff --git a/addons/weather/XEH_postServerInit.sqf b/addons/weather/XEH_postServerInit.sqf
index cfe35e6009..076b538806 100644
--- a/addons/weather/XEH_postServerInit.sqf
+++ b/addons/weather/XEH_postServerInit.sqf
@@ -1,3 +1,15 @@
#include "script_component.hpp"
-[FUNC(serverController), 60] call cba_fnc_addPerFrameHandler;
+// Rain
+GVAR(rain_next_period) = -1;
+GVAR(rain_period_count) = 0;
+GVAR(current_rain) = 0;
+GVAR(rain_current_range) = -1+(random 2);
+
+// Wind
+call FUNC(initWind);
+
+GVAR(overcast_multiplier) = 1;
+GVAR(serverUpdateInterval) = 60;
+
+[FUNC(serverController), GVAR(serverUpdateInterval)] call cba_fnc_addPerFrameHandler;
diff --git a/addons/weather/XEH_preClientInit.sqf b/addons/weather/XEH_preClientInit.sqf
deleted file mode 100644
index b979521cdd..0000000000
--- a/addons/weather/XEH_preClientInit.sqf
+++ /dev/null
@@ -1,17 +0,0 @@
-#include "script_component.hpp"
-
-
-FUNC(KEEPTIME) = {
- if((count GVAR(WINDSPEED)) > 0) then {
- private ["_wind", "_p", "_str"];
- _wind = ACE_wind;
-
- _p = _wind call CBA_fnc_vect2polar;
- _str = format["Wind: %1 at %2m/s (%3MPH)\n%4", floor(_p select 1), floor(_p select 0), floor((_p select 0)*2.23693629), GVAR(WINDSPEED)];
- TRACE_2("Wind",_wind,_str);
- };
-};
-
-#ifdef DEBUG_MODE_FULL
- [FUNC(KEEPTIME), 0.0, []] call CBA_fnc_addPerFrameHandler;
-#endif
diff --git a/addons/weather/XEH_preInit.sqf b/addons/weather/XEH_preInit.sqf
index ee05983a69..401ae155c1 100644
--- a/addons/weather/XEH_preInit.sqf
+++ b/addons/weather/XEH_preInit.sqf
@@ -8,10 +8,22 @@ PREP(calculateBarometricPressure);
PREP(displayWindInfo);
PREP(getMapData);
PREP(getWind);
+PREP(initWind);
PREP(serverController);
PREP(updateHumidity);
PREP(updateRain);
PREP(updateTemperature);
PREP(updateWind);
+// Control server side weather propagation
+GVAR(enableServerController) = true;
+
+// Control client side weather effects
+GVAR(syncRain) = true;
+GVAR(syncWind) = true; // Wind, Gusts, Waves
+GVAR(syncMisc) = true; // Lightnings, Rainbow, Fog
+
+// Make sure this data is read before client/server postInit
+call FUNC(getMapData);
+
ADDON = true;
diff --git a/addons/weather/functions/fnc_displayWindInfo.sqf b/addons/weather/functions/fnc_displayWindInfo.sqf
index 58d728bf67..7996503719 100644
--- a/addons/weather/functions/fnc_displayWindInfo.sqf
+++ b/addons/weather/functions/fnc_displayWindInfo.sqf
@@ -28,7 +28,7 @@ EGVAR(advanced_ballistics,Protractor) = false;
GVAR(WindInfo) = true;
[{
- private ["_windSpeed", "_windDir", "_playerDir", "_windIndex", "_windColor", "_newWindSpeed", "_windSource", "_height"];
+ private ["_windSpeed", "_windDir", "_playerDir", "_windIndex", "_windColor"];
if !(GVAR(WindInfo) && !(underwater ACE_player) && vehicle ACE_player == ACE_player) exitWith {
GVAR(WindInfo) = false;
diff --git a/addons/weather/functions/fnc_getMapData.sqf b/addons/weather/functions/fnc_getMapData.sqf
index cb0a961c21..f2527d1157 100644
--- a/addons/weather/functions/fnc_getMapData.sqf
+++ b/addons/weather/functions/fnc_getMapData.sqf
@@ -35,6 +35,32 @@ if (worldName in ["Thirsk"]) then { GVAR(Latitude) = 65; GVAR(Altitude) = 0; };
if (worldName in ["lingor"]) then { GVAR(Latitude) = -4; GVAR(Altitude) = 0; };
if (worldName in ["Panthera3"]) then { GVAR(Latitude) = 46; GVAR(Altitude) = 0; };
+// Assume default wind values
+// Source: https://weatherspark.com/averages/32194/Lemnos-Limnos-North-Aegean-Islands-Greece
+GVAR(WindSpeedMax) = [[8.8, 5.5], [8.8, 5], [8.6, 4.8], [7.6, 3.4], [7.0, 3.0], [7.1, 3.0], [7.5, 3.1], [8.0, 3.2], [7.6, 3.5], [7.8, 4.6], [7.9, 5.0], [8.2, 5.5]];
+GVAR(WindSpeedMean) = [4.8, 4.9, 4.6, 4.1, 3.5, 3.5, 4.3, 4.4, 4.1, 4.5, 4.5, 5.0];
+GVAR(WindSpeedMin) = [[0.2, 5.0], [0.1, 5.0], [0.2, 4.3], [0.0, 3.0], [0.0, 2.1], [0.0, 2.0], [0.1, 3.1], [0.3, 3.1], [0.0, 3.6], [0.0, 4.2], [0.1, 5.0], [0.2, 5.5]];
+GVAR(WindDirectionProbabilities) = [[0.06, 0.32, 0.05, 0.04, 0.15, 0.06, 0.02, 0.02], // January
+ [0.08, 0.32, 0.04, 0.04, 0.18, 0.06, 0.02, 0.02], // February
+ [0.09, 0.30, 0.04, 0.04, 0.20, 0.06, 0.02, 0.03], // March
+ [0.10, 0.25, 0.03, 0.04, 0.22, 0.06, 0.02, 0.04], // April
+ [0.18, 0.25, 0.03, 0.04, 0.18, 0.04, 0.01, 0.05], // May
+ [0.25, 0.25, 0.03, 0.03, 0.15, 0.03, 0.00, 0.08], // June
+ [0.32, 0.30, 0.02, 0.02, 0.10, 0.01, 0.00, 0.09], // July
+ [0.28, 0.35, 0.02, 0.01, 0.08, 0.01, 0.00, 0.08], // August
+ [0.20, 0.37, 0.03, 0.01, 0.11, 0.01, 0.01, 0.05], // September
+ [0.10, 0.39, 0.04, 0.02, 0.15, 0.02, 0.01, 0.03], // October
+ [0.08, 0.38, 0.06, 0.04, 0.19, 0.03, 0.02, 0.02], // November
+ [0.06, 0.37, 0.05, 0.03, 0.18, 0.04, 0.02, 0.02]];// December
+
+// Check if the wind data is defined in the map config
+if (isArray (configFile >> "CfgWorlds" >> worldName >> "ACE_WindSpeedMean")) then {
+ GVAR(WindSpeedMin) = getArray (configFile >> "CfgWorlds" >> worldName >> "ACE_WindSpeedMin");
+ GVAR(WindSpeedMean) = getArray (configFile >> "CfgWorlds" >> worldName >> "ACE_WindSpeedMean");
+ GVAR(WindSpeedMax) = getArray (configFile >> "CfgWorlds" >> worldName >> "ACE_WindSpeedMax");
+ GVAR(WindDirectionProbabilities) = getArray (configFile >> "CfgWorlds" >> worldName >> "ACE_WindDirectionProbabilities");
+};
+
// Check if the weather data is defined in the map config
if (isArray (configFile >> "CfgWorlds" >> worldName >> "ACE_TempDay")) exitWith {
GVAR(TempDay) = getArray (configFile >> "CfgWorlds" >> worldName >> "ACE_TempDay");
@@ -112,4 +138,4 @@ GVAR(TempNight) = [-4, -3, 0, 4, 9, 12, 14, 14, 10, 6, 2, -2];
GVAR(Humidity) = [82, 80, 78, 70, 71, 72, 70, 73, 78, 80, 83, 82];
GVAR(currentTemperature) = 20;
-GVAR(currentHumidity) = 0.5;
+GVAR(currentHumidity) = 0.5;
\ No newline at end of file
diff --git a/addons/weather/functions/fnc_getWind.sqf b/addons/weather/functions/fnc_getWind.sqf
index 54ec6efad3..a23394e992 100644
--- a/addons/weather/functions/fnc_getWind.sqf
+++ b/addons/weather/functions/fnc_getWind.sqf
@@ -1,5 +1,5 @@
/*
- * Author: ACE2 Team
+ * Author: ACE2 Team, Ruthberg
*
* Calculate current wind locally from the data broadcasted by the server
*
@@ -10,25 +10,25 @@
* Wind
*/
#include "script_component.hpp"
-private ["_dir","_dirInc","_dirRange","_period","_periodPercent","_periodPosition","_return","_spd","_spdInc","_spdRange"];
-_return = [0,0,0];
-if(!isNil "ACE_WIND_PARAMS") then {
- _dir = ACE_WIND_PARAMS select 0;
- _dirRange = (ACE_WIND_PARAMS select 1) - (ACE_WIND_PARAMS select 0);
- _spd = ACE_WIND_PARAMS select 2;
- _spdRange = (ACE_WIND_PARAMS select 3) - (ACE_WIND_PARAMS select 2);
- _period = ACE_WIND_PARAMS select 4;
+if (isNil "ACE_WIND_PARAMS") exitWith { [0, 0, 0] };
- _periodPosition = (time - GVAR(wind_period_start_time)) min _period;
- _periodPercent = _periodPosition/_period;
- _spdInc = _spdRange * _periodPercent;
- _dirInc = _dirRange * _periodPercent;
- _spd = (_spd + _spdInc);
- _dir = _dir + _dirInc;
- if (_dir > 360) then {_dir = _dir - 360};
- if (_dir < 0) then {_dir = _dir + 360};
+EXPLODE_5_PVT(ACE_WIND_PARAMS,_dir,_dirChange,_spd,_spdChange,_period);
- _return = [_spd * sin _dir, _spd * cos _dir, 0];
-};
-_return;
\ No newline at end of file
+private ["_periodPercent", "_periodPosition"];
+_periodPosition = (time - GVAR(wind_period_start_time)) min _period;
+_periodPercent = _periodPosition / _period;
+
+_spd = _spd + _spdChange * _periodPercent;
+_dir = _dir + _dirChange * _periodPercent;
+
+_dir = (360 + _dir) % 360;
+
+TRACE_1("PeriodStartTime",Round(GVAR(wind_period_start_time)));
+TRACE_2("Dir: Current/Change",Round(_dir),Round(_dirChange));
+TRACE_2("Spd: Current/Change",Round(_spd * 10) / 10,Round(_spdChange * 10) / 10);
+TRACE_3("Period/Position/Percent",Round(_period),Round(_periodPosition),Round(_periodPercent * 100) / 100);
+
+// TODO: Add some deterministic noise
+
+[-_spd * sin(_dir), -_spd * cos(_dir), 0]
diff --git a/addons/weather/functions/fnc_initWind.sqf b/addons/weather/functions/fnc_initWind.sqf
new file mode 100644
index 0000000000..10b22efa2a
--- /dev/null
+++ b/addons/weather/functions/fnc_initWind.sqf
@@ -0,0 +1,58 @@
+/*
+ * Author: Ruthberg
+ *
+ * Inits the wind variables on mission start
+ *
+ * Argument:
+ * None
+ *
+ * Return value:
+ * None
+ */
+#include "script_component.hpp"
+
+private ["_sum", "_rand", "_csum", "_index", "_month", "_windDirectionProbabilities"];
+_month = date select 1;
+_windDirectionProbabilities = GVAR(WindDirectionProbabilities) select (_month - 1);
+
+ACE_wind = [0, 0, 0];
+
+GVAR(wind_direction_reference) = random 360;
+_sum = 0;
+for "_i" from 0 to 7 do {
+ _sum = _sum + (_windDirectionProbabilities select _i);
+};
+_rand = random _sum;
+_csum = [0, 0, 0, 0, 0, 0, 0, 0];
+for "_i" from 0 to 7 do {
+ for "_j" from 0 to _i do {
+ _csum set [_i, (_csum select _i) + (_windDirectionProbabilities select _j)];
+ };
+};
+_index = 0;
+for "_i" from 0 to 7 do {
+ if (_rand > (_csum select _i)) then {
+ _index = _index + 1;
+ };
+};
+GVAR(wind_direction_reference) = 45 * _index;
+
+GVAR(wind_mean_dir) = GVAR(wind_direction_reference);
+GVAR(wind_direction_reference) = GVAR(wind_direction_reference) + (random 22.5) - (random 22.5);
+GVAR(wind_direction_reference) = (360 + GVAR(wind_direction_reference)) % 360;
+
+GVAR(min_wind_speed) = GVAR(WindSpeedMin) select (_month - 1);
+GVAR(min_wind_speed) = (GVAR(min_wind_speed) select 0) + (random (GVAR(min_wind_speed) select 1)) - (random (GVAR(min_wind_speed) select 1));
+GVAR(min_wind_speed) = 0 max GVAR(min_wind_speed);
+GVAR(mean_wind_speed) = GVAR(WindSpeedMean) select (_month - 1);
+GVAR(max_wind_speed) = GVAR(WindSpeedMax) select (_month - 1);
+GVAR(max_wind_speed) = (GVAR(max_wind_speed) select 0) + (random (GVAR(max_wind_speed) select 1)) - (random (GVAR(max_wind_speed) select 1));
+GVAR(max_wind_speed) = 0 max GVAR(max_wind_speed);
+
+GVAR(current_wind_direction) = GVAR(wind_direction_reference);
+GVAR(current_wind_speed) = GVAR(min_wind_speed) + (GVAR(max_wind_speed) - GVAR(min_wind_speed)) * (random 1);
+
+GVAR(wind_period_count) = 0;
+GVAR(wind_next_period) = -1;
+
+GVAR(wind_speed_debug_output) = [];
diff --git a/addons/weather/functions/fnc_serverController.sqf b/addons/weather/functions/fnc_serverController.sqf
index d7dff0eb70..a9ceca3815 100644
--- a/addons/weather/functions/fnc_serverController.sqf
+++ b/addons/weather/functions/fnc_serverController.sqf
@@ -1,7 +1,7 @@
/*
- * Author: ACE2 Team, esteldunedain
+ * Author: ACE2 Team, esteldunedain, ruthberg
*
- * Calculate the wind and rain evolution on the server. Broadcast the current and next values to the clients
+ * Calculate the wind and rain evolution on the server. Broadcasts the current and next values to the clients
*
* Argument:
* None
@@ -10,90 +10,98 @@
* None
*/
#include "script_component.hpp"
-private ["_gustCount","_gustDir","_gustSpeed","_gustTime","_gusts","_i","_lastRain","_maxInterval","_rainOverCast","_startDir","_startSpeed","_time","_timeTillGust","_transitionTime"];
+
+if (!GVAR(enableServerController)) exitWith {};
+
+private ["_lastRain", "_rainOverCast", "_transitionTime", "_windDirectionVariance", "_windSpeed", "_windSpeedChange", "_windMaxDiff", "_windMinDiff", "_windDirection", "_windDirectionChange", "_ratioMin", "_ratioMax"];
// Rain simulation
-if(GVAR(rain_period_count) > GVAR(rain_next_period)) then {
+if (GVAR(syncRain) && GVAR(rain_period_count) > GVAR(rain_next_period)) then {
- if(overcast >= 0.7) then {
- _lastRain = GVAR(current_rain);
- _rainOverCast = ((overcast-0.7)/0.3);
- GVAR(rain_next_period) = ceil((1+random(10))/GVAR(overcast_multiplier));
-
- GVAR(current_rain) = (GVAR(current_rain)+(((GVAR(current_rain)))*((_rainOverCast*(GVAR(overcast_multiplier)))/8)*GVAR(rain_current_range)));
- GVAR(current_rain) = (GVAR(current_rain) max 0.01) min 1;
-
- _transitionTime = (_rainOverCast*5)+(random (_rainOverCast*20))+1;
- GVAR(rain_current_range) = -1+(random 2);
-
- ACE_RAIN_PARAMS = [_lastRain, GVAR(current_rain), _transitionTime];
- TRACE_4("",_lastRain,_rainOverCast,_transitionTime, overcast);
+ GVAR(rain_next_period) = ceil((1 + (random 10)) / GVAR(overcast_multiplier));
+ GVAR(rain_period_count) = 0;
+
+ _lastRain = GVAR(current_rain);
+
+ if (overcast >= 0.7) then {
+ _rainOverCast = (overcast - 0.7) / 0.3;
+ if (GVAR(current_rain) == 0) then {
+ // Initialize rain with a random strength depending on the current overcast value
+ GVAR(current_rain) = 0.25 + (random 0.25) + (random 0.5) * _rainOverCast;
+ };
+
+ GVAR(current_rain) = GVAR(current_rain) + GVAR(current_rain) * ((_rainOverCast * GVAR(overcast_multiplier)) / 8) * GVAR(rain_current_range);
+ GVAR(current_rain) = 0.01 max GVAR(current_rain) min 1;
+
+ GVAR(rain_current_range) = -1 + (random 2);
} else {
- GVAR(current_rain) = 0;
- _lastRain = GVAR(current_rain);
_rainOverCast = 1;
- _transitionTime = (_rainOverCast*5)+(random (_rainOverCast*20))+1;
-
- ACE_RAIN_PARAMS = [_lastRain, GVAR(current_rain), _transitionTime];
- TRACE_4("",_lastRain,_rainOverCast,_transitionTime, overcast);
+
+ GVAR(current_rain) = 0;
};
+
+ _transitionTime = 1 + (_rainOverCast * 5) + (random (_rainOverCast * 20));
+
+ ACE_RAIN_PARAMS = [_lastRain, GVAR(current_rain), _transitionTime];
+ TRACE_4("",_lastRain,_rainOverCast,_transitionTime,overcast);
GVAR(rain_period_start_time) = time;
publicVariable "ACE_RAIN_PARAMS";
};
// Wind simulation
-if(GVAR(wind_period_count) > GVAR(wind_next_period)) then {
- _startDir = GVAR(wind_current_dir);
- _startSpeed = GVAR(wind_current_speed);
- GVAR(wind_current_dir) = (GVAR(wind_current_dir)+(((GVAR(wind_current_dir)))*((overcast*(GVAR(overcast_multiplier)))/8)*GVAR(wind_current_range_dir)));
-
- GVAR(wind_current_speed) = (GVAR(wind_current_speed)+(((GVAR(wind_current_speed)))*(overcast*(GVAR(overcast_multiplier))/12)*GVAR(wind_current_range_speed)));
- GVAR(wind_current_speed) = GVAR(wind_current_speed) max 0.01;
-
- if(GVAR(wind_current_dir) < 0) then {
- GVAR(wind_current_dir) = GVAR(wind_current_dir)+360;
- };
- GVAR(wind_current_dir) = GVAR(wind_current_dir) % 360;
-
- GVAR(wind_current_range_speed) = (-1)+(random 2);
-
- GVAR(wind_current_range_dir) = (-1)+(random 2);
-
- GVAR(wind_next_period) = ceil((2+random(5))/(GVAR(overcast_multiplier)));
+if (GVAR(syncWind) && GVAR(wind_period_count) > GVAR(wind_next_period)) then {
+
+ GVAR(wind_next_period) = ceil((2 + (random 5)) / GVAR(overcast_multiplier));
GVAR(wind_period_count) = 0;
-
- _gustCount = floor(random(GVAR(wind_next_period)*(overcast*((GVAR(overcast_multiplier)^3)))));
-
- _time = GVAR(wind_next_period)*60;
- _gusts = [];
- if(_gustCount > 0) then {
- _maxInterval = _time/_gustCount;
- for "_i" from 0 to _gustCount-1 do {
- _gustTime = (random (3 min _maxInterval));
- _timeTillGust = (_maxInterval*_i)+(random (_maxInterval - _gustTime));
- _gustSpeed = (random 1);
- _gustDir = (GVAR(wind_current_dir)+(GVAR(wind_current_dir)*(-1+(random 2))))*(overcast*(GVAR(overcast_multiplier)));
- _gusts set[(count _gusts), [_timeTillGust, _gustTime, _gustSpeed, _gustDir]];
- };
+
+ _windDirectionVariance = (90 - (random 180)) * (overcast ^ 2);
+ _windDirection = (360 + GVAR(wind_direction_reference) + _windDirectionVariance) % 360;
+ _windDirectionChange = _windDirection - GVAR(current_wind_direction);
+ if (_windDirectionChange > 180) then {
+ _windDirectionChange = _windDirectionChange - 360;
};
-
- GVAR(wind_total_time) = GVAR(wind_total_time) + GVAR(wind_next_period);
-
- ACE_WIND_PARAMS = [_startDir,
- GVAR(wind_current_dir),
- _startSpeed,
- GVAR(wind_current_speed),
- _time,
- _gusts];
-
+ if (_windDirectionChange < -180) then {
+ _windDirectionChange = 360 + _windDirectionChange;
+ };
+
+ _windMaxDiff = GVAR(mean_wind_speed) - GVAR(max_wind_speed);
+ _windMinDiff = GVAR(min_wind_speed) - GVAR(mean_wind_speed);
+
+ _ratioMax = (random 1) ^ 2;
+ _ratioMin = (random 1) ^ 2;
+
+ _windSpeed = GVAR(current_wind_speed);
+ _windSpeedChange = 0;
+ if ((random 1) < (0.3 max overcast)) then {
+ _windSpeed = GVAR(mean_wind_speed) + _windMaxDiff * _ratioMax + _windMinDiff * _ratioMin;
+ _windSpeedChange = _windSpeed - GVAR(current_wind_speed);
+ };
+
+ _transitionTime = GVAR(wind_next_period) * GVAR(serverUpdateInterval);
+
+ TRACE_5("dirCur/dirNew/spdCur/spdNew/period",GVAR(current_wind_direction),_windDirection,GVAR(current_wind_speed),_windSpeed,_transitionTime);
+
+ ACE_WIND_PARAMS = [GVAR(current_wind_direction),
+ _windDirectionChange,
+ GVAR(current_wind_speed),
+ _windSpeedChange,
+ _transitionTime];
+
+ GVAR(current_wind_direction) = _windDirection;
+ GVAR(current_wind_speed) = _windSpeed;
+
GVAR(wind_period_start_time) = time;
publicVariable "ACE_WIND_PARAMS";
};
-// Sync misc. parameters
-ACE_MISC_PARAMS = [lightnings, rainbow, fogParams];
-publicVariable "ACE_MISC_PARAMS";
+
+if (GVAR(syncMisc)) then {
+ ACE_MISC_PARAMS = [lightnings, rainbow, fogParams, GVAR(temperatureShift), GVAR(badWeatherShift), GVAR(humidityShift)];
+ publicVariable "ACE_MISC_PARAMS";
+};
GVAR(rain_period_count) = GVAR(rain_period_count) + 1;
-GVAR(wind_period_count) = GVAR(wind_period_count) + 1;
\ No newline at end of file
+GVAR(wind_period_count) = GVAR(wind_period_count) + 1;
+
+GVAR(overcast_multiplier) = 1 max (2* overcast) min 2; // 0 (@ overcast 0), 2 (@ overcast 1)
\ No newline at end of file
diff --git a/addons/weather/functions/fnc_updateHumidity.sqf b/addons/weather/functions/fnc_updateHumidity.sqf
index e3ba7a0224..dce031b3f3 100644
--- a/addons/weather/functions/fnc_updateHumidity.sqf
+++ b/addons/weather/functions/fnc_updateHumidity.sqf
@@ -23,6 +23,9 @@ if (rain > 0 && overcast > 0.7) then {
_pS1 = 6.112 * exp((17.62 * _avgTemperature) / (243.12 + _avgTemperature));
_PS2 = 6.112 * exp((17.62 * GVAR(currentTemperature)) / (243.12 + GVAR(currentTemperature)));
GVAR(currentHumidity) = GVAR(currentHumidity) * _PS1 / _PS2;
+ GVAR(currentHumidity) = GVAR(currentHumidity) + GVAR(humidityShift);
+
+ TRACE_1("humidityShift",GVAR(humidityShift));
};
GVAR(currentHumidity) = 0 max GVAR(currentHumidity) min 1;
diff --git a/addons/weather/functions/fnc_updateRain.sqf b/addons/weather/functions/fnc_updateRain.sqf
index 01e32e1734..d240093443 100644
--- a/addons/weather/functions/fnc_updateRain.sqf
+++ b/addons/weather/functions/fnc_updateRain.sqf
@@ -1,5 +1,5 @@
/*
- * Author: ACE2 Team
+ * Author: ACE2 Team, Ruthberg
*
* Updates rain based on ACE_RAIN_PARAMS
*
@@ -11,16 +11,15 @@
*/
#include "script_component.hpp"
-private ["_oldStrength", "_rainStrength", "_transitionTime", "_periodPosition", "_periodPercent"];
+if (!GVAR(syncRain)) exitWith {};
-if (!GVAR(enableRain)) exitWith {};
+if (!isNil "ACE_RAIN_PARAMS") then {
+
+ EXPLODE_3_PVT(ACE_RAIN_PARAMS,_oldRain,_newRain,_period);
+
+ private ["_periodPosition", "_periodPercent"];
+ _periodPosition = (time - GVAR(rain_period_start_time)) min _period;
+ _periodPercent = (_periodPosition / _period) min 1;
-if (!isNil "ACE_RAIN_PARAMS" && {!isNil QGVAR(rain_period_start_time)}) then {
- _oldStrength = ACE_RAIN_PARAMS select 0;
- _rainStrength = ACE_RAIN_PARAMS select 1;
- _transitionTime = ACE_RAIN_PARAMS select 2;
- _periodPosition = (time - GVAR(rain_period_start_time)) min _transitionTime;
- _periodPercent = (_periodPosition/_transitionTime) min 1;
-
- 0 setRain ((_periodPercent*(_rainStrength-_oldStrength))+_oldStrength);
+ 0 setRain (_oldRain + (_newRain - _oldRain) * _periodPercent);
};
diff --git a/addons/weather/functions/fnc_updateTemperature.sqf b/addons/weather/functions/fnc_updateTemperature.sqf
index 5e342ad83d..870d00333c 100644
--- a/addons/weather/functions/fnc_updateTemperature.sqf
+++ b/addons/weather/functions/fnc_updateTemperature.sqf
@@ -18,5 +18,7 @@ _month = date select 1;
_hourlyCoef = -0.5 * sin(360 * ((3 + (date select 3))/24 + (date select 4)/1440));
GVAR(currentTemperature) = (GVAR(TempDay) select (_month - 1)) * (1 - _hourlyCoef) + (GVAR(TempNight) select (_month - 1)) * _hourlyCoef;
-GVAR(currentTemperature) = GVAR(currentTemperature) - 2 * humidity - 4 * overcast;
+GVAR(currentTemperature) = GVAR(currentTemperature) + GVAR(temperatureShift) - GVAR(badWeatherShift) * overcast;
GVAR(currentTemperature) = round(GVAR(currentTemperature) * 10) / 10;
+
+TRACE_2("temperatureShift/badWeatherShift",GVAR(temperatureShift),GVAR(badWeatherShift));
diff --git a/addons/weather/functions/fnc_updateWind.sqf b/addons/weather/functions/fnc_updateWind.sqf
index e5a52348a8..06bb57d093 100644
--- a/addons/weather/functions/fnc_updateWind.sqf
+++ b/addons/weather/functions/fnc_updateWind.sqf
@@ -1,5 +1,5 @@
/*
- * Author: ACE2 Team
+ * Author: ACE2 Team, Ruthberg
*
* Updates wind, gusts and waves based on ACE_wind
*
@@ -11,6 +11,8 @@
*/
#include "script_component.hpp"
+if (!GVAR(syncWind)) exitWith { ACE_wind = wind };
+
ACE_wind = [] call FUNC(getWind);
setWind [ACE_wind select 0, ACE_wind select 1, true];
2 setGusts 0;
@@ -18,4 +20,4 @@ setWind [ACE_wind select 0, ACE_wind select 1, true];
// Set waves: 0 when no wind, 1 when wind >= 16 m/s
1 setWaves (((vectorMagnitude ACE_wind) / 16.0) min 1.0);
-//hintSilent format["Wind: %1\nACE_wind: %2\nDeviation: %3 (m/s)", wind, ACE_wind, Round((vectorMagnitude (ACE_wind vectorDiff wind)) * 1000) / 1000];
+TRACE_3("Wind/ACE_wind/Deviation(m/s)",wind,ACE_wind,Round((vectorMagnitude (ACE_wind vectorDiff wind)) * 1000) / 1000);
diff --git a/documentation/README_DE.md b/documentation/README_DE.md
new file mode 100644
index 0000000000..0b5ca4d0ef
--- /dev/null
+++ b/documentation/README_DE.md
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Benötigt eine Aktuelle Version von CBA A3 | BIF thread
+
+**ACE3** ist ein Gemeinschaftsprojekt der sich zusammengeschlossenen Moddinggruppen von **ACE2**, **AGM** und **CSE** mit dem Ziel den Realismus und die Spieltiefe von Arma 3 zu steigern.
+
+Da die MOD vollkommen als **open-source** Projekt gestaltet ist, steht es jedem frei Änderungen vorzuschlagen, oder seine eigene, modifizierte Version zu erstellen, solange diese ebenfalls der Öffentlichkeit zugänglich ist und mit GNU General Public License übereinstimmt. (Weitere Informationen ist der Lizenzdatei in diesem Projekt entnehmbar)
+
+Die Mod ist **modular gestaltet** — beinahe jede PBO kann entfernt werden, sodass jede Gemeinschaft ihre eigene Version der Mod unterhalten kann. Dies kann zum Beispiel einige Funktionalitäten ausschließen, da das Feature nicht gewünscht ist, oder es mit einer anderen MOD in Konflikt gerät etc. .Ebenfalls können viele Einstellungen vom Missionsersteller vorgenommen werden (u.a. am medizinischem System), sodass eine individuelle Erfahrung gewährleistet wird.
+
+### Features
+* Verbessertes medizinisches System
+* Logistik System: U.a. Transport und Fahrzeugreparatur
+* Sprengstoffsystem mit unterschiedlichen Zündern
+* Gefangenensystem
+* Reale Namen für Arma 3 Fahrzeuge und Waffen
+* Realistisches, ballistisches Verhalten (Wind und Luftfeuchtigkeit)
+* Simulation der Rückstrahlzone
+* Ein Feuerleitsystem für gepanzerte Fahrzeuge und Hubschrauber
+ ***und noch viel mehr...***
+
+#### Anleitungen
+Du hast ACE3 installiert, hast aber keine Ahnung was und wie alles funktioniert und wo sich was befindet? [Erste Schritte](https://github.com/acemod/ACE3/blob/master/documentation/user/getting-started.md).
+
+#### Mitwirken
+Wenn du bei der Entwicklung der MOD mithelfen möchtest, so kannst du dies tun, indem du nach Fehlern Ausschau hältst, oder neue Funktionen vorschlägst. Um etwas beizutragen, "Forke" einfach dieses Archiv (bzw. repository) und erstelle deine "Pull-Request", welche von anderen Entwicklern und Beiträgern überprüft wird. Bitte trage dich dabei in "AUTHORS.txt" mit deinem Nutzernamen und einer gütligen Email-Adresse ein.
+
+Um einen Fehler oder ein Feature zu melden bzw. ein bereits Bestehendes zu ändern - nutze unseren [Issue Tracker](https://github.com/acemod/ACE3/issues).
+
+#### Testen & MOD erstellen
+Wenn du die neusten Entwicklungen erleben und uns dabei helfen möchtest bestehende Fehler zu entdecken, lade dir einfach die "Master Branch" herunter. Entweder nutzt du Git - wenn die Schritte bekannt sind - oder du lädst es dir direkt über [diesen Link] (https://github.com/acemod/ACE3/archive/master.zip) herunter.
+
+Wie du deine eigene Entwicklungsumgebung und eine Testversion von ACE erstellst folge [dieser Anleitung](https://github.com/acemod/ACE3/blob/master/documentation/development/setting-up-the-development-environment.md).
diff --git a/documentation/development/ace3-config-entries.md b/documentation/development/ace3-config-entries.md
index cc0104a8b1..78f8022856 100644
--- a/documentation/development/ace3-config-entries.md
+++ b/documentation/development/ace3-config-entries.md
@@ -46,17 +46,20 @@ ace_gforcecoef
ace_protection
ace_scopeadjust_horizontal
ace_scopeadjust_vertical
+ace_scopeadjust_increment
ace_isusedlauncher
ace_attachable
ace_range
ace_detonator
+ace_barrelTwist
+ace_twistDirection
+ace_barrelLength
```
### CfgAmmo
```c++
-ace_bulletmass
ace_recoil_shakemultiplier
ace_frag_skip
ace_frag_force
@@ -68,6 +71,17 @@ ace_frag_gurney_k
ace_explodeondefuse
ace_explosive
ace_fcs_airburst
+ace_caliber
+ace_bulletlength
+ace_bulletmass
+ace_transonicstabilitycoef
+ace_ammotempmuzzlevelocityshifts
+ace_ballisticcoefficients
+ace_velocityboundaries
+ace_standardatmosphere
+ace_dragmodel
+ace_muzzlevelocities
+ace_barrellengths
```
diff --git a/documentation/feature/medical-system.md b/documentation/feature/medical-system.md
new file mode 100644
index 0000000000..3d756b70c8
--- /dev/null
+++ b/documentation/feature/medical-system.md
@@ -0,0 +1,70 @@
+---
+layout: wiki
+title: Medical System
+group: feature
+order: 4
+parent: wiki
+---
+
+## 1. Overview
+ACE provide users with a more realistic medical system and comes in both a basic and advanced version. This page will detail the differences between both systems and what they do. It is split into two parts; basic and advanced. Both versions have overlap but each have their own unique characteristics.
+
+
+## 2. Basic Medical
+ACE's basic medical system is quite a bit more complex than Arma's default system, but not really difficult to grasp. ACE basic medical is a mixture between the ACE2 and AGM medical systems.
+
+The four main elements that basic medical introduces are:
+
+* damage divided into different zones (head, body, left & right arm, left & right leg)
+* bleeding
+* unconsciousness
+* pain
+
+All interactions in the medical system are done with the interaction menu. Non-medics can - by default - not perform all actions, and their actions take more time as when performed by trained medics. These actions are using epinephrine and blood IVs.
+
+
+### How it works
+
+When hit, units start to lose blood depending on the severity of their wounds. Once the level of blood falls below a certain threshold, the unit will fall unconscious and eventually die. Units will also fall unconscious when sustaining large amounts of damage at once.
+
+To stop the bleeding, the combat life saver needs to bandage every wounded limb. Unconscious units can be "woken up" with Epipens. Should a unit have lost a lot of blood, it might be necessary to replace the lost blood with a blood bag before being able to wake unconscious units up.
+
+Should a unit be in pain, materializing itself with a chromatic aberration screen effect, he can be given morphine.
+
+## 3. Advanced Medical
+The advanced medical system provides a more complex and detailed medical simulation and is based off the CSE/CMS medical system. It focuses on a more realistic model for injuries and treatment, thus resulting in a more important and prominent role for combat medics, and a bigger incentive to not get shot.
+
+The system behind advanced medical is designed to attempt to mimic important parts of the human body, as well as react to any injuries sustained and treatments applied in a realistic manner. The available treatments and supplies in advanced medical are based off the Tactical Combat Casualty Care (TCCC) guidelines, which are the same guidelines used by real-life combat medics around the world.
+
+Besides the 4 elements introduced by basic medical, advanced introduces the following:
+
+* More detailed wound system
+* Accurate blood loss based upon sustained injuries
+* Vitals, including heart rate and blood pressure
+* Cardiac Arrest
+* Various treatment methods such as CPR, different kinds of IVs and tourniquets
+* A basic medication simulation
+
+### How it works
+
+Same as with basic, when hit an injury is sustained. Different though is that the type of injury and the severity of it are based upon how the damage was done and what caused it. This affects both blood loss and immediate consequences, such as being knocked out or being killed right away. When a player has sustained an injury, this will be indicated by flashing red of the screen; this means the player is bleeding.
+
+##### Stopping bleeding
+In order to stop the bleeding, all injuries on every bodypart requires treatment. This is done by either applying a tourniquet to legs or arms as a temporarly solution, or by using bandages to stop the bleeding as a more permament fix.
+
+##### Vitals
+While a unit is bleeding however, the blood volume decreases which will result in a change of vitals. Depending on the factors such as current blood volume, the blood loss rate, medication used, the blood pressure will start to drop. To counter this drop, also based upon the previously mentioned factors and others, the heart rate will adjust accordingly to attempt to keep blood pressure at safe levels. This means that for any patient it is required to keep an eye on the vitals. This is done through the interaction system by selecting check pulse or blood pressure on either the arms or head.
+
+##### Medication
+To stabalize the vitals and to counter for example pain, a player/medic can use medication. Advanced medical has 3 different medications available:
+* Atropine
+* Morphine
+* Epinephrine
+
+Atropine is a vagolytic and anticholinergic drug which in low dosages reduces heart rate but in high dosages increases it, countering effects of organophosphate poisoning (in NBC scenarios; anticholinesterase poisoning) and symptomatic bradycardia (in post-ROSC care and resuscitative medicine).
+
+Morphine is used to alleviate large amounts of pain. Has an effect similar to Heroin due to its opiate properties. Must only ever be given once, and only when bleeding has been reduced to a minimum. Morphine must never be given to a casualty with a low heart rate, as it can stop the heart.
+
+Epinephrine is used to increase heart rate and blood pressure and alleviate unconsciousness. Epinephrine is a synthetic form of Adrenaline, which is naturally produced in the body. It can also be applied to counter-act the effects of Atropine. Be careful though, as it may only be given once.
+
+_Epinephrine must never be given to a casualty with a high heart rate or blood pressure._
diff --git a/documentation/framework/fragmentation-configuration.md b/documentation/framework/fragmentation-configuration.md
index 1372b2b69a..c8a64b2db4 100644
--- a/documentation/framework/fragmentation-configuration.md
+++ b/documentation/framework/fragmentation-configuration.md
@@ -15,15 +15,15 @@ The system for the end-developer is easy to use, and only requires minimal resea
Below is an example set of explosives configuration properties for sys_frag (in this case an M67 hand grenade):
```c++
-ACE_FRAG_METAL = 210; // metal in grams
-ACE_FRAG_CHARGE = 185; // explosive in grams
-ACE_FRAG_GURNEY_C = 2843; // Gurney velocity constant for explosive type. See: http://en.wikipedia.org/wiki/Gurney_equations
-ACE_FRAG_GURNEY_K = 3/5; // Gurney shape factor, in this case a sphere. See: http://en.wikipedia.org/wiki/Gurney_equations
+ace_frag_metal = 210; // metal in grams
+ace_frag_charge = 185; // explosive in grams
+ace_frag_gurney_c = 2843; // Gurney velocity constant for explosive type. See: http://en.wikipedia.org/wiki/Gurney_equations
+ace_frag_gurney_k = 3/5; // Gurney shape factor, in this case a sphere. See: http://en.wikipedia.org/wiki/Gurney_equations
```
-`ACE_FRAG_METAL` is the amount of metal being fragmented (generally taken as the entire weight of the warhead, though in some cases you might want to only include the fragmentation jacket or body. `ACE_FRAG_CHARGE` is the amount of explosive filler in the warhead. `ACE_FRAG_METAL` and `ACE_FRAG_CHARGE` are dimensionless values, as long as they are both in the same unit (for example kg/kg g/g lbs/lbs).
+`ace_frag_metal` is the amount of metal being fragmented (generally taken as the entire weight of the warhead, though in some cases you might want to only include the fragmentation jacket or body. `ace_frag_charge` is the amount of explosive filler in the warhead. `ace_frag_metal` and `ace_frag_charge` are dimensionless values, as long as they are both in the same unit (for example kg/kg g/g lbs/lbs).
-`ACE_FRAG_GURNEY_C` is the Gurney constant for explosive force. You can find a list of common explosive types below. If you can not find it here, or want more accurate numbers, just google the type of explosive and Gurney constant and you can find substantial information. This is *NOT* the detonation velocity of the explosive, do not confuse them!
+`ace_frag_gurney_c` is the Gurney constant for explosive force. You can find a list of common explosive types below. If you can not find it here, or want more accurate numbers, just google the type of explosive and Gurney constant and you can find substantial information. This is *NOT* the detonation velocity of the explosive, do not confuse them!
| Type | Speed |
|------------------|----------|
@@ -42,7 +42,7 @@ ACE_FRAG_GURNEY_K = 3/5; // Gurney shape factor, in this case a sphere. See: ht
|Tritonal | 2320 m/s |
-`ACE_FRAG_GURNEY_K` is the shape factor for the explosive configuration. You should choose it based on the general configuration of explosives/metal in the warhead. Most grenades for example are a sphere. Artillery and aircraft bombs are a cylinder. Mines generally a flat plate. Below is a list of the three common shapes and their factors.
+`ace_frag_gurney_k` is the shape factor for the explosive configuration. You should choose it based on the general configuration of explosives/metal in the warhead. Most grenades for example are a sphere. Artillery and aircraft bombs are a cylinder. Mines generally a flat plate. Below is a list of the three common shapes and their factors.
```
Sphere = 3/5
@@ -52,7 +52,7 @@ Plate = 3/5
There are other configurations but these are the most common. If you are interested in others check out the wikipedia link given above. Most of these will not correctly function in sys_frag though due to additional variables for the equation.
-In addition to these variables there are different types of fragmentation fragments to choose from, and they can be defined in the config value `ACE_FRAG_CLASSES[]`. Below are a list of the types.
+In addition to these variables there are different types of fragmentation fragments to choose from, and they can be defined in the config value `ace_frag_classes[]`. Below are a list of the types.
```
ACE_frag_tiny
@@ -71,6 +71,6 @@ The tinier the piece of fragmentation the shorter the distance of travel. The `_
The final information needed is a couple of entries for forcing or ignoring fragmentation for this ammo.
-If you set `ACE_FRAG_SKIP` to 1 then you will skip fragmentation for ammo of this type. This is useful for things that might cause high network load, such as FFAR rockets, or possibly even 40mm grenades from AGLs. Experimentation under network conditions is required.
+If you set `ace_frag_skip` to 1 then you will skip fragmentation for ammo of this type. This is useful for things that might cause high network load, such as FFAR rockets, or possibly even 40mm grenades from AGLs. Experimentation under network conditions is required.
-If you set `ACE_FRAG_FORCE` to 1 it will force the fragmentation system to use frag on this ammo, ignoring sys_frags internal qualifications based on hit values.
+If you set `ace_frag_force` to 1 it will force the fragmentation system to use frag on this ammo, ignoring sys_frags internal qualifications based on hit values.
diff --git a/documentation/user/getting-started.md b/documentation/user/getting-started.md
index 5a9c3f6917..012f307445 100644
--- a/documentation/user/getting-started.md
+++ b/documentation/user/getting-started.md
@@ -1,20 +1,90 @@
---
layout: wiki
-title: Getting Started
+title: Getting started
group: user
order: 0
parent: wiki
---
+
+
Note:
+
This page is currently under construction.
+
-**This page will get updated soon.**
+Downloaded ACE3 and have no idea where to start? This page serves as a document to help new players get started with things like the medical system, or how to adjust your scope.
+### Table of contents
+1. [Vector 21](#vector-21)
-## Table of Contents
+### Vector 21
+*Part of: ace_vector*
- 1. [xx](#xx)
- 2. [yy](#yy)
- 3. [zz](#zz)
+ACE3 adds a realistic depiction of the Vector 21 rangefinder to the game. Unlike other rangefinders, it doesn't just magically show you the range to your target, but in exchange allows you to do alot of things with it that the other choices in Arma do not offer. The Vector's functions include, but are not limited to:
+- Distance to a target
+- Azimuth to a target
+- Horizontal and vertical distance to a target
+- Distance between 2 targets
+- Angle between 2 targets
+- Switching between feet and meters
+- Switching between degrees and mils
+...
-## What ACE3 has to offer
+The Vector is controlled with 2 keys: the azimuth key and the range key; Tab and R by default. First you bring it up like every other binocular in the game and then, while looking through it you can access all the different functions.
+
+The Vector 21 rangefinder has the following usage modes:
+
+1. Slope distance
+2. Azimuth
+3. Slope distance & Azimuth
+4. Horizontal distance and height difference
+5. Azimuth & Inclination
+6. Distance between two points
+7. Horizontal & vertical distance between two points
+8. Horizontal distance & azimuth between two points
+9. Fall of shot
+
+#### 1. Slope distance
+
+
+Press and hold the "Distance" key until the red pointing circle appears. Sight the circle on the object and release the key.
+
+#### 2. Azimuth
+
+
+Press and hold the "Azimuth" key until the red pointing circle appears. Sight the circle on the object and release the key.
+
+#### 3. Slope distance and Azimuth
+
+
+Press and hold both the "Distance" and "Azimuth" key until the red pointing circle appears. Sight the circle on the object and release both keys.
+
+#### 4. Horizontal distance and height difference
+
+
+Tap the "Distance" key once then press and hold it until the red pointing circle appears. Sight the circle on the object and release the key.
+
+#### 5. Azimuth and Inclination
+
+
+Tap the "Azimuth" key once then press and hold it until the red pointing circle appears. Sight the circle on the object and release the key.
+
+#### 6. Distance between two points
+
+
+Press and hold the "Distance" key until the red pointing circle appears. Sight the circle on the first object and tap the "Azimuth" key while further holding the "Distance" key. The first measurement is confirmed ("1-P" = first point). Sight the second object and release the "Distance" key.
+
+#### 7. Horizontal and vertical distance between two points
+
+
+Tap the "Distance" key once then press and hold it until the red pointing circle appears. Sight the circle on the object and tap the "Azimuth" key once. The first measurement is confirmed ("1-P" = first point). Sight the second object and release the "Distance" key.
+
+#### 8. Horizontal distance and azimuth between two points
+
+
+Press and hold the "Azimuth" key until the red pointing circle appears. Sight the circle on the first object and tap the "Distance" key while further holding the "Azimuth" key. The first measurement is confirmed ("1-P" = first point). Sight the second object and release the "Azimuth" key.
+
+#### 9. Fall of shot
+
+
+Tap the "Azimuth" key once then press and hold it until the red pointing circle appears. Sight the circle on the object and tap the "Distance" key while further holding the "Azimuth" key. The first measurement is confirmed ("1-P" = first point). Sight the Fall of shot and release the "Azimuth" key. The left digits display the left (`L`)/right (`r`) correction value in meter and the right digits display the longer (`A` = add)/shorter (`d` = drop) correction value in meter. If the "Distance" key is tapped the height correction values will be displayed (`UP` and `dn`).
diff --git a/documentation/user/how-to-make-a-feature-request.md b/documentation/user/how-to-make-a-feature-request.md
index bfc5401f38..7b0c52478d 100644
--- a/documentation/user/how-to-make-a-feature-request.md
+++ b/documentation/user/how-to-make-a-feature-request.md
@@ -6,19 +6,17 @@ order: 11
parent: wiki
---
-### Before requesting
+### Background
+ACE2, AGM and CSE had a lot of features implemented or planned. All of them are or have been evaluated for inclusion in ACE3 itself, and we'd like to port the majority of them eventually. However, due to time constraints, we have managed to finish only a fraction of the job so far.
-ACE 2, AGM and CSE had a lot of features implemented or planned. All of them are or have been evaluated for inclusion in ACE3 itself, and we'd like to port the majority of them eventually. However, due to time constraints, we have only managed to do a fraction of the job so far.
-
-There's really no point on making feature requests for anything included or planned for inclusion in ACE2, AGM or CSE. The majority of those things are been considered for porting or rewritting already.
+Please refrain from making requests for any planned or existing features from either ACE2, AGM or CSE. Most of them are already being or have been considered for porting or a rewrite.
-
Please note:
-
Due to the pace at which development is taking place, we are establishing a feature request embargo during the first week weeks prior and posterior to the first release. Feel free to add feature requests as described below, but don't expect them to be evaluated or discussed yet. Any dev activity on the feature request thread is highly unlikely during that period.
+
Note:
+
Due to our current work load, in the period of weeks prior and posterior to the first release, new feature requests are under embargo. Feel free to submit yours now, but don't expect them to be considered just yet. Any treatment or attention by developers towards the feature request thread is highly unlikely during this time.
### Requesting a feature
+In order to avoid duplicates and keep the issue tracker organized, we have created a common issue for ACE 3 Feature requests . Any and all relevant requests should be submitted there, where they will also get discussed and evaluated. Before adding a new one, make sure to check the previous entries from the thread and do a quick search for similar suggestions; please don't reiterate requests for features that had already been accepted for inclusion, or those which were disregarded earlier.
-In order not to spam the issue tracker with duplicated requests, we have have created a single Issue for feature request . Any and all requests should be done there, where they will get discussed and evaluated. Before posting a new one, please make sure to check the previous entries on the thread and make a quick search; please don't reiterate requests that had already been either accepted for inclusion or disregarded.
-
-Accepted feature requests may be moved to a separate issue by moderators for further discussion.
+Following their approval, feature requests may be moved by moderators to a separate issue for further discussion.
diff --git a/documentation/user/shourtcuts.md b/documentation/user/shourtcuts.md
index d44dc54886..0e6444c645 100644
--- a/documentation/user/shourtcuts.md
+++ b/documentation/user/shourtcuts.md
@@ -7,198 +7,198 @@ parent: wiki
---
-
-
- PBO
- Command
- Shortcut
-
-
-
-
- ACE_Interaction
- Interaction Menu
- Win_Left
-
-
- ACE_Interaction
- Interaction Menu (Self)
- Ctrl Win_Left
-
-
- ACE_Interaction
- Open / Close Door
- Ctrl Space
-
-
- ACE_Interaction
- Tap Shoulder
- Ctrl T
-
-
- ACE_Logistics
- Modifier Key
- Ctrl_Left
-
-
- ACE_Goggles
- Wipe Goggles
- Ctrl Shift T
-
-
- ACE_Grenades
- Switch Grenade Mode
- 8
-
-
- ACE_NameTags
- Show Names
- Ctrl_Left
-
-
- ACE_NightVision
- Increase NVG Brightness
- Alt Page Up
-
-
- ACE_NightVision
- Decrease NVG Brightness
- Alt Page Down
-
-
- ACE_Overheating
- Clear jam
- Shift R
-
-
- ACE_Parachute
- Show Altimeter
- O
-
-
- ACE_Reload
- Check Ammo
- Ctrl R
-
-
- ACE_SafeMode
- Safe Mode
- ` (en) | ^ (de)
-
-
- ACE_Scopes
- Adjust Elevation Up
- Page Up
-
-
- ACE_Scopes
- Adjust Elevation Down
- Page Down
-
-
- ACE_Scopes
- Adjust Windage Left
- Ctrl Page Up
-
-
- ACE_Scopes
- Adjust Windage Right
- Ctrl Page Down
-
-
- ACE_Vector
- Vector - Azimuth Key
- Tab
-
-
- ACE_Vector
- Vector - Distance Key
- R
-
-
- ACE_Vehicles
- Speed Limiter
- Del
-
-
- ACE_WeaponSelect
- Select Pistol
- 1
-
-
- ACE_WeaponSelect
- Select Rifle
- 2
-
-
- ACE_WeaponSelect
- Select Grenade Launcher
- 3
-
-
- ACE_WeaponSelect
- Select Binoculars
- 5
-
-
- ACE_WeaponSelect
- Select Frag Grenade
- 6
-
-
- ACE_WeaponSelect
- Select Non-Frag Grenade
- 7
-
-
- ACE_WeaponSelect
- Holster Weapon
- 0
-
-
- ACE_WeaponSelect
- Engine on
- 2
-
-
- ACE_WeaponSelect
- Engine off
- 1
-
-
- ACE_WeaponSelect
- Select Main Gun
- 3
-
-
- ACE_WeaponSelect
- Select Machine Gun
- 4
-
-
- ACE_WeaponSelect
- Select Missiles
- 5
-
-
- ACE_WeaponSelect
- Fire Smoke Launcher
- 9
-
-
- ACE_FireControlSsystem
- Lase Target / Measure Distance
- Tab
-
-
- ACE_FireControlSsystem
- Adjust FCS Range (Up)
- Page Up
-
-
- ACE_FireControlSsystem
- Adjust FCS Range (Down)
- Page Down
-
-
-
\ No newline at end of file
+
+
+ Shortcut
+ Action
+ PBO
+
+
+
+
+ ⊞ Win
+ Interaction menu
+ ACE_Interaction
+
+
+ Ctrl +⊞ Win
+ Self-interaction menu
+ ACE_Interaction
+
+
+ Ctrl +Space
+ Open/close door
+ ACE_Interaction
+
+
+ Ctrl +T
+ Tap on the shoulder
+ ACE_Interaction
+
+
+ Ctrl
+ Modifier key
+ ACE_Logistics
+
+
+ Ctrl +⇧ Shift +T
+ Wipe off goggles
+ ACE_Goggles
+
+
+ 8
+ Switch grenade mode
+ ACE_Grenades
+
+
+ Ctrl
+ Show names
+ ACE_NameTags
+
+
+ Alt +Page Up
+ NVG: Increase brightness
+ ACE_NightVision
+
+
+ Alt +Page Down
+ NVG: Decrease brightness
+ ACE_NightVision
+
+
+ ⇧ Shift +R
+ Clear firearm malfunction
+ ACE_Overheating
+
+
+ O
+ Altimeter
+ ACE_Parachute
+
+
+ Ctrl +R
+ Check ammunition
+ ACE_Reload
+
+
+ `
+ Safety toggle
+ ACE_SafeMode
+
+
+ Page Up
+ Scope: Elevation up
+ ACE_Scopes
+
+
+ Page Down
+ Scope: Elevation down
+ ACE_Scopes
+
+
+ Ctrl +Page Up
+ Scope: Windage left
+ ACE_Scopes
+
+
+ Ctrl +Page Down
+ Scope: Windage right
+ ACE_Scopes
+
+
+ Tab ↹
+ Vector: Azimuth key
+ ACE_Vector
+
+
+ R
+ Vector: Distance key
+ ACE_Vector
+
+
+ Del
+ Speed limiter
+ ACE_Vehicles
+
+
+ 1
+ Pistol
+ ACE_WeaponSelect
+
+
+ 2
+ Rifle
+ ACE_WeaponSelect
+
+
+ 3
+ Grenade launcher
+ ACE_WeaponSelect
+
+
+ 5
+ Binoculars
+ ACE_WeaponSelect
+
+
+ 6
+ Frag grenade
+ ACE_WeaponSelect
+
+
+ 7
+ Non-frag grenade
+ ACE_WeaponSelect
+
+
+ 0
+ Holster weapon
+ ACE_WeaponSelect
+
+
+ 2
+ Engine on
+ ACE_WeaponSelect
+
+
+ 1
+ Engine off
+ ACE_WeaponSelect
+
+
+ 3
+ Primary weapon
+ ACE_WeaponSelect
+
+
+ 4
+ Machine gun
+ ACE_WeaponSelect
+
+
+ 5
+ Missiles
+ ACE_WeaponSelect
+
+
+ 9
+ Fire smoke launcher
+ ACE_WeaponSelect
+
+
+ Tab ↹
+ FCS: Lase target (measure distance)
+ ACE_FireControlSsystem
+
+
+ Page Up
+ FCS: Range up
+ ACE_FireControlSsystem
+
+
+ Page Down
+ FCS: Range down
+ ACE_FireControlSsystem
+
+
+
diff --git a/extras/CfgWeaponsReference.hpp b/extras/CfgWeaponsReference.hpp
index 77ce494e39..4821d53813 100644
--- a/extras/CfgWeaponsReference.hpp
+++ b/extras/CfgWeaponsReference.hpp
@@ -294,7 +294,7 @@ class CfgWeapons
class RH_gsh18 : Pistol_Base_F
{
ACE_barrelTwist=9.8;
- ACE_barrelLength=4.1;
+ ACE_barrelLength=4.1;
};
class RH_mateba : Pistol_Base_F
{
@@ -329,7 +329,7 @@ class CfgWeapons
class RH_fn57 : Pistol_Base_F
{
ACE_barrelTwist=9.1;
- ACE_barrelLength=4.8;
+ ACE_barrelLength=4.8;
};
class RH_vp70 : Pistol_Base_F
{
diff --git a/extras/assets/icons/png/Icon_Module_mk6_ca.png b/extras/assets/icons/png/Icon_Module_mk6_ca.png
new file mode 100644
index 0000000000..26c2966551
Binary files /dev/null and b/extras/assets/icons/png/Icon_Module_mk6_ca.png differ
diff --git a/optionals/asdg_comp/config.cpp b/optionals/compat_asdg/config.cpp
similarity index 100%
rename from optionals/asdg_comp/config.cpp
rename to optionals/compat_asdg/config.cpp
diff --git a/optionals/asdg_comp/script_component.hpp b/optionals/compat_asdg/script_component.hpp
similarity index 100%
rename from optionals/asdg_comp/script_component.hpp
rename to optionals/compat_asdg/script_component.hpp
diff --git a/optionals/compat_cup/CfgAmmo.hpp b/optionals/compat_cup/CfgAmmo.hpp
new file mode 100644
index 0000000000..1dcd91bc23
--- /dev/null
+++ b/optionals/compat_cup/CfgAmmo.hpp
@@ -0,0 +1,422 @@
+class CfgAmmo
+{
+ class BulletBase;
+ class B_762x51_Ball;
+ class B_127x99_Ball;
+ class CUP_B_545x39_Ball: BulletBase
+ {
+ ACE_caliber=0.220;
+ ACE_bulletLength=0.85;
+ ACE_bulletMass=52.9;
+ 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.168};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=7;
+ ACE_muzzleVelocities[]={780, 880, 920};
+ ACE_barrelLengths[]={10, 16.3, 20};
+ };
+ class CUP_B_545x39_Ball_Tracer_Green: CUP_B_545x39_Ball
+ {
+ ACE_caliber=0.220;
+ ACE_bulletLength=0.85;
+ ACE_bulletMass=49.8;
+ 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.168};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=7;
+ ACE_muzzleVelocities[]={785, 883, 925};
+ ACE_barrelLengths[]={10, 16.3, 20};
+ };
+ class CUP_B_545x39_Ball_Tracer_Red: BulletBase
+ {
+ ACE_caliber=0.220;
+ ACE_bulletLength=0.85;
+ ACE_bulletMass=49.8;
+ 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.168};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=7;
+ ACE_muzzleVelocities[]={785, 883, 925};
+ ACE_barrelLengths[]={10, 16.3, 20};
+ };
+ class CUP_B_545x39_Ball_Tracer_White: BulletBase
+ {
+ ACE_caliber=0.220;
+ ACE_bulletLength=0.85;
+ ACE_bulletMass=49.8;
+ 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.168};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=7;
+ ACE_muzzleVelocities[]={785, 883, 925};
+ ACE_barrelLengths[]={10, 16.3, 20};
+ };
+ class CUP_B_545x39_Ball_Tracer_Yellow: BulletBase
+ {
+ ACE_caliber=0.220;
+ ACE_bulletLength=0.85;
+ ACE_bulletMass=49.8;
+ 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.168};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=7;
+ ACE_muzzleVelocities[]={785, 883, 925};
+ ACE_barrelLengths[]={10, 16.3, 20};
+ };
+ class CUP_B_762x39_Ball: BulletBase
+ {
+ ACE_caliber=0.308;
+ ACE_bulletLength=1.14;
+ ACE_bulletMass=123;
+ 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.275};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ICAO";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={650, 716, 750};
+ ACE_barrelLengths[]={10, 16.3, 20};
+ };
+ class CUP_B_762x39_Ball_Tracer_Green: BulletBase
+ {
+ ACE_caliber=0.308;
+ ACE_bulletLength=1.14;
+ ACE_bulletMass=117;
+ 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.275};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ICAO";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={650, 716, 750};
+ ACE_barrelLengths[]={10, 16.3, 20};
+ };
+ class CUP_B_9x18_Ball: BulletBase
+ {
+ ACE_caliber=0.365;
+ ACE_bulletLength=0.610;
+ ACE_bulletMass=92.6;
+ 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.125};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={298, 330, 350};
+ ACE_barrelLengths[]={3.8, 5, 9};
+ };
+ class CUP_B_9x18_Ball_Tracer_Green: BulletBase
+ {
+ ACE_caliber=0.365;
+ ACE_bulletLength=0.610;
+ ACE_bulletMass=92.6;
+ 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.125};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={298, 330, 350};
+ ACE_barrelLengths[]={3.8, 5, 9};
+ };
+ class CUP_B_9x18_Ball_Tracer_Red: BulletBase
+ {
+ ACE_caliber=0.365;
+ ACE_bulletLength=0.610;
+ ACE_bulletMass=92.6;
+ 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.125};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={298, 330, 350};
+ ACE_barrelLengths[]={3.8, 5, 9};
+ };
+ class CUP_B_9x18_Ball_Tracer_Yellow: BulletBase
+ {
+ ACE_caliber=0.365;
+ ACE_bulletLength=0.610;
+ ACE_bulletMass=92.6;
+ 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.125};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={298, 330, 350};
+ ACE_barrelLengths[]={3.8, 5, 9};
+ };
+ class CUP_B_9x18_Ball_White_Tracer: BulletBase
+ {
+ ACE_caliber=0.365;
+ ACE_bulletLength=0.610;
+ ACE_bulletMass=92.6;
+ 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.125};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={298, 330, 350};
+ ACE_barrelLengths[]={3.8, 5, 9};
+ };
+ class CUP_B_9x19_Ball: BulletBase
+ {
+ ACE_caliber=0.355;
+ ACE_bulletLength=0.610;
+ ACE_bulletMass=124;
+ 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.165};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={340, 370, 400};
+ ACE_barrelLengths[]={4, 5, 9};
+ };
+ class CUP_B_762x51_noTracer: B_762x51_Ball
+ {
+ ACE_caliber=0.308;
+ ACE_bulletLength=1.14;
+ ACE_bulletMass=146;
+ 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.2};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ICAO";
+ ACE_dragModel=7;
+ ACE_muzzleVelocities[]={700, 800, 820, 833, 845};
+ ACE_barrelLengths[]={10, 16, 20, 24, 26};
+ };
+ class CUP_B_303_Ball: BulletBase
+ {
+ ACE_caliber=0.311;
+ ACE_bulletLength=1.227;
+ ACE_bulletMass=174;
+ 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.499, 0.493, 0.48};
+ ACE_velocityBoundaries[]={671, 549};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={748, 761, 765};
+ ACE_barrelLengths[]={20, 24, 26};
+ };
+ class CUP_B_127x107_Ball_Green_Tracer: BulletBase
+ {
+ ACE_caliber=0.511;
+ ACE_bulletLength=2.520;
+ ACE_bulletMass=745;
+ 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.63};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={820};
+ ACE_barrelLengths[]={28.7};
+ };
+ class CUP_B_127x108_Ball_Green_Tracer: BulletBase
+ {
+ ACE_caliber=0.511;
+ ACE_bulletLength=2.520;
+ ACE_bulletMass=745;
+ 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.63};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={820};
+ ACE_barrelLengths[]={28.7};
+ };
+ class CUP_B_762x54_Ball_White_Tracer: BulletBase
+ {
+ ACE_caliber=0.312;
+ ACE_bulletLength=1.14;
+ ACE_bulletMass=149;
+ 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.395};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ICAO";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={680, 750, 798, 800};
+ ACE_barrelLengths[]={16, 20, 24, 26};
+ };
+ class CUP_B_762x54_Ball_Red_Tracer: BulletBase
+ {
+ ACE_caliber=0.312;
+ ACE_bulletLength=1.14;
+ ACE_bulletMass=149;
+ 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.395};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ICAO";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={680, 750, 798, 800};
+ ACE_barrelLengths[]={16, 20, 24, 26};
+ };
+ class CUP_B_762x54_Ball_Green_Tracer: BulletBase
+ {
+ ACE_caliber=0.312;
+ ACE_bulletLength=1.14;
+ ACE_bulletMass=149;
+ 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.395};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ICAO";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={680, 750, 798, 800};
+ ACE_barrelLengths[]={16, 20, 24, 26};
+ };
+ class CUP_B_762x54_Ball_Yellow_Tracer: BulletBase
+ {
+ ACE_caliber=0.312;
+ ACE_bulletLength=1.14;
+ ACE_bulletMass=149;
+ 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.395};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ICAO";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={680, 750, 798, 800};
+ ACE_barrelLengths[]={16, 20, 24, 26};
+ };
+ class CUP_B_9x39_SP5: BulletBase
+ {
+ ACE_caliber=0.364;
+ ACE_bulletLength=1.24;
+ ACE_bulletMass=250;
+ 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.275};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ICAO";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={280, 300, 320};
+ ACE_barrelLengths[]={10, 16.3, 20};
+ };
+ class CUP_B_762x51_Tracer_Green: BulletBase
+ {
+ ACE_caliber=0.308;
+ ACE_bulletLength=1.14;
+ ACE_bulletMass=146;
+ 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.2};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ICAO";
+ ACE_dragModel=7;
+ ACE_muzzleVelocities[]={700, 800, 820, 833, 845};
+ ACE_barrelLengths[]={10, 16, 20, 24, 26};
+ };
+ class CUP_B_762x51_Tracer_Red: BulletBase
+ {
+ ACE_caliber=0.308;
+ ACE_bulletLength=1.14;
+ ACE_bulletMass=146;
+ 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.2};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ICAO";
+ ACE_dragModel=7;
+ ACE_muzzleVelocities[]={700, 800, 820, 833, 845};
+ ACE_barrelLengths[]={10, 16, 20, 24, 26};
+ };
+ class CUP_B_762x51_Tracer_Yellow: BulletBase
+ {
+ ACE_caliber=0.308;
+ ACE_bulletLength=1.14;
+ ACE_bulletMass=146;
+ 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.2};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ICAO";
+ ACE_dragModel=7;
+ ACE_muzzleVelocities[]={700, 800, 820, 833, 845};
+ ACE_barrelLengths[]={10, 16, 20, 24, 26};
+ };
+ class CUP_B_762x51_Tracer_White: BulletBase
+ {
+ ACE_caliber=0.308;
+ ACE_bulletLength=1.14;
+ ACE_bulletMass=146;
+ 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.2};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ICAO";
+ ACE_dragModel=7;
+ ACE_muzzleVelocities[]={700, 800, 820, 833, 845};
+ ACE_barrelLengths[]={10, 16, 20, 24, 26};
+ };
+ class B_127x107_Ball: BulletBase
+ {
+ ACE_caliber=0.511;
+ ACE_bulletLength=2.520;
+ ACE_bulletMass=745;
+ 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.63};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={820};
+ ACE_barrelLengths[]={28.7};
+ };
+ class CUP_B_9x18_SD: BulletBase
+ {
+ ACE_caliber=0.365;
+ ACE_bulletLength=0.610;
+ ACE_bulletMass=92.6;
+ 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.125};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={298, 330, 340};
+ ACE_barrelLengths[]={3.8, 5, 9};
+ };
+ class CUP_B_765x17_Ball: BulletBase
+ {
+ ACE_caliber=0.3125;
+ ACE_bulletLength=0.610;
+ ACE_bulletMass=65;
+ 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.118};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={282, 300, 320};
+ ACE_barrelLengths[]={4, 5, 9};
+ };
+ class CUP_B_145x115_AP_Green_Tracer: BulletBase
+ {
+ ACE_caliber=0.586;
+ ACE_bulletLength=2.00;
+ ACE_bulletMass=1010;
+ 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.620};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={1000};
+ ACE_barrelLengths[]={53};
+ };
+ class CUP_B_127x99_Ball_White_Tracer: B_127x99_Ball
+ {
+ ACE_caliber=0.510;
+ ACE_bulletLength=2.310;
+ ACE_bulletMass=647;
+ 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[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={853};
+ ACE_barrelLengths[]={29};
+ };
+ class CUP_B_86x70_Ball_noTracer: BulletBase
+ {
+ ACE_caliber=0.338;
+ ACE_bulletLength=1.70;
+ ACE_bulletMass=300;
+ 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.381};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ICAO";
+ ACE_dragModel=7;
+ ACE_muzzleVelocities[]={820, 826, 830};
+ ACE_barrelLengths[]={24, 26.5, 28};
+ };
+};
\ No newline at end of file
diff --git a/optionals/compat_cup/config.cpp b/optionals/compat_cup/config.cpp
new file mode 100644
index 0000000000..e4f26f8051
--- /dev/null
+++ b/optionals/compat_cup/config.cpp
@@ -0,0 +1,14 @@
+#include "script_component.hpp"
+
+class CfgPatches {
+ class ADDON {
+ units[] = {};
+ weapons[] = {};
+ requiredVersion = REQUIRED_VERSION;
+ requiredAddons[] = {"CUP_Weapons_Ammunition"};
+ author[]={"Ruthberg"};
+ VERSION_CONFIG;
+ };
+};
+
+#include "CfgAmmo.hpp"
diff --git a/optionals/compat_cup/script_component.hpp b/optionals/compat_cup/script_component.hpp
new file mode 100644
index 0000000000..3d77fcb370
--- /dev/null
+++ b/optionals/compat_cup/script_component.hpp
@@ -0,0 +1,5 @@
+#define COMPONENT CUP_Weapons_Ammunition_comp
+
+#include "\z\ace\addons\main\script_mod.hpp"
+
+#include "\z\ace\addons\main\script_macros.hpp"
diff --git a/optionals/compat_hlc_ar15/CfgWeapons.hpp b/optionals/compat_hlc_ar15/CfgWeapons.hpp
new file mode 100644
index 0000000000..d57de932e6
--- /dev/null
+++ b/optionals/compat_hlc_ar15/CfgWeapons.hpp
@@ -0,0 +1,65 @@
+class CfgWeapons
+{
+ class Rifle;
+ class Rifle_Base_F;
+ class hlc_ar15_base: Rifle_Base_F
+ {
+ ACE_barrelTwist=7;
+ ACE_barrelLength=11.5;
+ };
+ class hlc_rifle_RU556: hlc_ar15_base
+ {
+ ACE_barrelTwist=7;
+ ACE_barrelLength=10.3;
+ };
+ class hlc_rifle_RU5562: hlc_rifle_RU556
+ {
+ ACE_barrelTwist=7;
+ ACE_barrelLength=10.3;
+ };
+ class hlc_rifle_CQBR: hlc_rifle_RU556
+ {
+ ACE_barrelTwist=7;
+ ACE_barrelLength=10;
+ };
+ class hlc_rifle_M4: hlc_rifle_RU556
+ {
+ ACE_barrelTwist=7;
+ ACE_barrelLength=14.5;
+ };
+ class hlc_rifle_bcmjack: hlc_ar15_base
+ {
+ ACE_barrelTwist=7;
+ ACE_barrelLength=14.5;
+ };
+ class hlc_rifle_Colt727: hlc_ar15_base
+ {
+ ACE_barrelTwist=7;
+ ACE_barrelLength=14.5;
+ };
+ class hlc_rifle_Colt727_GL: hlc_rifle_Colt727
+ {
+ ACE_barrelTwist=7;
+ ACE_barrelLength=14.5;
+ };
+ class hlc_rifle_Bushmaster300: hlc_rifle_Colt727
+ {
+ ACE_barrelTwist=8;
+ ACE_barrelLength=14.5;
+ };
+ class hlc_rifle_vendimus: hlc_rifle_Bushmaster300
+ {
+ ACE_barrelTwist=8;
+ ACE_barrelLength=16;
+ };
+ class hlc_rifle_SAMR: hlc_rifle_RU556
+ {
+ ACE_barrelTwist=9;
+ ACE_barrelLength=16;
+ };
+ class hlc_rifle_honeybase: hlc_rifle_RU556
+ {
+ ACE_barrelTwist=8;
+ ACE_barrelLength=6;
+ };
+};
\ No newline at end of file
diff --git a/optionals/compat_hlc_ar15/config.cpp b/optionals/compat_hlc_ar15/config.cpp
new file mode 100644
index 0000000000..51e42dc040
--- /dev/null
+++ b/optionals/compat_hlc_ar15/config.cpp
@@ -0,0 +1,14 @@
+#include "script_component.hpp"
+
+class CfgPatches {
+ class ADDON {
+ units[] = {};
+ weapons[] = {};
+ requiredVersion = REQUIRED_VERSION;
+ requiredAddons[] = {"hlcweapons_ar15"};
+ author[]={"Ruthberg"};
+ VERSION_CONFIG;
+ };
+};
+
+#include "CfgWeapons.hpp"
diff --git a/optionals/compat_hlc_ar15/script_component.hpp b/optionals/compat_hlc_ar15/script_component.hpp
new file mode 100644
index 0000000000..3fb38b0477
--- /dev/null
+++ b/optionals/compat_hlc_ar15/script_component.hpp
@@ -0,0 +1,5 @@
+#define COMPONENT hlcweapons_ar15_comp
+
+#include "\z\ace\addons\main\script_mod.hpp"
+
+#include "\z\ace\addons\main\script_macros.hpp"
diff --git a/optionals/compat_hlc_wp_mp5/CfgWeapons.hpp b/optionals/compat_hlc_wp_mp5/CfgWeapons.hpp
new file mode 100644
index 0000000000..bb2762d1bc
--- /dev/null
+++ b/optionals/compat_hlc_wp_mp5/CfgWeapons.hpp
@@ -0,0 +1,60 @@
+
+class CfgWeapons
+{
+ class Rifle_Base_F;
+ class hlc_MP5_base: Rifle_Base_F
+ {
+ ACE_barrelTwist=10;
+ ACE_barrelLength=9;
+ };
+ class hlc_smg_mp5k_PDW: hlc_MP5_base
+ {
+ ACE_barrelTwist=10;
+ ACE_barrelLength=4.5;
+ };
+ class hlc_smg_mp5k: hlc_smg_mp5k_PDW
+ {
+ ACE_barrelTwist=10;
+ ACE_barrelLength=4.5;
+ };
+ class hlc_smg_mp5a2: hlc_MP5_base
+ {
+ ACE_barrelTwist=10;
+ ACE_barrelLength=9;
+ };
+ class hlc_smg_MP5N: hlc_MP5_base
+ {
+ ACE_barrelTwist=10;
+ ACE_barrelLength=9;
+ };
+ class hlc_smg_9mmar: hlc_smg_MP5N
+ {
+ ACE_barrelTwist=10;
+ ACE_barrelLength=9;
+ };
+ class hlc_smg_mp5a4: hlc_MP5_base
+ {
+ ACE_barrelTwist=10;
+ ACE_barrelLength=9;
+ };
+ class hlc_smg_mp510: hlc_smg_MP5N
+ {
+ ACE_barrelTwist=15;
+ ACE_barrelLength=9;
+ };
+ class hlc_smg_mp5sd5: hlc_MP5_base
+ {
+ ACE_barrelTwist=10;
+ ACE_barrelLength=9;
+ };
+ class hlc_smg_mp5a3: hlc_smg_mp5a2
+ {
+ ACE_barrelTwist=10;
+ ACE_barrelLength=9;
+ };
+ class hlc_smg_mp5sd6: hlc_smg_mp5sd5
+ {
+ ACE_barrelTwist=10;
+ ACE_barrelLength=9;
+ };
+};
diff --git a/optionals/compat_hlc_wp_mp5/config.cpp b/optionals/compat_hlc_wp_mp5/config.cpp
new file mode 100644
index 0000000000..1f4fe78db4
--- /dev/null
+++ b/optionals/compat_hlc_wp_mp5/config.cpp
@@ -0,0 +1,14 @@
+#include "script_component.hpp"
+
+class CfgPatches {
+ class ADDON {
+ units[] = {};
+ weapons[] = {};
+ requiredVersion = REQUIRED_VERSION;
+ requiredAddons[] = {"hlcweapons_mp5"};
+ author[]={"Ruthberg"};
+ VERSION_CONFIG;
+ };
+};
+
+#include "CfgWeapons.hpp"
diff --git a/optionals/compat_hlc_wp_mp5/script_component.hpp b/optionals/compat_hlc_wp_mp5/script_component.hpp
new file mode 100644
index 0000000000..6b19e4912b
--- /dev/null
+++ b/optionals/compat_hlc_wp_mp5/script_component.hpp
@@ -0,0 +1,5 @@
+#define COMPONENT hlcweapons_mp5_comp
+
+#include "\z\ace\addons\main\script_mod.hpp"
+
+#include "\z\ace\addons\main\script_macros.hpp"
diff --git a/optionals/compat_hlcmods_ak/CfgWeapons.hpp b/optionals/compat_hlcmods_ak/CfgWeapons.hpp
new file mode 100644
index 0000000000..390d3e6177
--- /dev/null
+++ b/optionals/compat_hlcmods_ak/CfgWeapons.hpp
@@ -0,0 +1,76 @@
+class CfgWeapons
+{
+ class optic_dms;
+ class hlc_ak_base;
+ class hlc_rifle_ak12;
+ class InventoryOpticsItem_Base_F;
+ class hlc_rifle_ak74: hlc_ak_base
+ {
+ ACE_barrelTwist=7.8699999;
+ ACE_barrelLength=16.299999;
+ };
+ class hlc_rifle_aku12: hlc_rifle_ak12
+ {
+ ACE_barrelTwist=6.3000002;
+ ACE_barrelLength=8.3000002;
+ };
+ class hlc_rifle_RPK12: hlc_rifle_ak12
+ {
+ ACE_barrelLength=23.200001;
+ };
+ class hlc_rifle_aks74u: hlc_rifle_ak74
+ {
+ ACE_barrelTwist=6.3000002;
+ ACE_barrelLength=8.3000002;
+ };
+ class hlc_rifle_ak47: hlc_rifle_ak74
+ {
+ ACE_barrelTwist=9.4499998;
+ ACE_barrelLength=16.299999;
+ };
+ class hlc_rifle_akm: hlc_rifle_ak47
+ {
+ ACE_barrelTwist=7.8699999;
+ ACE_barrelLength=16.299999;
+ };
+ class hlc_rifle_rpk: hlc_rifle_ak47
+ {
+ ACE_barrelTwist=9.4499998;
+ ACE_barrelLength=23.200001;
+ };
+ class hlc_rifle_rpk74n: hlc_rifle_rpk
+ {
+ ACE_barrelTwist=9.4499998;
+ ACE_barrelLength=23.200001;
+ };
+ class hlc_rifle_aek971: hlc_rifle_ak74
+ {
+ ACE_barrelTwist=9.5;
+ ACE_barrelLength=17;
+ };
+ class hlc_rifle_saiga12k: hlc_rifle_ak47
+ {
+ ACE_barrelTwist=0;
+ ACE_twistDirection=0;
+ ACE_barrelLength=16.9;
+ };
+
+ class HLC_Optic_PSO1 : optic_dms {
+ ACE_ScopeAdjust_Vertical[] = { 0, 0 };
+ ACE_ScopeAdjust_Horizontal[] = { -10, 10 };
+ ACE_ScopeAdjust_Increment = 0.5;
+ class ItemInfo : InventoryOpticsItem_Base_F {
+ class OpticsModes {
+ class Snip {
+ discreteDistance[]={100, 200, 300, 400, 450, 500, 550, 600, 650, 700, 750, 800, 850, 900, 950, 1000};
+ discreteDistanceInitIndex=3;
+ };
+ };
+ };
+ };
+ class HLC_Optic_1p29 : HLC_Optic_PSO1 {
+ ACE_ScopeAdjust_Vertical[] = {};
+ ACE_ScopeAdjust_Horizontal[] = {};
+ ACE_ScopeAdjust_Increment = 0;
+ };
+};
\ No newline at end of file
diff --git a/optionals/compat_hlcmods_ak/config.cpp b/optionals/compat_hlcmods_ak/config.cpp
new file mode 100644
index 0000000000..7c8cdba2ba
--- /dev/null
+++ b/optionals/compat_hlcmods_ak/config.cpp
@@ -0,0 +1,14 @@
+#include "script_component.hpp"
+
+class CfgPatches {
+ class ADDON {
+ units[] = {};
+ weapons[] = {};
+ requiredVersion = REQUIRED_VERSION;
+ requiredAddons[] = {"hlcweapons_aks"};
+ author[]={"Ruthberg"};
+ VERSION_CONFIG;
+ };
+};
+
+#include "CfgWeapons.hpp"
diff --git a/optionals/compat_hlcmods_ak/script_component.hpp b/optionals/compat_hlcmods_ak/script_component.hpp
new file mode 100644
index 0000000000..a970229846
--- /dev/null
+++ b/optionals/compat_hlcmods_ak/script_component.hpp
@@ -0,0 +1,5 @@
+#define COMPONENT hlcweapons_aks_comp
+
+#include "\z\ace\addons\main\script_mod.hpp"
+
+#include "\z\ace\addons\main\script_macros.hpp"
diff --git a/optionals/compat_hlcmods_aug/CfgWeapons.hpp b/optionals/compat_hlcmods_aug/CfgWeapons.hpp
new file mode 100644
index 0000000000..b46cf485e1
--- /dev/null
+++ b/optionals/compat_hlcmods_aug/CfgWeapons.hpp
@@ -0,0 +1,51 @@
+
+class CfgWeapons
+{
+ class Rifle_Base_F;
+ class hlc_aug_base;
+ class hlc_rifle_aug: hlc_aug_base
+ {
+ ACE_barrelTwist=9;
+ ACE_barrelLength=20;
+ };
+ class hlc_rifle_auga1carb: hlc_rifle_aug
+ {
+ ACE_barrelTwist=9;
+ ACE_barrelLength=16;
+ };
+ class hlc_rifle_aughbar: hlc_rifle_aug
+ {
+ ACE_barrelTwist=9;
+ ACE_barrelLength=24;
+ };
+ class hlc_rifle_augpara: hlc_rifle_aug
+ {
+ ACE_barrelTwist=9;
+ ACE_barrelLength=16.5;
+ };
+ class hlc_rifle_auga2: hlc_rifle_aug
+ {
+ ACE_barrelTwist=9;
+ ACE_barrelLength=20;
+ };
+ class hlc_rifle_auga2para: hlc_rifle_auga2
+ {
+ ACE_barrelTwist=9;
+ ACE_barrelLength=16.5;
+ };
+ class hlc_rifle_auga2carb: hlc_rifle_auga2
+ {
+ ACE_barrelTwist=9;
+ ACE_barrelLength=18;
+ };
+ class hlc_rifle_auga2lsw: hlc_rifle_aughbar
+ {
+ ACE_barrelTwist=9;
+ ACE_barrelLength=24;
+ };
+ class hlc_rifle_auga3: hlc_rifle_aug
+ {
+ ACE_barrelTwist=9;
+ ACE_barrelLength=18;
+ };
+};
\ No newline at end of file
diff --git a/optionals/compat_hlcmods_aug/config.cpp b/optionals/compat_hlcmods_aug/config.cpp
new file mode 100644
index 0000000000..06192a6ffd
--- /dev/null
+++ b/optionals/compat_hlcmods_aug/config.cpp
@@ -0,0 +1,14 @@
+#include "script_component.hpp"
+
+class CfgPatches {
+ class ADDON {
+ units[] = {};
+ weapons[] = {};
+ requiredVersion = REQUIRED_VERSION;
+ requiredAddons[] = {"hlcweapons_AUG"};
+ author[]={"Ruthberg"};
+ VERSION_CONFIG;
+ };
+};
+
+#include "CfgWeapons.hpp"
diff --git a/optionals/compat_hlcmods_aug/script_component.hpp b/optionals/compat_hlcmods_aug/script_component.hpp
new file mode 100644
index 0000000000..d5a6712b6b
--- /dev/null
+++ b/optionals/compat_hlcmods_aug/script_component.hpp
@@ -0,0 +1,5 @@
+#define COMPONENT hlcweapons_AUG_comp
+
+#include "\z\ace\addons\main\script_mod.hpp"
+
+#include "\z\ace\addons\main\script_macros.hpp"
diff --git a/optionals/compat_hlcmods_core/CfgAmmo.hpp b/optionals/compat_hlcmods_core/CfgAmmo.hpp
new file mode 100644
index 0000000000..7259d2da3d
--- /dev/null
+++ b/optionals/compat_hlcmods_core/CfgAmmo.hpp
@@ -0,0 +1,316 @@
+class CfgAmmo
+{
+ class B_762x51_Ball;
+ class B_556x45_Ball;
+ class B_127x99_Ball;
+ class B_127x99_Ball_Tracer_Red;
+ class HLC_762x51_tracer;
+ class HLC_762x51_ball;
+ class HLC_556NATO_EPR: B_556x45_Ball
+ {
+ ACE_caliber=0.224;
+ ACE_bulletLength=0.906;
+ ACE_bulletMass=62;
+ ACE_ammoTempMuzzleVelocityShifts[]={-27.20, -26.44, -23.76, -21.00, -17.54, -13.10, -7.95, -1.62, 6.24, 15.48, 27.75};
+ ACE_ballisticCoefficients[]={0.151};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=7;
+ ACE_muzzleVelocities[]={723, 764, 796, 825, 843, 866, 878, 892, 906, 915, 922, 900};
+ ACE_barrelLengths[]={8.3, 9.4, 10.6, 11.8, 13.0, 14.2, 15.4, 16.5, 17.7, 18.9, 20.0, 24.0};
+ };
+ class HLC_556NATO_SOST: B_556x45_Ball
+ {
+ ACE_caliber=0.224;
+ ACE_bulletLength=0.906;
+ ACE_bulletMass=62;
+ 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.307};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={780, 886, 950};
+ ACE_barrelLengths[]={10, 15.5, 20};
+ };
+ class HLC_556NATO_SPR: B_556x45_Ball
+ {
+ ACE_caliber=0.224;
+ ACE_bulletLength=0.906;
+ ACE_bulletMass=77;
+ 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[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={624, 816, 832, 838};
+ ACE_barrelLengths[]={7.5, 14.5, 18, 20};
+ };
+ class HLC_300Blackout_Ball: B_556x45_Ball
+ {
+ ACE_caliber=0.308;
+ ACE_bulletLength=1.118;
+ ACE_bulletMass=147;
+ 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.398};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ICAO";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={559, 609, 625};
+ ACE_barrelLengths[]={6, 16, 20};
+ };
+ class HLC_300Blackout_SMK: HLC_300Blackout_Ball
+ {
+ ACE_caliber=0.308;
+ ACE_bulletLength=1.489;
+ ACE_bulletMass=220;
+ 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.608};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ICAO";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={300, 320, 340};
+ ACE_barrelLengths[]={9, 16, 20};
+ };
+ class HLC_762x39_Ball: HLC_300Blackout_Ball
+ {
+ ACE_caliber=0.308;
+ ACE_bulletLength=1.14;
+ ACE_bulletMass=123;
+ 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.275};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ICAO";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={650, 716, 750};
+ ACE_barrelLengths[]={10, 16.3, 20};
+ };
+ class HLC_762x39_Tracer: HLC_762x39_Ball
+ {
+ ACE_caliber=0.308;
+ ACE_bulletLength=1.14;
+ ACE_bulletMass=117;
+ 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.275};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ICAO";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={650, 716, 750};
+ ACE_barrelLengths[]={10, 16.3, 20};
+ };
+ class HLC_762x51_MK316_20in: B_762x51_Ball
+ {
+ ACE_caliber=0.308;
+ ACE_bulletLength=1.24;
+ ACE_bulletMass=175;
+ 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.243};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ICAO";
+ ACE_dragModel=7;
+ ACE_muzzleVelocities[]={750, 780, 790, 794};
+ ACE_barrelLengths[]={16, 20, 24, 26};
+ };
+ class HLC_762x51_BTSub: B_762x51_Ball
+ {
+ ACE_caliber=0.308;
+ ACE_bulletLength=1.340;
+ ACE_bulletMass=200;
+ 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.235};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ICAO";
+ ACE_dragModel=7;
+ ACE_muzzleVelocities[]={305, 325, 335, 340};
+ ACE_barrelLengths[]={16, 20, 24, 26};
+ };
+ class HLC_762x54_ball: HLC_762x51_ball
+ {
+ ACE_caliber=0.312;
+ ACE_bulletLength=1.14;
+ ACE_bulletMass=152;
+ 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.4};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ICAO";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={700, 800, 820, 833};
+ ACE_barrelLengths[]={16, 20, 24, 26};
+ };
+ class HLC_762x54_tracer: HLC_762x51_tracer
+ {
+ ACE_caliber=0.312;
+ ACE_bulletLength=1.14;
+ ACE_bulletMass=149;
+ 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.395};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ICAO";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={680, 750, 798, 800};
+ ACE_barrelLengths[]={16, 20, 24, 26};
+ };
+ class HLC_303Brit_B: B_556x45_Ball
+ {
+ ACE_caliber=0.311;
+ ACE_bulletLength=1.227;
+ ACE_bulletMass=174;
+ 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.499, 0.493, 0.48};
+ ACE_velocityBoundaries[]={671, 549};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={748, 761, 765};
+ ACE_barrelLengths[]={20, 24, 26};
+ };
+ class HLC_792x57_Ball: HLC_303Brit_B
+ {
+ ACE_caliber=0.318;
+ ACE_bulletLength=1.128;
+ ACE_bulletMass=196;
+ 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.315};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={785, 800, 815};
+ ACE_barrelLengths[]={20, 23.62, 26};
+ };
+ class HLC_542x42_ball: HLC_303Brit_B
+ {
+ };
+ class HLC_542x42_Tracer: HLC_303Brit_B
+ {
+ };
+ class FH_545x39_Ball: B_556x45_Ball
+ {
+ ACE_caliber=0.220;
+ ACE_bulletLength=0.85;
+ ACE_bulletMass=52.9;
+ 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.168};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=7;
+ ACE_muzzleVelocities[]={780, 880, 920};
+ ACE_barrelLengths[]={10, 16.3, 20};
+ };
+ class FH_545x39_7u1: FH_545x39_Ball
+ {
+ ACE_bulletMass=80;
+ 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_muzzleVelocities[]={260, 303, 320};
+ ACE_barrelLengths[]={10, 16.3, 20};
+ };
+ class HLC_57x28mm_JHP: FH_545x39_Ball
+ {
+ ACE_caliber=0.224;
+ ACE_bulletLength=0.495;
+ ACE_bulletMass=28;
+ 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.144};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={550, 625, 720};
+ ACE_barrelLengths[]={4, 6, 10.35};
+ };
+ class HLC_9x19_Ball: B_556x45_Ball
+ {
+ ACE_caliber=0.355;
+ ACE_bulletLength=0.610;
+ ACE_bulletMass=124;
+ 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.165};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={340, 370, 400};
+ ACE_barrelLengths[]={4, 5, 9};
+ };
+ class HLC_9x19_M882_SMG: B_556x45_Ball
+ {
+ ACE_caliber=0.355;
+ ACE_bulletLength=0.610;
+ ACE_bulletMass=124;
+ 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.165};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={340, 370, 400};
+ ACE_barrelLengths[]={4, 5, 9};
+ };
+ class HLC_9x19_GoldDot: HLC_9x19_Ball
+ {
+ ACE_muzzleVelocities[]={350, 380, 420};
+ };
+ class HLC_9x19_Subsonic: HLC_9x19_Ball
+ {
+ ACE_muzzleVelocities[]={300, 320, 340};
+ };
+ class HLC_10mm_FMJ: HLC_9x19_Ball
+ {
+ ACE_caliber=0.5;
+ ACE_bulletLength=0.764;
+ ACE_bulletMass=165;
+ 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.189};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={360, 400, 430};
+ ACE_barrelLengths[]={4, 4.61, 9};
+ };
+ class HLC_45ACP_Ball: B_556x45_Ball
+ {
+ ACE_caliber=0.452;
+ ACE_bulletLength=0.68;
+ ACE_bulletMass=230;
+ 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.195};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={230, 250, 285};
+ ACE_barrelLengths[]={4, 5, 9};
+ };
+ class FH_44Mag: HLC_45ACP_Ball
+ {
+ ACE_caliber=0.429;
+ ACE_bulletLength=0.804;
+ ACE_bulletMass=200;
+ 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.172};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={360, 390, 420};
+ ACE_barrelLengths[]={4, 7.5, 9};
+ };
+ class FH_50BMG_SLAP: B_127x99_Ball
+ {
+ ACE_caliber=0.308;
+ ACE_bulletLength=1.25;
+ ACE_bulletMass=350;
+ 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.056};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={1204};
+ ACE_barrelLengths[]={29};
+ };
+ class FH_50BMG_Raufoss: B_127x99_Ball
+ {
+ ACE_caliber=0.510;
+ ACE_bulletLength=2.380;
+ ACE_bulletMass=660;
+ 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[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={817};
+ ACE_barrelLengths[]={29};
+ };
+};
diff --git a/optionals/compat_hlcmods_core/config.cpp b/optionals/compat_hlcmods_core/config.cpp
new file mode 100644
index 0000000000..ecd780908f
--- /dev/null
+++ b/optionals/compat_hlcmods_core/config.cpp
@@ -0,0 +1,14 @@
+#include "script_component.hpp"
+
+class CfgPatches {
+ class ADDON {
+ units[] = {};
+ weapons[] = {};
+ requiredVersion = REQUIRED_VERSION;
+ requiredAddons[] = {"hlcweapons_core"};
+ author[]={"Ruthberg"};
+ VERSION_CONFIG;
+ };
+};
+
+#include "CfgAmmo.hpp"
diff --git a/optionals/compat_hlcmods_core/script_component.hpp b/optionals/compat_hlcmods_core/script_component.hpp
new file mode 100644
index 0000000000..444799ed4a
--- /dev/null
+++ b/optionals/compat_hlcmods_core/script_component.hpp
@@ -0,0 +1,5 @@
+#define COMPONENT hlcweapons_core_comp
+
+#include "\z\ace\addons\main\script_mod.hpp"
+
+#include "\z\ace\addons\main\script_macros.hpp"
diff --git a/optionals/compat_hlcmods_fal/CfgWeapons.hpp b/optionals/compat_hlcmods_fal/CfgWeapons.hpp
new file mode 100644
index 0000000000..05a17d8eb4
--- /dev/null
+++ b/optionals/compat_hlcmods_fal/CfgWeapons.hpp
@@ -0,0 +1,50 @@
+
+class CfgWeapons
+{
+ class hlc_fal_base;
+ class hlc_rifle_falosw: hlc_fal_base
+ {
+ ACE_barrelTwist=12;
+ ACE_barrelLength=13;
+ };
+ class hlc_rifle_osw_GL: hlc_rifle_falosw
+ {
+ ACE_barrelTwist=12;
+ ACE_barrelLength=13;
+ };
+ class hlc_rifle_SLR: hlc_fal_base
+ {
+ ACE_barrelTwist=12;
+ ACE_barrelLength=21.700001;
+ };
+ class hlc_rifle_STG58F: hlc_fal_base
+ {
+ ACE_barrelTwist=12;
+ ACE_barrelLength=21;
+ };
+ class hlc_rifle_FAL5061: hlc_fal_base
+ {
+ ACE_barrelTwist=12;
+ ACE_barrelLength=18;
+ };
+ class hlc_rifle_L1A1SLR: hlc_rifle_SLR
+ {
+ ACE_barrelTwist=12;
+ ACE_barrelLength=21.700001;
+ };
+ class hlc_rifle_c1A1: hlc_rifle_SLR
+ {
+ ACE_barrelTwist=12;
+ ACE_barrelLength=21.700001;
+ };
+ class hlc_rifle_LAR: hlc_rifle_FAL5061
+ {
+ ACE_barrelTwist=12;
+ ACE_barrelLength=21;
+ };
+ class hlc_rifle_SLRchopmod: hlc_rifle_FAL5061
+ {
+ ACE_barrelTwist=12;
+ ACE_barrelLength=18;
+ };
+};
\ No newline at end of file
diff --git a/optionals/compat_hlcmods_fal/config.cpp b/optionals/compat_hlcmods_fal/config.cpp
new file mode 100644
index 0000000000..5428e9871c
--- /dev/null
+++ b/optionals/compat_hlcmods_fal/config.cpp
@@ -0,0 +1,14 @@
+#include "script_component.hpp"
+
+class CfgPatches {
+ class ADDON {
+ units[] = {};
+ weapons[] = {};
+ requiredVersion = REQUIRED_VERSION;
+ requiredAddons[] = {"hlcweapons_falpocalypse"};
+ author[]={"Ruthberg"};
+ VERSION_CONFIG;
+ };
+};
+
+#include "CfgWeapons.hpp"
diff --git a/optionals/compat_hlcmods_fal/script_component.hpp b/optionals/compat_hlcmods_fal/script_component.hpp
new file mode 100644
index 0000000000..828722a5a4
--- /dev/null
+++ b/optionals/compat_hlcmods_fal/script_component.hpp
@@ -0,0 +1,5 @@
+#define COMPONENT hlcweapons_falpocalypse_comp
+
+#include "\z\ace\addons\main\script_mod.hpp"
+
+#include "\z\ace\addons\main\script_macros.hpp"
diff --git a/optionals/compat_hlcmods_g3/CfgWeapons.hpp b/optionals/compat_hlcmods_g3/CfgWeapons.hpp
new file mode 100644
index 0000000000..e45fe34048
--- /dev/null
+++ b/optionals/compat_hlcmods_g3/CfgWeapons.hpp
@@ -0,0 +1,45 @@
+
+class CfgWeapons
+{
+ class hlc_g3_base;
+ class hlc_rifle_g3sg1: hlc_g3_base
+ {
+ ACE_barrelTwist=12;
+ ACE_barrelLength=17.700001;
+ };
+ class hlc_rifle_psg1: hlc_rifle_g3sg1
+ {
+ ACE_barrelTwist=12;
+ ACE_barrelLength=25.6;
+ };
+ class hlc_rifle_g3a3: hlc_rifle_g3sg1
+ {
+ ACE_barrelTwist=12;
+ ACE_barrelLength=17.700001;
+ };
+ class hlc_rifle_g3a3ris: hlc_rifle_g3a3
+ {
+ ACE_barrelTwist=12;
+ ACE_barrelLength=17.700001;
+ };
+ class hlc_rifle_g3ka4: hlc_rifle_g3a3
+ {
+ ACE_barrelTwist=12;
+ ACE_barrelLength=12.4;
+ };
+ class HLC_Rifle_g3ka4_GL: hlc_rifle_g3ka4
+ {
+ ACE_barrelTwist=12;
+ ACE_barrelLength=12.4;
+ };
+ class hlc_rifle_hk51: hlc_rifle_g3sg1
+ {
+ ACE_barrelTwist=12;
+ ACE_barrelLength=8.3100004;
+ };
+ class hlc_rifle_hk53: hlc_rifle_g3sg1
+ {
+ ACE_barrelTwist=7;
+ ACE_barrelLength=8.3100004;
+ };
+};
\ No newline at end of file
diff --git a/optionals/compat_hlcmods_g3/config.cpp b/optionals/compat_hlcmods_g3/config.cpp
new file mode 100644
index 0000000000..6b79486364
--- /dev/null
+++ b/optionals/compat_hlcmods_g3/config.cpp
@@ -0,0 +1,14 @@
+#include "script_component.hpp"
+
+class CfgPatches {
+ class ADDON {
+ units[] = {};
+ weapons[] = {};
+ requiredVersion = REQUIRED_VERSION;
+ requiredAddons[] = {"hlcweapons_g3"};
+ author[]={"Ruthberg"};
+ VERSION_CONFIG;
+ };
+};
+
+#include "CfgWeapons.hpp"
diff --git a/optionals/compat_hlcmods_g3/script_component.hpp b/optionals/compat_hlcmods_g3/script_component.hpp
new file mode 100644
index 0000000000..642977f87b
--- /dev/null
+++ b/optionals/compat_hlcmods_g3/script_component.hpp
@@ -0,0 +1,5 @@
+#define COMPONENT hlcweapons_g3_comp
+
+#include "\z\ace\addons\main\script_mod.hpp"
+
+#include "\z\ace\addons\main\script_macros.hpp"
diff --git a/optionals/compat_hlcmods_m14/CfgWeapons.hpp b/optionals/compat_hlcmods_m14/CfgWeapons.hpp
new file mode 100644
index 0000000000..01a67ff063
--- /dev/null
+++ b/optionals/compat_hlcmods_m14/CfgWeapons.hpp
@@ -0,0 +1,16 @@
+
+class CfgWeapons
+{
+ class Rifle_Base_F;
+ class hlc_rifle_M14;
+ class hlc_M14_base: Rifle_Base_F
+ {
+ ACE_barrelTwist=12;
+ ACE_barrelLength=22;
+ };
+ class hlc_rifle_m14sopmod: hlc_rifle_M14
+ {
+ ACE_barrelTwist=12;
+ ACE_barrelLength=18;
+ };
+};
diff --git a/optionals/compat_hlcmods_m14/config.cpp b/optionals/compat_hlcmods_m14/config.cpp
new file mode 100644
index 0000000000..cdf11a7db1
--- /dev/null
+++ b/optionals/compat_hlcmods_m14/config.cpp
@@ -0,0 +1,14 @@
+#include "script_component.hpp"
+
+class CfgPatches {
+ class ADDON {
+ units[] = {};
+ weapons[] = {};
+ requiredVersion = REQUIRED_VERSION;
+ requiredAddons[] = {"hlcweapons_m14"};
+ author[]={"Ruthberg"};
+ VERSION_CONFIG;
+ };
+};
+
+#include "CfgWeapons.hpp"
diff --git a/optionals/compat_hlcmods_m14/script_component.hpp b/optionals/compat_hlcmods_m14/script_component.hpp
new file mode 100644
index 0000000000..a29b751195
--- /dev/null
+++ b/optionals/compat_hlcmods_m14/script_component.hpp
@@ -0,0 +1,5 @@
+#define COMPONENT hlcweapons_m14_comp
+
+#include "\z\ace\addons\main\script_mod.hpp"
+
+#include "\z\ace\addons\main\script_macros.hpp"
diff --git a/optionals/compat_hlcmods_m60e4/CfgWeapons.hpp b/optionals/compat_hlcmods_m60e4/CfgWeapons.hpp
new file mode 100644
index 0000000000..9532c1968d
--- /dev/null
+++ b/optionals/compat_hlcmods_m60e4/CfgWeapons.hpp
@@ -0,0 +1,15 @@
+
+class CfgWeapons
+{
+ class hlc_M60e4_base;
+ class hlc_lmg_M60E4: hlc_M60e4_base
+ {
+ ACE_barrelTwist=12;
+ ACE_barrelLength=17;
+ };
+ class hlc_lmg_m60: hlc_M60e4_base
+ {
+ ACE_barrelTwist=12;
+ ACE_barrelLength=22;
+ };
+};
diff --git a/optionals/compat_hlcmods_m60e4/config.cpp b/optionals/compat_hlcmods_m60e4/config.cpp
new file mode 100644
index 0000000000..1df3a97a20
--- /dev/null
+++ b/optionals/compat_hlcmods_m60e4/config.cpp
@@ -0,0 +1,14 @@
+#include "script_component.hpp"
+
+class CfgPatches {
+ class ADDON {
+ units[] = {};
+ weapons[] = {};
+ requiredVersion = REQUIRED_VERSION;
+ requiredAddons[] = {"hlcweapons_m60e4"};
+ author[]={"Ruthberg"};
+ VERSION_CONFIG;
+ };
+};
+
+#include "CfgWeapons.hpp"
diff --git a/optionals/compat_hlcmods_m60e4/script_component.hpp b/optionals/compat_hlcmods_m60e4/script_component.hpp
new file mode 100644
index 0000000000..4a5a9c03b0
--- /dev/null
+++ b/optionals/compat_hlcmods_m60e4/script_component.hpp
@@ -0,0 +1,5 @@
+#define COMPONENT hlc_m60e4_comp
+
+#include "\z\ace\addons\main\script_mod.hpp"
+
+#include "\z\ace\addons\main\script_macros.hpp"
diff --git a/optionals/compat_rh_acc/CfgWeapons.hpp b/optionals/compat_rh_acc/CfgWeapons.hpp
new file mode 100644
index 0000000000..4dda8ffbe0
--- /dev/null
+++ b/optionals/compat_rh_acc/CfgWeapons.hpp
@@ -0,0 +1,131 @@
+
+class CfgWeapons {
+ class ItemCore;
+ class InventoryOpticsItem_Base_F;
+
+ class RH_accupoint : ItemCore {
+ ACE_ScopeAdjust_Vertical[] = { -4, 30 };
+ ACE_ScopeAdjust_Horizontal[] = { -6, 6 };
+ ACE_ScopeAdjust_Increment = 0.1;
+ class ItemInfo : InventoryOpticsItem_Base_F {
+ class OpticsModes {
+ class Accupoint {
+ discreteDistance[] = { 100 };
+ discreteDistanceInitIndex = 0;
+ };
+ };
+ };
+ };
+
+ class RH_m3lr : ItemCore {
+ ACE_ScopeAdjust_Vertical[] = { -4, 30 };
+ ACE_ScopeAdjust_Horizontal[] = { -6, 6 };
+ ACE_ScopeAdjust_Increment = 0.1;
+ class ItemInfo : InventoryOpticsItem_Base_F {
+ class OpticsModes {
+ class m3lr {
+ discreteDistance[] = { 100 };
+ discreteDistanceInitIndex = 0;
+ };
+ };
+ };
+ };
+
+ class RH_leu_mk4 : ItemCore {
+ ACE_ScopeAdjust_Vertical[] = { -4, 30 };
+ ACE_ScopeAdjust_Horizontal[] = { -6, 6 };
+ ACE_ScopeAdjust_Increment = 0.1;
+ class ItemInfo : InventoryOpticsItem_Base_F {
+ class OpticsModes {
+ class mk4 {
+ discreteDistance[] = { 100 };
+ discreteDistanceInitIndex = 0;
+ };
+ };
+ };
+ };
+
+ class RH_c79 : ItemCore {
+ ACE_ScopeAdjust_Vertical[] = { -4, 30 };
+ ACE_ScopeAdjust_Horizontal[] = { -6, 6 };
+ ACE_ScopeAdjust_Increment = 0.1;
+ class ItemInfo : InventoryOpticsItem_Base_F {
+ class OpticsModes {
+ class c79scope {
+ discreteDistance[] = { 100 };
+ discreteDistanceInitIndex = 0;
+ };
+ };
+ };
+ };
+
+ class RH_c79_2d : ItemCore {
+ ACE_ScopeAdjust_Vertical[] = { -4, 30 };
+ ACE_ScopeAdjust_Horizontal[] = { -6, 6 };
+ ACE_ScopeAdjust_Increment = 0.1;
+ class ItemInfo : InventoryOpticsItem_Base_F {
+ class OpticsModes {
+ class c79scope {
+ discreteDistance[] = { 100 };
+ discreteDistanceInitIndex = 0;
+ };
+ };
+ };
+ };
+
+ class RH_anpvs10 : ItemCore {
+ ACE_ScopeAdjust_Vertical[] = { -4, 30 };
+ ACE_ScopeAdjust_Horizontal[] = { -6, 6 };
+ ACE_ScopeAdjust_Increment = 0.1;
+ class ItemInfo : InventoryOpticsItem_Base_F {
+ class OpticsModes {
+ class pvs10 {
+ discreteDistance[] = { 100 };
+ discreteDistanceInitIndex = 0;
+ };
+ };
+ };
+ };
+
+ class RH_pas13cm : ItemCore {
+ ACE_ScopeAdjust_Vertical[] = { -4, 30 };
+ ACE_ScopeAdjust_Horizontal[] = { -6, 6 };
+ ACE_ScopeAdjust_Increment = 0.1;
+ class ItemInfo : InventoryOpticsItem_Base_F {
+ class OpticsModes {
+ class MTWS {
+ discreteDistance[] = { 100 };
+ discreteDistanceInitIndex = 0;
+ };
+ };
+ };
+ };
+
+ class RH_pas13cmg : ItemCore {
+ ACE_ScopeAdjust_Vertical[] = { -4, 30 };
+ ACE_ScopeAdjust_Horizontal[] = { -6, 6 };
+ ACE_ScopeAdjust_Increment = 0.1;
+ class ItemInfo : InventoryOpticsItem_Base_F {
+ class OpticsModes {
+ class MTWSmg {
+ discreteDistance[] = { 100 };
+ discreteDistanceInitIndex = 0;
+ };
+ };
+ };
+ };
+
+ class RH_pas13ch : ItemCore {
+ ACE_ScopeAdjust_Vertical[] = { -4, 30 };
+ ACE_ScopeAdjust_Horizontal[] = { -6, 6 };
+ ACE_ScopeAdjust_Increment = 0.1;
+ class ItemInfo : InventoryOpticsItem_Base_F {
+ class OpticsModes {
+ class HTWS {
+ discreteDistance[] = { 100 };
+ discreteDistanceInitIndex = 0;
+ };
+ };
+ };
+ };
+};
diff --git a/optionals/compat_rh_acc/config.cpp b/optionals/compat_rh_acc/config.cpp
new file mode 100644
index 0000000000..9f563bd157
--- /dev/null
+++ b/optionals/compat_rh_acc/config.cpp
@@ -0,0 +1,14 @@
+#include "script_component.hpp"
+
+class CfgPatches {
+ class ADDON {
+ units[] = {};
+ weapons[] = {};
+ requiredVersion = REQUIRED_VERSION;
+ requiredAddons[] = {"RH_acc"};
+ author[]={"Ruthberg"};
+ VERSION_CONFIG;
+ };
+};
+
+#include "CfgWeapons.hpp"
diff --git a/optionals/compat_rh_acc/script_component.hpp b/optionals/compat_rh_acc/script_component.hpp
new file mode 100644
index 0000000000..4b36a38ce0
--- /dev/null
+++ b/optionals/compat_rh_acc/script_component.hpp
@@ -0,0 +1,5 @@
+#define COMPONENT RH_acc_comp
+
+#include "\z\ace\addons\main\script_mod.hpp"
+
+#include "\z\ace\addons\main\script_macros.hpp"
diff --git a/optionals/compat_rh_de/CfgAmmo.hpp b/optionals/compat_rh_de/CfgAmmo.hpp
new file mode 100644
index 0000000000..b66b55f530
--- /dev/null
+++ b/optionals/compat_rh_de/CfgAmmo.hpp
@@ -0,0 +1,161 @@
+
+class CfgAmmo
+{
+ class BulletBase;
+ class RH_50_AE_Ball: BulletBase
+ {
+ ACE_caliber=0.5;
+ ACE_bulletLength=1.110;
+ ACE_bulletMass=325;
+ 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.228};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={360, 398, 420};
+ ACE_barrelLengths[]={4, 6, 9};
+ };
+ class RH_454_Casull: BulletBase
+ {
+ ACE_caliber=0.452;
+ ACE_bulletLength=0.895;
+ ACE_bulletMass=325;
+ 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.171};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={450, 490, 500};
+ ACE_barrelLengths[]={4, 7.5, 9};
+ };
+ class RH_32ACP: BulletBase
+ {
+ ACE_caliber=0.3125;
+ ACE_bulletLength=0.610;
+ ACE_bulletMass=65;
+ 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.118};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={282, 300, 320};
+ ACE_barrelLengths[]={4, 5, 9};
+ };
+ class RH_45ACP: BulletBase
+ {
+ ACE_caliber=0.452;
+ ACE_bulletLength=0.68;
+ ACE_bulletMass=230;
+ 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.195};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={230, 250, 285};
+ ACE_barrelLengths[]={4, 5, 9};
+ };
+ class RH_B_40SW: BulletBase
+ {
+ ACE_caliber=0.4;
+ ACE_bulletLength=0.447;
+ ACE_bulletMass=135;
+ 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.105, 0.115, 0.120, 0.105};
+ ACE_velocityBoundaries[]={365, 305, 259};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={360, 380, 400};
+ ACE_barrelLengths[]={4, 6, 9};
+ };
+ class RH_44mag_ball: BulletBase
+ {
+ ACE_caliber=0.429;
+ ACE_bulletLength=0.804;
+ ACE_bulletMass=200;
+ 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.172};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={360, 390, 420};
+ ACE_barrelLengths[]={4, 7.5, 9};
+ };
+ class RH_357mag_ball: BulletBase
+ {
+ ACE_caliber=0.357;
+ ACE_bulletLength=0.541;
+ ACE_bulletMass=125;
+ 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.148};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={490, 510, 535};
+ ACE_barrelLengths[]={4, 6, 9};
+ };
+ class RH_762x25: BulletBase
+ {
+ ACE_caliber=0.310;
+ ACE_bulletLength=0.5455;
+ ACE_bulletMass=86;
+ 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.17};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={360, 380, 400};
+ ACE_barrelLengths[]={4, 6, 9};
+ };
+ class RH_9x18_Ball: BulletBase
+ {
+ ACE_caliber=0.365;
+ ACE_bulletLength=0.610;
+ ACE_bulletMass=92.6;
+ 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.125};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={298, 330, 350};
+ ACE_barrelLengths[]={3.8, 5, 9};
+ };
+ class RH_B_9x19_Ball: BulletBase
+ {
+ ACE_caliber=0.355;
+ ACE_bulletLength=0.610;
+ ACE_bulletMass=124;
+ 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.165};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={340, 370, 400};
+ ACE_barrelLengths[]={4, 5, 9};
+ };
+ class RH_B_22LR_SD: BulletBase
+ {
+ ACE_caliber=0.223;
+ ACE_bulletLength=0.45;
+ ACE_bulletMass=38;
+ 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.111};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={330, 340, 360};
+ ACE_barrelLengths[]={4, 6, 9};
+ };
+ class RH_57x28mm: BulletBase
+ {
+ ACE_caliber=0.224;
+ ACE_bulletLength=0.495;
+ ACE_bulletMass=28;
+ 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.144};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={550, 625, 720};
+ ACE_barrelLengths[]={4, 6, 10.35};
+ };
+};
\ No newline at end of file
diff --git a/optionals/compat_rh_de/CfgWeapons.hpp b/optionals/compat_rh_de/CfgWeapons.hpp
new file mode 100644
index 0000000000..8fdff293c9
--- /dev/null
+++ b/optionals/compat_rh_de/CfgWeapons.hpp
@@ -0,0 +1,140 @@
+class CfgWeapons
+{
+ class Pistol_Base_F;
+ class RH_Pistol_Base_F;
+ class RH_deagle: RH_Pistol_Base_F
+ {
+ ACE_barrelTwist=19;
+ ACE_barrelLength=6;
+ };
+ class RH_mateba: Pistol_Base_F
+ {
+ ACE_barrelTwist=14;
+ ACE_barrelLength=6;
+ };
+ class RH_mp412: Pistol_Base_F
+ {
+ ACE_barrelTwist=10;
+ ACE_barrelLength=6;
+ };
+ class RH_python: Pistol_Base_F
+ {
+ ACE_barrelTwist=14;
+ ACE_barrelLength=6;
+ };
+ class RH_bull: RH_python
+ {
+ ACE_barrelTwist=24;
+ ACE_barrelLength=6.5;
+ };
+ class RH_ttracker: Pistol_Base_F
+ {
+ ACE_barrelTwist=12;
+ ACE_barrelLength=4;
+ };
+ class RH_cz75: RH_Pistol_Base_F
+ {
+ ACE_barrelTwist=9.7;
+ ACE_barrelLength=4.7;
+ };
+ class RH_p226: RH_Pistol_Base_F
+ {
+ ACE_barrelTwist=9.8;
+ ACE_barrelLength=4.4;
+ };
+ class RH_sw659: RH_Pistol_Base_F
+ {
+ ACE_barrelTwist=9.8;
+ ACE_barrelLength=7.44;
+ };
+ class RH_usp: RH_Pistol_Base_F
+ {
+ ACE_barrelTwist=16;
+ ACE_barrelLength=4.41;
+ };
+ class RH_uspm: RH_Pistol_Base_F
+ {
+ ACE_barrelTwist=16;
+ ACE_barrelLength=6;
+ };
+ class RH_kimber: RH_Pistol_Base_F
+ {
+ ACE_barrelTwist=16;
+ ACE_barrelLength=5;
+ };
+ class RH_m1911: RH_Pistol_Base_F
+ {
+ ACE_barrelTwist=16;
+ ACE_barrelLength=5;
+ };
+ class RH_tt33: RH_Pistol_Base_F
+ {
+ ACE_barrelTwist=9.45;
+ ACE_barrelLength=4.6;
+ };
+ class RH_mak: RH_Pistol_Base_F
+ {
+ ACE_barrelTwist=9.45;
+ ACE_barrelLength=3.68;
+ };
+ class RH_mk2: RH_Pistol_Base_F
+ {
+ ACE_barrelTwist=16;
+ ACE_barrelLength=4;
+ };
+ class RH_m9: RH_Pistol_Base_F
+ {
+ ACE_barrelTwist=9.8;
+ ACE_barrelLength=4.9;
+ };
+ class RH_g18: RH_Pistol_Base_F
+ {
+ ACE_barrelTwist=9.8;
+ ACE_barrelLength=4.49;
+ };
+ class RH_g17: RH_Pistol_Base_F
+ {
+ ACE_barrelTwist=9.8;
+ ACE_barrelLength=4.49;
+ };
+ class RH_g19: RH_Pistol_Base_F
+ {
+ ACE_barrelTwist=9.8;
+ ACE_barrelLength=4;
+ };
+ class RH_gsh18: RH_Pistol_Base_F
+ {
+ ACE_barrelTwist=9.8;
+ ACE_barrelLength=4.1;
+ };
+ class RH_fnp45: RH_Pistol_Base_F
+ {
+ ACE_barrelTwist=16;
+ ACE_barrelLength=4.5;
+ };
+ class RH_fn57: RH_fnp45
+ {
+ ACE_barrelTwist=9.1;
+ ACE_barrelLength=4.8;
+ };
+ class RH_vp70: RH_Pistol_Base_F
+ {
+ ACE_barrelTwist=9.8;
+ ACE_barrelLength=4.6;
+ };
+ class RH_vz61: RH_Pistol_Base_F
+ {
+ ACE_barrelTwist=16;
+ ACE_barrelLength=4.5;
+ };
+ class RH_tec9: RH_Pistol_Base_F
+ {
+ ACE_barrelTwist=9.8;
+ ACE_barrelLength=5;
+ };
+ class RH_muzi: RH_Pistol_Base_F
+ {
+ ACE_barrelTwist=9.8;
+ ACE_barrelLength=5;
+ };
+};
\ No newline at end of file
diff --git a/optionals/compat_rh_de/config.cpp b/optionals/compat_rh_de/config.cpp
new file mode 100644
index 0000000000..3d82eab05a
--- /dev/null
+++ b/optionals/compat_rh_de/config.cpp
@@ -0,0 +1,15 @@
+#include "script_component.hpp"
+
+class CfgPatches {
+ class ADDON {
+ units[] = {};
+ weapons[] = {};
+ requiredVersion = REQUIRED_VERSION;
+ requiredAddons[] = {"RH_de_cfg"};
+ author[]={"Ruthberg"};
+ VERSION_CONFIG;
+ };
+};
+
+#include "CfgAmmo.hpp"
+#include "CfgWeapons.hpp"
diff --git a/optionals/compat_rh_de/script_component.hpp b/optionals/compat_rh_de/script_component.hpp
new file mode 100644
index 0000000000..07ed06ae3f
--- /dev/null
+++ b/optionals/compat_rh_de/script_component.hpp
@@ -0,0 +1,5 @@
+#define COMPONENT RH_de_cfg_comp
+
+#include "\z\ace\addons\main\script_mod.hpp"
+
+#include "\z\ace\addons\main\script_macros.hpp"
diff --git a/optionals/compat_rh_m4/CfgAmmo.hpp b/optionals/compat_rh_m4/CfgAmmo.hpp
new file mode 100644
index 0000000000..c15e0e503a
--- /dev/null
+++ b/optionals/compat_rh_m4/CfgAmmo.hpp
@@ -0,0 +1,206 @@
+class CfgAmmo {
+
+ class Default;
+ class BulletCore;
+ class BulletBase;
+ class B_9x21_Ball;
+ class B_556x45_Ball;
+ class B_65x39_Caseless;
+ class B_762x51_Ball;
+
+ class RH_9x19_B_M822: BulletBase
+ {
+ ACE_caliber=0.355;
+ ACE_bulletLength=0.610;
+ ACE_bulletMass=124;
+ 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.165};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={340, 370, 400};
+ ACE_barrelLengths[]={4, 5, 9};
+ };
+ class RH_9x19_B_HP: BulletBase
+ {
+ ACE_caliber=0.355;
+ ACE_bulletLength=0.610;
+ ACE_bulletMass=124;
+ 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.165};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={340, 370, 400};
+ ACE_barrelLengths[]={4, 5, 9};
+ };
+ class RH_9x19_B_HPSB: BulletBase
+ {
+ ACE_caliber=0.355;
+ ACE_bulletLength=0.603;
+ ACE_bulletMass=147;
+ 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.212};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={295, 310, 330};
+ ACE_barrelLengths[]={4, 5, 9};
+ };
+ class RH_556x45_B_M855A1: B_556x45_Ball
+ {
+ ACE_caliber=0.224;
+ ACE_bulletLength=0.906;
+ ACE_bulletMass=62;
+ ACE_ammoTempMuzzleVelocityShifts[]={-27.20, -26.44, -23.76, -21.00, -17.54, -13.10, -7.95, -1.62, 6.24, 15.48, 27.75};
+ ACE_ballisticCoefficients[]={0.151};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=7;
+ ACE_muzzleVelocities[]={723, 764, 796, 825, 843, 866, 878, 892, 906, 915, 922, 900};
+ ACE_barrelLengths[]={8.3, 9.4, 10.6, 11.8, 13.0, 14.2, 15.4, 16.5, 17.7, 18.9, 20.0, 24.0};
+ };
+ class RH_556x45_B_Mk318: B_556x45_Ball
+ {
+ ACE_caliber=0.224;
+ ACE_bulletLength=0.906;
+ ACE_bulletMass=62;
+ 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.307};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={780, 886, 950};
+ ACE_barrelLengths[]={10, 15.5, 20};
+ };
+ class RH_556x45_B_Mk262: B_556x45_Ball
+ {
+ ACE_caliber=0.224;
+ ACE_bulletLength=0.906;
+ ACE_bulletMass=77;
+ 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[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={624, 816, 832, 838};
+ ACE_barrelLengths[]={7.5, 14.5, 18, 20};
+ };
+ class RH_68x43_B_FMJ: B_65x39_Caseless
+ {
+ ACE_caliber=0.277;
+ ACE_bulletLength=0.959;
+ ACE_bulletMass=115;
+ 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.162};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ICAO";
+ ACE_dragModel=7;
+ ACE_muzzleVelocities[]={713, 785, 810, 850};
+ ACE_barrelLengths[]={12, 16, 20, 24};
+ };
+ class RH_68x43_B_Match: B_65x39_Caseless
+ {
+ ACE_caliber=0.277;
+ ACE_bulletLength=1.250;
+ ACE_bulletMass=135;
+ 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.253};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ICAO";
+ ACE_dragModel=7;
+ ACE_muzzleVelocities[]={700, 732, 750, 780};
+ ACE_barrelLengths[]={12, 16, 20, 24};
+ };
+ class RH_762x35_B_FMJ: B_65x39_Caseless
+ {
+ ACE_caliber=0.308;
+ ACE_bulletLength=1.118;
+ ACE_bulletMass=147;
+ 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.398};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ICAO";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={559, 609, 625};
+ ACE_barrelLengths[]={6, 16, 20};
+ };
+ class RH_762x35_B_Match: B_65x39_Caseless
+ {
+ ACE_caliber=0.308;
+ ACE_bulletLength=1.153;
+ ACE_bulletMass=125;
+ 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.349, 0.338, 0.330, 0.310};
+ ACE_velocityBoundaries[]={792, 610, 488};
+ ACE_standardAtmosphere="ICAO";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={572, 676, 700};
+ ACE_barrelLengths[]={6, 16, 20};
+ };
+ class RH_762x35_B_MSB: B_65x39_Caseless
+ {
+ ACE_caliber=0.308;
+ ACE_bulletLength=1.489;
+ ACE_bulletMass=220;
+ 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.608};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ICAO";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={300, 320, 340};
+ ACE_barrelLengths[]={9, 16, 20};
+ };
+ class RH_762x51_B_M80A1: B_762x51_Ball
+ {
+ ACE_caliber=0.308;
+ ACE_bulletLength=1.14;
+ ACE_bulletMass=146;
+ 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.2};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ICAO";
+ ACE_dragModel=7;
+ ACE_muzzleVelocities[]={700, 800, 820, 833, 845};
+ ACE_barrelLengths[]={10, 16, 20, 24, 26};
+ };
+ class RH_762x51_B_Mk316LR: B_762x51_Ball
+ {
+ ACE_caliber=0.308;
+ ACE_bulletLength=1.24;
+ ACE_bulletMass=175;
+ 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[]={};
+ ACE_standardAtmosphere="ICAO";
+ ACE_dragModel=7;
+ ACE_muzzleVelocities[]={775, 790, 805, 810};
+ ACE_barrelLengths[]={16, 20, 24, 26};
+ };
+ class RH_762x51_B_Mk319: B_762x51_Ball
+ {
+ ACE_caliber=0.308;
+ ACE_bulletLength=1.24;
+ ACE_bulletMass=130;
+ 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[]={};
+ ACE_standardAtmosphere="ICAO";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={838, 892, 910};
+ ACE_barrelLengths[]={13, 16, 20};
+ };
+ class RH_762x51_B_LFMJSB: B_762x51_Ball
+ {
+ ACE_caliber=0.308;
+ ACE_bulletLength=1.340;
+ ACE_bulletMass=200;
+ 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.235};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ICAO";
+ ACE_dragModel=7;
+ ACE_muzzleVelocities[]={305, 325, 335, 340};
+ ACE_barrelLengths[]={16, 20, 24, 26};
+ };
+};
diff --git a/optionals/compat_rh_m4/CfgWeapons.hpp b/optionals/compat_rh_m4/CfgWeapons.hpp
new file mode 100644
index 0000000000..69536e9302
--- /dev/null
+++ b/optionals/compat_rh_m4/CfgWeapons.hpp
@@ -0,0 +1,130 @@
+
+class CfgWeapons
+{
+ class Rifle_Base_F;
+ class RH_ar10: Rifle_Base_F
+ {
+ ACE_barrelTwist=11.25;
+ ACE_barrelLength=20.8;
+ };
+ class RH_m110: Rifle_Base_F
+ {
+ ACE_barrelTwist=10;
+ ACE_barrelLength=20;
+ };
+ class RH_Mk11: RH_m110
+ {
+ ACE_barrelTwist=11.25;
+ ACE_barrelLength=24;
+ };
+ class RH_SR25EC: RH_m110
+ {
+ ACE_barrelTwist=11.25;
+ ACE_barrelLength=20;
+ };
+ class RH_m4: Rifle_Base_F
+ {
+ ACE_barrelTwist=7;
+ ACE_barrelLength=14.5;
+ };
+ class RH_M4_ris: RH_m4
+ {
+ ACE_barrelTwist=7;
+ ACE_barrelLength=14.5;
+ };
+ class RH_M4A1_ris: RH_M4_ris
+ {
+ ACE_barrelTwist=7;
+ ACE_barrelLength=14.5;
+ };
+ class RH_M4m: RH_M4A1_ris
+ {
+ ACE_barrelTwist=7;
+ ACE_barrelLength=10.5;
+ };
+ class RH_M4sbr: RH_M4A1_ris
+ {
+ ACE_barrelTwist=7;
+ ACE_barrelLength=10.5;
+ };
+ class RH_hb: Rifle_Base_F
+ {
+ ACE_barrelTwist=8;
+ ACE_barrelLength=6;
+ };
+ class RH_hb_b: RH_hb
+ {
+ ACE_barrelTwist=8;
+ ACE_barrelLength=6;
+ };
+ class RH_sbr9: Rifle_Base_F
+ {
+ ACE_barrelTwist=9.7;
+ ACE_barrelLength=9;
+ };
+ class RH_M4A6: RH_M4A1_ris
+ {
+ ACE_barrelTwist=10;
+ ACE_barrelLength=14.5;
+ };
+ class RH_M16a1: RH_m4
+ {
+ ACE_barrelTwist=14;
+ ACE_barrelLength=20;
+ };
+ class RH_M16A2: RH_m4
+ {
+ ACE_barrelTwist=7;
+ ACE_barrelLength=20;
+ };
+ class RH_M16A4 : RH_M4_ris
+ {
+ ACE_barrelTwist=7;
+ ACE_barrelLength=20;
+ };
+ class RH_M16A3: RH_M16A4
+ {
+ ACE_barrelTwist=7;
+ ACE_barrelLength=20;
+ };
+ class RH_M16A4_m: RH_M16A4
+ {
+ ACE_barrelTwist=7;
+ ACE_barrelLength=20;
+ };
+ class RH_M16A6: RH_M16A4
+ {
+ ACE_barrelTwist=7;
+ ACE_barrelLength=20;
+ };
+ class RH_Mk12mod1: RH_M16A4
+ {
+ ACE_barrelTwist=7;
+ ACE_barrelLength=18;
+ };
+ class RH_SAMR: RH_Mk12mod1
+ {
+ ACE_barrelTwist=7.7;
+ ACE_barrelLength=20;
+ };
+ class RH_Hk416: RH_M4A1_ris
+ {
+ ACE_barrelTwist=7;
+ ACE_barrelLength=14.5;
+ };
+ class RH_Hk416s: RH_M4sbr
+ {
+ ACE_barrelTwist=7;
+ ACE_barrelLength=10.4;
+ };
+ class RH_Hk416c: RH_M4sbr
+ {
+ ACE_barrelTwist=7;
+ ACE_barrelLength=9;
+ };
+ class RH_M27IAR: RH_Mk12mod1
+ {
+ ACE_barrelTwist=7;
+ ACE_barrelLength=16.5;
+ };
+};
\ No newline at end of file
diff --git a/optionals/compat_rh_m4/config.cpp b/optionals/compat_rh_m4/config.cpp
new file mode 100644
index 0000000000..9c28be4f89
--- /dev/null
+++ b/optionals/compat_rh_m4/config.cpp
@@ -0,0 +1,15 @@
+#include "script_component.hpp"
+
+class CfgPatches {
+ class ADDON {
+ units[] = {};
+ weapons[] = {};
+ requiredVersion = REQUIRED_VERSION;
+ requiredAddons[] = {"RH_m4_cfg"};
+ author[]={"Ruthberg"};
+ VERSION_CONFIG;
+ };
+};
+
+#include "CfgAmmo.hpp"
+#include "CfgWeapons.hpp"
diff --git a/optionals/compat_rh_m4/script_component.hpp b/optionals/compat_rh_m4/script_component.hpp
new file mode 100644
index 0000000000..167c926dd7
--- /dev/null
+++ b/optionals/compat_rh_m4/script_component.hpp
@@ -0,0 +1,5 @@
+#define COMPONENT RH_m4_cfg_comp
+
+#include "\z\ace\addons\main\script_mod.hpp"
+
+#include "\z\ace\addons\main\script_macros.hpp"
diff --git a/optionals/compat_rh_pdw/CfgAmmo.hpp b/optionals/compat_rh_pdw/CfgAmmo.hpp
new file mode 100644
index 0000000000..706344ff8c
--- /dev/null
+++ b/optionals/compat_rh_pdw/CfgAmmo.hpp
@@ -0,0 +1,15 @@
+
+class BulletBase;
+class RH_B_6x35: BulletBase
+{
+ ACE_caliber=0.224;
+ ACE_bulletLength=0.445;
+ ACE_bulletMass=65;
+ 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.26};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={730, 750, 760};
+ ACE_barrelLengths[]={8, 10, 12};
+};
\ No newline at end of file
diff --git a/optionals/compat_rh_pdw/CfgWeapons.hpp b/optionals/compat_rh_pdw/CfgWeapons.hpp
new file mode 100644
index 0000000000..b009a202ce
--- /dev/null
+++ b/optionals/compat_rh_pdw/CfgWeapons.hpp
@@ -0,0 +1,10 @@
+
+class CfgWeapons
+{
+ class Rifle_Base_F;
+ class RH_PDW: Rifle_Base_F
+ {
+ ACE_barrelTwist=7;
+ ACE_barrelLength=10;
+ };
+};
diff --git a/optionals/compat_rh_pdw/config.cpp b/optionals/compat_rh_pdw/config.cpp
new file mode 100644
index 0000000000..4aed0e6241
--- /dev/null
+++ b/optionals/compat_rh_pdw/config.cpp
@@ -0,0 +1,15 @@
+#include "script_component.hpp"
+
+class CfgPatches {
+ class ADDON {
+ units[] = {};
+ weapons[] = {};
+ requiredVersion = REQUIRED_VERSION;
+ requiredAddons[] = {"RH_PDW"};
+ author[]={"Ruthberg"};
+ VERSION_CONFIG;
+ };
+};
+
+#include "CfgAmmo.hpp"
+#include "CfgWeapons.hpp"
diff --git a/optionals/compat_rh_pdw/script_component.hpp b/optionals/compat_rh_pdw/script_component.hpp
new file mode 100644
index 0000000000..67c4617e06
--- /dev/null
+++ b/optionals/compat_rh_pdw/script_component.hpp
@@ -0,0 +1,5 @@
+#define COMPONENT RH_PDW_comp
+
+#include "\z\ace\addons\main\script_mod.hpp"
+
+#include "\z\ace\addons\main\script_macros.hpp"
diff --git a/optionals/compat_rksl_pm_ii/CfgWeapons.hpp b/optionals/compat_rksl_pm_ii/CfgWeapons.hpp
new file mode 100644
index 0000000000..621dd98b71
--- /dev/null
+++ b/optionals/compat_rksl_pm_ii/CfgWeapons.hpp
@@ -0,0 +1,33 @@
+
+class CfgWeapons {
+ class ItemCore;
+ class InventoryOpticsItem_Base_F;
+
+ class RKSL_optic_PMII_312 : ItemCore {
+ ACE_ScopeAdjust_Vertical[] = { -4, 30 };
+ ACE_ScopeAdjust_Horizontal[] = { -6, 6 };
+ ACE_ScopeAdjust_Increment = 0.1;
+ class ItemInfo : InventoryOpticsItem_Base_F {
+ class OpticsModes {
+ class Snip {
+ discreteDistance[] = { 100 };
+ discreteDistanceInitIndex = 0;
+ };
+ };
+ };
+ };
+
+ class RKSL_optic_PMII_312_sunshade : ItemCore {
+ ACE_ScopeAdjust_Vertical[] = { -4, 30 };
+ ACE_ScopeAdjust_Horizontal[] = { -6, 6 };
+ ACE_ScopeAdjust_Increment = 0.1;
+ class ItemInfo : InventoryOpticsItem_Base_F {
+ class OpticsModes {
+ class Snip {
+ discreteDistance[] = { 100 };
+ discreteDistanceInitIndex = 0;
+ };
+ };
+ };
+ };
+};
diff --git a/optionals/compat_rksl_pm_ii/config.cpp b/optionals/compat_rksl_pm_ii/config.cpp
new file mode 100644
index 0000000000..c3ed720f8b
--- /dev/null
+++ b/optionals/compat_rksl_pm_ii/config.cpp
@@ -0,0 +1,14 @@
+#include "script_component.hpp"
+
+class CfgPatches {
+ class ADDON {
+ units[] = {};
+ weapons[] = {};
+ requiredVersion = REQUIRED_VERSION;
+ requiredAddons[] = {"RKSL_PMII"};
+ author[]={"Ruthberg"};
+ VERSION_CONFIG;
+ };
+};
+
+#include "CfgWeapons.hpp"
diff --git a/optionals/compat_rksl_pm_ii/script_component.hpp b/optionals/compat_rksl_pm_ii/script_component.hpp
new file mode 100644
index 0000000000..a98639b0e8
--- /dev/null
+++ b/optionals/compat_rksl_pm_ii/script_component.hpp
@@ -0,0 +1,5 @@
+#define COMPONENT RKSL_PMII_comp
+
+#include "\z\ace\addons\main\script_mod.hpp"
+
+#include "\z\ace\addons\main\script_macros.hpp"
diff --git a/tools/make.cfg b/tools/make.cfg
index e89568d60e..5e2d9d78da 100644
--- a/tools/make.cfg
+++ b/tools/make.cfg
@@ -17,6 +17,11 @@ project = @ace
# Default: None
# key = D:\Program Files (x86)\Bohemia Interactive\Tools\DSSignFile Tools\keys\ace_preAlpha.biprivatekey
+# Path to where private keys are automatically created if the command-line parameter "key" is used
+# Make sure this isn't in your public repository!
+# Default: \private_keys
+# private_key_path = P:\private_keys
+
# If set to True, the make system will attempt to autodetect addons in the
# current folder by looking for directories with 'config.cpp' in them.
# Default: True
diff --git a/tools/make.py b/tools/make.py
index 3b7bf9d94e..382f8dd776 100644
--- a/tools/make.py
+++ b/tools/make.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# vim: set fileencoding=utf-8 :
# make.py
@@ -60,6 +60,9 @@ module_root = ""
release_dir = ""
module_root_parent = ""
optionals_root = ""
+key_name = "ace_preAlpha"
+key = ""
+dssignfile = ""
###############################################################################
# http://akiscode.com/articles/sha-1directoryhash.shtml
@@ -196,6 +199,7 @@ def find_bi_tools(work_drive):
else:
raise Exception("BadTools","Arma 3 Tools are not installed correctly or the P: drive needs to be created.")
+
def find_depbo_tools(regKey):
"""Use registry entries to find DePBO-based tools."""
stop = False
@@ -248,6 +252,7 @@ def find_depbo_tools(regKey):
#Strip any quotations from the path due to a MikeRo tool bug which leaves a trailing space in some of its registry paths.
return [pboproject_path.strip('"'),rapify_path.strip('"'),makepbo_path.strip('"')]
+
def color(color):
"""Set the color. Works on Win32 and normal terminals."""
if sys.platform == "win32":
@@ -304,12 +309,12 @@ def copy_important_files(source_dir,destination_dir):
"logo_ace3_ca.paa"
]
- print_yellow ("source_dir: " + source_dir)
- print_yellow("destination_dir: " + destination_dir)
-
#copy importantFiles
try:
print_blue("\nSearching for important files in " + source_dir)
+ print("Source_dir: " + source_dir)
+ print("Destination_dir: " + destination_dir)
+
for file in importantFiles:
print_green("Copying file => " + os.path.join(source_dir,file))
shutil.copyfile(os.path.join(source_dir,file),os.path.join(destination_dir,file))
@@ -336,6 +341,7 @@ def copy_important_files(source_dir,destination_dir):
finally:
os.chdir(originalDir)
+
def copy_optionals_for_building(mod,pbos):
src_directories = os.listdir(optionals_root)
current_dir = os.getcwd()
@@ -350,10 +356,15 @@ def copy_optionals_for_building(mod,pbos):
#print ("Adding the following file: " + file_name)
pbos.append(file_name)
pbo_path = os.path.join(release_dir, "@ace","optionals",file_name)
+ sigFile_name = file_name +"."+ key_name + ".bisign"
+ sig_path = os.path.join(release_dir, "@ace","optionals",sigFile_name)
if (os.path.isfile(pbo_path)):
print("Moving " + pbo_path + " for processing.")
shutil.move(pbo_path, os.path.join(release_dir,"@ace","addons",file_name))
+ if (os.path.isfile(sig_path)):
+ #print("Moving " + sig_path + " for processing.")
+ shutil.move(sig_path, os.path.join(release_dir,"@ace","addons",sigFile_name))
except:
print_error("Error in moving")
raise
@@ -384,7 +395,8 @@ def copy_optionals_for_building(mod,pbos):
finally:
os.chdir(current_dir)
-def cleanup_optionals(mod,pbos):
+
+def cleanup_optionals(mod):
print("")
try:
for dir_name in mod:
@@ -400,9 +412,17 @@ def cleanup_optionals(mod,pbos):
file_name = "ace_{}.pbo".format(dir_name)
src_file_path = os.path.join(release_dir, "@ace","addons",file_name)
dst_file_path = os.path.join(release_dir, "@ace","optionals",file_name)
+
+ sigFile_name = file_name +"."+ key_name + ".bisign"
+ src_sig_path = os.path.join(release_dir, "@ace","addons",sigFile_name)
+ dst_sig_path = os.path.join(release_dir, "@ace","optionals",sigFile_name)
+
if (os.path.isfile(src_file_path)):
#print("Preserving " + file_name)
os.renames(src_file_path,dst_file_path)
+ if (os.path.isfile(src_sig_path)):
+ #print("Preserving " + sigFile_name)
+ os.renames(src_sig_path,dst_sig_path)
except FileExistsError:
print_error(file_name + " already exists")
continue
@@ -411,12 +431,47 @@ def cleanup_optionals(mod,pbos):
except:
print_error("Cleaning Optionals Failed")
raise
+
+
+def purge(dir, pattern, friendlyPattern="files"):
+ print_green("Deleting " + friendlyPattern + " files from directory: " + dir)
+ for f in os.listdir(dir):
+ if re.search(pattern, f):
+ os.remove(os.path.join(dir, f))
+
+
+def build_signature_file(file_name):
+ global key
+ global dssignfile
+ print("Signing with " + key + ".")
+ ret = subprocess.call([dssignfile, key, file_name])
+ if ret == 0:
+ return True
+ else:
+ return False
+
+
+def check_for_obsolete_pbos(addonspath, file):
+ module = file[4:-4]
+ if not os.path.exists(os.path.join(addonspath, module)):
+ return True
+ return False
###############################################################################
+
def main(argv):
"""Build an Arma addon suite in a directory from rules in a make.cfg file."""
print_blue(("\nmake.py for Arma, modified for Advanced Combat Environment v" + __version__))
+ global work_drive
+ global module_root
+ global release_dir
+ global module_root_parent
+ global optionals_root
+ global key_name
+ global key
+ global dssignfile
+
if sys.platform != "win32":
print_error("Non-Windows platform (Cygwin?). Please re-run from cmd.")
sys.exit(1)
@@ -436,7 +491,7 @@ def main(argv):
release_version = 0 # Version of release
use_pboproject = True # Default to pboProject build tool
make_target = "DEFAULT" # Which section in make.cfg to use for the build
- new_key = False # Make a new key and use it to sign?
+ new_key = True # Make a new key and use it to sign?
quiet = False # Suppress output from build tool?
# Parse arguments
@@ -512,6 +567,8 @@ See the make.cfg file for additional build options.
else:
check_external = False
+ print_yellow("\nCheck external references is set to " + str(check_external))
+
# Get the directory the make script is in.
make_root = os.path.dirname(os.path.realpath(__file__))
make_root_parent = os.path.abspath(os.path.join(os.getcwd(), os.pardir))
@@ -524,26 +581,27 @@ See the make.cfg file for additional build options.
commit_id = subprocess.check_output(["git", "rev-parse", "HEAD"])
commit_id = str(commit_id, "utf-8")[:8]
+ key_name = str(key_name+"-"+commit_id)
except:
print_error("FAILED TO DETERMINE COMMIT ID.")
commit_id = "NOGIT"
cfg = configparser.ConfigParser();
try:
- global work_drive
- global module_root
- global release_dir
- global module_root_parent
- global optionals_root
-
cfg.read(os.path.join(make_root, "make.cfg"))
# Project name (with @ symbol)
project = cfg.get(make_target, "project", fallback="@"+os.path.basename(os.getcwd()))
+ # BI Tools work drive on Windows
+ work_drive = cfg.get(make_target, "work_drive", fallback="P:\\")
+
# Private key path
key = cfg.get(make_target, "key", fallback=None)
+ # Private key creation directory
+ private_key_path = cfg.get(make_target, "private_key_path", fallback=os.path.join(work_drive, "private_keys"))
+
# Project prefix (folder path)
prefix = cfg.get(make_target, "prefix", fallback="")
@@ -561,9 +619,6 @@ See the make.cfg file for additional build options.
# List of directories to ignore when detecting
ignore = [x.strip() for x in cfg.get(make_target, "ignore", fallback="release").split(',')]
- # BI Tools work drive on Windows
- work_drive = cfg.get(make_target, "work_drive", fallback="P:\\")
-
# Which build tool should we use?
build_tool = cfg.get(make_target, "build_tool", fallback="addonbuilder").lower()
@@ -640,6 +695,20 @@ See the make.cfg file for additional build options.
print ("No cache found.")
cache = {}
+ if not os.path.isdir(os.path.join(release_dir, project, "addons")):
+ try:
+ os.makedirs(os.path.join(release_dir, project, "addons"))
+ except:
+ print_error("Cannot create release directory")
+ raise
+
+ if not os.path.isdir(os.path.join(release_dir, project, "keys")):
+ try:
+ os.makedirs(os.path.join(release_dir, project, "keys"))
+ except:
+ print_error("Cannot create release directory")
+ raise
+
#Temporarily copy optionals_root for building. They will be removed later.
optionals_modules = []
optional_files = []
@@ -659,39 +728,60 @@ See the make.cfg file for additional build options.
# Make the key specified from command line if necessary.
if new_key:
- if not os.path.isfile(os.path.join(module_root, key_name + ".biprivatekey")):
- print_green("\nRequested key does not exist.")
+ if not os.path.isfile(os.path.join(private_key_path, key_name + ".biprivatekey")):
+ print_yellow("\nRequested key does not exist.")
+ try:
+ os.makedirs(private_key_path)
+ except:
+ pass
+ curDir = os.getcwd()
+ os.chdir(private_key_path)
ret = subprocess.call([dscreatekey, key_name]) # Created in make_root
+ os.chdir(curDir)
if ret == 0:
- print_blue("Created: " + os.path.join(module_root, key_name + ".biprivatekey"))
+ print_green("Created: " + os.path.join(private_key_path, key_name + ".biprivatekey"))
+ print("Removing any old signature keys...")
+ purge(os.path.join(module_root, release_dir, project, "addons"), "^.*\.bisign$","*.bisign")
+ purge(os.path.join(module_root, release_dir, project, "optionals"), "^.*\.bisign$","*.bisign")
+ purge(os.path.join(module_root, release_dir, project, "keys"), "^.*\.bikey$","*.bikey")
else:
print_error("Failed to create key!")
try:
- print_blue("Copying public key to release directory.")
+ print("Copying public key to release directory.")
try:
- os.makedirs(os.path.join(module_root, release_dir, "Keys"))
+ os.makedirs(os.path.join(module_root, release_dir, project, "keys"))
except:
pass
- shutil.copyfile(os.path.join(module_root, key_name + ".bikey"), os.path.join(module_root, release_dir, "Keys", key_name + ".bikey"))
+ shutil.copyfile(os.path.join(private_key_path, key_name + ".bikey"), os.path.join(module_root, release_dir, project, "keys", key_name + ".bikey"))
except:
- raise
print_error("Could not copy key to release directory.")
+ raise
else:
- print_green("\nNOTE: Using key " + os.path.join(module_root, key_name + ".biprivatekey"))
+ print_green("\nNOTE: Using key " + os.path.join(private_key_path, key_name + ".biprivatekey"))
- key = os.path.join(module_root, key_name + ".biprivatekey")
+ key = os.path.join(private_key_path, key_name + ".biprivatekey")
+ # Remove any obsolete files.
+ print_blue("\nChecking for obsolete files...")
+ obsolete_check_path = os.path.join(module_root, release_dir, project,"addons")
+ for file in os.listdir(obsolete_check_path):
+ if (file.endswith(".pbo") and os.path.isfile(os.path.join(obsolete_check_path,file))):
+ if check_for_obsolete_pbos(module_root, file):
+ fileName = os.path.splitext(file)[0]
+ print_yellow("Removing obsolete file => " + file)
+ purge(obsolete_check_path,fileName+"\..",fileName+".*")
# For each module, prep files and then build.
print_blue("\nBuilding...")
for module in modules:
print_green("\nMaking " + module + "-"*max(1, (60-len(module))))
missing = False
+ sigMissing = False
# Cache check
if module in cache:
@@ -706,16 +796,23 @@ See the make.cfg file for additional build options.
# Hash the module
new_sha = get_directory_hash(os.path.join(module_root, module))
- # Is the pbo file missing?
+ # Is the pbo or sig file missing?
missing = not os.path.isfile(os.path.join(release_dir, project, "addons", "ace_{}.pbo".format(module)))
+ sigFile = pbo_name_prefix+module + ".pbo." + key_name + ".bisign"
+ sigMissing = not os.path.isfile(os.path.join(release_dir, project, "addons", sigFile ))
+
if missing:
- print("ace_{}.pbo".format(module) + " is missing. Building...")
+ print_yellow("Missing PBO file ace_{}.pbo".format(module) + ". Building...")
# Check if it needs rebuilt
# print ("Hash:", new_sha)
if old_sha == new_sha and not missing:
if not force_build:
print("Module has not changed.")
+ if sigMissing:
+ if key:
+ print("Missing Signature key " + sigFile)
+ build_signature_file(os.path.join(module_root, release_dir, project, "addons", pbo_name_prefix + module + ".pbo"))
# Skip everything else
continue
@@ -740,13 +837,13 @@ See the make.cfg file for additional build options.
try:
# Remove the old pbo, key, and log
- old = os.path.join(module_root, release_dir, project, "Addons", module) + "*"
+ old = os.path.join(module_root, release_dir, project, "addons", pbo_name_prefix+module) + "*"
files = glob.glob(old)
for f in files:
os.remove(f)
if pbo_name_prefix:
- old = os.path.join(module_root, release_dir, project, "Addons", pbo_name_prefix+module) + "*"
+ old = os.path.join(module_root, release_dir, project, "addons", pbo_name_prefix+module) + "*"
files = glob.glob(old)
for f in files:
os.remove(f)
@@ -759,11 +856,11 @@ See the make.cfg file for additional build options.
# Build the module into a pbo
print_blue("Building: " + os.path.join(work_drive, prefix, module))
- print_blue("Destination: " + os.path.join(module_root, release_dir, project, "Addons"))
+ print_blue("Destination: " + os.path.join(module_root, release_dir, project, "addons"))
# Make destination folder (if needed)
try:
- os.makedirs(os.path.join(module_root, release_dir, project, "Addons"))
+ os.makedirs(os.path.join(module_root, release_dir, project, "addons"))
except:
pass
@@ -815,7 +912,7 @@ See the make.cfg file for additional build options.
if os.path.isfile(os.path.join(work_drive, prefix, module, "$NOBIN$")):
print_green("$NOBIN$ Found. Proceeding with non-binarizing!")
- cmd = [makepboTool, "-P","-A","-L","-N","-G", os.path.join(work_drive, prefix, module),os.path.join(module_root, release_dir, project,"Addons")]
+ cmd = [makepboTool, "-P","-A","-L","-N","-G", os.path.join(work_drive, prefix, module),os.path.join(module_root, release_dir, project,"addons")]
else:
if check_external:
@@ -837,7 +934,7 @@ See the make.cfg file for additional build options.
# Prettyprefix rename the PBO if requested.
if pbo_name_prefix:
try:
- os.rename(os.path.join(module_root, release_dir, project, "Addons", module+".pbo"), os.path.join(module_root, release_dir, project, "Addons", pbo_name_prefix+module+".pbo"))
+ os.rename(os.path.join(module_root, release_dir, project, "addons", module+".pbo"), os.path.join(module_root, release_dir, project, "addons", pbo_name_prefix+module+".pbo"))
except:
raise
print_error("Could not rename built PBO with prefix.")
@@ -845,9 +942,9 @@ See the make.cfg file for additional build options.
if key:
print("Signing with " + key + ".")
if pbo_name_prefix:
- ret = subprocess.call([dssignfile, key, os.path.join(module_root, release_dir, project, "Addons", pbo_name_prefix + module + ".pbo")])
+ ret = subprocess.call([dssignfile, key, os.path.join(module_root, release_dir, project, "addons", pbo_name_prefix + module + ".pbo")])
else:
- ret = subprocess.call([dssignfile, key, os.path.join(module_root, release_dir, project, "Addons", module + ".pbo")])
+ ret = subprocess.call([dssignfile, key, os.path.join(module_root, release_dir, project, "addons", module + ".pbo")])
if ret == 0:
build_successful = True
@@ -887,7 +984,7 @@ See the make.cfg file for additional build options.
# Call AddonBuilder
os.chdir("P:\\")
- cmd = [addonbuilder, os.path.join(work_drive, prefix, module), os.path.join(make_root, release_dir, project, "Addons"), "-clear", "-project="+work_drive]
+ cmd = [addonbuilder, os.path.join(work_drive, prefix, module), os.path.join(make_root, release_dir, project, "addons"), "-clear", "-project="+work_drive]
if not do_binarize:
cmd.append("-packonly")
@@ -910,7 +1007,7 @@ See the make.cfg file for additional build options.
# Prettyprefix rename the PBO if requested.
if pbo_name_prefix:
try:
- os.rename(os.path.join(make_root, release_dir, project, "Addons", module+".pbo"), os.path.join(make_root, release_dir, project, "Addons", pbo_name_prefix+module+".pbo"))
+ os.rename(os.path.join(make_root, release_dir, project, "addons", module+".pbo"), os.path.join(make_root, release_dir, project, "addons", pbo_name_prefix+module+".pbo"))
except:
raise
print_error("Could not rename built PBO with prefix.")
@@ -920,9 +1017,9 @@ See the make.cfg file for additional build options.
if key:
print("Signing with " + key + ".")
if pbo_name_prefix:
- ret = subprocess.call([dssignfile, key, os.path.join(make_root, release_dir, project, "Addons", pbo_name_prefix + module + ".pbo")])
+ ret = subprocess.call([dssignfile, key, os.path.join(make_root, release_dir, project, "addons", pbo_name_prefix + module + ".pbo")])
else:
- ret = subprocess.call([dssignfile, key, os.path.join(make_root, release_dir, project, "Addons", module + ".pbo")])
+ ret = subprocess.call([dssignfile, key, os.path.join(make_root, release_dir, project, "addons", module + ".pbo")])
if ret == 0:
build_successful = True
@@ -963,7 +1060,8 @@ See the make.cfg file for additional build options.
except:
print_error("ERROR: Could not delete pboProject temp files.")
- print_green("\nDone.")
+ copy_important_files(module_root_parent,os.path.join(release_dir, "@ace"))
+ cleanup_optionals(optionals_modules)
# Make release
if make_release:
@@ -971,7 +1069,7 @@ See the make.cfg file for additional build options.
try:
# Delete all log files
- for root, dirs, files in os.walk(os.path.join(module_root, release_dir, project, "Addons")):
+ for root, dirs, files in os.walk(os.path.join(module_root, release_dir, project, "addons")):
for currentFile in files:
if currentFile.lower().endswith("log"):
os.remove(os.path.join(root, currentFile))
@@ -1003,9 +1101,10 @@ See the make.cfg file for additional build options.
shutil.copytree(os.path.join(module_root, release_dir, project), os.path.join(a3_path, project))
except:
print_error("Could not copy files. Is Arma 3 running?")
+
+ print_green("\nDone.")
+
- copy_important_files(module_root_parent,os.path.join(release_dir, "@ace"))
- cleanup_optionals(optionals_modules,optional_files)
if __name__ == "__main__":
main(sys.argv)
input("Press Enter to continue...")
diff --git a/tools/search_privates.py b/tools/search_privates.py
index 6445a24dd7..37320214fc 100644
--- a/tools/search_privates.py
+++ b/tools/search_privates.py
@@ -53,7 +53,7 @@ def check_privates(filepath):
# Regex search privates
- srch = re.compile('(? 0:
+ print (filepath)
+
+ private_output = 'private[';
+ first = True
+ for bad_priv in unused:
+ if first:
+ first = False
+ private_output = private_output + '"' + bad_priv
+ else:
+ private_output = private_output + '", "' + bad_priv
+
+ private_output = private_output + '"];';
+ print (private_output)
+
+ for bad_priv in unused:
+ print ('\t' + bad_priv)
+ bad_count_file = bad_count_file + 1
+
+
+
+ return bad_count_file
+
+def main():
+
+ print("#########################")
+ print("# Search your Privates #")
+ print("#########################")
+
+ sqf_list = []
+ bad_count = 0
+
+ parser = argparse.ArgumentParser()
+ parser.add_argument('-m','--module', help='only search specified module addon folder', required=False, default=".")
+ args = parser.parse_args()
+
+ for root, dirnames, filenames in os.walk('../addons' + '/' + args.module):
+ for filename in fnmatch.filter(filenames, '*.sqf'):
+ sqf_list.append(os.path.join(root, filename))
+
+ for filename in sqf_list:
+ bad_count = bad_count + check_privates(filename)
+
+
+ print ("Bad Count {0}".format(bad_count))
+
+if __name__ == "__main__":
+ main()