diff --git a/.editorconfig b/.editorconfig
index 0deca3d2ab..af1c2ff314 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -1,7 +1,7 @@
root = true
[*]
-end_of_line = crlf
+end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = space
@@ -10,4 +10,3 @@ trim_trailing_whitespace = true
[*.md]
trim_trailing_whitespace = false
-
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000000..3c59efe684
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,4 @@
+* text=auto
+*.png binary
+*.jpg binary
+*.paa binary
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
new file mode 100644
index 0000000000..b8aae89b77
--- /dev/null
+++ b/.github/CONTRIBUTING.md
@@ -0,0 +1,29 @@
+# Reporting an issue
+
+## Before reporting
+
+If you have found an issue with ACE3 please make sure that ACE3 really is the cause of the problem. To do this try to reproduce the issue with using only `@CBA_A3` and `@ace` on a newly created mission.
+
+Indicate if the issue appears on stable or development version. In case it is the development version, please also include the commit SHA-1 hash.
+
+**Please note:**
+- It's not a valid to simply remove @ace
from the mod list to confirm that ACE3 is the culprit.
+- If the error happens when using a third-party mod contact the author of the appropriate mod and report the issue there.
+
+## Reporting the issue
+
+Head over to the [ACE3 GitHub issue tracker](https://github.com/acemod/ACE3/issues) and press the [New issue](https://github.com/acemod/ACE3/issues/new) button in the top right corner. Add a descriptive title and complete the issue template.
+
+A video of the issue might be helpful in resolving it faster.
+
+# Feature Requests
+
+## 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.
+
+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.
+
+## Requesting a feature
+In order to avoid duplicates and keep the issue tracker organized, we have created a common issue for [ACE3 Feature requests](https://github.com/acemod/ACE3/issues/3594). 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.
+
+Following their approval, feature requests may be moved by moderators to a separate issue for further discussion.
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
new file mode 100644
index 0000000000..8097ed6e28
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE.md
@@ -0,0 +1,23 @@
+**Arma 3 Version:** `x.xx` (stable / rc / dev)
+**CBA Version:** `2.x.x` (stable / dev + commit hash)
+**ACE3 Version:** `3.x.x` (stable / dev + commit hash)
+
+**Mods:**
+- `@CBA_A3`
+- `@ace`
+
+**Description:**
+- Add a detailed description of the error. This makes it easier for us to fix the issue.
+
+**Steps to reproduce:**
+- Add the steps needed to reproduce the issue.
+
+**Where did the issue occur?**
+- Dedicated / Self-Hosted Multiplayer / Singleplayer / Editor (Singleplayer) / Editor (Multiplayer) / Virtual Arsenal
+
+**Placed Modules:**
+- Add the list of modules you have placed on the map. Use 'None' if the error occurs without any modules.
+
+**RPT log file:**
+- Add a link ([gist](https://gist.github.com) or [pastebin](http://pastebin.com)) to the client and/or server RPT file. An instruction to find your RPT files can be found [here](https://community.bistudio.com/wiki/Crash_Files#Arma_3).
+- If possible at the time the bug is encountered, go to ACE Options and select "Debug To Clipboard", this will print extensive debug information to the RPT file.
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
new file mode 100644
index 0000000000..f96a900cb7
--- /dev/null
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,4 @@
+**When merged this pull request will:**
+- Describe what this pull request will do
+- Each change in a separate line
+- Respect the [Development Guidelines](http://ace3mod.com/wiki/development/)
diff --git a/.gitignore b/.gitignore
index f312ddb55e..5aebbbd408 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,8 +1,9 @@
-release/*
-*.cache
-*.pbo
-texHeaders.bin
-*.swp
-*.swo
-*.biprivatekey
-Thumbs.db
+release/*
+tools/temp
+*.cache
+*.pbo
+texHeaders.bin
+*.swp
+*.swo
+*.biprivatekey
+Thumbs.db
diff --git a/.travis.yml b/.travis.yml
index 1d2a49e2e6..3828300d7f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -12,6 +12,7 @@ before_script:
fi
script:
- python3 tools/sqf_validator.py
+- python3 tools/config_style_checker.py
- if [ -n "${GH_TOKEN}" ] && [ "${TRAVIS_BRANCH}" == "master" ] && [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then
python3 tools/deploy.py;
fi
diff --git a/AUTHORS.txt b/AUTHORS.txt
index b812ed0ae7..bab4c9b873 100644
--- a/AUTHORS.txt
+++ b/AUTHORS.txt
@@ -14,7 +14,8 @@ Garth "L-H" de Wet
Giallustio
Glowbal
Janus
-jokoho482 `
+jokoho482
+Jonpas
Kieran
NouberNou
PabstMirror
@@ -39,6 +40,7 @@ Alganthe
Anthariel
Arkhir
Asgar Serran
+BaerMitUmlaut
Bamse
Bla1337
BlackPixxel
@@ -63,6 +65,7 @@ F3 Project
Falke75
Ferenczi
Ferenzi
+FFAAMOD
Filip Basara
fr89k
FreeZbe
@@ -72,19 +75,20 @@ Gianmarco Varriale (TeamNuke)
GieNkoV
GitHawk
gpgpgpgp
+Grey-Soldierman
Grzegorz
Hamburger SV
Harakhti
havena
Hawkins
Head
-Jonpas
Karneck
Kavinsky
Kllrt
legman
Legolasindar "Viper"
licht-im-Norden87
+looter
Macusercom
MarcBook
meat
@@ -109,6 +113,7 @@ Sniperwolf572
System98
SzwedzikPL
Tachi
+Tessa Elieff
Toaster
Tonic
Tourorist
@@ -117,4 +122,3 @@ voiper
VyMajoris(W-Cephei)
Winter
zGuba
-Grey-Soldierman
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
deleted file mode 100644
index ed17a41e67..0000000000
--- a/CONTRIBUTING.md
+++ /dev/null
@@ -1,64 +0,0 @@
-# Reporting an issue
-
-## Before reporting
-
-If you have found an issue with ACE3 please make sure that ACE3 is really the cause of the problem. To do this try to reproduce the issue with using only `@CBA_A3` and `@ace` on a newly created mission.
-
-Indicate if the issue appears on stable or development version. In case it is the development version, please also include the commit SHA-1 hash.
-
-
-
Please note:
-
It's not a valid to simply remove @ace
from the mod list to confirm that ACE3 is the culprit.
-
If the error happens when using a third-party mod contact the author of the appropriate mod and report the issue there.
-
-
-## Reporting the issue
-
-Head over to the [ACE3 GitHub issue tracker](https://github.com/acemod/ACE3/issues) and press the [New issue](https://github.com/acemod/ACE3/issues/new) button in the top right corner. Add a descriptive title and copy the following issue template in to the text area:
-
-```
-ACE3 Version: 3.x.x
-(indicate if stable or dev, if dev indicate the commit the version is based on)
-
-**Mods:**
-* `@CBA_A3`
-* `@ace`
-
-**Placed ACE3 Modules:**
-* *Add the list of modules you have placed on the map. Use 'None' if the error occurs without using any modules.*
-* You can also press the `Debug to` button in the ACE3 option menu (escape -> ACE3 options -> Debug to) and add a link (pastebin.com) to the results.
-
-**Description:**
-* Add a detailed description of the error. This makes it easier for us to fix the issue.*
-
-**Steps to reproduce:**
-* *Add the steps needed to reproduce the issue.*
-
-**Where did the issue occur?**
-* A possible answer might be "Multiplayer", "Editor" or "Singleplayer"*
-
-**RPT log file:**
-* Add a link (pastebin.com) to the client or server RPT file.*
-```
-
-A video of the issue might be helpful in resolving it faster.
-
-GitHub uses [Markdown](http://daringfireball.net/projects/markdown/syntax) to style the output. If you want to know more about it (e.g. how to [turn text bold](https://help.github.com/articles/markdown-basics/#styling-text), how to denote [code blocks](https://help.github.com/articles/markdown-basics/#inline-formats) or [inline code](https://help.github.com/articles/markdown-basics/#multiple-lines)) have a look at the [GitHub Markdown Documentation](https://help.github.com/articles/github-flavored-markdown).
-
-
-# Feature Requests
-
-## 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.
-
-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.
-
-## Requesting a feature
-In order to avoid duplicates and keep the issue tracker organized, we have created a common issue for [ACE3 Feature requests](https://github.com/acemod/ACE3/issues/414). 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.
-
-Following their approval, feature requests may be moved by moderators to a separate issue for further discussion.
-
-# Regarding Pull Requests (PRs)
-- You want to help but don't know where to start? Check the wiki entry for [setting up the development environment](http://ace3mod.com/wiki/development/setting-up-the-development-environment.html)
-- [Make sure to respect the file structure](http://ace3mod.com/wiki/development/modularity-and-pbo-structure.html)
-- [Make sure to respect the coding guidelines](http://ace3mod.com/wiki/development/coding-guidelines.html)
diff --git a/LICENSE b/LICENSE
index 037f1df2f3..f748d222de 100644
--- a/LICENSE
+++ b/LICENSE
@@ -26,6 +26,8 @@ Some folders of this project may contain a separate LICENSE file. Should
that be the case, everything in that folder and all subfolders is subject
to that license instead.
+ - ARMA PUBLIC LICENSE (\addons\apl)
+ - CreativeCommons Attributions 3.0 (\addons\fastroping\data\sounds)
============================================================================
Full GNU General Public License Text
diff --git a/README.md b/README.md
index 54849217ab..37b5f2a626 100644
--- a/README.md
+++ b/README.md
@@ -3,15 +3,15 @@
-
-
-
-
-
+
+
+
+
+
@@ -64,7 +64,6 @@ The mod is **built modularly**, so almost any included PBO can be easily removed
- 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
diff --git a/ace_advanced_ballistics.dll b/ace_advanced_ballistics.dll
index a35dcbd2da..0a3d2366f1 100644
Binary files a/ace_advanced_ballistics.dll and b/ace_advanced_ballistics.dll differ
diff --git a/ace_break_line.dll b/ace_break_line.dll
index d76c3d4819..812455aa6b 100644
Binary files a/ace_break_line.dll and b/ace_break_line.dll differ
diff --git a/ace_clipboard.dll b/ace_clipboard.dll
index c6b771be7f..a21c2da4ab 100644
Binary files a/ace_clipboard.dll and b/ace_clipboard.dll differ
diff --git a/ace_fcs.dll b/ace_fcs.dll
index b224c194cd..f732a8ca03 100644
Binary files a/ace_fcs.dll and b/ace_fcs.dll differ
diff --git a/ace_medical.dll b/ace_medical.dll
index 3b5e97ca19..0091bc67bd 100644
Binary files a/ace_medical.dll and b/ace_medical.dll differ
diff --git a/ace_parse_imagepath.dll b/ace_parse_imagepath.dll
index f2c6054cec..2235393dd4 100644
Binary files a/ace_parse_imagepath.dll and b/ace_parse_imagepath.dll differ
diff --git a/addons/advanced_ballistics/ACE_Settings.hpp b/addons/advanced_ballistics/ACE_Settings.hpp
index d88a9b1148..9815cc8491 100644
--- a/addons/advanced_ballistics/ACE_Settings.hpp
+++ b/addons/advanced_ballistics/ACE_Settings.hpp
@@ -1,29 +1,34 @@
class ACE_Settings {
class GVAR(enabled) {
+ category = CSTRING(DisplayName);
displayName = CSTRING(enabled_DisplayName);
description = CSTRING(enabled_Description);
typeName = "BOOL";
value = 0;
};
class GVAR(simulateForSnipers) {
+ category = CSTRING(DisplayName);
displayName = CSTRING(simulateForSnipers_DisplayName);
description = CSTRING(simulateForSnipers_Description);
typeName = "BOOL";
value = 1;
};
class GVAR(simulateForGroupMembers) {
+ category = CSTRING(DisplayName);
displayName = CSTRING(simulateForGroupMembers_DisplayName);
description = CSTRING(simulateForGroupMembers_Description);
typeName = "BOOL";
value = 0;
};
class GVAR(simulateForEveryone) {
+ category = CSTRING(DisplayName);
displayName = CSTRING(simulateForEveryone_DisplayName);
description = CSTRING(simulateForEveryone_Description);
typeName = "BOOL";
value = 0;
};
class GVAR(disabledInFullAutoMode) {
+ category = CSTRING(DisplayName);
displayName = CSTRING(disabledInFullAutoMod_DisplayName);
description = CSTRING(disabledInFullAutoMod_Description);
typeName = "BOOL";
@@ -31,6 +36,7 @@ class ACE_Settings {
};
/* // TODO: We currently do not have firedEHs on vehicles
class GVAR(vehicleGunnerEnabled) {
+ category = CSTRING(DisplayName);
displayName = "Enabled For Vehicle Gunners";
description = "Enables advanced ballistics for vehicle gunners";
typeName = "BOOL";
@@ -38,30 +44,35 @@ class ACE_Settings {
};
*/
class GVAR(ammoTemperatureEnabled) {
+ category = CSTRING(DisplayName);
displayName = CSTRING(ammoTemperatureEnabled_DisplayName);
description = CSTRING(ammoTemperatureEnabled_Description);
typeName = "BOOL";
value = 1;
};
class GVAR(barrelLengthInfluenceEnabled) {
+ category = CSTRING(DisplayName);
displayName = CSTRING(barrelLengthInfluenceEnabled_DisplayName);
description = CSTRING(barrelLengthInfluenceEnabled_Description);
typeName = "BOOL";
value = 1;
};
class GVAR(bulletTraceEnabled) {
+ category = CSTRING(DisplayName);
displayName = CSTRING(bulletTraceEnabled_DisplayName);
description = CSTRING(bulletTraceEnabled_Description);
typeName = "BOOL";
value = 1;
};
class GVAR(simulationInterval) {
+ category = CSTRING(DisplayName);
displayName = CSTRING(simulationInterval_DisplayName);
description = CSTRING(simulationInterval_Description);
typeName = "SCALAR";
value = 0.0;
};
class GVAR(simulationRadius) {
+ category = CSTRING(DisplayName);
displayName = CSTRING(simulationRadius_DisplayName);
description = CSTRING(simulationRadius_Description);
typeName = "SCALAR";
diff --git a/addons/advanced_ballistics/CfgEventHandlers.hpp b/addons/advanced_ballistics/CfgEventHandlers.hpp
index 44b6e8e6ff..5da5fd0dc2 100644
--- a/addons/advanced_ballistics/CfgEventHandlers.hpp
+++ b/addons/advanced_ballistics/CfgEventHandlers.hpp
@@ -1,3 +1,10 @@
+
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE( call COMPILE_FILE(XEH_preInit) );
diff --git a/addons/advanced_ballistics/CfgVehicles.hpp b/addons/advanced_ballistics/CfgVehicles.hpp
index 27ccb2377b..804a6e9236 100644
--- a/addons/advanced_ballistics/CfgVehicles.hpp
+++ b/addons/advanced_ballistics/CfgVehicles.hpp
@@ -3,7 +3,7 @@ class CfgVehicles {
class GVAR(ModuleSettings): ACE_Module {
scope = 2;
displayName = CSTRING(DisplayName);
- icon = QUOTE(PATHTOF(UI\Icon_Module_Wind_ca.paa));
+ icon = QPATHTOF(UI\Icon_Module_Wind_ca.paa);
category = "ACE";
function = QUOTE(DFUNC(initModuleSettings));
functionPriority = 1;
diff --git a/addons/advanced_ballistics/XEH_PREP.hpp b/addons/advanced_ballistics/XEH_PREP.hpp
new file mode 100644
index 0000000000..df2501467f
--- /dev/null
+++ b/addons/advanced_ballistics/XEH_PREP.hpp
@@ -0,0 +1,14 @@
+
+PREP(calculateAmmoTemperatureVelocityShift);
+PREP(calculateAtmosphericCorrection);
+PREP(calculateBarrelLengthVelocityShift);
+PREP(calculateRetardation);
+PREP(calculateStabilityFactor);
+PREP(diagnoseWeapons);
+PREP(displayProtractor);
+PREP(handleFired);
+PREP(initializeTerrainExtension);
+PREP(initModuleSettings);
+PREP(readAmmoDataFromConfig);
+PREP(readWeaponDataFromConfig);
+PREP(handleFirePFH);
diff --git a/addons/advanced_ballistics/XEH_postInit.sqf b/addons/advanced_ballistics/XEH_postInit.sqf
index 20c0622eac..96aef4a93d 100644
--- a/addons/advanced_ballistics/XEH_postInit.sqf
+++ b/addons/advanced_ballistics/XEH_postInit.sqf
@@ -5,7 +5,7 @@
GVAR(currentbulletID) = -1;
GVAR(Protractor) = false;
-GVAR(ProtractorStart) = ACE_time;
+GVAR(ProtractorStart) = CBA_missionTime;
GVAR(allBullets) = [];
GVAR(currentGrid) = 0;
@@ -21,18 +21,37 @@ if (!GVAR(extensionAvailable)) exitWith {
};
};
*/
-[] call FUNC(initializeTerrainExtension);
if (!hasInterface) exitWith {};
-["SettingsInitialized", {
+["ace_settingsInitialized", {
//If not enabled, dont't add PFEH
if (!GVAR(enabled)) exitWith {};
+ //Run the terrain processor
+ [] call FUNC(initializeTerrainExtension);
+
// Register fire event handler
- ["firedPlayer", DFUNC(handleFired)] call EFUNC(common,addEventHandler);
- ["firedPlayerNonLocal", DFUNC(handleFired)] call EFUNC(common,addEventHandler);
+ ["ace_firedPlayer", DFUNC(handleFired)] call CBA_fnc_addEventHandler;
+ ["ace_firedPlayerNonLocal", DFUNC(handleFired)] call CBA_fnc_addEventHandler;
- [] call FUNC(updateTrajectoryPFH);
+ //Add warnings for missing compat PBOs (only if AB is on)
+ {
+ _x params ["_modPBO", "_compatPBO"];
+ if ((isClass (configFile >> "CfgPatches" >> _modPBO)) && {!isClass (configFile >> "CfgPatches" >> _compatPBO)}) then {
+ ACE_LOGWARNING_2("Weapon Mod [%1] missing ace compat pbo [%2] (from @ace\optionals)",_modPBO,_compatPBO);
+ };
+ } forEach [
+ ["RH_acc","ace_compat_rh_acc"],
+ ["RH_de_cfg","ace_compat_rh_de"],
+ ["RH_m4_cfg","ace_compat_rh_m4"],
+ ["RH_PDW","ace_compat_rh_pdw"],
+ ["RKSL_PMII","ace_compat_rksl_pm_ii"],
+ ["iansky_opt","ace_compat_sma3_iansky"],
+ ["R3F_Armes","ace_compat_r3f"]
+ ];
+}] call CBA_fnc_addEventHandler;
-}] call EFUNC(common,addEventHandler);
+#ifdef DEBUG_MODE_FULL
+ call FUNC(diagnoseWeapons);
+#endif
\ No newline at end of file
diff --git a/addons/advanced_ballistics/XEH_preInit.sqf b/addons/advanced_ballistics/XEH_preInit.sqf
index f722d9c573..a7feade1c3 100644
--- a/addons/advanced_ballistics/XEH_preInit.sqf
+++ b/addons/advanced_ballistics/XEH_preInit.sqf
@@ -2,16 +2,6 @@
ADDON = false;
-PREP(calculateAmmoTemperatureVelocityShift);
-PREP(calculateAtmosphericCorrection);
-PREP(calculateBarrelLengthVelocityShift);
-PREP(calculateRetardation);
-PREP(calculateStabilityFactor);
-PREP(displayProtractor);
-PREP(handleFired);
-PREP(initializeTerrainExtension);
-PREP(initModuleSettings);
-PREP(readAmmoDataFromConfig);
-PREP(readWeaponDataFromConfig);
-PREP(handleFirePFH);
+#include "XEH_PREP.hpp"
+
ADDON = true;
diff --git a/addons/advanced_ballistics/XEH_preStart.sqf b/addons/advanced_ballistics/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/advanced_ballistics/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/advanced_ballistics/config.cpp b/addons/advanced_ballistics/config.cpp
index 3f974b18df..692a9391a0 100644
--- a/addons/advanced_ballistics/config.cpp
+++ b/addons/advanced_ballistics/config.cpp
@@ -6,8 +6,9 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_ballistics", "ace_weather"};
- author[] = {"Ruthberg"};
- authorUrl = "https://github.com/ulteq";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"Ruthberg"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
diff --git a/addons/advanced_ballistics/functions/fnc_calculateBarrelLengthVelocityShift.sqf b/addons/advanced_ballistics/functions/fnc_calculateBarrelLengthVelocityShift.sqf
index 9c46cc2423..1f8a7e6eb9 100644
--- a/addons/advanced_ballistics/functions/fnc_calculateBarrelLengthVelocityShift.sqf
+++ b/addons/advanced_ballistics/functions/fnc_calculateBarrelLengthVelocityShift.sqf
@@ -22,6 +22,7 @@ private ["_muzzleVelocityTableCount", "_barrelLengthTableCount", "_lowerDataInde
"_upperDataIndex", "_lowerBarrelLength", "_upperBarrelLength", "_lowerMuzzleVelocity",
"_upperMuzzleVelocity", "_interpolationRatio"];
params ["_barrelLength", "_muzzleVelocityTable", "_barrelLengthTable", "_muzzleVelocity"];
+TRACE_4("params",_barrelLength,_muzzleVelocityTable,_barrelLengthTable,_muzzleVelocity);
// If barrel length is not defined, then there is no point in calculating muzzle velocity
if (_barrelLength == 0) exitWith { 0 };
diff --git a/addons/advanced_ballistics/functions/fnc_diagnoseWeapons.sqf b/addons/advanced_ballistics/functions/fnc_diagnoseWeapons.sqf
new file mode 100644
index 0000000000..4d344e8bfe
--- /dev/null
+++ b/addons/advanced_ballistics/functions/fnc_diagnoseWeapons.sqf
@@ -0,0 +1,59 @@
+/*
+ * Author: esteldunedain
+ *
+ * This function diagnoses all primary weapons to find cases in which the initial
+ * velocity of shots with and without AB significantly mismatch
+ *
+ * Arguments:
+ * None. Parameters inherited from EFUNC(common,firedEH)
+ *
+ * Return Value:
+ * None
+ *
+ * Public: No
+ */
+#define DEBUG_MODE_FULL
+#include "script_component.hpp"
+
+private _cfgWeapons = configFile >> "CfgWeapons";
+for "_i" from 0 to (count _cfgWeapons)-1 do {
+ private _weaponConfig = _cfgWeapons select _i;
+ if (isClass _weaponConfig) then {
+ private _weapon = configName _weaponConfig;
+ private _weaponType = getNumber (_weaponConfig >> "Type");
+ if (_weaponType == 1) then {
+ // The weapon is a primary weapon
+
+ private _weaponInitSpeed = getNumber (_weaponConfig >> "initSpeed");
+ private _magazines = getArray (_weaponConfig >> "magazines");
+ {
+ private _magazine = _x;
+ private _magazineInitSpeed = getNumber (configFile >> "CfgMagazines" >> _magazine >> "initSpeed");
+ private _ammo = getText (configFile >> "CfgMagazines" >> _magazine >> "ammo");
+
+ // Vanilla initial speed --------------------------
+ private _vanillaInitialSpeed = _magazineInitSpeed;
+ if (_weaponInitSpeed > 0) then {
+ _vanillaInitialSpeed = _weaponInitSpeed;
+ } else {
+ if (_weaponInitSpeed < 0) then {
+ _vanillaInitialSpeed = _vanillaInitialSpeed * (-_weaponInitSpeed);
+ };
+ };
+ // --------------------------------------------------
+
+ // AB initial speed --------------------------------
+ // Get Weapon and Ammo Configurations
+ private _AmmoCacheEntry = _ammo call FUNC(readAmmoDataFromConfig);
+ private _WeaponCacheEntry = _weapon call FUNC(readWeaponDataFromConfig);
+ _AmmoCacheEntry params ["_airFriction", "_caliber", "_bulletLength", "_bulletMass", "_transonicStabilityCoef", "_dragModel", "_ballisticCoefficients", "_velocityBoundaries", "_atmosphereModel", "_ammoTempMuzzleVelocityShifts", "_muzzleVelocityTable", "_barrelLengthTable"];
+ _WeaponCacheEntry params ["_barrelTwist", "_twistDirection", "_barrelLength"];
+
+ private _barrelVelocityShift = [_barrelLength, _muzzleVelocityTable, _barrelLengthTable, _vanillaInitialSpeed] call FUNC(calculateBarrelLengthVelocityShift);
+ private _abInitialSpeed = _vanillaInitialSpeed + _barrelVelocityShift;
+ // --------------------------------------------------
+ diag_log text format ["ABDiagnose,%1,%2,%3,%4,%5,%6,%7",_weapon,_magazine,_ammo,_magazineInitSpeed,_weaponInitSpeed,_vanillaInitialSpeed,_abInitialSpeed];
+ } forEach _magazines;
+ };
+ };
+};
diff --git a/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf b/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf
index 5ad6cb111e..62663c843b 100644
--- a/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf
+++ b/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf
@@ -43,13 +43,13 @@ GVAR(Protractor) = true;
__ctrl1 ctrlSetScale 1;
__ctrl1 ctrlCommit 0;
- __ctrl1 ctrlSetText QUOTE(PATHTOF(UI\protractor.paa));
+ __ctrl1 ctrlSetText QPATHTOF(UI\protractor.paa);
__ctrl1 ctrlSetTextColor [1, 1, 1, 1];
__ctrl2 ctrlSetScale 1;
- __ctrl2 ctrlSetPosition [SafeZoneX + 0.001, SafeZoneY + 0.001 - 0.0012 * (-58 max (asin((ACE_player weaponDirection currentWeapon ACE_player) select 2)) min 58), 0.2, 0.2 * 4/3];
+ __ctrl2 ctrlSetPosition [SafeZoneX + 0.001, SafeZoneY - 0.001 - 0.1074 * (-0.86 max ((ACE_player weaponDirection currentWeapon ACE_player) select 2) min 0.86), 0.2, 0.2 * 4/3];
__ctrl2 ctrlCommit 0;
- __ctrl2 ctrlSetText QUOTE(PATHTOF(UI\protractor_marker.paa));
+ __ctrl2 ctrlSetText QPATHTOF(UI\protractor_marker.paa);
__ctrl2 ctrlSetTextColor [1, 1, 1, 1];
}, 0.1, []] call CBA_fnc_addPerFrameHandler;
diff --git a/addons/advanced_ballistics/functions/fnc_handleFirePFH.sqf b/addons/advanced_ballistics/functions/fnc_handleFirePFH.sqf
index fc8dc1b8a2..6bc6e234ae 100644
--- a/addons/advanced_ballistics/functions/fnc_handleFirePFH.sqf
+++ b/addons/advanced_ballistics/functions/fnc_handleFirePFH.sqf
@@ -12,7 +12,7 @@
*/
#include "script_component.hpp"
-private _aceTimeSecond = floor ACE_time;
+private _aceTimeSecond = floor CBA_missionTime;
{
private ["_bulletVelocity", "_bulletPosition", "_bulletSpeed"];
@@ -31,7 +31,7 @@ private _aceTimeSecond = floor ACE_time;
drop ["\A3\data_f\ParticleEffects\Universal\Refract","","Billboard",1,0.1,getPos _bullet,[0,0,0],0,1.275,1,0,[0.02*_caliber,0.01*_caliber],[[0,0,0,0.65],[0,0,0,0.2]],[1,0],0,0,"","",""];
};
- call compile ("ace_advanced_ballistics" callExtension format["simulate:%1:%2:%3:%4:%5:%6:%7", _index, _bulletVelocity, _bulletPosition, ACE_wind, ASLToATL(_bulletPosition) select 2, _aceTimeSecond, ACE_time - _aceTimeSecond]);
+ call compile ("ace_advanced_ballistics" callExtension format["simulate:%1:%2:%3:%4:%5:%6:%7", _index, _bulletVelocity, _bulletPosition, ACE_wind, ASLToATL(_bulletPosition) select 2, _aceTimeSecond, CBA_missionTime - _aceTimeSecond]);
};
nil
} count +GVAR(allBullets);
diff --git a/addons/advanced_ballistics/functions/fnc_handleFired.sqf b/addons/advanced_ballistics/functions/fnc_handleFired.sqf
index 9646f065d4..7085224771 100644
--- a/addons/advanced_ballistics/functions/fnc_handleFired.sqf
+++ b/addons/advanced_ballistics/functions/fnc_handleFired.sqf
@@ -88,7 +88,7 @@ if (GVAR(ammoTemperatureEnabled) || GVAR(barrelLengthInfluenceEnabled)) then {
_bulletTraceVisible = false;
if (GVAR(bulletTraceEnabled) && cameraView == "GUNNER") then {
- if (currentWeapon ACE_player in ["ACE_Vector", "Binocular", "Rangefinder", "Laserdesignator"]) then {
+ if (currentWeapon ACE_player == binocular ACE_player) then {
_bulletTraceVisible = true;
} else {
if (currentWeapon ACE_player == primaryWeapon ACE_player && count primaryWeaponItems ACE_player > 2) then {
@@ -110,8 +110,8 @@ if (_caliber > 0 && _bulletLength > 0 && _bulletMass > 0 && _barrelTwist > 0) th
GVAR(currentbulletID) = (GVAR(currentbulletID) + 1) % 10000;
-_aceTimeSecond = floor ACE_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 _projectile, EGVAR(common,mapLatitude), EGVAR(weather,currentTemperature), EGVAR(common,mapAltitude), EGVAR(weather,currentHumidity), overcast, _aceTimeSecond, ACE_time - _aceTimeSecond];
+_aceTimeSecond = floor CBA_missionTime;
+"ace_advanced_ballistics" callExtension format["new:%1:%2:%3:%4:%5:%6:%7:%8:%9:%10:%11:%12:%13:%14:%15:%16:%17:%18", GVAR(currentbulletID), _airFriction, _ballisticCoefficients, _velocityBoundaries, _atmosphereModel, _dragModel, _stabilityFactor, _twistDirection, _muzzleVelocity, _transonicStabilityCoef, getPosASL _projectile, EGVAR(common,mapLatitude), EGVAR(weather,currentTemperature), EGVAR(common,mapAltitude), EGVAR(weather,currentHumidity), overcast, _aceTimeSecond, CBA_missionTime - _aceTimeSecond];
GVAR(allBullets) pushBack [_projectile, _caliber, _bulletTraceVisible, GVAR(currentbulletID)];
diff --git a/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf b/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf
index 02468d0349..9fed872a6b 100644
--- a/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf
+++ b/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf
@@ -18,13 +18,13 @@ if (!GVAR(extensionAvailable)) exitWith {};
private ["_initStartTime", "_mapSize", "_mapGrids", "_gridCells", "_x", "_y", "_gridCenter", "_gridHeight", "_gridNumObjects", "_gridSurfaceIsWater"];
-_initStartTime = ACE_time;
+_initStartTime = CBA_missionTime;
_mapSize = getNumber (configFile >> "CfgWorlds" >> worldName >> "MapSize");
if (("ace_advanced_ballistics" callExtension format["init:%1:%2", worldName, _mapSize]) == "Terrain already initialized") exitWith {
#ifdef DEBUG_MODE_FULL
systemChat "AdvancedBallistics: Terrain already initialized";
- #endIf
+ #endif
};
_mapGrids = ceil(_mapSize / 50) + 1;
@@ -38,7 +38,7 @@ GVAR(currentGrid) = 0;
if (GVAR(currentGrid) >= _gridCells) exitWith {
#ifdef DEBUG_MODE_FULL
- systemChat format["AdvancedBallistics: Finished terrain initialization in %1 seconds", ceil(ACE_time - _initStartTime)];
+ systemChat format["AdvancedBallistics: Finished terrain initialization in %1 seconds", ceil(CBA_missionTime - _initStartTime)];
#endif
[_idPFH] call CBA_fnc_removePerFrameHandler;
};
diff --git a/addons/advanced_ballistics/functions/fnc_readAmmoDataFromConfig.sqf b/addons/advanced_ballistics/functions/fnc_readAmmoDataFromConfig.sqf
index 9839c1dcc3..646096683a 100644
--- a/addons/advanced_ballistics/functions/fnc_readAmmoDataFromConfig.sqf
+++ b/addons/advanced_ballistics/functions/fnc_readAmmoDataFromConfig.sqf
@@ -24,6 +24,7 @@
*/
#include "script_component.hpp"
+TRACE_1("Reading Ammo Config",_this);
private ["_ammo", "_airFriction", "_caliber", "_bulletLength", "_bulletMass", "_transonicStabilityCoef", "_dragModel", "_ballisticCoefficients", "_velocityBoundaries", "_atmosphereModel", "_ammoTempMuzzleVelocityShifts", "_muzzleVelocityTable", "_barrelLengthTable", "_result"];
_ammoConfig = configFile >> "CfgAmmo" >> _this;
@@ -49,6 +50,42 @@ _ammoTempMuzzleVelocityShifts = getArray(_ammoConfig >> "ACE_ammoTempMuzzleVeloc
_muzzleVelocityTable = getArray(_ammoConfig >> "ACE_muzzleVelocities");
_barrelLengthTable = getArray(_ammoConfig >> "ACE_barrelLengths");
+//Handle subsonic ammo that would have a huge muzzle velocity shift (when ballistic configs not explicitly defined)
+private _typicalSpeed = getNumber (_ammoConfig >> "typicalSpeed");
+if ((_typicalSpeed > 0) && {_typicalSpeed < 360}) then {
+ private _inheritedBarrelConfig = (!(_muzzleVelocityTable isEqualTo [])) && {(configProperties [_ammoConfig, "(configName _x) == 'ACE_muzzleVelocities'", false]) isEqualTo []};
+ private _inheritedTempConfig = (!(_ammoTempMuzzleVelocityShifts isEqualTo [])) && {(configProperties [_ammoConfig, "(configName _x) == 'ACE_ammoTempMuzzleVelocityShifts'", false]) isEqualTo []};
+ TRACE_3("subsonic",_typicalSpeed,_inheritedBarrelConfig,_inheritedTempConfig);
+ if (_inheritedBarrelConfig || _inheritedTempConfig) then {
+ private _parentConfig = inheritsFrom _ammoConfig;
+ private _parentSpeed = getNumber (_parentConfig >> "typicalSpeed");
+ ACE_LOGWARNING_4("Subsonic Ammo %1 (%2 m/s) missing `ACE_muzzleVelocities` or `ACE_ammoTempMuzzleVelocityShifts` configs, attempting to use parent %3 (%4m/s)",_this,_typicalSpeed,configName _parentConfig, _parentSpeed);
+ if (_parentSpeed <= 0) exitWith {//Handle weird or null parent
+ _muzzleVelocityTable = [];
+ _ammoTempMuzzleVelocityShifts = [];
+ };
+ private _linearMuliplier = _typicalSpeed / _parentSpeed;
+ if (_inheritedBarrelConfig) then {
+ if (!((configProperties [_parentConfig, "(configName _x) == 'ACE_muzzleVelocities'", false]) isEqualTo [])) then {
+ TRACE_2("Parent Has Defined Barrel MV",_linearMuliplier,_muzzleVelocityTable);
+ { _muzzleVelocityTable set [_forEachIndex, (_x * _linearMuliplier)]; } forEach _muzzleVelocityTable;
+ } else {
+ TRACE_2("Parent DOES NOT Have Defined Barrel MV",_linearMuliplier,_muzzleVelocityTable);
+ _muzzleVelocityTable = [];
+ };
+ };
+ if (_inheritedTempConfig) then {
+ if (!((configProperties [_parentConfig, "(configName _x) == 'ACE_ammoTempMuzzleVelocityShifts'", false]) isEqualTo [])) then {
+ TRACE_2("Parent Has Defined Ammo Temp Shifts",_linearMuliplier,_muzzleVelocityTable);
+ { _ammoTempMuzzleVelocityShifts set [_forEachIndex, (_x * _linearMuliplier)]; } forEach _ammoTempMuzzleVelocityShifts;
+ } else {
+ TRACE_2("Parent DOES NOT Have Defined Ammo Temp Shifts",_linearMuliplier,_muzzleVelocityTable);
+ _ammoTempMuzzleVelocityShifts = [];
+ };
+ };
+ };
+};
+
_result = [_airFriction, _caliber, _bulletLength, _bulletMass, _transonicStabilityCoef, _dragModel, _ballisticCoefficients, _velocityBoundaries, _atmosphereModel, _ammoTempMuzzleVelocityShifts, _muzzleVelocityTable, _barrelLengthTable];
uiNamespace setVariable [format[QGVAR(%1), _this], _result];
diff --git a/addons/advanced_ballistics/stringtable.xml b/addons/advanced_ballistics/stringtable.xml
index bfe0718d90..718057a5b4 100644
--- a/addons/advanced_ballistics/stringtable.xml
+++ b/addons/advanced_ballistics/stringtable.xml
@@ -35,6 +35,7 @@
Balistique avancée
Fejlett ballisztika
Продвинутая баллистика
+ Balistica Avanzata
Advanced Ballistics
@@ -46,6 +47,7 @@
Balistique avancée
Fejlett ballisztika
Продвинутая баллистика
+ Balistica Avanzata
Enables advanced ballistics
@@ -57,6 +59,7 @@
Activer la balistique avancée
Engedélyezi a fejlett ballisztikát
Включает продвинутую баллистику
+ Abilita Balistica Avanzata
Enabled For Snipers
@@ -68,6 +71,7 @@
Activer pour les snipers
Mesterlövészeknek engedélyezve
Включена для снайперов
+ Abilita per Tiratori Scelti
Enables advanced ballistics for non local snipers (when using high power optics)
@@ -79,6 +83,7 @@
Active la balistique avancée pour les snipers non locaux (en utilisant les optiques avancées)
Engedélyezi a fejlett ballisztikát nem-helyi mesterlövészeknek (nagy-teljesítményű optika használatakor)
Включает продвинутую баллистику для нелокальных снайперов (при использовании мощной оптики)
+ Abilita Balistica Avanzata per Tiratori Scelti non locali (con ottiche ad alto potenziale)
Enabled For Group Members
@@ -87,9 +92,10 @@
Für Gruppenmitglieder aktiviert
Povoleno pro členy skupiny
Ativada para membros do grupo
- Activer pour les membres groupés
+ Activer pour les membres du groupe
Csoporttagoknak engedélyezve
Включена для группы
+ Abilita per Membri del Gruppo
Enables advanced ballistics for non local group members
@@ -98,9 +104,10 @@
Aktiviert die erweiterte Ballistik für nicht lokale Gruppenmitglieder
Aktivuje pokročilou balistiku pro nelokální členy skupiny
Ativa balística avançada para membros de grupo não locais
- Active la balistique avancée pour les membres groupés non locaux
+ Active la balistique avancée pour les membres du groupe non locaux
Engedélyezi a fejlett ballisztikát nem-helyi csoporttagoknak
Включает продвинутую баллистику для нелокальных членов группы
+ Abilita Balistica Avanzata per Membri non locali del Gruppo
Enabled For Everyone
@@ -112,6 +119,7 @@
Activer pour tout le monde
Mindenkinek engedélyezve
Включена для всех
+ Abilita per tutti
Enables advanced ballistics for all non local players (enabling this may degrade performance during heavy firefights in multiplayer)
@@ -120,9 +128,10 @@
Aktiviert die erweiterte Ballistik für alle nicht lokalen Spieler (das Aktivieren dieser Funktion kann zur Beeinträchtigung des Spielerlebnisses im Multiplayer führen)
Aktivuje pokročilou balistiku pro všechny nelokální hráče (aktivace této možnosti způsobuje pokles FPS během velké přestřelky v multiplayeru)
Ativa balística avançada para todos os jogadores não locais (ativando isso pode degradar a performance durante troca de tiros intensas no multiplayer)
- Active la balistique avancé pour tous les joueurs non locaux (activer cette option peut avoir un impact sur les performance en multi durant les grands échanges de tirs)
+ Active la balistique avancée pour tous les joueurs non locaux (activer cette option peut avoir un impact sur les performance en multi durant les grands échanges de tirs)
Engedélyezi a fejlett ballisztikát az összes nem-helyi játékosnak (ez a funkció leronthatja a teljesítményt intenzív többjátékos tűzharcok alatt)
Включает продвинутую баллистику для всех нелокальных игроков (включение этой опции может снизить производительность при массовых перестрелках в мультиплеере)
+ Abilita Balistica Avanzata per tutti i giocatori non locali (abilitare questo parametro potrebbe degradare le prestazioni durante scontri intensi in multiplayer)
Always Enabled For Group Members
@@ -131,9 +140,10 @@
Für Gruppenmitglieder immer aktiviert
Vždy povoleno pro členy skupiny
Sempre ativada para membros do grupo
- Toujours activer pour les membres groupés
+ Toujours activer pour les membres du groupe
Mindig engedélyezve csoporttagoknak
Всегда включена для членов группы
+ Sempre abilitato per Membri del Gruppo
Always enables advanced ballistics when a group member fires
@@ -145,6 +155,7 @@
Active tout le temps la balistique avancée quand un membre du groupe ouvre le feu
Mindig engedélyezi a fejlett ballisztikát, ha egy csoporttag tüzel
Всегда включает продвинутую баллистику когда стреляет член группы
+ Abilita sempre Balistica Avanzata quando un Membro del Gruppo spara
Disabled In FullAuto Mode
@@ -156,6 +167,7 @@
Désactiver en mode rafale libre
Automata módban letiltva
Выкл. для автомат. режима
+ Disabilita in modalità di fuoco automatico
Disables the advanced ballistics during full auto fire
@@ -167,6 +179,7 @@
Désactive la balistique avancée pour les tirs en rafale libre
Letiltja a fejlett ballisztikát automata tüzelés folyamán
Выключает продвинутую баллистику при стрельбе в полностью автоматическом режиме
+ Disabilita Balistica Avanzata durante fuoco automatico
Enable Ammo Temperature Simulation
@@ -178,6 +191,7 @@
Activer la simulation de la température
Lőszer-hő szimuláció engedélyezése
Симуляция температуры для боеприпасов
+ Abilita simulazione della temperatura delle munizioni
Muzzle velocity varies with ammo temperature
@@ -189,6 +203,7 @@
La température de la munition influe sur la vélocité intiale
A kezdősebesség a lőszer hőmérsékletétől függően változó
Начальная скорость пули зависит от температуры
+ Velocità alla volata varia con la temperatura delle munizioni
Enable Barrel Length Simulation
@@ -200,6 +215,7 @@
Activer la simulation de la longueur de canon
Csőhossz-szimuláció engedélyezése
Симуляция длины ствола
+ Abilita simulazione della lunghezza della canna
Muzzle velocity varies with barrel length
@@ -211,6 +227,7 @@
La longueur du canon influe sur la vélocité initale
A kezdősebesség a cső hosszától függően változó
Начальная скорость пули зависит от длины ствола
+ Velocità alla volata varia con la lunghezza della canna
Enable Bullet Trace Effect
@@ -222,6 +239,7 @@
Activer l'effet traçante
Nyomkövető-effekt engedélyezése
Следы пуль
+ Abilita effetto di tracciatura dei proiettili
Enables a bullet trace effect to high caliber bullets (only visible when looking through high power optics)
@@ -233,6 +251,7 @@
Active une tracante pour les munitions de gros calibre (seulement visible en utilisant des optiques avancées)
Engedélyezi a nagy kaliberű lövedékek nyomának vizuális követését (csak nagy teljesítményű optikán keresztül látható)
Включает эффект следов пуль для больших калибров (видны только через мощную оптику)
+ Abilita effetto di tracciatura per proiettili di alto calibro (visibile solo attraverso ottiche ad alto potenziale)
Simulation Interval
@@ -244,6 +263,7 @@
Intervalle de simulation
Szimuláció intervalluma
Интервал симуляции
+ Intervallo Simulazione
Defines the interval between every calculation step
@@ -252,9 +272,10 @@
Legt das Intervall zwischen den Berechnungsschritten fest
Určuje interval mezi každým výpočtem
Define o intervalo entre cada cálculo
- Défini un intervalle de calcul entre deux simulations
+ Définit un intervalle de calcul entre deux simulations
Meghatározza a számítási lépések közötti időintervallumot
Определяет временной интервал между вычислениями
+ Definisce l'intervallo tra ogni step di calcolo
Simulation Radius
@@ -266,6 +287,7 @@
Rayon de simulation
Szimuláció hatóköre
Радиус симуляции
+ Raggio Simulazione
Defines the radius around the player (in meters) at which advanced ballistics are applied to projectiles
@@ -274,19 +296,22 @@
Gibt den Radius (in Metern) um den Spieler an, bei dem die erweiterte Ballistik auf Geschosse angewendet wird
Určuje oblast kolem hráče (v metrech), kde je pokročilá balistika použita na projektil
Define o raio ao redor do jogador (em metros) onde a balística avançada será aplicada aos projéteis
- Défini le rayon autour du joueur (en mètres) d'application de la balistique avancée
+ Définit le rayon autour du joueur (en mètres) d'application de la balistique avancée
Meghatározza a játékos körüli hatókört (méterben), ahol a lövedékek fejlett ballisztikát használnak
Определяет радиус вокруг игрока (в метрах), в котором продвинутая баллистика применяется к снарядам
+ Definisce il raggio attorno al giocatore (in metri) per cui la Balistica Avanzata è applicata ai proiettili
This module enables advanced ballistics simulation - meaning the trajectory of projectiles is influenced by variables like air temperature, atmospheric pressure, humidity, gravity, the type of ammunition and the weapon from which it was fired.
+ Dieses Modul aktiviert die Erweiterte Ballisitk. Die Flugbahn eines Geschosses wird nun von Einflüssen wie z.B Temperatur, Luftdruck, Luftfeuchtigkeit, Schwerkraft, Geschossart sowie der Waffe aus dem es gefeuert wird, beeinflusst.
Moduł ten pozwala aktywować zaawansowaną balistykę biorącą przy obliczeniach trajektorii lotu pocisku pod uwagę takie rzeczy jak temperatura powietrza, ciśnienie atmosferyczne, wilgotność powietrza, siły Coriolisa i Eotvosa, grawitację a także broń z jakiej wykonywany jest strzał oraz rodzaj amunicji. Wszystko to sprowadza się na bardzo dokładne odwzorowanie balistyki.
Tento modul umožňuje aktivovat pokročilou balistiku, která vypočítává trajektorii kulky a bere do úvahy věci jako je teplota vzduchu, atmosférický tlak, vlhkost vzduchu, gravitaci, typ munice a zbraň, ze které je náboj vystřelen. To vše přispívá k velmi přesné balistice.
Este módulo permite que você ative cálculos de balística avançada, fazendo a trajetória do projétil levar em consideração coisas como temperatura do ar, pressão atmosférica, umidade, força de Coriolis, a gravidade, o modelo da arma no qual o disparo é realizado e o tipo de munição. Tudo isso acrescenta-se a um balística muito precisa.
- Ce module active la simulation de balistique avancée - ie les projectiles sont influencé par des varibles comme le vent, la température, la pression atmosphérique, l'humidité, la gravité, le type de munition et l'arme avec laquelles ils sont tirés
+ Ce module active la simulation de balistique avancée - ie les projectiles sont influencés par des varibles comme le vent, la température, la pression atmosphérique, l'humidité, la gravité, le type de munition et l'arme avec laquelle ils sont tirés.
Ez a modul engedélyezi a fejlett ballisztikai szimulációt - a lövedékek röppályáját befolyásolni fogja a levegő hőmérséklete, légnyomás, páratartalom, gravitáció, a lövedék fajtája, valamint a fegyver, amiből kilőtték a lövedéket.
Этот модуль включает симуляцию продвинутой баллистики - при этом на траекторию полета снаряда влияют различные параметры, такие как температура воздуха, атмосферное давление, влажность, гравитация, тип боеприпаса и оружия, из которого произвели выстрел.
Este módulo permite la simulación balística avanzada - es decir, la trayectoria de los proyectiles está influenciada por variables como la temperatura del aire, la presión atmosférica, la humedad, la gravedad, el tipo de municiones y el arma desde el que fue disparada.
+ Questo modulo abilita la simulazione della Balistica Avanzata - cioè la traiettoria dei proiettili è influenzata da variabili come la temperatura dell'aria, pressione atmosferica, umidità, gravità, il tipo di munizione e l'arma da cui è sparata
-
\ No newline at end of file
+
diff --git a/addons/ai/config.cpp b/addons/ai/config.cpp
index fdcb6afe9d..504c8b6e3c 100644
--- a/addons/ai/config.cpp
+++ b/addons/ai/config.cpp
@@ -6,8 +6,9 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
- author[] = {"KoffeinFlummi","commy2"};
- authorUrl = "https://github.com/KoffeinFlummi/";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"KoffeinFlummi","commy2"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
diff --git a/addons/aircraft/CfgAmmo.hpp b/addons/aircraft/CfgAmmo.hpp
index 8aa5d3173e..2c3701b8e0 100644
--- a/addons/aircraft/CfgAmmo.hpp
+++ b/addons/aircraft/CfgAmmo.hpp
@@ -11,7 +11,7 @@ class CfgAmmo {
explosive = 1.8;
tracersEvery = 3;
tracerEndTime = 3.5;
-
+
CraterEffects = "ExploAmmoCrater";
explosionEffects = "ExploAmmoExplosion";
model = "\A3\Weapons_f\Data\bullettracer\tracer_red";
diff --git a/addons/aircraft/Heli_Attack_01_base_F.hpp b/addons/aircraft/Heli_Attack_01_base_F.hpp
index 26a4605910..f56cda1fd8 100644
--- a/addons/aircraft/Heli_Attack_01_base_F.hpp
+++ b/addons/aircraft/Heli_Attack_01_base_F.hpp
@@ -1,997 +1,997 @@
-class Heli_Attack_01_base_F: Helicopter_Base_F {
- lockDetectionSystem = 12;
- incomingMissileDetectionSystem = 16;
- driverCanEject = 1;
-
- class MFD
- {
- class AirplaneHUD
- {
- class Bones{};
- class Draw{};
- topLeft = "HUD_top_left";
- topRight = "HUD_top_right";
- bottomLeft = "HUD_bottom_left";
- borderLeft = 0;
- borderRight = 0;
- borderTop = 0;
- borderBottom = 0;
- color[] = {0.15,1,0.15,1};
- enableParallax = 0;
- helmetMountedDisplay = 1;
- helmetPosition[] = {0,0,0};
- helmetRight[] = {0,0,0};
- helmetDown[] = {0,0,0};
- };
- class ACE_HUD_1
- {
- topLeft = "HUD_top_left";
- topRight = "HUD_top_right";
- bottomLeft = "HUD_bottom_left";
- borderLeft = 0;
- borderRight = 0;
- borderTop = 0;
- borderBottom = 0;
- color[] = {0.15,1,0.15,1};
- enableParallax = 0;
- class Bones
- {
- class GunnerAim
- {
- type = "vector";
- source = "weapon";
- pos0[] = {0.5,"0.9 - 0.04 + 0.012"};
- pos10[] = {"0.5 + 0.0111","0.9 - 0.04 + 0.012 + 0.0133"};
- };
- class Target
- {
- source = "target";
- type = "vector";
- pos0[] = {0.5,0.5};
- pos10[] = {0.85,0.85};
- };
- class Velocity
- {
- type = "vector";
- source = "velocity";
- pos0[] = {0.5,0.5};
- pos10[] = {0.65,0.65};
- };
- class Velocity_slip
- {
- type = "vector";
- source = "velocity";
- pos0[] = {0.5,0.845};
- pos10[] = {0.53,0.845};
- };
- class VspeedBone
- {
- type = "linear";
- source = "vspeed";
- sourceScale = 1;
- min = -10;
- max = 10;
- minPos[] = {0.93,0.2};
- maxPos[] = {0.93,0.8};
- };
- class RadarAltitudeBone
- {
- type = "linear";
- source = "altitudeAGL";
- sourceScale = 1;
- min = 0;
- max = 60;
- minPos[] = {0.965,0.2};
- maxPos[] = {0.965,0.8};
- };
- class HorizonBankRot
- {
- type = "rotational";
- source = "horizonBank";
- center[] = {0.5,0.5};
- min = -3.1416;
- max = 3.1416;
- minAngle = -180;
- maxAngle = 180;
- aspectRatio = 1;
- };
- class ForwardVec
- {
- type = "vector";
- source = "forward";
- pos0[] = {0,0};
- pos10[] = {0.25,0.25};
- };
- class WeaponAim
- {
- type = "vector";
- source = "weapon";
- pos0[] = {0.5,0.5};
- pos10[] = {0.75,0.75};
- };
- class Level0
- {
- type = "horizon";
- pos0[] = {0.5,0.5};
- pos10[] = {0.78,0.78};
- angle = 0;
- };
- class LevelP5: Level0
- {
- angle = 5;
- };
- class LevelM5: Level0
- {
- angle = -5;
- };
- class LevelP10: Level0
- {
- angle = 10;
- };
- class LevelM10: Level0
- {
- angle = -10;
- };
- class LevelP15: Level0
- {
- angle = 15;
- };
- class LevelM15: Level0
- {
- angle = -15;
- };
- class LevelP20: Level0
- {
- angle = 20;
- };
- class LevelM20: Level0
- {
- angle = -20;
- };
- class LevelP25: Level0
- {
- angle = 25;
- };
- class LevelM25: Level0
- {
- angle = -25;
- };
- class LevelP30: Level0
- {
- angle = 30;
- };
- class LevelM30: Level0
- {
- angle = -30;
- };
- class LevelP35: Level0
- {
- angle = 35;
- };
- class LevelM35: Level0
- {
- angle = -35;
- };
- class LevelP40: Level0
- {
- angle = 40;
- };
- class LevelM40: Level0
- {
- angle = -40;
- };
- class LevelP45: Level0
- {
- angle = 45;
- };
- class LevelM45: Level0
- {
- angle = -45;
- };
- class LevelP50: Level0
- {
- angle = 50;
- };
- class LevelM50: Level0
- {
- angle = -50;
- };
- };
- class Draw
- {
- color[] = {0.18,1,0.18};
- alpha = 1;
- condition = "on";
- class Horizont
- {
- clipTL[] = {0.15,0.15};
- clipBR[] = {0.85,0.85};
- class Dimmed
- {
- class Level0
- {
- type = "line";
- points[] = {{ "Level0",{ -0.42,0 },1 },{ "Level0",{ -0.38,0 },1 },{ },{ "Level0",{ -0.37,0 },1 },{ "Level0",{ -0.33,0 },1 },{ },{ "Level0",{ -0.32,0 },1 },{ "Level0",{ -0.28,0 },1 },{ },{ "Level0",{ -0.27,0 },1 },{ "Level0",{ -0.23,0 },1 },{ },{ "Level0",{ -0.22,0 },1 },{ "Level0",{ -0.18,0 },1 },{ },{ "Level0",{ -0.17,0 },1 },{ "Level0",{ -0.13,0 },1 },{ },{ "Level0",{ -0.12,0 },1 },{ "Level0",{ -0.08,0 },1 },{ },{ "Level0",{ 0.42,0 },1 },{ "Level0",{ 0.38,0 },1 },{ },{ "Level0",{ 0.37,0 },1 },{ "Level0",{ 0.33,0 },1 },{ },{ "Level0",{ 0.32,0 },1 },{ "Level0",{ 0.28,0 },1 },{ },{ "Level0",{ 0.27,0 },1 },{ "Level0",{ 0.23,0 },1 },{ },{ "Level0",{ 0.22,0 },1 },{ "Level0",{ 0.18,0 },1 },{ },{ "Level0",{ 0.17,0 },1 },{ "Level0",{ 0.13,0 },1 },{ },{ "Level0",{ 0.12,0 },1 },{ "Level0",{ 0.08,0 },1 }};
- };
- };
- };
- class HorizonBankRot
- {
- type = "line";
- width = 3;
- points[] = {{ "HorizonBankRot",{ 0,0.25 },1 },{ "HorizonBankRot",{ -0.01,0.23 },1 },{ "HorizonBankRot",{ 0.01,0.23 },1 },{ "HorizonBankRot",{ 0,0.25 },1 }};
- };
- class Static_HAD_BOX
- {
- clipTL[] = {0,1};
- clipBR[] = {1,0};
- type = "line";
- width = 5;
- points[] = {{ { "0.5-0.1","0.9-0.04" },1 },{ { "0.5-0.1","0.9+0.04" },1 },{ { "0.5+0.1","0.9+0.04" },1 },{ { "0.5+0.1","0.9-0.04" },1 },{ { "0.5-0.1","0.9-0.04" },1 },{ },{ { "0.5-0.1","0.9-0.04+0.012" },1 },{ { "0.5-0.092","0.9-0.04+0.012" },1 },{ },{ { "0.5+0.1","0.9-0.04+0.012" },1 },{ { "0.5+0.092","0.9-0.04+0.012" },1 },{ },{ { 0.5,"0.9-0.04" },1 },{ { 0.5,"0.9-0.032" },1 },{ },{ { 0.5,"0.9+0.04" },1 },{ { 0.5,"0.9+0.032" },1 },{ }};
- };
- class Gunner_HAD
- {
- type = "line";
- width = 6;
- points[] = {{ "GunnerAim",{ -0.015,-0.008 },1 },{ "GunnerAim",{ -0.015,0.008 },1 },{ "GunnerAim",{ 0.015,0.008 },1 },{ "GunnerAim",{ 0.015,-0.008 },1 },{ "GunnerAim",{ -0.015,-0.008 },1 }};
- };
- class Slip_ball_group
- {
- class Slip_bars
- {
- type = "line";
- width = 4;
- points[] = {{ { "0.5-0.018","0.9-0.04" },1 },{ { "0.5-0.018","0.9-0.075" },1 },{ },{ { "0.5+0.018","0.9-0.04" },1 },{ { "0.5+0.018","0.9-0.075" },1 }};
- };
- class Slip_ball
- {
- type = "line";
- width = 6;
- points[] = {{ "Velocity_slip",1,{ "0 * 0.75","-0.02 * 0.75" },1 },{ "Velocity_slip",1,{ "0.0099999998 * 0.75","-0.01732 * 0.75" },1 },{ "Velocity_slip",1,{ "0.01732 * 0.75","-0.0099999998 * 0.75" },1 },{ "Velocity_slip",1,{ "0.02 * 0.75","0 * 0.75" },1 },{ "Velocity_slip",1,{ "0.01732 * 0.75","0.0099999998 * 0.75" },1 },{ "Velocity_slip",1,{ "0.0099999998 * 0.75","0.01732 * 0.75" },1 },{ "Velocity_slip",1,{ "0 * 0.75","0.02 * 0.75" },1 },{ "Velocity_slip",1,{ "-0.0099999998 * 0.75","0.01732 * 0.75" },1 },{ "Velocity_slip",1,{ "-0.01732 * 0.75","0.0099999998 * 0.75" },1 },{ "Velocity_slip",1,{ "-0.02 * 0.75","0 * 0.75" },1 },{ "Velocity_slip",1,{ "-0.01732 * 0.75","-0.0099999998 * 0.75" },1 },{ "Velocity_slip",1,{ "-0.0099999998 * 0.75","-0.01732 * 0.75" },1 },{ "Velocity_slip",1,{ "0 * 0.75","-0.02 * 0.75" },1 },{ },{ "Velocity_slip",1,{ "0 * 0.6","-0.02 * 0.6" },1 },{ "Velocity_slip",1,{ "0.0099999998 * 0.6","-0.01732 * 0.6" },1 },{ "Velocity_slip",1,{ "0.01732 * 0.6","-0.0099999998 * 0.6" },1 },{ "Velocity_slip",1,{ "0.02 * 0.6","0 * 0.6" },1 },{ "Velocity_slip",1,{ "0.01732 * 0.6","0.0099999998 * 0.6" },1 },{ "Velocity_slip",1,{ "0.0099999998 * 0.6","0.01732 * 0.6" },1 },{ "Velocity_slip",1,{ "0 * 0.6","0.02 * 0.6" },1 },{ "Velocity_slip",1,{ "-0.0099999998 * 0.6","0.01732 * 0.6" },1 },{ "Velocity_slip",1,{ "-0.01732 * 0.6","0.0099999998 * 0.6" },1 },{ "Velocity_slip",1,{ "-0.02 * 0.6","0 * 0.6" },1 },{ "Velocity_slip",1,{ "-0.01732 * 0.6","-0.0099999998 * 0.6" },1 },{ "Velocity_slip",1,{ "-0.0099999998 * 0.6","-0.01732 * 0.6" },1 },{ "Velocity_slip",1,{ "0 * 0.6","-0.02 * 0.6" },1 },{ },{ "Velocity_slip",1,{ "0 * 0.5","-0.02 * 0.5" },1 },{ "Velocity_slip",1,{ "0.0099999998 * 0.5","-0.01732 * 0.5" },1 },{ "Velocity_slip",1,{ "0.01732 * 0.5","-0.0099999998 * 0.5" },1 },{ "Velocity_slip",1,{ "0.02 * 0.5","0 * 0.5" },1 },{ "Velocity_slip",1,{ "0.01732 * 0.5","0.0099999998 * 0.5" },1 },{ "Velocity_slip",1,{ "0.0099999998 * 0.5","0.01732 * 0.5" },1 },{ "Velocity_slip",1,{ "0 * 0.5","0.02 * 0.5" },1 },{ "Velocity_slip",1,{ "-0.0099999998 * 0.5","0.01732 * 0.5" },1 },{ "Velocity_slip",1,{ "-0.01732 * 0.5","0.0099999998 * 0.5" },1 },{ "Velocity_slip",1,{ "-0.02 * 0.5","0 * 0.5" },1 },{ "Velocity_slip",1,{ "-0.01732 * 0.5","-0.0099999998 * 0.5" },1 },{ "Velocity_slip",1,{ "-0.0099999998 * 0.5","-0.01732 * 0.5" },1 },{ "Velocity_slip",1,{ "0 * 0.5","-0.02 * 0.5" },1 },{ },{ "Velocity_slip",1,{ "0 * 0.4","-0.02 * 0.4" },1 },{ "Velocity_slip",1,{ "0.0099999998 * 0.4","-0.01732 * 0.4" },1 },{ "Velocity_slip",1,{ "0.01732 * 0.4","-0.0099999998 * 0.4" },1 },{ "Velocity_slip",1,{ "0.02 * 0.4","0 * 0.4" },1 },{ "Velocity_slip",1,{ "0.01732 * 0.4","0.0099999998 * 0.4" },1 },{ "Velocity_slip",1,{ "0.0099999998 * 0.4","0.01732 * 0.4" },1 },{ "Velocity_slip",1,{ "0 * 0.4","0.02 * 0.4" },1 },{ "Velocity_slip",1,{ "-0.0099999998 * 0.4","0.01732 * 0.4" },1 },{ "Velocity_slip",1,{ "-0.01732 * 0.4","0.0099999998 * 0.4" },1 },{ "Velocity_slip",1,{ "-0.02 * 0.4","0 * 0.4" },1 },{ "Velocity_slip",1,{ "-0.01732 * 0.4","-0.0099999998 * 0.4" },1 },{ "Velocity_slip",1,{ "-0.0099999998 * 0.4","-0.01732 * 0.4" },1 },{ "Velocity_slip",1,{ "0 * 0.4","-0.02 * 0.4" },1 },{ },{ "Velocity_slip",1,{ "0 * 0.30","-0.02 * 0.30" },1 },{ "Velocity_slip",1,{ "0.0099999998 * 0.30","-0.01732 * 0.30" },1 },{ "Velocity_slip",1,{ "0.01732 * 0.30","-0.0099999998 * 0.30" },1 },{ "Velocity_slip",1,{ "0.02 * 0.30","0 * 0.30" },1 },{ "Velocity_slip",1,{ "0.01732 * 0.30","0.0099999998 * 0.30" },1 },{ "Velocity_slip",1,{ "0.0099999998 * 0.30","0.01732 * 0.30" },1 },{ "Velocity_slip",1,{ "0 * 0.30","0.02 * 0.30" },1 },{ "Velocity_slip",1,{ "-0.0099999998 * 0.30","0.01732 * 0.30" },1 },{ "Velocity_slip",1,{ "-0.01732 * 0.30","0.0099999998 * 0.30" },1 },{ "Velocity_slip",1,{ "-0.02 * 0.30","0 * 0.30" },1 },{ "Velocity_slip",1,{ "-0.01732 * 0.30","-0.0099999998 * 0.30" },1 },{ "Velocity_slip",1,{ "-0.0099999998 * 0.30","-0.01732 * 0.30" },1 },{ "Velocity_slip",1,{ "0 * 0.30","-0.02 * 0.30" },1 },{ },{ "Velocity_slip",1,{ "0 * 0.20","-0.02 * 0.20" },1 },{ "Velocity_slip",1,{ "0.0099999998 * 0.20","-0.01732 * 0.20" },1 },{ "Velocity_slip",1,{ "0.01732 * 0.20","-0.0099999998 * 0.20" },1 },{ "Velocity_slip",1,{ "0.02 * 0.20","0 * 0.20" },1 },{ "Velocity_slip",1,{ "0.01732 * 0.20","0.0099999998 * 0.20" },1 },{ "Velocity_slip",1,{ "0.0099999998 * 0.20","0.01732 * 0.20" },1 },{ "Velocity_slip",1,{ "0 * 0.20","0.02 * 0.20" },1 },{ "Velocity_slip",1,{ "-0.0099999998 * 0.20","0.01732 * 0.20" },1 },{ "Velocity_slip",1,{ "-0.01732 * 0.20","0.0099999998 * 0.20" },1 },{ "Velocity_slip",1,{ "-0.02 * 0.20","0 * 0.20" },1 },{ "Velocity_slip",1,{ "-0.01732 * 0.20","-0.0099999998 * 0.20" },1 },{ "Velocity_slip",1,{ "-0.0099999998 * 0.20","-0.01732 * 0.20" },1 },{ "Velocity_slip",1,{ "0 * 0.20","-0.02 * 0.20" },1 },{ },{ "Velocity_slip",1,{ "0 * 0.1","-0.02 * 0.1" },1 },{ "Velocity_slip",1,{ "0.0099999998 * 0.1","-0.01732 * 0.1" },1 },{ "Velocity_slip",1,{ "0.01732 * 0.1","-0.0099999998 * 0.1" },1 },{ "Velocity_slip",1,{ "0.02 * 0.1","0 * 0.1" },1 },{ "Velocity_slip",1,{ "0.01732 * 0.1","0.0099999998 * 0.1" },1 },{ "Velocity_slip",1,{ "0.0099999998 * 0.1","0.01732 * 0.1" },1 },{ "Velocity_slip",1,{ "0 * 0.1","0.02 * 0.1" },1 },{ "Velocity_slip",1,{ "-0.0099999998 * 0.1","0.01732 * 0.1" },1 },{ "Velocity_slip",1,{ "-0.01732 * 0.1","0.0099999998 * 0.1" },1 },{ "Velocity_slip",1,{ "-0.02 * 0.1","0 * 0.1" },1 },{ "Velocity_slip",1,{ "-0.01732 * 0.1","-0.0099999998 * 0.1" },1 },{ "Velocity_slip",1,{ "-0.0099999998 * 0.1","-0.01732 * 0.1" },1 },{ "Velocity_slip",1,{ "0 * 0.1","-0.02 * 0.1" },1 }};
- };
- };
- class Centerline
- {
- type = "line";
- width = 5;
- points[] = {{ { 0.5,0.48 },1 },{ { 0.5,0.45 },1 },{ },{ { 0.5,0.52 },1 },{ { 0.5,0.55 },1 },{ },{ { 0.48,0.5 },1 },{ { 0.45,0.5 },1 },{ },{ { 0.52,0.5 },1 },{ { 0.55,0.5 },1 },{ }};
- };
- class WeaponName
- {
- type = "text";
- source = "weapon";
- sourceScale = 1;
- align = "right";
- scale = 1;
- pos[] = {{ 0.61,0.86 },1};
- right[] = {{ 0.65,0.86 },1};
- down[] = {{ 0.61,0.9 },1};
- };
- class Ammo_GUN
- {
- type = "group";
- condition = "mgun";
- class Ammo_count_GUN
- {
- type = "text";
- source = "ammo";
- sourceScale = 1;
- align = "right";
- scale = 1;
- pos[] = {{ 0.61,0.89 },1};
- right[] = {{ 0.65,0.89 },1};
- down[] = {{ 0.61,0.93 },1};
- };
- };
- class Ammo_RKT
- {
- type = "group";
- condition = "rocket";
- class Ammo_count_RKT
- {
- type = "text";
- source = "ammo";
- sourceScale = 1;
- align = "right";
- scale = 1;
- pos[] = {{ 0.61,0.89 },1};
- right[] = {{ 0.65,0.89 },1};
- down[] = {{ 0.61,0.93 },1};
- };
- };
- class Ammo_AGM
- {
- type = "group";
- condition = "AAmissile";
- class Ammo_count_AGM
- {
- type = "text";
- source = "ammo";
- sourceScale = 1;
- align = "right";
- scale = 1;
- pos[] = {{ 0.61,0.89 },1};
- right[] = {{ 0.65,0.89 },1};
- down[] = {{ 0.61,0.93 },1};
- };
- };
- class Ammo_AAM
- {
- type = "group";
- condition = "ATmissile";
- class Ammo_count_AAM
- {
- type = "text";
- source = "ammo";
- sourceScale = 1;
- align = "right";
- scale = 1;
- pos[] = {{ 0.61,0.89 },1};
- right[] = {{ 0.65,0.89 },1};
- down[] = {{ 0.61,0.93 },1};
- };
- };
- class Ammo_Bomb
- {
- type = "group";
- condition = "Bomb";
- class Ammo_count_Bomb
- {
- type = "text";
- source = "ammo";
- sourceScale = 1;
- align = "right";
- scale = 1;
- pos[] = {{ 0.61,0.89 },1};
- right[] = {{ 0.65,0.89 },1};
- down[] = {{ 0.61,0.93 },1};
- };
- };
- class LightsGroup
- {
- type = "group";
- condition = "lights";
- class LightsText
- {
- type = "text";
- source = "static";
- text = "LIGHTS";
- align = "right";
- scale = 1;
- pos[] = {{ 0.03,"0.53 + 0.055" },1};
- right[] = {{ 0.07,"0.53 + 0.055" },1};
- down[] = {{ 0.03,"0.53 + 0.095" },1};
- };
- };
- class CollisionLightsGroup
- {
- type = "group";
- condition = "collisionlights";
- class CollisionLightsText
- {
- type = "text";
- source = "static";
- text = "A-COL";
- align = "right";
- scale = 1;
- pos[] = {{ 0.03,"0.53 + 0.105" },1};
- right[] = {{ 0.07,"0.53 + 0.105" },1};
- down[] = {{ 0.03,"0.53 + 0.145" },1};
- };
- };
- class GearGroup
- {
- type = "group";
- condition = "ils";
- class GearText
- {
- type = "text";
- source = "static";
- text = "GEAR";
- align = "right";
- scale = 1;
- pos[] = {{ 0.03,"0.53 + 0.155" },1};
- right[] = {{ 0.07,"0.53 + 0.155" },1};
- down[] = {{ 0.03,"0.53 + 0.195" },1};
- };
- };
- class ATMissileTOFGroup
- {
- condition = "ATmissile";
- type = "group";
- class TOFtext
- {
- type = "text";
- align = "right";
- source = "static";
- text = "TOF=";
- scale = 1;
- pos[] = {{ 0.61,0.92 },1};
- right[] = {{ 0.65,0.92 },1};
- down[] = {{ 0.61,0.96 },1};
- };
- class TOFnumber
- {
- type = "text";
- source = "targetDist";
- sourcescale = 0.0025;
- align = "right";
- scale = 1;
- pos[] = {{ 0.69,0.92 },1};
- right[] = {{ 0.73,0.92 },1};
- down[] = {{ 0.69,0.96 },1};
- };
- };
- class LaserTOFGroup
- {
- condition = "Bomb";
- type = "group";
- class TOFtext
- {
- type = "text";
- align = "right";
- source = "static";
- text = "TOF=";
- scale = 1;
- pos[] = {{ 0.61,0.92 },1};
- right[] = {{ 0.65,0.92 },1};
- down[] = {{ 0.61,0.96 },1};
- };
- class TOFnumber
- {
- type = "text";
- source = "targetDist";
- sourcescale = 0.0025;
- align = "right";
- scale = 1;
- pos[] = {{ 0.69,0.92 },1};
- right[] = {{ 0.73,0.92 },1};
- down[] = {{ 0.69,0.96 },1};
- };
- };
- class RocketTOFGroup
- {
- condition = "Rocket";
- type = "group";
- class TOFtext
- {
- type = "text";
- align = "right";
- source = "static";
- text = "TOF=";
- scale = 1;
- pos[] = {{ 0.61,0.92 },1};
- right[] = {{ 0.65,0.92 },1};
- down[] = {{ 0.61,0.96 },1};
- };
- class TOFnumber
- {
- type = "text";
- source = "targetDist";
- sourcescale = 0.0025;
- align = "right";
- scale = 1;
- pos[] = {{ 0.69,0.92 },1};
- right[] = {{ 0.73,0.92 },1};
- down[] = {{ 0.69,0.96 },1};
- };
- };
- class RangeNumber
- {
- type = "text";
- source = "targetDist";
- sourceScale = 1;
- align = "left";
- scale = 1;
- pos[] = {{ 0.39,0.89 },1};
- right[] = {{ 0.43,0.89 },1};
- down[] = {{ 0.39,0.93 },1};
- };
- class RangeText
- {
- type = "text";
- source = "static";
- text = "RNG";
- align = "left";
- scale = 1;
- pos[] = {{ 0.39,0.86 },1};
- right[] = {{ 0.43,0.86 },1};
- down[] = {{ 0.39,0.9 },1};
- };
- class SpeedNumber
- {
- type = "text";
- align = "right";
- scale = 1;
- source = "speed";
- sourceScale = 3.6;
- pos[] = {{ 0.03,0.475 },1};
- right[] = {{ 0.08,0.475 },1};
- down[] = {{ 0.03,0.525 },1};
- };
- class TorqueNumber
- {
- condition = "simulRTD";
- class Torque_number
- {
- type = "text";
- align = "left";
- scale = 1;
- source = "rtdRotorTorque";
- sourceScale = 290;
- pos[] = {{ 0.065,0.175 },1};
- right[] = {{ 0.115,0.175 },1};
- down[] = {{ 0.065,0.225 },1};
- };
- class Torquetext
- {
- type = "text";
- source = "static";
- text = "%";
- align = "right";
- scale = 1;
- pos[] = {{ 0.07,0.175 },1};
- right[] = {{ 0.12,0.175 },1};
- down[] = {{ 0.07,0.225 },1};
- };
- };
- class AltNumber: SpeedNumber
- {
- align = "right";
- source = "altitudeAGL";
- sourceScale = 1;
- pos[] = {{ 0.83,0.475 },1};
- right[] = {{ 0.88,0.475 },1};
- down[] = {{ 0.83,0.525 },1};
- };
- class ASLNumber
- {
- type = "text";
- source = "altitudeASL";
- sourceScale = 1;
- align = "right";
- scale = 1;
- pos[] = {{ 0.835,0.18 },1};
- right[] = {{ 0.875,0.18 },1};
- down[] = {{ 0.835,0.22 },1};
- };
- class VspeedScalePosta
- {
- type = "line";
- width = 5;
- points[] = {{ { 0.98,0.2 },1 },{ { 1,0.2 },1 },{ },{ { 0.93,0.2 },1 },{ { 0.95,0.2 },1 },{ },{ { 0.98,0.35 },1 },{ { 1,0.35 },1 },{ },{ { 0.93,0.35 },1 },{ { 0.95,0.35 },1 },{ },{ { 0.94,0.38 },1 },{ { 0.95,0.38 },1 },{ },{ { 0.94,0.41 },1 },{ { 0.95,0.41 },1 },{ },{ { 0.94,0.44 },1 },{ { 0.95,0.44 },1 },{ },{ { 0.94,0.47 },1 },{ { 0.95,0.47 },1 },{ },{ { 0.98,0.5 },1 },{ { 1,0.5 },1 },{ },{ { 0.93,0.5 },1 },{ { 0.95,0.5 },1 },{ },{ { 0.94,0.53 },1 },{ { 0.95,0.53 },1 },{ },{ { 0.94,0.56 },1 },{ { 0.95,0.56 },1 },{ },{ { 0.94,0.59 },1 },{ { 0.95,0.59 },1 },{ },{ { 0.94,0.62 },1 },{ { 0.95,0.62 },1 },{ },{ { 0.98,0.65 },1 },{ { 1,0.65 },1 },{ },{ { 0.93,0.65 },1 },{ { 0.95,0.65 },1 },{ },{ { 0.99,0.68 },1 },{ { 0.98,0.68 },1 },{ },{ { 0.99,0.71 },1 },{ { 0.98,0.71 },1 },{ },{ { 0.99,0.74 },1 },{ { 0.98,0.74 },1 },{ },{ { 0.99,0.77 },1 },{ { 0.98,0.77 },1 },{ },{ { 0.98,0.8 },1 },{ { 1,0.8 },1 },{ },{ { 0.93,0.8 },1 },{ { 0.95,0.8 },1 },{ }};
- };
- class RadarAltitudeBand
- {
- clipTL[] = {0,0.2};
- clipBR[] = {1,0.8};
- hideValue = 201;
- class radarbanda
- {
- type = "line";
- width = 17;
- points[] = {{ "RadarAltitudeBone",{ 0,0 },1 },{ "RadarAltitudeBone",{ 0,0.6 },1 }};
- };
- };
- class VspeedBand
- {
- type = "line";
- width = 3;
- points[] = {{ "VspeedBone",{ -0.01,0 },1 },{ "VspeedBone",{ -0.025,-0.015 },1 },{ "VspeedBone",{ -0.025,0.015 },1 },{ "VspeedBone",{ -0.01,0 },1 },{ }};
- };
- class HeadingNumber: SpeedNumber
- {
- source = "heading";
- sourceScale = 1;
- align = "center";
- pos[] = {{ 0.5,0.045 },1};
- right[] = {{ 0.56,0.045 },1};
- down[] = {{ 0.5,"0.045 + 0.06" },1};
- };
- class Center_box
- {
- type = "line";
- width = 1.5;
- points[] = {{ { 0.45,"0.02 + 0.085 - 0.06" },1 },{ { "0.45 + 0.10","0.02 + 0.085 - 0.06" },1 },{ { "0.45 + 0.10","0.02 + 0.085" },1 },{ { 0.45,"0.02 + 0.085" },1 },{ { 0.45,"0.02 + 0.085 - 0.06" },1 }};
- };
- class HeadingArrow
- {
- type = "line";
- width = 7;
- points[] = {{ { "0.5","0.128 + 0.03" },1 },{ { 0.5,0.128 },1 }};
- };
- class HeadingScale_LEFT
- {
- clipTL[] = {0,0};
- clipBR[] = {0.45,1};
- class Heading_group
- {
- type = "scale";
- horizontal = 1;
- source = "heading";
- sourceScale = 1;
- width = 5;
- top = 0.12;
- center = 0.5;
- bottom = 0.88;
- lineXleft = "0.03 + 0.085";
- lineYright = "0.02 + 0.085";
- lineXleftMajor = "0.04 + 0.085";
- lineYrightMajor = "0.02 + 0.085";
- majorLineEach = 3;
- numberEach = 3;
- step = 10;
- stepSize = "0.05";
- align = "center";
- scale = 1;
- pos[] = {0.12,"0.0 + 0.065"};
- right[] = {0.16,"0.0 + 0.065"};
- down[] = {0.12,"0.04 + 0.065"};
- };
- };
- class HeadingScale_RIGHT
- {
- clipTL[] = {0.55,0};
- clipBR[] = {1,1};
- class Heading_group
- {
- type = "scale";
- horizontal = 1;
- source = "heading";
- sourceScale = 1;
- width = 5;
- top = 0.12;
- center = 0.5;
- bottom = 0.88;
- lineXleft = "0.03 + 0.085";
- lineYright = "0.02 + 0.085";
- lineXleftMajor = "0.04 + 0.085";
- lineYrightMajor = "0.02 + 0.085";
- majorLineEach = 3;
- numberEach = 3;
- step = 10;
- stepSize = "0.05";
- align = "center";
- scale = 1;
- pos[] = {0.12,"0.0 + 0.065"};
- right[] = {0.16,"0.0 + 0.065"};
- down[] = {0.12,"0.04 + 0.065"};
- };
- };
- class HeadingScale_BOTTOM
- {
- clipTL[] = {0.45,"0.02 + 0.085"};
- clipBR[] = {"0.45 + 0.10",1};
- class Heading_group
- {
- type = "scale";
- horizontal = 1;
- source = "heading";
- sourceScale = 1;
- width = 5;
- top = 0.12;
- center = 0.5;
- bottom = 0.88;
- lineXleft = "0.03 + 0.085";
- lineYright = "0.02 + 0.085";
- lineXleftMajor = "0.04 + 0.085";
- lineYrightMajor = "0.02 + 0.085";
- majorLineEach = 3;
- numberEach = 3;
- step = 10;
- stepSize = "0.05";
- align = "center";
- scale = 1;
- pos[] = {0.12,"0.0 + 0.065"};
- right[] = {0.16,"0.0 + 0.065"};
- down[] = {0.12,"0.04 + 0.065"};
- };
- };
- class Fuel_Text
- {
- type = "text";
- source = "static";
- text = "Fuel";
- align = "right";
- scale = 1;
- pos[] = {{ 0.03,0.9 },1};
- right[] = {{ 0.07,0.9 },1};
- down[] = {{ 0.03,0.94 },1};
- };
- class Fuel_Number
- {
- type = "text";
- source = "fuel";
- sourceScale = 100;
- align = "right";
- scale = 1;
- pos[] = {{ 0.1,0.9 },1};
- right[] = {{ 0.14,0.9 },1};
- down[] = {{ 0.1,0.94 },1};
- };
- };
- helmetMountedDisplay = 1;
- helmetPosition[] = {-0.04,0.04,0.1};
- helmetRight[] = {0.08,0,0};
- helmetDown[] = {0,-0.08,0};
- };
- class ACE_HUD_2
- {
- topLeft = "HUD_top_left";
- topRight = "HUD_top_right";
- bottomLeft = "HUD_bottom_left";
- borderLeft = 0;
- borderRight = 0;
- borderTop = 0;
- borderBottom = 0;
- color[] = {0.15,1,0.15,1};
- enableParallax = 0;
- class Bones
- {
- class Velocity
- {
- type = "vector";
- source = "velocity";
- pos0[] = {0.5,0.5};
- pos10[] = {0.75,0.75};
- };
- class ForwardVec1
- {
- type = "vector";
- source = "forward";
- pos0[] = {0,0};
- pos10[] = {0.25,0.25};
- };
- class ForwardVec
- {
- type = "vector";
- source = "forward";
- pos0[] = {0,0};
- pos10[] = {0.253,0.253};
- };
- class WeaponAim
- {
- type = "vector";
- source = "weapon";
- pos0[] = {0.5,0.5};
- pos10[] = {0.753,0.753};
- };
- class WeaponAim1
- {
- type = "vector";
- source = "weapon";
- pos0[] = {0,0};
- pos10[] = {0.253,0.23};
- };
- class Target
- {
- type = "vector";
- source = "target";
- pos0[] = {0.5,0.5};
- pos10[] = {0.753,0.753};
- };
- class RadarContact
- {
- type = "fixed";
- pos[] = {0,0};
- };
- };
- class Draw
- {
- color[] = {0.18,1,0.18};
- alpha = 1;
- condition = "on";
- class PlaneMovementCrosshair
- {
- type = "line";
- width = 7;
- points[] = {{ "ForwardVec1",1,"Velocity",1,{ 0,-0.02 },1 },{ "ForwardVec1",1,"Velocity",1,{ 0.01,-0.01732 },1 },{ "ForwardVec1",1,"Velocity",1,{ 0.01732,-0.01 },1 },{ "ForwardVec1",1,"Velocity",1,{ 0.02,0 },1 },{ "ForwardVec1",1,"Velocity",1,{ 0.01732,0.01 },1 },{ "ForwardVec1",1,"Velocity",1,{ 0.01,0.01732 },1 },{ "ForwardVec1",1,"Velocity",1,{ 0,0.02 },1 },{ "ForwardVec1",1,"Velocity",1,{ -0.01,0.01732 },1 },{ "ForwardVec1",1,"Velocity",1,{ -0.01732,0.01 },1 },{ "ForwardVec1",1,"Velocity",1,{ -0.02,0 },1 },{ "ForwardVec1",1,"Velocity",1,{ -0.01732,-0.01 },1 },{ "ForwardVec1",1,"Velocity",1,{ -0.01,-0.01732 },1 },{ "ForwardVec1",1,"Velocity",1,{ 0,-0.02 },1 },{ },{ "ForwardVec1",1,"Velocity",1,{ 0.04,0 },1 },{ "ForwardVec1",1,"Velocity",1,{ 0.02,0 },1 },{ },{ "ForwardVec1",1,"Velocity",1,{ -0.04,0 },1 },{ "ForwardVec1",1,"Velocity",1,{ -0.02,0 },1 },{ },{ "ForwardVec1",1,"Velocity",1,{ 0,-0.04 },1 },{ "ForwardVec1",1,"Velocity",1,{ 0,-0.02 },1 }};
- };
- class Gunner_AIM
- {
- type = "group";
- class Circle
- {
- type = "line";
- width = 6;
- points[] = {{ "ForwardVec",1,"WeaponAim",1,{ 0,-0.015 },1 },{ "ForwardVec",1,"WeaponAim",1,{ 0,-0.03 },1 },{ },{ "ForwardVec",1,"WeaponAim",1,{ 0,-0.0325 },1 },{ "ForwardVec",1,"WeaponAim",1,{ 0,-0.0475 },1 },{ },{ "ForwardVec",1,"WeaponAim",1,{ 0,0.015 },1 },{ "ForwardVec",1,"WeaponAim",1,{ 0,0.03 },1 },{ },{ "ForwardVec",1,"WeaponAim",1,{ 0,0.0325 },1 },{ "ForwardVec",1,"WeaponAim",1,{ 0,0.0475 },1 },{ },{ "ForwardVec",1,"WeaponAim",1,{ -0.015,0 },1 },{ "ForwardVec",1,"WeaponAim",1,{ -0.03,0 },1 },{ },{ "ForwardVec",1,"WeaponAim",1,{ -0.0325,0 },1 },{ "ForwardVec",1,"WeaponAim",1,{ -0.0475,0 },1 },{ },{ "ForwardVec",1,"WeaponAim",1,{ 0.015,0 },1 },{ "ForwardVec",1,"WeaponAim",1,{ 0.03,0 },1 },{ },{ "ForwardVec",1,"WeaponAim",1,{ 0.0325,0 },1 },{ "ForwardVec",1,"WeaponAim",1,{ 0.0475,0 },1 }};
- };
- };
- class GunCross
- {
- condition = "mgun";
- class Circle
- {
- type = "line";
- width = 9;
- points[] = {{ "ForwardVec",1,"WeaponAim",1,{ 0,-0.05 },1 },{ "ForwardVec",1,"WeaponAim",1,{ 0,-0.015 },1 },{ },{ "ForwardVec",1,"WeaponAim",1,{ 0,0.015 },1 },{ "ForwardVec",1,"WeaponAim",1,{ 0,0.05 },1 },{ },{ "ForwardVec",1,"WeaponAim",1,{ -0.05,0 },1 },{ "ForwardVec",1,"WeaponAim",1,{ -0.015,0 },1 },{ },{ "ForwardVec",1,"WeaponAim",1,{ 0.015,0 },1 },{ "ForwardVec",1,"WeaponAim",1,{ 0.05,0 },1 },{ }};
- };
- };
- class RocketCross
- {
- condition = "rocket";
- width = 6;
- class Circle
- {
- type = "line";
- width = 6;
- points[] = {{ "ForwardVec",1,"WeaponAim",1,{ -0.05,-0.08 },1 },{ "ForwardVec",1,"WeaponAim",1,{ 0.05,-0.08 },1 },{ },{ "ForwardVec",1,"WeaponAim",1,{ 0,-0.08 },1 },{ "ForwardVec",1,"WeaponAim",1,{ 0,0.08 },1 },{ },{ "ForwardVec",1,"WeaponAim",1,{ -0.05,0.08 },1 },{ "ForwardVec",1,"WeaponAim",1,{ 0.05,0.08 },1 },{ }};
- };
- };
- class AT_Aim
- {
- condition = "ATmissile";
- width = 2;
- class Circle
- {
- type = "line";
- width = 2;
- points[] = {{ "ForwardVec",1,"WeaponAim",1,{ -0.1,-0.1 },1 },{ "ForwardVec",1,"WeaponAim",1,{ 0.1,-0.1 },1 },{ "ForwardVec",1,"WeaponAim",1,{ 0.1,0.1 },1 },{ "ForwardVec",1,"WeaponAim",1,{ -0.1,0.1 },1 },{ "ForwardVec",1,"WeaponAim",1,{ -0.1,-0.1 },1 }};
- };
- };
- class AA_aim
- {
- condition = "AAmissile";
- class Circle
- {
- type = "line";
- width = 2.5;
- points[] = {{ "ForwardVec",1,"WeaponAim",1,{ "0 / 4","-0.248559 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.0434 / 4","-0.244781 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.0855 / 4","-0.233571 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.125 / 4","-0.215252 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.1607 / 4","-0.190396 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.1915 / 4","-0.159774 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.2165 / 4","-0.12428 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.234925 / 4","-0.0850072 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.2462 / 4","-0.0431499 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.25 / 4","0 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.2462 / 4","0.0431499 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.234925 / 4","0.0850072 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.2165 / 4","0.12428 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.1915 / 4","0.159774 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.1607 / 4","0.190396 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.125 / 4","0.215252 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.0855 / 4","0.233571 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.0434 / 4","0.244781 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0 / 4","0.248559 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.0434 / 4","0.244781 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.0855 / 4","0.233571 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.125 / 4","0.215252 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.1607 / 4","0.190396 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.1915 / 4","0.159774 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.2165 / 4","0.12428 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.234925 / 4","0.0850072 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.2462 / 4","0.0431499 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.25 / 4","0 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.2462 / 4","-0.0431499 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.234925 / 4","-0.0850072 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.2165 / 4","-0.12428 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.1915 / 4","-0.159774 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.1607 / 4","-0.190396 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.125 / 4","-0.215252 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.0855 / 4","-0.233571 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.0434 / 4","-0.244781 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0 / 4","-0.248559 / 4" },1 },{ },{ "ForwardVec",1,"WeaponAim",1,{ "0 / 2","-0.248559 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.0434 / 2","-0.244781 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.0855 / 2","-0.233571 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.125 / 2","-0.215252 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.1607 / 2","-0.190396 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.1915 / 2","-0.159774 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.2165 / 2","-0.12428 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.234925 / 2","-0.0850072 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.2462 / 2","-0.0431499 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.25 / 2","0 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.2462 / 2","0.0431499 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.234925 / 2","0.0850072 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.2165 / 2","0.12428 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.1915 / 2","0.159774 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.1607 / 2","0.190396 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.125 / 2","0.215252 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.0855 / 2","0.233571 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.0434 / 2","0.244781 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0 / 2","0.248559 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.0434 / 2","0.244781 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.0855 / 2","0.233571 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.125 / 2","0.215252 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.1607 / 2","0.190396 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.1915 / 2","0.159774 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.2165 / 2","0.12428 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.234925 / 2","0.0850072 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.2462 / 2","0.0431499 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.25 / 2","0 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.2462 / 2","-0.0431499 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.234925 / 2","-0.0850072 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.2165 / 2","-0.12428 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.1915 / 2","-0.159774 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.1607 / 2","-0.190396 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.125 / 2","-0.215252 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.0855 / 2","-0.233571 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.0434 / 2","-0.244781 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0 / 2","-0.248559 / 2" },1 }};
- };
- };
- class TargetACQ
- {
- type = "line";
- width = 2;
- points[] = {{ "ForwardVec",1,"target",{ 0,-0.06 },1 },{ "ForwardVec",1,"target",{ 0,-0.055 },1 },{ },{ "ForwardVec",1,"target",{ 0,-0.05 },1 },{ "ForwardVec",1,"target",{ 0,-0.045 },1 },{ },{ "ForwardVec",1,"target",{ 0,-0.04 },1 },{ "ForwardVec",1,"target",{ 0,-0.035 },1 },{ },{ "ForwardVec",1,"target",{ 0,-0.03 },1 },{ "ForwardVec",1,"target",{ 0,-0.025 },1 },{ },{ "ForwardVec",1,"target",{ 0,-0.02 },1 },{ "ForwardVec",1,"target",{ 0,-0.015 },1 },{ },{ "ForwardVec",1,"target",{ 0,-0.01 },1 },{ "ForwardVec",1,"target",{ 0,-0.005 },1 },{ },{ "ForwardVec",1,"target",{ 0,0 },1 },{ "ForwardVec",1,"target",{ 0,0 },1 },{ },{ "ForwardVec",1,"target",{ 0,0.06 },1 },{ "ForwardVec",1,"target",{ 0,0.055 },1 },{ },{ "ForwardVec",1,"target",{ 0,0.05 },1 },{ "ForwardVec",1,"target",{ 0,0.045 },1 },{ },{ "ForwardVec",1,"target",{ 0,0.04 },1 },{ "ForwardVec",1,"target",{ 0,0.035 },1 },{ },{ "ForwardVec",1,"target",{ 0,0.03 },1 },{ "ForwardVec",1,"target",{ 0,0.025 },1 },{ },{ "ForwardVec",1,"target",{ 0,0.02 },1 },{ "ForwardVec",1,"target",{ 0,0.015 },1 },{ },{ "ForwardVec",1,"target",{ 0,0.01 },1 },{ "ForwardVec",1,"target",{ 0,0.005 },1 },{ },{ "ForwardVec",1,"target",{ -0.06,0 },1 },{ "ForwardVec",1,"target",{ -0.055,0 },1 },{ },{ "ForwardVec",1,"target",{ -0.05,0 },1 },{ "ForwardVec",1,"target",{ -0.045,0 },1 },{ },{ "ForwardVec",1,"target",{ -0.04,0 },1 },{ "ForwardVec",1,"target",{ -0.035,0 },1 },{ },{ "ForwardVec",1,"target",{ -0.03,0 },1 },{ "ForwardVec",1,"target",{ -0.025,0 },1 },{ },{ "ForwardVec",1,"target",{ -0.02,0 },1 },{ "ForwardVec",1,"target",{ -0.015,0 },1 },{ },{ "ForwardVec",1,"target",{ -0.01,0 },1 },{ "ForwardVec",1,"target",{ -0.005,0 },1 },{ },{ "ForwardVec",1,"target",{ 0.06,0 },1 },{ "ForwardVec",1,"target",{ 0.055,0 },1 },{ },{ "ForwardVec",1,"target",{ 0.05,0 },1 },{ "ForwardVec",1,"target",{ 0.045,0 },1 },{ },{ "ForwardVec",1,"target",{ 0.04,0 },1 },{ "ForwardVec",1,"target",{ 0.035,0 },1 },{ },{ "ForwardVec",1,"target",{ 0.03,0 },1 },{ "ForwardVec",1,"target",{ 0.025,0 },1 },{ },{ "ForwardVec",1,"target",{ 0.02,0 },1 },{ "ForwardVec",1,"target",{ 0.015,0 },1 },{ },{ "ForwardVec",1,"target",{ 0.01,0 },1 },{ "ForwardVec",1,"target",{ 0.005,0 },1 },{ }};
- };
- class RadarTargets
- {
- type = "radar";
- pos0[] = {0.5,0.5};
- pos10[] = {0.753,0.753};
- width = 2.5;
- points[] = {{ "ForwardVec",1,"RadarContact",{ -0.01,-0.01 },1 },{ "ForwardVec",1,"RadarContact",{ 0.01,-0.01 },1 },{ "ForwardVec",1,"RadarContact",{ 0.01,0.01 },1 },{ "ForwardVec",1,"RadarContact",{ -0.01,0.01 },1 },{ "ForwardVec",1,"RadarContact",{ -0.01,-0.01 },1 }};
- };
- };
- helmetMountedDisplay = 1;
- helmetPosition[] = {-0.035,0.035,0.1};
- helmetRight[] = {0.07,0,0};
- helmetDown[] = {0,-0.07,0};
- };
- };
-
- class Turrets: Turrets {
- class MainTurret: MainTurret {
- weapons[] = {"ACE_gatling_20mm_Comanche","missiles_DAGR","missiles_ASRAAM", "ACE_AIR_SAFETY"};
- magazines[] = {"ACE_500Rnd_20mm_shells_Comanche","4Rnd_AAA_missiles","24Rnd_PG_missiles"};
-
- outGunnerMayFire = 1;
- commanding = -1;
- primaryGunner = 1;
- gunnerOpticsModel = "";
- gunnerOpticsEffect[] = {"TankCommanderOptics1"};
- gunnerForceOptics = 0;
- turretInfoType = "Rsc_ACE_Helo_UI_Turret";
- showAllTargets = 2;
- discretedistance[] = {100,200,300,400,500,600,700,800,900,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000};
- discretedistanceinitindex = 3;
- copilotHasFlares = 1;
- directionStabilized = 1;
- isCopilot = 1;
- showHMD = 1;
- CanEject = 1;
- startEngine = 0;
- minElev = -51;
- maxElev = 9;
- initElev = 6;
- minTurn = -120;
- maxTurn = 120;
- initTurn = 0;
-
- class OpticsIn
- {
- delete Narrow;
- delete Medium;
- delete Wide;
-
- class ACE_WideUnstabilized {
- opticsDisplayName = "W NS";
- initAngleX = 0;
- minAngleX = -35;
- maxAngleX = 10;
- initAngleY = 0;
- minAngleY = -100;
- maxAngleY = 100;
- initFov = 0.466;
- minFov = 0.466;
- maxFov = 0.466;
- visionMode[] = {"Normal","Ti"};
- thermalMode[] = {0,1};
- gunnerOpticsColor[] = {0,0,0,1};
- directionStabilized = 0;
- horizontallyStabilized = 1;
- gunnerOpticsModel = "\A3\Weapons_F_Beta\Reticle\Heli_Attack_01_Optics_Gunner_wide_F";
- };
- class ACE_Wide: ACE_WideUnstabilized {
- opticsDisplayName = "W";
- initAngleX = 0;
- minAngleX = -35;
- maxAngleX = 10;
- initAngleY = 0;
- minAngleY = -100;
- maxAngleY = 100;
- initFov = 0.466;
- minFov = 0.466;
- maxFov = 0.466;
- visionMode[] = {"Normal","Ti"};
- thermalMode[] = {0,1};
- gunnerOpticsColor[] = {0,0,0,1};
- directionStabilized = 1;
- horizontallyStabilized = 1;
- gunnerOpticsModel = "\A3\Weapons_F_Beta\Reticle\Heli_Attack_01_Optics_Gunner_wide_F";
- };
- class ACE_Medium: ACE_Wide {
- opticsDisplayName = "M";
- initFov = 0.093;
- minFov = 0.093;
- maxFov = 0.093;
- gunnerOpticsColor[] = {0,0,0,1};
- directionStabilized = 1;
- horizontallyStabilized = 1;
- gunnerOpticsModel = "\A3\Weapons_F_Beta\Reticle\Heli_Attack_01_Optics_Gunner_medium_F";
- };
- class ACE_Narrow: ACE_Wide {
- opticsDisplayName = "N";
- initFov = 0.029;
- minFov = 0.029;
- maxFov = 0.029;
- gunnerOpticsColor[] = {0,0,0,1};
- directionStabilized = 1;
- horizontallyStabilized = 1;
- gunnerOpticsModel = "\A3\Weapons_F_Beta\Reticle\Heli_Attack_01_Optics_Gunner_narrow_F";
-
- };
- class ACE_Narrower: ACE_Wide {
- opticsDisplayName = "Z";
- initFov = 0.01;
- minFov = 0.01;
- maxFov = 0.01;
- gunnerOpticsColor[] = {0,0,0,1};
- directionStabilized = 1;
- horizontallyStabilized = 1;
- gunnerOpticsModel = "\A3\Weapons_F_Beta\Reticle\Heli_Attack_01_Optics_Gunner_narrow_F";
-
- };
- };
- class OpticsOut
- {
- class Monocular
- {
- initAngleX = 0;
- minAngleX = -30;
- maxAngleX = 30;
- initAngleY = 0;
- minAngleY = -100;
- maxAngleY = 100;
- initFov = 1.1;
- minFov = 0.133;
- maxFov = 1.1;
- visionMode[] = {"Normal","NVG"};
- gunnerOpticsModel = "";
- gunnerOpticsEffect[] = {};
- hideUnitInfo = 1;
- };
- };
- };
- };
-
- class AnimationSources: AnimationSources {
- class Gatling {
- weapon = "ACE_gatling_20mm_Comanche";
- };
- class Muzzle_flash {
- weapon = "ACE_gatling_20mm_Comanche";
- };
- };
-};
\ No newline at end of file
+class Heli_Attack_01_base_F: Helicopter_Base_F {
+ lockDetectionSystem = 12;
+ incomingMissileDetectionSystem = 16;
+ driverCanEject = 1;
+
+ class MFD
+ {
+ class AirplaneHUD
+ {
+ class Bones{};
+ class Draw{};
+ topLeft = "HUD_top_left";
+ topRight = "HUD_top_right";
+ bottomLeft = "HUD_bottom_left";
+ borderLeft = 0;
+ borderRight = 0;
+ borderTop = 0;
+ borderBottom = 0;
+ color[] = {0.15,1,0.15,1};
+ enableParallax = 0;
+ helmetMountedDisplay = 1;
+ helmetPosition[] = {0,0,0};
+ helmetRight[] = {0,0,0};
+ helmetDown[] = {0,0,0};
+ };
+ class ACE_HUD_1
+ {
+ topLeft = "HUD_top_left";
+ topRight = "HUD_top_right";
+ bottomLeft = "HUD_bottom_left";
+ borderLeft = 0;
+ borderRight = 0;
+ borderTop = 0;
+ borderBottom = 0;
+ color[] = {0.15,1,0.15,1};
+ enableParallax = 0;
+ class Bones
+ {
+ class GunnerAim
+ {
+ type = "vector";
+ source = "weapon";
+ pos0[] = {0.5,"0.9 - 0.04 + 0.012"};
+ pos10[] = {"0.5 + 0.0111","0.9 - 0.04 + 0.012 + 0.0133"};
+ };
+ class Target
+ {
+ source = "target";
+ type = "vector";
+ pos0[] = {0.5,0.5};
+ pos10[] = {0.85,0.85};
+ };
+ class Velocity
+ {
+ type = "vector";
+ source = "velocity";
+ pos0[] = {0.5,0.5};
+ pos10[] = {0.65,0.65};
+ };
+ class Velocity_slip
+ {
+ type = "vector";
+ source = "velocity";
+ pos0[] = {0.5,0.845};
+ pos10[] = {0.53,0.845};
+ };
+ class VspeedBone
+ {
+ type = "linear";
+ source = "vspeed";
+ sourceScale = 1;
+ min = -10;
+ max = 10;
+ minPos[] = {0.93,0.2};
+ maxPos[] = {0.93,0.8};
+ };
+ class RadarAltitudeBone
+ {
+ type = "linear";
+ source = "altitudeAGL";
+ sourceScale = 1;
+ min = 0;
+ max = 60;
+ minPos[] = {0.965,0.2};
+ maxPos[] = {0.965,0.8};
+ };
+ class HorizonBankRot
+ {
+ type = "rotational";
+ source = "horizonBank";
+ center[] = {0.5,0.5};
+ min = -3.1416;
+ max = 3.1416;
+ minAngle = -180;
+ maxAngle = 180;
+ aspectRatio = 1;
+ };
+ class ForwardVec
+ {
+ type = "vector";
+ source = "forward";
+ pos0[] = {0,0};
+ pos10[] = {0.25,0.25};
+ };
+ class WeaponAim
+ {
+ type = "vector";
+ source = "weapon";
+ pos0[] = {0.5,0.5};
+ pos10[] = {0.75,0.75};
+ };
+ class Level0
+ {
+ type = "horizon";
+ pos0[] = {0.5,0.5};
+ pos10[] = {0.78,0.78};
+ angle = 0;
+ };
+ class LevelP5: Level0
+ {
+ angle = 5;
+ };
+ class LevelM5: Level0
+ {
+ angle = -5;
+ };
+ class LevelP10: Level0
+ {
+ angle = 10;
+ };
+ class LevelM10: Level0
+ {
+ angle = -10;
+ };
+ class LevelP15: Level0
+ {
+ angle = 15;
+ };
+ class LevelM15: Level0
+ {
+ angle = -15;
+ };
+ class LevelP20: Level0
+ {
+ angle = 20;
+ };
+ class LevelM20: Level0
+ {
+ angle = -20;
+ };
+ class LevelP25: Level0
+ {
+ angle = 25;
+ };
+ class LevelM25: Level0
+ {
+ angle = -25;
+ };
+ class LevelP30: Level0
+ {
+ angle = 30;
+ };
+ class LevelM30: Level0
+ {
+ angle = -30;
+ };
+ class LevelP35: Level0
+ {
+ angle = 35;
+ };
+ class LevelM35: Level0
+ {
+ angle = -35;
+ };
+ class LevelP40: Level0
+ {
+ angle = 40;
+ };
+ class LevelM40: Level0
+ {
+ angle = -40;
+ };
+ class LevelP45: Level0
+ {
+ angle = 45;
+ };
+ class LevelM45: Level0
+ {
+ angle = -45;
+ };
+ class LevelP50: Level0
+ {
+ angle = 50;
+ };
+ class LevelM50: Level0
+ {
+ angle = -50;
+ };
+ };
+ class Draw
+ {
+ color[] = {0.18,1,0.18};
+ alpha = 1;
+ condition = "on";
+ class Horizont
+ {
+ clipTL[] = {0.15,0.15};
+ clipBR[] = {0.85,0.85};
+ class Dimmed
+ {
+ class Level0
+ {
+ type = "line";
+ points[] = {{ "Level0",{ -0.42,0 },1 },{ "Level0",{ -0.38,0 },1 },{ },{ "Level0",{ -0.37,0 },1 },{ "Level0",{ -0.33,0 },1 },{ },{ "Level0",{ -0.32,0 },1 },{ "Level0",{ -0.28,0 },1 },{ },{ "Level0",{ -0.27,0 },1 },{ "Level0",{ -0.23,0 },1 },{ },{ "Level0",{ -0.22,0 },1 },{ "Level0",{ -0.18,0 },1 },{ },{ "Level0",{ -0.17,0 },1 },{ "Level0",{ -0.13,0 },1 },{ },{ "Level0",{ -0.12,0 },1 },{ "Level0",{ -0.08,0 },1 },{ },{ "Level0",{ 0.42,0 },1 },{ "Level0",{ 0.38,0 },1 },{ },{ "Level0",{ 0.37,0 },1 },{ "Level0",{ 0.33,0 },1 },{ },{ "Level0",{ 0.32,0 },1 },{ "Level0",{ 0.28,0 },1 },{ },{ "Level0",{ 0.27,0 },1 },{ "Level0",{ 0.23,0 },1 },{ },{ "Level0",{ 0.22,0 },1 },{ "Level0",{ 0.18,0 },1 },{ },{ "Level0",{ 0.17,0 },1 },{ "Level0",{ 0.13,0 },1 },{ },{ "Level0",{ 0.12,0 },1 },{ "Level0",{ 0.08,0 },1 }};
+ };
+ };
+ };
+ class HorizonBankRot
+ {
+ type = "line";
+ width = 3;
+ points[] = {{ "HorizonBankRot",{ 0,0.25 },1 },{ "HorizonBankRot",{ -0.01,0.23 },1 },{ "HorizonBankRot",{ 0.01,0.23 },1 },{ "HorizonBankRot",{ 0,0.25 },1 }};
+ };
+ class Static_HAD_BOX
+ {
+ clipTL[] = {0,1};
+ clipBR[] = {1,0};
+ type = "line";
+ width = 5;
+ points[] = {{ { "0.5-0.1","0.9-0.04" },1 },{ { "0.5-0.1","0.9+0.04" },1 },{ { "0.5+0.1","0.9+0.04" },1 },{ { "0.5+0.1","0.9-0.04" },1 },{ { "0.5-0.1","0.9-0.04" },1 },{ },{ { "0.5-0.1","0.9-0.04+0.012" },1 },{ { "0.5-0.092","0.9-0.04+0.012" },1 },{ },{ { "0.5+0.1","0.9-0.04+0.012" },1 },{ { "0.5+0.092","0.9-0.04+0.012" },1 },{ },{ { 0.5,"0.9-0.04" },1 },{ { 0.5,"0.9-0.032" },1 },{ },{ { 0.5,"0.9+0.04" },1 },{ { 0.5,"0.9+0.032" },1 },{ }};
+ };
+ class Gunner_HAD
+ {
+ type = "line";
+ width = 6;
+ points[] = {{ "GunnerAim",{ -0.015,-0.008 },1 },{ "GunnerAim",{ -0.015,0.008 },1 },{ "GunnerAim",{ 0.015,0.008 },1 },{ "GunnerAim",{ 0.015,-0.008 },1 },{ "GunnerAim",{ -0.015,-0.008 },1 }};
+ };
+ class Slip_ball_group
+ {
+ class Slip_bars
+ {
+ type = "line";
+ width = 4;
+ points[] = {{ { "0.5-0.018","0.9-0.04" },1 },{ { "0.5-0.018","0.9-0.075" },1 },{ },{ { "0.5+0.018","0.9-0.04" },1 },{ { "0.5+0.018","0.9-0.075" },1 }};
+ };
+ class Slip_ball
+ {
+ type = "line";
+ width = 6;
+ points[] = {{ "Velocity_slip",1,{ "0 * 0.75","-0.02 * 0.75" },1 },{ "Velocity_slip",1,{ "0.0099999998 * 0.75","-0.01732 * 0.75" },1 },{ "Velocity_slip",1,{ "0.01732 * 0.75","-0.0099999998 * 0.75" },1 },{ "Velocity_slip",1,{ "0.02 * 0.75","0 * 0.75" },1 },{ "Velocity_slip",1,{ "0.01732 * 0.75","0.0099999998 * 0.75" },1 },{ "Velocity_slip",1,{ "0.0099999998 * 0.75","0.01732 * 0.75" },1 },{ "Velocity_slip",1,{ "0 * 0.75","0.02 * 0.75" },1 },{ "Velocity_slip",1,{ "-0.0099999998 * 0.75","0.01732 * 0.75" },1 },{ "Velocity_slip",1,{ "-0.01732 * 0.75","0.0099999998 * 0.75" },1 },{ "Velocity_slip",1,{ "-0.02 * 0.75","0 * 0.75" },1 },{ "Velocity_slip",1,{ "-0.01732 * 0.75","-0.0099999998 * 0.75" },1 },{ "Velocity_slip",1,{ "-0.0099999998 * 0.75","-0.01732 * 0.75" },1 },{ "Velocity_slip",1,{ "0 * 0.75","-0.02 * 0.75" },1 },{ },{ "Velocity_slip",1,{ "0 * 0.6","-0.02 * 0.6" },1 },{ "Velocity_slip",1,{ "0.0099999998 * 0.6","-0.01732 * 0.6" },1 },{ "Velocity_slip",1,{ "0.01732 * 0.6","-0.0099999998 * 0.6" },1 },{ "Velocity_slip",1,{ "0.02 * 0.6","0 * 0.6" },1 },{ "Velocity_slip",1,{ "0.01732 * 0.6","0.0099999998 * 0.6" },1 },{ "Velocity_slip",1,{ "0.0099999998 * 0.6","0.01732 * 0.6" },1 },{ "Velocity_slip",1,{ "0 * 0.6","0.02 * 0.6" },1 },{ "Velocity_slip",1,{ "-0.0099999998 * 0.6","0.01732 * 0.6" },1 },{ "Velocity_slip",1,{ "-0.01732 * 0.6","0.0099999998 * 0.6" },1 },{ "Velocity_slip",1,{ "-0.02 * 0.6","0 * 0.6" },1 },{ "Velocity_slip",1,{ "-0.01732 * 0.6","-0.0099999998 * 0.6" },1 },{ "Velocity_slip",1,{ "-0.0099999998 * 0.6","-0.01732 * 0.6" },1 },{ "Velocity_slip",1,{ "0 * 0.6","-0.02 * 0.6" },1 },{ },{ "Velocity_slip",1,{ "0 * 0.5","-0.02 * 0.5" },1 },{ "Velocity_slip",1,{ "0.0099999998 * 0.5","-0.01732 * 0.5" },1 },{ "Velocity_slip",1,{ "0.01732 * 0.5","-0.0099999998 * 0.5" },1 },{ "Velocity_slip",1,{ "0.02 * 0.5","0 * 0.5" },1 },{ "Velocity_slip",1,{ "0.01732 * 0.5","0.0099999998 * 0.5" },1 },{ "Velocity_slip",1,{ "0.0099999998 * 0.5","0.01732 * 0.5" },1 },{ "Velocity_slip",1,{ "0 * 0.5","0.02 * 0.5" },1 },{ "Velocity_slip",1,{ "-0.0099999998 * 0.5","0.01732 * 0.5" },1 },{ "Velocity_slip",1,{ "-0.01732 * 0.5","0.0099999998 * 0.5" },1 },{ "Velocity_slip",1,{ "-0.02 * 0.5","0 * 0.5" },1 },{ "Velocity_slip",1,{ "-0.01732 * 0.5","-0.0099999998 * 0.5" },1 },{ "Velocity_slip",1,{ "-0.0099999998 * 0.5","-0.01732 * 0.5" },1 },{ "Velocity_slip",1,{ "0 * 0.5","-0.02 * 0.5" },1 },{ },{ "Velocity_slip",1,{ "0 * 0.4","-0.02 * 0.4" },1 },{ "Velocity_slip",1,{ "0.0099999998 * 0.4","-0.01732 * 0.4" },1 },{ "Velocity_slip",1,{ "0.01732 * 0.4","-0.0099999998 * 0.4" },1 },{ "Velocity_slip",1,{ "0.02 * 0.4","0 * 0.4" },1 },{ "Velocity_slip",1,{ "0.01732 * 0.4","0.0099999998 * 0.4" },1 },{ "Velocity_slip",1,{ "0.0099999998 * 0.4","0.01732 * 0.4" },1 },{ "Velocity_slip",1,{ "0 * 0.4","0.02 * 0.4" },1 },{ "Velocity_slip",1,{ "-0.0099999998 * 0.4","0.01732 * 0.4" },1 },{ "Velocity_slip",1,{ "-0.01732 * 0.4","0.0099999998 * 0.4" },1 },{ "Velocity_slip",1,{ "-0.02 * 0.4","0 * 0.4" },1 },{ "Velocity_slip",1,{ "-0.01732 * 0.4","-0.0099999998 * 0.4" },1 },{ "Velocity_slip",1,{ "-0.0099999998 * 0.4","-0.01732 * 0.4" },1 },{ "Velocity_slip",1,{ "0 * 0.4","-0.02 * 0.4" },1 },{ },{ "Velocity_slip",1,{ "0 * 0.30","-0.02 * 0.30" },1 },{ "Velocity_slip",1,{ "0.0099999998 * 0.30","-0.01732 * 0.30" },1 },{ "Velocity_slip",1,{ "0.01732 * 0.30","-0.0099999998 * 0.30" },1 },{ "Velocity_slip",1,{ "0.02 * 0.30","0 * 0.30" },1 },{ "Velocity_slip",1,{ "0.01732 * 0.30","0.0099999998 * 0.30" },1 },{ "Velocity_slip",1,{ "0.0099999998 * 0.30","0.01732 * 0.30" },1 },{ "Velocity_slip",1,{ "0 * 0.30","0.02 * 0.30" },1 },{ "Velocity_slip",1,{ "-0.0099999998 * 0.30","0.01732 * 0.30" },1 },{ "Velocity_slip",1,{ "-0.01732 * 0.30","0.0099999998 * 0.30" },1 },{ "Velocity_slip",1,{ "-0.02 * 0.30","0 * 0.30" },1 },{ "Velocity_slip",1,{ "-0.01732 * 0.30","-0.0099999998 * 0.30" },1 },{ "Velocity_slip",1,{ "-0.0099999998 * 0.30","-0.01732 * 0.30" },1 },{ "Velocity_slip",1,{ "0 * 0.30","-0.02 * 0.30" },1 },{ },{ "Velocity_slip",1,{ "0 * 0.20","-0.02 * 0.20" },1 },{ "Velocity_slip",1,{ "0.0099999998 * 0.20","-0.01732 * 0.20" },1 },{ "Velocity_slip",1,{ "0.01732 * 0.20","-0.0099999998 * 0.20" },1 },{ "Velocity_slip",1,{ "0.02 * 0.20","0 * 0.20" },1 },{ "Velocity_slip",1,{ "0.01732 * 0.20","0.0099999998 * 0.20" },1 },{ "Velocity_slip",1,{ "0.0099999998 * 0.20","0.01732 * 0.20" },1 },{ "Velocity_slip",1,{ "0 * 0.20","0.02 * 0.20" },1 },{ "Velocity_slip",1,{ "-0.0099999998 * 0.20","0.01732 * 0.20" },1 },{ "Velocity_slip",1,{ "-0.01732 * 0.20","0.0099999998 * 0.20" },1 },{ "Velocity_slip",1,{ "-0.02 * 0.20","0 * 0.20" },1 },{ "Velocity_slip",1,{ "-0.01732 * 0.20","-0.0099999998 * 0.20" },1 },{ "Velocity_slip",1,{ "-0.0099999998 * 0.20","-0.01732 * 0.20" },1 },{ "Velocity_slip",1,{ "0 * 0.20","-0.02 * 0.20" },1 },{ },{ "Velocity_slip",1,{ "0 * 0.1","-0.02 * 0.1" },1 },{ "Velocity_slip",1,{ "0.0099999998 * 0.1","-0.01732 * 0.1" },1 },{ "Velocity_slip",1,{ "0.01732 * 0.1","-0.0099999998 * 0.1" },1 },{ "Velocity_slip",1,{ "0.02 * 0.1","0 * 0.1" },1 },{ "Velocity_slip",1,{ "0.01732 * 0.1","0.0099999998 * 0.1" },1 },{ "Velocity_slip",1,{ "0.0099999998 * 0.1","0.01732 * 0.1" },1 },{ "Velocity_slip",1,{ "0 * 0.1","0.02 * 0.1" },1 },{ "Velocity_slip",1,{ "-0.0099999998 * 0.1","0.01732 * 0.1" },1 },{ "Velocity_slip",1,{ "-0.01732 * 0.1","0.0099999998 * 0.1" },1 },{ "Velocity_slip",1,{ "-0.02 * 0.1","0 * 0.1" },1 },{ "Velocity_slip",1,{ "-0.01732 * 0.1","-0.0099999998 * 0.1" },1 },{ "Velocity_slip",1,{ "-0.0099999998 * 0.1","-0.01732 * 0.1" },1 },{ "Velocity_slip",1,{ "0 * 0.1","-0.02 * 0.1" },1 }};
+ };
+ };
+ class Centerline
+ {
+ type = "line";
+ width = 5;
+ points[] = {{ { 0.5,0.48 },1 },{ { 0.5,0.45 },1 },{ },{ { 0.5,0.52 },1 },{ { 0.5,0.55 },1 },{ },{ { 0.48,0.5 },1 },{ { 0.45,0.5 },1 },{ },{ { 0.52,0.5 },1 },{ { 0.55,0.5 },1 },{ }};
+ };
+ class WeaponName
+ {
+ type = "text";
+ source = "weapon";
+ sourceScale = 1;
+ align = "right";
+ scale = 1;
+ pos[] = {{ 0.61,0.86 },1};
+ right[] = {{ 0.65,0.86 },1};
+ down[] = {{ 0.61,0.9 },1};
+ };
+ class Ammo_GUN
+ {
+ type = "group";
+ condition = "mgun";
+ class Ammo_count_GUN
+ {
+ type = "text";
+ source = "ammo";
+ sourceScale = 1;
+ align = "right";
+ scale = 1;
+ pos[] = {{ 0.61,0.89 },1};
+ right[] = {{ 0.65,0.89 },1};
+ down[] = {{ 0.61,0.93 },1};
+ };
+ };
+ class Ammo_RKT
+ {
+ type = "group";
+ condition = "rocket";
+ class Ammo_count_RKT
+ {
+ type = "text";
+ source = "ammo";
+ sourceScale = 1;
+ align = "right";
+ scale = 1;
+ pos[] = {{ 0.61,0.89 },1};
+ right[] = {{ 0.65,0.89 },1};
+ down[] = {{ 0.61,0.93 },1};
+ };
+ };
+ class Ammo_AGM
+ {
+ type = "group";
+ condition = "AAmissile";
+ class Ammo_count_AGM
+ {
+ type = "text";
+ source = "ammo";
+ sourceScale = 1;
+ align = "right";
+ scale = 1;
+ pos[] = {{ 0.61,0.89 },1};
+ right[] = {{ 0.65,0.89 },1};
+ down[] = {{ 0.61,0.93 },1};
+ };
+ };
+ class Ammo_AAM
+ {
+ type = "group";
+ condition = "ATmissile";
+ class Ammo_count_AAM
+ {
+ type = "text";
+ source = "ammo";
+ sourceScale = 1;
+ align = "right";
+ scale = 1;
+ pos[] = {{ 0.61,0.89 },1};
+ right[] = {{ 0.65,0.89 },1};
+ down[] = {{ 0.61,0.93 },1};
+ };
+ };
+ class Ammo_Bomb
+ {
+ type = "group";
+ condition = "Bomb";
+ class Ammo_count_Bomb
+ {
+ type = "text";
+ source = "ammo";
+ sourceScale = 1;
+ align = "right";
+ scale = 1;
+ pos[] = {{ 0.61,0.89 },1};
+ right[] = {{ 0.65,0.89 },1};
+ down[] = {{ 0.61,0.93 },1};
+ };
+ };
+ class LightsGroup
+ {
+ type = "group";
+ condition = "lights";
+ class LightsText
+ {
+ type = "text";
+ source = "static";
+ text = "LIGHTS";
+ align = "right";
+ scale = 1;
+ pos[] = {{ 0.03,"0.53 + 0.055" },1};
+ right[] = {{ 0.07,"0.53 + 0.055" },1};
+ down[] = {{ 0.03,"0.53 + 0.095" },1};
+ };
+ };
+ class CollisionLightsGroup
+ {
+ type = "group";
+ condition = "collisionlights";
+ class CollisionLightsText
+ {
+ type = "text";
+ source = "static";
+ text = "A-COL";
+ align = "right";
+ scale = 1;
+ pos[] = {{ 0.03,"0.53 + 0.105" },1};
+ right[] = {{ 0.07,"0.53 + 0.105" },1};
+ down[] = {{ 0.03,"0.53 + 0.145" },1};
+ };
+ };
+ class GearGroup
+ {
+ type = "group";
+ condition = "ils";
+ class GearText
+ {
+ type = "text";
+ source = "static";
+ text = "GEAR";
+ align = "right";
+ scale = 1;
+ pos[] = {{ 0.03,"0.53 + 0.155" },1};
+ right[] = {{ 0.07,"0.53 + 0.155" },1};
+ down[] = {{ 0.03,"0.53 + 0.195" },1};
+ };
+ };
+ class ATMissileTOFGroup
+ {
+ condition = "ATmissile";
+ type = "group";
+ class TOFtext
+ {
+ type = "text";
+ align = "right";
+ source = "static";
+ text = "TOF=";
+ scale = 1;
+ pos[] = {{ 0.61,0.92 },1};
+ right[] = {{ 0.65,0.92 },1};
+ down[] = {{ 0.61,0.96 },1};
+ };
+ class TOFnumber
+ {
+ type = "text";
+ source = "targetDist";
+ sourcescale = 0.0025;
+ align = "right";
+ scale = 1;
+ pos[] = {{ 0.69,0.92 },1};
+ right[] = {{ 0.73,0.92 },1};
+ down[] = {{ 0.69,0.96 },1};
+ };
+ };
+ class LaserTOFGroup
+ {
+ condition = "Bomb";
+ type = "group";
+ class TOFtext
+ {
+ type = "text";
+ align = "right";
+ source = "static";
+ text = "TOF=";
+ scale = 1;
+ pos[] = {{ 0.61,0.92 },1};
+ right[] = {{ 0.65,0.92 },1};
+ down[] = {{ 0.61,0.96 },1};
+ };
+ class TOFnumber
+ {
+ type = "text";
+ source = "targetDist";
+ sourcescale = 0.0025;
+ align = "right";
+ scale = 1;
+ pos[] = {{ 0.69,0.92 },1};
+ right[] = {{ 0.73,0.92 },1};
+ down[] = {{ 0.69,0.96 },1};
+ };
+ };
+ class RocketTOFGroup
+ {
+ condition = "Rocket";
+ type = "group";
+ class TOFtext
+ {
+ type = "text";
+ align = "right";
+ source = "static";
+ text = "TOF=";
+ scale = 1;
+ pos[] = {{ 0.61,0.92 },1};
+ right[] = {{ 0.65,0.92 },1};
+ down[] = {{ 0.61,0.96 },1};
+ };
+ class TOFnumber
+ {
+ type = "text";
+ source = "targetDist";
+ sourcescale = 0.0025;
+ align = "right";
+ scale = 1;
+ pos[] = {{ 0.69,0.92 },1};
+ right[] = {{ 0.73,0.92 },1};
+ down[] = {{ 0.69,0.96 },1};
+ };
+ };
+ class RangeNumber
+ {
+ type = "text";
+ source = "targetDist";
+ sourceScale = 1;
+ align = "left";
+ scale = 1;
+ pos[] = {{ 0.39,0.89 },1};
+ right[] = {{ 0.43,0.89 },1};
+ down[] = {{ 0.39,0.93 },1};
+ };
+ class RangeText
+ {
+ type = "text";
+ source = "static";
+ text = "RNG";
+ align = "left";
+ scale = 1;
+ pos[] = {{ 0.39,0.86 },1};
+ right[] = {{ 0.43,0.86 },1};
+ down[] = {{ 0.39,0.9 },1};
+ };
+ class SpeedNumber
+ {
+ type = "text";
+ align = "right";
+ scale = 1;
+ source = "speed";
+ sourceScale = 3.6;
+ pos[] = {{ 0.03,0.475 },1};
+ right[] = {{ 0.08,0.475 },1};
+ down[] = {{ 0.03,0.525 },1};
+ };
+ class TorqueNumber
+ {
+ condition = "simulRTD";
+ class Torque_number
+ {
+ type = "text";
+ align = "left";
+ scale = 1;
+ source = "rtdRotorTorque";
+ sourceScale = 290;
+ pos[] = {{ 0.065,0.175 },1};
+ right[] = {{ 0.115,0.175 },1};
+ down[] = {{ 0.065,0.225 },1};
+ };
+ class Torquetext
+ {
+ type = "text";
+ source = "static";
+ text = "%";
+ align = "right";
+ scale = 1;
+ pos[] = {{ 0.07,0.175 },1};
+ right[] = {{ 0.12,0.175 },1};
+ down[] = {{ 0.07,0.225 },1};
+ };
+ };
+ class AltNumber: SpeedNumber
+ {
+ align = "right";
+ source = "altitudeAGL";
+ sourceScale = 1;
+ pos[] = {{ 0.83,0.475 },1};
+ right[] = {{ 0.88,0.475 },1};
+ down[] = {{ 0.83,0.525 },1};
+ };
+ class ASLNumber
+ {
+ type = "text";
+ source = "altitudeASL";
+ sourceScale = 1;
+ align = "right";
+ scale = 1;
+ pos[] = {{ 0.835,0.18 },1};
+ right[] = {{ 0.875,0.18 },1};
+ down[] = {{ 0.835,0.22 },1};
+ };
+ class VspeedScalePosta
+ {
+ type = "line";
+ width = 5;
+ points[] = {{ { 0.98,0.2 },1 },{ { 1,0.2 },1 },{ },{ { 0.93,0.2 },1 },{ { 0.95,0.2 },1 },{ },{ { 0.98,0.35 },1 },{ { 1,0.35 },1 },{ },{ { 0.93,0.35 },1 },{ { 0.95,0.35 },1 },{ },{ { 0.94,0.38 },1 },{ { 0.95,0.38 },1 },{ },{ { 0.94,0.41 },1 },{ { 0.95,0.41 },1 },{ },{ { 0.94,0.44 },1 },{ { 0.95,0.44 },1 },{ },{ { 0.94,0.47 },1 },{ { 0.95,0.47 },1 },{ },{ { 0.98,0.5 },1 },{ { 1,0.5 },1 },{ },{ { 0.93,0.5 },1 },{ { 0.95,0.5 },1 },{ },{ { 0.94,0.53 },1 },{ { 0.95,0.53 },1 },{ },{ { 0.94,0.56 },1 },{ { 0.95,0.56 },1 },{ },{ { 0.94,0.59 },1 },{ { 0.95,0.59 },1 },{ },{ { 0.94,0.62 },1 },{ { 0.95,0.62 },1 },{ },{ { 0.98,0.65 },1 },{ { 1,0.65 },1 },{ },{ { 0.93,0.65 },1 },{ { 0.95,0.65 },1 },{ },{ { 0.99,0.68 },1 },{ { 0.98,0.68 },1 },{ },{ { 0.99,0.71 },1 },{ { 0.98,0.71 },1 },{ },{ { 0.99,0.74 },1 },{ { 0.98,0.74 },1 },{ },{ { 0.99,0.77 },1 },{ { 0.98,0.77 },1 },{ },{ { 0.98,0.8 },1 },{ { 1,0.8 },1 },{ },{ { 0.93,0.8 },1 },{ { 0.95,0.8 },1 },{ }};
+ };
+ class RadarAltitudeBand
+ {
+ clipTL[] = {0,0.2};
+ clipBR[] = {1,0.8};
+ hideValue = 201;
+ class radarbanda
+ {
+ type = "line";
+ width = 17;
+ points[] = {{ "RadarAltitudeBone",{ 0,0 },1 },{ "RadarAltitudeBone",{ 0,0.6 },1 }};
+ };
+ };
+ class VspeedBand
+ {
+ type = "line";
+ width = 3;
+ points[] = {{ "VspeedBone",{ -0.01,0 },1 },{ "VspeedBone",{ -0.025,-0.015 },1 },{ "VspeedBone",{ -0.025,0.015 },1 },{ "VspeedBone",{ -0.01,0 },1 },{ }};
+ };
+ class HeadingNumber: SpeedNumber
+ {
+ source = "heading";
+ sourceScale = 1;
+ align = "center";
+ pos[] = {{ 0.5,0.045 },1};
+ right[] = {{ 0.56,0.045 },1};
+ down[] = {{ 0.5,"0.045 + 0.06" },1};
+ };
+ class Center_box
+ {
+ type = "line";
+ width = 1.5;
+ points[] = {{ { 0.45,"0.02 + 0.085 - 0.06" },1 },{ { "0.45 + 0.10","0.02 + 0.085 - 0.06" },1 },{ { "0.45 + 0.10","0.02 + 0.085" },1 },{ { 0.45,"0.02 + 0.085" },1 },{ { 0.45,"0.02 + 0.085 - 0.06" },1 }};
+ };
+ class HeadingArrow
+ {
+ type = "line";
+ width = 7;
+ points[] = {{ { "0.5","0.128 + 0.03" },1 },{ { 0.5,0.128 },1 }};
+ };
+ class HeadingScale_LEFT
+ {
+ clipTL[] = {0,0};
+ clipBR[] = {0.45,1};
+ class Heading_group
+ {
+ type = "scale";
+ horizontal = 1;
+ source = "heading";
+ sourceScale = 1;
+ width = 5;
+ top = 0.12;
+ center = 0.5;
+ bottom = 0.88;
+ lineXleft = "0.03 + 0.085";
+ lineYright = "0.02 + 0.085";
+ lineXleftMajor = "0.04 + 0.085";
+ lineYrightMajor = "0.02 + 0.085";
+ majorLineEach = 3;
+ numberEach = 3;
+ step = 10;
+ stepSize = "0.05";
+ align = "center";
+ scale = 1;
+ pos[] = {0.12,"0.0 + 0.065"};
+ right[] = {0.16,"0.0 + 0.065"};
+ down[] = {0.12,"0.04 + 0.065"};
+ };
+ };
+ class HeadingScale_RIGHT
+ {
+ clipTL[] = {0.55,0};
+ clipBR[] = {1,1};
+ class Heading_group
+ {
+ type = "scale";
+ horizontal = 1;
+ source = "heading";
+ sourceScale = 1;
+ width = 5;
+ top = 0.12;
+ center = 0.5;
+ bottom = 0.88;
+ lineXleft = "0.03 + 0.085";
+ lineYright = "0.02 + 0.085";
+ lineXleftMajor = "0.04 + 0.085";
+ lineYrightMajor = "0.02 + 0.085";
+ majorLineEach = 3;
+ numberEach = 3;
+ step = 10;
+ stepSize = "0.05";
+ align = "center";
+ scale = 1;
+ pos[] = {0.12,"0.0 + 0.065"};
+ right[] = {0.16,"0.0 + 0.065"};
+ down[] = {0.12,"0.04 + 0.065"};
+ };
+ };
+ class HeadingScale_BOTTOM
+ {
+ clipTL[] = {0.45,"0.02 + 0.085"};
+ clipBR[] = {"0.45 + 0.10",1};
+ class Heading_group
+ {
+ type = "scale";
+ horizontal = 1;
+ source = "heading";
+ sourceScale = 1;
+ width = 5;
+ top = 0.12;
+ center = 0.5;
+ bottom = 0.88;
+ lineXleft = "0.03 + 0.085";
+ lineYright = "0.02 + 0.085";
+ lineXleftMajor = "0.04 + 0.085";
+ lineYrightMajor = "0.02 + 0.085";
+ majorLineEach = 3;
+ numberEach = 3;
+ step = 10;
+ stepSize = "0.05";
+ align = "center";
+ scale = 1;
+ pos[] = {0.12,"0.0 + 0.065"};
+ right[] = {0.16,"0.0 + 0.065"};
+ down[] = {0.12,"0.04 + 0.065"};
+ };
+ };
+ class Fuel_Text
+ {
+ type = "text";
+ source = "static";
+ text = "Fuel";
+ align = "right";
+ scale = 1;
+ pos[] = {{ 0.03,0.9 },1};
+ right[] = {{ 0.07,0.9 },1};
+ down[] = {{ 0.03,0.94 },1};
+ };
+ class Fuel_Number
+ {
+ type = "text";
+ source = "fuel";
+ sourceScale = 100;
+ align = "right";
+ scale = 1;
+ pos[] = {{ 0.1,0.9 },1};
+ right[] = {{ 0.14,0.9 },1};
+ down[] = {{ 0.1,0.94 },1};
+ };
+ };
+ helmetMountedDisplay = 1;
+ helmetPosition[] = {-0.04,0.04,0.1};
+ helmetRight[] = {0.08,0,0};
+ helmetDown[] = {0,-0.08,0};
+ };
+ class ACE_HUD_2
+ {
+ topLeft = "HUD_top_left";
+ topRight = "HUD_top_right";
+ bottomLeft = "HUD_bottom_left";
+ borderLeft = 0;
+ borderRight = 0;
+ borderTop = 0;
+ borderBottom = 0;
+ color[] = {0.15,1,0.15,1};
+ enableParallax = 0;
+ class Bones
+ {
+ class Velocity
+ {
+ type = "vector";
+ source = "velocity";
+ pos0[] = {0.5,0.5};
+ pos10[] = {0.75,0.75};
+ };
+ class ForwardVec1
+ {
+ type = "vector";
+ source = "forward";
+ pos0[] = {0,0};
+ pos10[] = {0.25,0.25};
+ };
+ class ForwardVec
+ {
+ type = "vector";
+ source = "forward";
+ pos0[] = {0,0};
+ pos10[] = {0.253,0.253};
+ };
+ class WeaponAim
+ {
+ type = "vector";
+ source = "weapon";
+ pos0[] = {0.5,0.5};
+ pos10[] = {0.753,0.753};
+ };
+ class WeaponAim1
+ {
+ type = "vector";
+ source = "weapon";
+ pos0[] = {0,0};
+ pos10[] = {0.253,0.23};
+ };
+ class Target
+ {
+ type = "vector";
+ source = "target";
+ pos0[] = {0.5,0.5};
+ pos10[] = {0.753,0.753};
+ };
+ class RadarContact
+ {
+ type = "fixed";
+ pos[] = {0,0};
+ };
+ };
+ class Draw
+ {
+ color[] = {0.18,1,0.18};
+ alpha = 1;
+ condition = "on";
+ class PlaneMovementCrosshair
+ {
+ type = "line";
+ width = 7;
+ points[] = {{ "ForwardVec1",1,"Velocity",1,{ 0,-0.02 },1 },{ "ForwardVec1",1,"Velocity",1,{ 0.01,-0.01732 },1 },{ "ForwardVec1",1,"Velocity",1,{ 0.01732,-0.01 },1 },{ "ForwardVec1",1,"Velocity",1,{ 0.02,0 },1 },{ "ForwardVec1",1,"Velocity",1,{ 0.01732,0.01 },1 },{ "ForwardVec1",1,"Velocity",1,{ 0.01,0.01732 },1 },{ "ForwardVec1",1,"Velocity",1,{ 0,0.02 },1 },{ "ForwardVec1",1,"Velocity",1,{ -0.01,0.01732 },1 },{ "ForwardVec1",1,"Velocity",1,{ -0.01732,0.01 },1 },{ "ForwardVec1",1,"Velocity",1,{ -0.02,0 },1 },{ "ForwardVec1",1,"Velocity",1,{ -0.01732,-0.01 },1 },{ "ForwardVec1",1,"Velocity",1,{ -0.01,-0.01732 },1 },{ "ForwardVec1",1,"Velocity",1,{ 0,-0.02 },1 },{ },{ "ForwardVec1",1,"Velocity",1,{ 0.04,0 },1 },{ "ForwardVec1",1,"Velocity",1,{ 0.02,0 },1 },{ },{ "ForwardVec1",1,"Velocity",1,{ -0.04,0 },1 },{ "ForwardVec1",1,"Velocity",1,{ -0.02,0 },1 },{ },{ "ForwardVec1",1,"Velocity",1,{ 0,-0.04 },1 },{ "ForwardVec1",1,"Velocity",1,{ 0,-0.02 },1 }};
+ };
+ class Gunner_AIM
+ {
+ type = "group";
+ class Circle
+ {
+ type = "line";
+ width = 6;
+ points[] = {{ "ForwardVec",1,"WeaponAim",1,{ 0,-0.015 },1 },{ "ForwardVec",1,"WeaponAim",1,{ 0,-0.03 },1 },{ },{ "ForwardVec",1,"WeaponAim",1,{ 0,-0.0325 },1 },{ "ForwardVec",1,"WeaponAim",1,{ 0,-0.0475 },1 },{ },{ "ForwardVec",1,"WeaponAim",1,{ 0,0.015 },1 },{ "ForwardVec",1,"WeaponAim",1,{ 0,0.03 },1 },{ },{ "ForwardVec",1,"WeaponAim",1,{ 0,0.0325 },1 },{ "ForwardVec",1,"WeaponAim",1,{ 0,0.0475 },1 },{ },{ "ForwardVec",1,"WeaponAim",1,{ -0.015,0 },1 },{ "ForwardVec",1,"WeaponAim",1,{ -0.03,0 },1 },{ },{ "ForwardVec",1,"WeaponAim",1,{ -0.0325,0 },1 },{ "ForwardVec",1,"WeaponAim",1,{ -0.0475,0 },1 },{ },{ "ForwardVec",1,"WeaponAim",1,{ 0.015,0 },1 },{ "ForwardVec",1,"WeaponAim",1,{ 0.03,0 },1 },{ },{ "ForwardVec",1,"WeaponAim",1,{ 0.0325,0 },1 },{ "ForwardVec",1,"WeaponAim",1,{ 0.0475,0 },1 }};
+ };
+ };
+ class GunCross
+ {
+ condition = "mgun";
+ class Circle
+ {
+ type = "line";
+ width = 9;
+ points[] = {{ "ForwardVec",1,"WeaponAim",1,{ 0,-0.05 },1 },{ "ForwardVec",1,"WeaponAim",1,{ 0,-0.015 },1 },{ },{ "ForwardVec",1,"WeaponAim",1,{ 0,0.015 },1 },{ "ForwardVec",1,"WeaponAim",1,{ 0,0.05 },1 },{ },{ "ForwardVec",1,"WeaponAim",1,{ -0.05,0 },1 },{ "ForwardVec",1,"WeaponAim",1,{ -0.015,0 },1 },{ },{ "ForwardVec",1,"WeaponAim",1,{ 0.015,0 },1 },{ "ForwardVec",1,"WeaponAim",1,{ 0.05,0 },1 },{ }};
+ };
+ };
+ class RocketCross
+ {
+ condition = "rocket";
+ width = 6;
+ class Circle
+ {
+ type = "line";
+ width = 6;
+ points[] = {{ "ForwardVec",1,"WeaponAim",1,{ -0.05,-0.08 },1 },{ "ForwardVec",1,"WeaponAim",1,{ 0.05,-0.08 },1 },{ },{ "ForwardVec",1,"WeaponAim",1,{ 0,-0.08 },1 },{ "ForwardVec",1,"WeaponAim",1,{ 0,0.08 },1 },{ },{ "ForwardVec",1,"WeaponAim",1,{ -0.05,0.08 },1 },{ "ForwardVec",1,"WeaponAim",1,{ 0.05,0.08 },1 },{ }};
+ };
+ };
+ class AT_Aim
+ {
+ condition = "ATmissile";
+ width = 2;
+ class Circle
+ {
+ type = "line";
+ width = 2;
+ points[] = {{ "ForwardVec",1,"WeaponAim",1,{ -0.1,-0.1 },1 },{ "ForwardVec",1,"WeaponAim",1,{ 0.1,-0.1 },1 },{ "ForwardVec",1,"WeaponAim",1,{ 0.1,0.1 },1 },{ "ForwardVec",1,"WeaponAim",1,{ -0.1,0.1 },1 },{ "ForwardVec",1,"WeaponAim",1,{ -0.1,-0.1 },1 }};
+ };
+ };
+ class AA_aim
+ {
+ condition = "AAmissile";
+ class Circle
+ {
+ type = "line";
+ width = 2.5;
+ points[] = {{ "ForwardVec",1,"WeaponAim",1,{ "0 / 4","-0.248559 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.0434 / 4","-0.244781 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.0855 / 4","-0.233571 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.125 / 4","-0.215252 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.1607 / 4","-0.190396 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.1915 / 4","-0.159774 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.2165 / 4","-0.12428 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.234925 / 4","-0.0850072 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.2462 / 4","-0.0431499 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.25 / 4","0 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.2462 / 4","0.0431499 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.234925 / 4","0.0850072 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.2165 / 4","0.12428 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.1915 / 4","0.159774 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.1607 / 4","0.190396 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.125 / 4","0.215252 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.0855 / 4","0.233571 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.0434 / 4","0.244781 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0 / 4","0.248559 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.0434 / 4","0.244781 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.0855 / 4","0.233571 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.125 / 4","0.215252 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.1607 / 4","0.190396 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.1915 / 4","0.159774 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.2165 / 4","0.12428 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.234925 / 4","0.0850072 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.2462 / 4","0.0431499 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.25 / 4","0 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.2462 / 4","-0.0431499 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.234925 / 4","-0.0850072 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.2165 / 4","-0.12428 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.1915 / 4","-0.159774 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.1607 / 4","-0.190396 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.125 / 4","-0.215252 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.0855 / 4","-0.233571 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.0434 / 4","-0.244781 / 4" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0 / 4","-0.248559 / 4" },1 },{ },{ "ForwardVec",1,"WeaponAim",1,{ "0 / 2","-0.248559 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.0434 / 2","-0.244781 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.0855 / 2","-0.233571 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.125 / 2","-0.215252 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.1607 / 2","-0.190396 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.1915 / 2","-0.159774 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.2165 / 2","-0.12428 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.234925 / 2","-0.0850072 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.2462 / 2","-0.0431499 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.25 / 2","0 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.2462 / 2","0.0431499 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.234925 / 2","0.0850072 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.2165 / 2","0.12428 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.1915 / 2","0.159774 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.1607 / 2","0.190396 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.125 / 2","0.215252 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.0855 / 2","0.233571 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0.0434 / 2","0.244781 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0 / 2","0.248559 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.0434 / 2","0.244781 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.0855 / 2","0.233571 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.125 / 2","0.215252 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.1607 / 2","0.190396 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.1915 / 2","0.159774 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.2165 / 2","0.12428 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.234925 / 2","0.0850072 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.2462 / 2","0.0431499 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.25 / 2","0 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.2462 / 2","-0.0431499 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.234925 / 2","-0.0850072 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.2165 / 2","-0.12428 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.1915 / 2","-0.159774 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.1607 / 2","-0.190396 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.125 / 2","-0.215252 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.0855 / 2","-0.233571 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "-0.0434 / 2","-0.244781 / 2" },1 },{ "ForwardVec",1,"WeaponAim",1,{ "0 / 2","-0.248559 / 2" },1 }};
+ };
+ };
+ class TargetACQ
+ {
+ type = "line";
+ width = 2;
+ points[] = {{ "ForwardVec",1,"target",{ 0,-0.06 },1 },{ "ForwardVec",1,"target",{ 0,-0.055 },1 },{ },{ "ForwardVec",1,"target",{ 0,-0.05 },1 },{ "ForwardVec",1,"target",{ 0,-0.045 },1 },{ },{ "ForwardVec",1,"target",{ 0,-0.04 },1 },{ "ForwardVec",1,"target",{ 0,-0.035 },1 },{ },{ "ForwardVec",1,"target",{ 0,-0.03 },1 },{ "ForwardVec",1,"target",{ 0,-0.025 },1 },{ },{ "ForwardVec",1,"target",{ 0,-0.02 },1 },{ "ForwardVec",1,"target",{ 0,-0.015 },1 },{ },{ "ForwardVec",1,"target",{ 0,-0.01 },1 },{ "ForwardVec",1,"target",{ 0,-0.005 },1 },{ },{ "ForwardVec",1,"target",{ 0,0 },1 },{ "ForwardVec",1,"target",{ 0,0 },1 },{ },{ "ForwardVec",1,"target",{ 0,0.06 },1 },{ "ForwardVec",1,"target",{ 0,0.055 },1 },{ },{ "ForwardVec",1,"target",{ 0,0.05 },1 },{ "ForwardVec",1,"target",{ 0,0.045 },1 },{ },{ "ForwardVec",1,"target",{ 0,0.04 },1 },{ "ForwardVec",1,"target",{ 0,0.035 },1 },{ },{ "ForwardVec",1,"target",{ 0,0.03 },1 },{ "ForwardVec",1,"target",{ 0,0.025 },1 },{ },{ "ForwardVec",1,"target",{ 0,0.02 },1 },{ "ForwardVec",1,"target",{ 0,0.015 },1 },{ },{ "ForwardVec",1,"target",{ 0,0.01 },1 },{ "ForwardVec",1,"target",{ 0,0.005 },1 },{ },{ "ForwardVec",1,"target",{ -0.06,0 },1 },{ "ForwardVec",1,"target",{ -0.055,0 },1 },{ },{ "ForwardVec",1,"target",{ -0.05,0 },1 },{ "ForwardVec",1,"target",{ -0.045,0 },1 },{ },{ "ForwardVec",1,"target",{ -0.04,0 },1 },{ "ForwardVec",1,"target",{ -0.035,0 },1 },{ },{ "ForwardVec",1,"target",{ -0.03,0 },1 },{ "ForwardVec",1,"target",{ -0.025,0 },1 },{ },{ "ForwardVec",1,"target",{ -0.02,0 },1 },{ "ForwardVec",1,"target",{ -0.015,0 },1 },{ },{ "ForwardVec",1,"target",{ -0.01,0 },1 },{ "ForwardVec",1,"target",{ -0.005,0 },1 },{ },{ "ForwardVec",1,"target",{ 0.06,0 },1 },{ "ForwardVec",1,"target",{ 0.055,0 },1 },{ },{ "ForwardVec",1,"target",{ 0.05,0 },1 },{ "ForwardVec",1,"target",{ 0.045,0 },1 },{ },{ "ForwardVec",1,"target",{ 0.04,0 },1 },{ "ForwardVec",1,"target",{ 0.035,0 },1 },{ },{ "ForwardVec",1,"target",{ 0.03,0 },1 },{ "ForwardVec",1,"target",{ 0.025,0 },1 },{ },{ "ForwardVec",1,"target",{ 0.02,0 },1 },{ "ForwardVec",1,"target",{ 0.015,0 },1 },{ },{ "ForwardVec",1,"target",{ 0.01,0 },1 },{ "ForwardVec",1,"target",{ 0.005,0 },1 },{ }};
+ };
+ class RadarTargets
+ {
+ type = "radar";
+ pos0[] = {0.5,0.5};
+ pos10[] = {0.753,0.753};
+ width = 2.5;
+ points[] = {{ "ForwardVec",1,"RadarContact",{ -0.01,-0.01 },1 },{ "ForwardVec",1,"RadarContact",{ 0.01,-0.01 },1 },{ "ForwardVec",1,"RadarContact",{ 0.01,0.01 },1 },{ "ForwardVec",1,"RadarContact",{ -0.01,0.01 },1 },{ "ForwardVec",1,"RadarContact",{ -0.01,-0.01 },1 }};
+ };
+ };
+ helmetMountedDisplay = 1;
+ helmetPosition[] = {-0.035,0.035,0.1};
+ helmetRight[] = {0.07,0,0};
+ helmetDown[] = {0,-0.07,0};
+ };
+ };
+
+ class Turrets: Turrets {
+ class MainTurret: MainTurret {
+ weapons[] = {"ACE_gatling_20mm_Comanche","missiles_DAGR","missiles_ASRAAM", "ACE_AIR_SAFETY"};
+ magazines[] = {"ACE_500Rnd_20mm_shells_Comanche","4Rnd_AAA_missiles","24Rnd_PG_missiles"};
+
+ outGunnerMayFire = 1;
+ commanding = -1;
+ primaryGunner = 1;
+ gunnerOpticsModel = "";
+ gunnerOpticsEffect[] = {"TankCommanderOptics1"};
+ gunnerForceOptics = 0;
+ turretInfoType = "Rsc_ACE_Helo_UI_Turret";
+ showAllTargets = 2;
+ discretedistance[] = {100,200,300,400,500,600,700,800,900,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000};
+ discretedistanceinitindex = 3;
+ copilotHasFlares = 1;
+ directionStabilized = 1;
+ isCopilot = 1;
+ showHMD = 1;
+ CanEject = 1;
+ startEngine = 0;
+ minElev = -51;
+ maxElev = 9;
+ initElev = 6;
+ minTurn = -120;
+ maxTurn = 120;
+ initTurn = 0;
+
+ class OpticsIn
+ {
+ delete Narrow;
+ delete Medium;
+ delete Wide;
+
+ class ACE_WideUnstabilized {
+ opticsDisplayName = "W NS";
+ initAngleX = 0;
+ minAngleX = -35;
+ maxAngleX = 10;
+ initAngleY = 0;
+ minAngleY = -100;
+ maxAngleY = 100;
+ initFov = 0.466;
+ minFov = 0.466;
+ maxFov = 0.466;
+ visionMode[] = {"Normal","Ti"};
+ thermalMode[] = {0,1};
+ gunnerOpticsColor[] = {0,0,0,1};
+ directionStabilized = 0;
+ horizontallyStabilized = 1;
+ gunnerOpticsModel = "\A3\Weapons_F_Beta\Reticle\Heli_Attack_01_Optics_Gunner_wide_F";
+ };
+ class ACE_Wide: ACE_WideUnstabilized {
+ opticsDisplayName = "W";
+ initAngleX = 0;
+ minAngleX = -35;
+ maxAngleX = 10;
+ initAngleY = 0;
+ minAngleY = -100;
+ maxAngleY = 100;
+ initFov = 0.466;
+ minFov = 0.466;
+ maxFov = 0.466;
+ visionMode[] = {"Normal","Ti"};
+ thermalMode[] = {0,1};
+ gunnerOpticsColor[] = {0,0,0,1};
+ directionStabilized = 1;
+ horizontallyStabilized = 1;
+ gunnerOpticsModel = "\A3\Weapons_F_Beta\Reticle\Heli_Attack_01_Optics_Gunner_wide_F";
+ };
+ class ACE_Medium: ACE_Wide {
+ opticsDisplayName = "M";
+ initFov = 0.093;
+ minFov = 0.093;
+ maxFov = 0.093;
+ gunnerOpticsColor[] = {0,0,0,1};
+ directionStabilized = 1;
+ horizontallyStabilized = 1;
+ gunnerOpticsModel = "\A3\Weapons_F_Beta\Reticle\Heli_Attack_01_Optics_Gunner_medium_F";
+ };
+ class ACE_Narrow: ACE_Wide {
+ opticsDisplayName = "N";
+ initFov = 0.029;
+ minFov = 0.029;
+ maxFov = 0.029;
+ gunnerOpticsColor[] = {0,0,0,1};
+ directionStabilized = 1;
+ horizontallyStabilized = 1;
+ gunnerOpticsModel = "\A3\Weapons_F_Beta\Reticle\Heli_Attack_01_Optics_Gunner_narrow_F";
+
+ };
+ class ACE_Narrower: ACE_Wide {
+ opticsDisplayName = "Z";
+ initFov = 0.01;
+ minFov = 0.01;
+ maxFov = 0.01;
+ gunnerOpticsColor[] = {0,0,0,1};
+ directionStabilized = 1;
+ horizontallyStabilized = 1;
+ gunnerOpticsModel = "\A3\Weapons_F_Beta\Reticle\Heli_Attack_01_Optics_Gunner_narrow_F";
+
+ };
+ };
+ class OpticsOut
+ {
+ class Monocular
+ {
+ initAngleX = 0;
+ minAngleX = -30;
+ maxAngleX = 30;
+ initAngleY = 0;
+ minAngleY = -100;
+ maxAngleY = 100;
+ initFov = 1.1;
+ minFov = 0.133;
+ maxFov = 1.1;
+ visionMode[] = {"Normal","NVG"};
+ gunnerOpticsModel = "";
+ gunnerOpticsEffect[] = {};
+ hideUnitInfo = 1;
+ };
+ };
+ };
+ };
+
+ class AnimationSources: AnimationSources {
+ class Gatling {
+ weapon = "ACE_gatling_20mm_Comanche";
+ };
+ class Muzzle_flash {
+ weapon = "ACE_gatling_20mm_Comanche";
+ };
+ };
+};
diff --git a/addons/aircraft/RscInGameUI.hpp b/addons/aircraft/RscInGameUI.hpp
index 620d895d9e..d3ef60c6b6 100644
--- a/addons/aircraft/RscInGameUI.hpp
+++ b/addons/aircraft/RscInGameUI.hpp
@@ -1,581 +1,581 @@
-class RscControlsGroup;
-class RscText;
-class RangeText: RscText{};
-class RscPicture;
-class RscOpticsText;
-class RscIGProgress;
-class RscOpticsValue;
-class VScrollbar;
-class HScrollbar;
-class RscLadderPicture;
-class RscControlsGroupNoScrollbars;
-
-
-class RscInGameUI
-{
- class RscUnitInfo;
- class Rsc_ACE_Helo_UI_Turret: RscUnitInfo
- {
- idd = 300;
- controls[] = {"CA_IGUI_elements_group","CA_VehicleToggles"};
- class VScrollbar;
- class HScrollbar;
- class CA_IGUI_elements_group: RscControlsGroup
- {
- idc = 170;
- class VScrollbar: VScrollbar
- {
- width = 0;
- };
- class HScrollbar: HScrollbar
- {
- height = 0;
- };
- x = "0 * (0.01875 * SafezoneH) + (SafezoneX + ((SafezoneW - SafezoneH) / 2))";
- y = "0 * (0.025 * SafezoneH) + (SafezoneY)";
- w = "53.5 * (0.01875 * SafezoneH)";
- h = "40 * (0.025 * SafezoneH)";
- class controls
- {
- class CA_Distance: RscText
- {
- idc = 151;
- style = 2;
- sizeEx = "0.0295*SafezoneH";
- shadow = 0;
- font = "EtelkaMonospacePro";
- x = "24.78 * (0.01875 * SafezoneH)";
- y = "30.88 * (0.025 * SafezoneH)";
- w = "4 * (0.01875 * SafezoneH)";
- h = "1.2 * (0.025 * SafezoneH)";
- };
- class CA_Speed: RangeText
- {
- idc = 188;
- style = 2;
- sizeEx = "0.0295*SafezoneH";
- shadow = 0;
- font = "EtelkaMonospacePro";
- text = "120";
- x = "14.78 * (0.01875 * SafezoneH)";
- y = "30.88 * (0.025 * SafezoneH)";
- w = "4 * (0.01875 * SafezoneH)";
- h = "1.2 * (0.025 * SafezoneH)";
- };
- class CA_Alt: RangeText
- {
- idc = 189;
- style = 2;
- sizeEx = "0.0295*SafezoneH";
- shadow = 0;
- font = "EtelkaMonospacePro";
- text = "3825";
- x = "34.78 * (0.01875 * SafezoneH)";
- y = "30.88 * (0.025 * SafezoneH)";
- w = "4 * (0.01875 * SafezoneH)";
- h = "1.2 * (0.025 * SafezoneH)";
- };
- class CA_VisionMode: RscText
- {
- idc = 152;
- style = 0;
- sizeEx = "0.0295*SafezoneH";
- shadow = 0;
- font = "EtelkaMonospacePro";
- text = "VIS";
- x = "12.58 * (0.01875 * SafezoneH)";
- y = "8 * (0.025 * SafezoneH)";
- w = "4 * (0.01875 * SafezoneH)";
- h = "1.2 * (0.025 * SafezoneH)";
- };
- class CA_FlirMode: RscText
- {
- idc = 153;
- style = 0;
- sizeEx = "0.0295*SafezoneH";
- shadow = 0;
- font = "EtelkaMonospacePro";
- text = "BHOT";
- x = "15.78 * (0.01875 * SafezoneH)";
- y = "8 * (0.025 * SafezoneH)";
- w = "4.5 * (0.01875 * SafezoneH)";
- h = "1.2 * (0.025 * SafezoneH)";
- };
- class ValueGrid: RangeText
- {
- idc = 172;
- font = "EtelkaMonospacePro";
- style = 2;
- sizeEx = "0.0295*SafezoneH";
- shadow = 0;
- x = "12.20 * (0.01875 * SafezoneH)";
- y = "3.5 * (0.025 * SafezoneH)";
- w = "6 * (0.01875 * SafezoneH)";
- h = "1 * (0.025 * SafezoneH)";
- };
- class TextTADS: RangeText
- {
- idc = 1010;
- text = "TADS";
- font = "EtelkaMonospacePro";
- style = 2;
- shadow = 0;
- x = "12.30 * (0.01875 * SafezoneH)";
- y = "5 * (0.025 * SafezoneH)";
- w = "4 * (0.01875 * SafezoneH)";
- h = "1.2 * (0.025 * SafezoneH)";
- };
- class ValueTime: RangeText
- {
- idc = 190;
- text = "20:28:35";
- font = "EtelkaMonospacePro";
- style = 2;
- sizeEx = "0.0295*SafezoneH";
- shadow = 0;
- x = "12.1 * (0.01875 * SafezoneH)";
- y = "6.5 * (0.025 * SafezoneH)";
- w = "6 * (0.01875 * SafezoneH)";
- h = "1 * (0.025 * SafezoneH)";
- };
- class CA_Laser: RscText
- {
- idc = 158;
- style = "0x30 + 0x800";
- sizeEx = "0.038*SafezoneH";
- shadow = 0;
- font = "EtelkaMonospacePro";
- text = PATHTOF(data\Helo_LaserON.paa);
- x = "20.45 * (0.01875 * SafezoneH)";
- y = "14.1 * (0.025 * SafezoneH)";
- w = "12.5 * (0.01875 * SafezoneH)";
- h = "12 * (0.025 * SafezoneH)";
- };
- class CA_Heading: RscText
- {
- idc = 156;
- style = 0;
- sizeEx = "0.038*SafezoneH";
- shadow = 0;
- font = "EtelkaMonospacePro";
- text = "023";
- x = "24.83 * (0.01875 * SafezoneH)";
- y = "6 * (0.025 * SafezoneH)";
- w = "4 * (0.01875 * SafezoneH)";
- h = "1.2 * (0.025 * SafezoneH)";
- };
- };
- };
- };
- class Rsc_ACE_Helo_UI_01: RscUnitInfo
- {
- controls[] = {"WeaponInfoControlsGroupRight","CA_TextFlaresMode","CA_TextFlares","CA_VehicleToggles","CA_Radar"};
- };
- class Rsc_ACE_Helo_UI_02: RscUnitInfo
- {
- controls[] = {"CA_TextFlaresMode","CA_TextFlares","CA_VehicleToggles","CA_Radar"};
- };
- class Rsc_ACE_Drones_UI_Turret: RscUnitInfo
- {
- idd = 300;
- controls[] = {"CA_Zeroing","CA_IGUI_elements_group","CA_VehicleToggles"};
- class CA_IGUI_elements_group: RscControlsGroup
- {
- idc = 170;
- class VScrollbar: VScrollbar
- {
- width = 0;
- };
- class HScrollbar: HScrollbar
- {
- height = 0;
- };
- x = "0 * (0.01875 * SafezoneH) + (SafezoneX + ((SafezoneW - SafezoneH) / 2))";
- y = "0 * (0.025 * SafezoneH) + (SafezoneY)";
- w = "53.5 * (0.01875 * SafezoneH)";
- h = "40 * (0.025 * SafezoneH)";
- class controls
- {
- class CA_Distance: RscText
- {
- idc = 151;
- style = 2;
- sizeEx = "0.0295*SafezoneH";
- shadow = 0;
- font = "EtelkaMonospacePro";
- x = "24.78 * (0.01875 * SafezoneH)";
- y = "30.88 * (0.025 * SafezoneH)";
- w = "4 * (0.01875 * SafezoneH)";
- h = "1.2 * (0.025 * SafezoneH)";
- };
- class CA_Speed: RangeText
- {
- idc = 188;
- style = 2;
- sizeEx = "0.0295*SafezoneH";
- shadow = 0;
- font = "EtelkaMonospacePro";
- text = "120";
- x = "14.78 * (0.01875 * SafezoneH)";
- y = "30.88 * (0.025 * SafezoneH)";
- w = "4 * (0.01875 * SafezoneH)";
- h = "1.2 * (0.025 * SafezoneH)";
- };
- class CA_Alt: RangeText
- {
- idc = 189;
- style = 2;
- sizeEx = "0.0295*SafezoneH";
- shadow = 0;
- font = "EtelkaMonospacePro";
- text = "3825";
- x = "34.78 * (0.01875 * SafezoneH)";
- y = "30.88 * (0.025 * SafezoneH)";
- w = "4 * (0.01875 * SafezoneH)";
- h = "1.2 * (0.025 * SafezoneH)";
- };
- class ValueTime: RangeText
- {
- idc = 190;
- text = "20:28:35";
- font = "EtelkaMonospacePro";
- style = 2;
- sizeEx = "0.0295*SafezoneH";
- shadow = 0;
- x = "1.75 * (0.01875 * SafezoneH)";
- y = "10.5 * (0.025 * SafezoneH)";
- w = "6 * (0.01875 * SafezoneH)";
- h = "1 * (0.025 * SafezoneH)";
- };
- class CA_VisionMode: RscText
- {
- idc = 152;
- style = 0;
- sizeEx = "0.0295*SafezoneH";
- shadow = 0;
- font = "EtelkaMonospacePro";
- text = "VIS";
- align = "right";
- x = "2.6 * (0.01875 * SafezoneH)";
- y = "12.0 * (0.025 * SafezoneH)";
- w = "4 * (0.01875 * SafezoneH)";
- h = "1.0 * (0.025 * SafezoneH)";
- };
- class CA_FlirMode: RscText
- {
- idc = 153;
- style = 0;
- sizeEx = "0.0295*SafezoneH";
- shadow = 0;
- font = "EtelkaMonospacePro";
- text = "BHOT";
- align = "right";
- x = "6.18 * (0.01875 * SafezoneH)";
- y = "12.0 * (0.025 * SafezoneH)";
- w = "4.5 * (0.01875 * SafezoneH)";
- h = "1.0 * (0.025 * SafezoneH)";
- };
- class TgT_Grid_text: RangeText
- {
- idc = 1005;
- text = "TGT:";
- font = "EtelkaMonospacePro";
- style = 2;
- sizeEx = "0.0295*SafezoneH";
- shadow = 0;
- x = "1.20 * (0.01875 * SafezoneH)";
- y = "13.5 * (0.025 * SafezoneH)";
- w = "6 * (0.01875 * SafezoneH)";
- h = "1 * (0.025 * SafezoneH)";
- };
- class TGT_ValueGrid: RangeText
- {
- idc = 172;
- font = "EtelkaMonospacePro";
- colorText[] = {0.706,0.0745,0.0196,0.8};
- style = 2;
- sizeEx = "0.0295*SafezoneH";
- shadow = 0;
- x = "5.20 * (0.01875 * SafezoneH)";
- y = "13.5 * (0.025 * SafezoneH)";
- w = "6 * (0.01875 * SafezoneH)";
- h = "1 * (0.025 * SafezoneH)";
- };
- class OWN_Grid_text: RangeText
- {
- idc = 1005;
- text = "OWN:";
- font = "EtelkaMonospacePro";
- style = 2;
- sizeEx = "0.0295*SafezoneH";
- shadow = 0;
- x = "1.20 * (0.01875 * SafezoneH)";
- y = "15 * (0.025 * SafezoneH)";
- w = "6 * (0.01875 * SafezoneH)";
- h = "1 * (0.025 * SafezoneH)";
- };
- class OWN_ValueGrid: RangeText
- {
- idc = 171;
- font = "EtelkaMonospacePro";
- colorText[] = {0.15,1,0.15,0.8};
- style = 2;
- sizeEx = "0.0295*SafezoneH";
- shadow = 0;
- x = "5.20 * (0.01875 * SafezoneH)";
- y = "15 * (0.025 * SafezoneH)";
- w = "6 * (0.01875 * SafezoneH)";
- h = "1 * (0.025 * SafezoneH)";
- };
- class CA_Laser: RscText
- {
- idc = 158;
- style = "0x30 + 0x800";
- sizeEx = "0.038*SafezoneH";
- shadow = 0;
- align = "right";
- font = "EtelkaMonospacePro";
- text = PATHTOF(data\Helo_LaserON.paa);
- x = "20.45 * (0.01875 * SafezoneH)";
- y = "14.1 * (0.025 * SafezoneH)";
- w = "12.5 * (0.01875 * SafezoneH)";
- h = "12 * (0.025 * SafezoneH)";
- };
- class CA_Heading: RscText
- {
- idc = 156;
- style = 0;
- sizeEx = "0.038*SafezoneH";
- shadow = 0;
- font = "EtelkaMonospacePro";
- text = "023";
- align = "right";
- x = "25 * (0.01875 * SafezoneH)";
- y = "5 * (0.025 * SafezoneH)";
- w = "4 * (0.01875 * SafezoneH)";
- h = "1.2 * (0.025 * SafezoneH)";
- };
- };
- };
- };
- class Rsc_ACE_Drones_UI_Pilots: RscUnitInfo
- {
- idd = 300;
- controls[] = {"WeaponInfoControlsGroupRight","CA_BackgroundVehicle","CA_BackgroundVehicleTitle","CA_BackgroundVehicleTitleDark","CA_BackgroundFuel","CA_Vehicle","CA_VehicleRole","CA_HitZones","CA_SpeedBackground","CA_SpeedUnits","CA_Speed","CA_ValueFuel","CA_AltBackground","CA_AltUnits","CA_Alt","CA_VehicleToggles","CA_Radar","DriverOpticsGroup"};
- class DriverOpticsGroup: RscControlsGroup
- {
- idc = 392;
- class VScrollbar: VScrollbar
- {
- width = 0;
- };
- class HScrollbar: HScrollbar
- {
- height = 0;
- };
- x = "0 * (0.01875 * SafezoneH) + (SafezoneX + ((SafezoneW - SafezoneH) / 2))";
- y = "0 * (0.025 * SafezoneH) + (SafezoneY)";
- w = "53.5 * (0.01875 * SafezoneH)";
- h = "40 * (0.025 * SafezoneH)";
- class controls
- {
- class TextGrid: RscText
- {
- style = 0;
- sizeEx = "0.02*SafezoneH";
- shadow = 0;
- font = "EtelkaMonospacePro";
- idc = 1005;
- text = "GRID:";
- x = "5.8 * (0.01875 * SafezoneH)";
- y = "31.8 * (0.025 * SafezoneH)";
- w = "5 * (0.01875 * SafezoneH)";
- h = "1 * (0.025 * SafezoneH)";
- };
- class ValueGrid: TextGrid
- {
- idc = 189;
- text = "382546";
- x = "10.3 * (0.01875 * SafezoneH)";
- y = "31.8 * (0.025 * SafezoneH)";
- w = "6 * (0.01875 * SafezoneH)";
- h = "1 * (0.025 * SafezoneH)";
- };
- class TextTime: TextGrid
- {
- idc = 1010;
- text = "TIME [UTC]:";
- x = "5.8 * (0.01875 * SafezoneH)";
- y = "32.6 * (0.025 * SafezoneH)";
- w = "5 * (0.01875 * SafezoneH)";
- h = "1 * (0.025 * SafezoneH)";
- };
- class ValueTime: TextGrid
- {
- idc = 101;
- text = "20:28:35";
- x = "10 * (0.01875 * SafezoneH)";
- y = "32.6 * (0.025 * SafezoneH)";
- w = "6 * (0.01875 * SafezoneH)";
- h = "1 * (0.025 * SafezoneH)";
- };
- class TextMag: TextGrid
- {
- idc = 1011;
- text = "CAM MAG:";
- x = "5.8 * (0.01875 * SafezoneH)";
- y = "7 * (0.025 * SafezoneH)";
- w = "5 * (0.01875 * SafezoneH)";
- h = "1 * (0.025 * SafezoneH)";
- };
- class OpticsZoom: TextGrid
- {
- idc = 192;
- text = "28x";
- x = "10.3 * (0.01875 * SafezoneH)";
- y = "7 * (0.025 * SafezoneH)";
- w = "6 * (0.01875 * SafezoneH)";
- h = "1 * (0.025 * SafezoneH)";
- };
- class BorderLineSpdTop: RscPicture
- {
- idc = 1203;
- text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\border_line_ca.paa";
- x = "3.343 * (0.01875 * SafezoneH)";
- y = "12.4 * (0.025 * SafezoneH)";
- w = "3 * (0.01875 * SafezoneH)";
- h = "1 * (0.025 * SafezoneH)";
- };
- class BorderLineSpdBottom: RscPicture
- {
- idc = 1207;
- text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\border_line_ca.paa";
- x = "3.343 * (0.01875 * SafezoneH)";
- y = "26.5 * (0.025 * SafezoneH)";
- w = "3 * (0.01875 * SafezoneH)";
- h = "1 * (0.025 * SafezoneH)";
- };
- class BorderLineAltTop: RscPicture
- {
- idc = 1205;
- text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\border_line_ca.paa";
- x = "47.16 * (0.01875 * SafezoneH)";
- y = "12.4 * (0.025 * SafezoneH)";
- w = "3 * (0.01875 * SafezoneH)";
- h = "1 * (0.025 * SafezoneH)";
- };
- class BorderLineAltBottom: RscPicture
- {
- idc = 1206;
- text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\border_line_ca.paa";
- x = "47.16 * (0.01875 * SafezoneH)";
- y = "26.5 * (0.025 * SafezoneH)";
- w = "3 * (0.01875 * SafezoneH)";
- h = "1 * (0.025 * SafezoneH)";
- };
- class TextSpd: TextGrid
- {
- idc = 1004;
- text = "SPD";
- x = "4.8 * (0.01875 * SafezoneH)";
- y = "11.8 * (0.025 * SafezoneH)";
- w = "5 * (0.01875 * SafezoneH)";
- h = "1.2 * (0.025 * SafezoneH)";
- };
- class SpeedValueBorder: RscPicture
- {
- idc = 1200;
- text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\altimeter_value_ca.paa";
- x = "6.3 * (0.01875 * SafezoneH)";
- y = "19 * (0.025 * SafezoneH)";
- w = "5 * (0.01875 * SafezoneH)";
- h = "2 * (0.025 * SafezoneH)";
- };
- class CA_Speed: TextGrid
- {
- idc = 190;
- sizeEx = "0.03*SafezoneH";
- text = "120";
- x = "7.5 * (0.01875 * SafezoneH)";
- y = "19.5 * (0.025 * SafezoneH)";
- w = "6 * (0.01875 * SafezoneH)";
- h = "1.2 * (0.025 * SafezoneH)";
- };
- class AnalogueSpeed: RscLadderPicture
- {
- idc = 384;
- topValue = 1312;
- bottomValue = -345;
- visibleRange = -1;
- text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\UAVspeedLadder_ca.paa";
- x = "1.5 * (0.01875 * SafezoneH)";
- y = "13 * (0.025 * SafezoneH)";
- w = "5 * (0.01875 * SafezoneH)";
- h = "14 * (0.025 * SafezoneH)";
- };
- class TextAlt: TextGrid
- {
- idc = 1006;
- text = "ALT";
- x = "46.9 * (0.01875 * SafezoneH)";
- y = "11.8 * (0.025 * SafezoneH)";
- w = "5 * (0.01875 * SafezoneH)";
- h = "1.2 * (0.025 * SafezoneH)";
- };
- class AltValueBorder: RscPicture
- {
- idc = 1201;
- text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\airspeed_value_ca.paa";
- x = "42.25 * (0.01875 * SafezoneH)";
- y = "19 * (0.025 * SafezoneH)";
- w = "5 * (0.01875 * SafezoneH)";
- h = "2 * (0.025 * SafezoneH)";
- };
- class CA_Alt: TextGrid
- {
- idc = 191;
- sizeEx = "0.03*SafezoneH";
- style = 1;
- text = "3825";
- x = "43 * (0.01875 * SafezoneH)";
- y = "19.5 * (0.025 * SafezoneH)";
- w = "3.2 * (0.01875 * SafezoneH)";
- h = "1.2 * (0.025 * SafezoneH)";
- };
- class AnalogueAlt: RscLadderPicture
- {
- idc = 385;
- topValue = 14430;
- bottomValue = -2110;
- visibleRange = -1;
- text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\UAValtLadder_ca.paa";
- x = "47 * (0.01875 * SafezoneH)";
- y = "13 * (0.025 * SafezoneH)";
- w = "2.5 * (0.01875 * SafezoneH)";
- h = "14 * (0.025 * SafezoneH)";
- };
- class AnalogueHorizon: RscLadderPicture
- {
- idc = 383;
- topValue = 90;
- bottomValue = -90;
- visibleRange = -1;
- text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\horizon_ladder_ca.paa";
- x = "16.75 * (0.01875 * SafezoneH)";
- y = "5 * (0.025 * SafezoneH)";
- w = "20 * (0.01875 * SafezoneH)";
- h = "30 * (0.025 * SafezoneH)";
- };
- class HorizonCenter: RscPicture
- {
- idc = 1202;
- text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\horizon_aircraft_ca.paa";
- x = "24.75 * (0.01875 * SafezoneH)";
- y = "19 * (0.025 * SafezoneH)";
- w = "4 * (0.01875 * SafezoneH)";
- h = "2 * (0.025 * SafezoneH)";
- };
- };
- };
- };
+class RscControlsGroup;
+class RscText;
+class RangeText: RscText{};
+class RscPicture;
+class RscOpticsText;
+class RscIGProgress;
+class RscOpticsValue;
+class VScrollbar;
+class HScrollbar;
+class RscLadderPicture;
+class RscControlsGroupNoScrollbars;
+
+
+class RscInGameUI
+{
+ class RscUnitInfo;
+ class Rsc_ACE_Helo_UI_Turret: RscUnitInfo
+ {
+ idd = 300;
+ controls[] = {"CA_IGUI_elements_group","CA_VehicleToggles"};
+ class VScrollbar;
+ class HScrollbar;
+ class CA_IGUI_elements_group: RscControlsGroup
+ {
+ idc = 170;
+ class VScrollbar: VScrollbar
+ {
+ width = 0;
+ };
+ class HScrollbar: HScrollbar
+ {
+ height = 0;
+ };
+ x = "0 * (0.01875 * SafezoneH) + (SafezoneX + ((SafezoneW - SafezoneH) / 2))";
+ y = "0 * (0.025 * SafezoneH) + (SafezoneY)";
+ w = "53.5 * (0.01875 * SafezoneH)";
+ h = "40 * (0.025 * SafezoneH)";
+ class controls
+ {
+ class CA_Distance: RscText
+ {
+ idc = 151;
+ style = 2;
+ sizeEx = "0.0295*SafezoneH";
+ shadow = 0;
+ font = "EtelkaMonospacePro";
+ x = "24.78 * (0.01875 * SafezoneH)";
+ y = "30.88 * (0.025 * SafezoneH)";
+ w = "4 * (0.01875 * SafezoneH)";
+ h = "1.2 * (0.025 * SafezoneH)";
+ };
+ class CA_Speed: RangeText
+ {
+ idc = 188;
+ style = 2;
+ sizeEx = "0.0295*SafezoneH";
+ shadow = 0;
+ font = "EtelkaMonospacePro";
+ text = "120";
+ x = "14.78 * (0.01875 * SafezoneH)";
+ y = "30.88 * (0.025 * SafezoneH)";
+ w = "4 * (0.01875 * SafezoneH)";
+ h = "1.2 * (0.025 * SafezoneH)";
+ };
+ class CA_Alt: RangeText
+ {
+ idc = 189;
+ style = 2;
+ sizeEx = "0.0295*SafezoneH";
+ shadow = 0;
+ font = "EtelkaMonospacePro";
+ text = "3825";
+ x = "34.78 * (0.01875 * SafezoneH)";
+ y = "30.88 * (0.025 * SafezoneH)";
+ w = "4 * (0.01875 * SafezoneH)";
+ h = "1.2 * (0.025 * SafezoneH)";
+ };
+ class CA_VisionMode: RscText
+ {
+ idc = 152;
+ style = 0;
+ sizeEx = "0.0295*SafezoneH";
+ shadow = 0;
+ font = "EtelkaMonospacePro";
+ text = "VIS";
+ x = "12.58 * (0.01875 * SafezoneH)";
+ y = "8 * (0.025 * SafezoneH)";
+ w = "4 * (0.01875 * SafezoneH)";
+ h = "1.2 * (0.025 * SafezoneH)";
+ };
+ class CA_FlirMode: RscText
+ {
+ idc = 153;
+ style = 0;
+ sizeEx = "0.0295*SafezoneH";
+ shadow = 0;
+ font = "EtelkaMonospacePro";
+ text = "BHOT";
+ x = "15.78 * (0.01875 * SafezoneH)";
+ y = "8 * (0.025 * SafezoneH)";
+ w = "4.5 * (0.01875 * SafezoneH)";
+ h = "1.2 * (0.025 * SafezoneH)";
+ };
+ class ValueGrid: RangeText
+ {
+ idc = 172;
+ font = "EtelkaMonospacePro";
+ style = 2;
+ sizeEx = "0.0295*SafezoneH";
+ shadow = 0;
+ x = "12.20 * (0.01875 * SafezoneH)";
+ y = "3.5 * (0.025 * SafezoneH)";
+ w = "6 * (0.01875 * SafezoneH)";
+ h = "1 * (0.025 * SafezoneH)";
+ };
+ class TextTADS: RangeText
+ {
+ idc = 1010;
+ text = "TADS";
+ font = "EtelkaMonospacePro";
+ style = 2;
+ shadow = 0;
+ x = "12.30 * (0.01875 * SafezoneH)";
+ y = "5 * (0.025 * SafezoneH)";
+ w = "4 * (0.01875 * SafezoneH)";
+ h = "1.2 * (0.025 * SafezoneH)";
+ };
+ class ValueTime: RangeText
+ {
+ idc = 190;
+ text = "20:28:35";
+ font = "EtelkaMonospacePro";
+ style = 2;
+ sizeEx = "0.0295*SafezoneH";
+ shadow = 0;
+ x = "12.1 * (0.01875 * SafezoneH)";
+ y = "6.5 * (0.025 * SafezoneH)";
+ w = "6 * (0.01875 * SafezoneH)";
+ h = "1 * (0.025 * SafezoneH)";
+ };
+ class CA_Laser: RscText
+ {
+ idc = 158;
+ style = "0x30 + 0x800";
+ sizeEx = "0.038*SafezoneH";
+ shadow = 0;
+ font = "EtelkaMonospacePro";
+ text = QPATHTOF(data\Helo_LaserON.paa);
+ x = "20.45 * (0.01875 * SafezoneH)";
+ y = "14.1 * (0.025 * SafezoneH)";
+ w = "12.5 * (0.01875 * SafezoneH)";
+ h = "12 * (0.025 * SafezoneH)";
+ };
+ class CA_Heading: RscText
+ {
+ idc = 156;
+ style = 0;
+ sizeEx = "0.038*SafezoneH";
+ shadow = 0;
+ font = "EtelkaMonospacePro";
+ text = "023";
+ x = "24.83 * (0.01875 * SafezoneH)";
+ y = "6 * (0.025 * SafezoneH)";
+ w = "4 * (0.01875 * SafezoneH)";
+ h = "1.2 * (0.025 * SafezoneH)";
+ };
+ };
+ };
+ };
+ class Rsc_ACE_Helo_UI_01: RscUnitInfo
+ {
+ controls[] = {"WeaponInfoControlsGroupRight","CA_TextFlaresMode","CA_TextFlares","CA_VehicleToggles","CA_Radar"};
+ };
+ class Rsc_ACE_Helo_UI_02: RscUnitInfo
+ {
+ controls[] = {"CA_TextFlaresMode","CA_TextFlares","CA_VehicleToggles","CA_Radar"};
+ };
+ class Rsc_ACE_Drones_UI_Turret: RscUnitInfo
+ {
+ idd = 300;
+ controls[] = {"CA_Zeroing","CA_IGUI_elements_group","CA_VehicleToggles"};
+ class CA_IGUI_elements_group: RscControlsGroup
+ {
+ idc = 170;
+ class VScrollbar: VScrollbar
+ {
+ width = 0;
+ };
+ class HScrollbar: HScrollbar
+ {
+ height = 0;
+ };
+ x = "0 * (0.01875 * SafezoneH) + (SafezoneX + ((SafezoneW - SafezoneH) / 2))";
+ y = "0 * (0.025 * SafezoneH) + (SafezoneY)";
+ w = "53.5 * (0.01875 * SafezoneH)";
+ h = "40 * (0.025 * SafezoneH)";
+ class controls
+ {
+ class CA_Distance: RscText
+ {
+ idc = 151;
+ style = 2;
+ sizeEx = "0.0295*SafezoneH";
+ shadow = 0;
+ font = "EtelkaMonospacePro";
+ x = "24.78 * (0.01875 * SafezoneH)";
+ y = "30.88 * (0.025 * SafezoneH)";
+ w = "4 * (0.01875 * SafezoneH)";
+ h = "1.2 * (0.025 * SafezoneH)";
+ };
+ class CA_Speed: RangeText
+ {
+ idc = 188;
+ style = 2;
+ sizeEx = "0.0295*SafezoneH";
+ shadow = 0;
+ font = "EtelkaMonospacePro";
+ text = "120";
+ x = "14.78 * (0.01875 * SafezoneH)";
+ y = "30.88 * (0.025 * SafezoneH)";
+ w = "4 * (0.01875 * SafezoneH)";
+ h = "1.2 * (0.025 * SafezoneH)";
+ };
+ class CA_Alt: RangeText
+ {
+ idc = 189;
+ style = 2;
+ sizeEx = "0.0295*SafezoneH";
+ shadow = 0;
+ font = "EtelkaMonospacePro";
+ text = "3825";
+ x = "34.78 * (0.01875 * SafezoneH)";
+ y = "30.88 * (0.025 * SafezoneH)";
+ w = "4 * (0.01875 * SafezoneH)";
+ h = "1.2 * (0.025 * SafezoneH)";
+ };
+ class ValueTime: RangeText
+ {
+ idc = 190;
+ text = "20:28:35";
+ font = "EtelkaMonospacePro";
+ style = 2;
+ sizeEx = "0.0295*SafezoneH";
+ shadow = 0;
+ x = "1.75 * (0.01875 * SafezoneH)";
+ y = "10.5 * (0.025 * SafezoneH)";
+ w = "6 * (0.01875 * SafezoneH)";
+ h = "1 * (0.025 * SafezoneH)";
+ };
+ class CA_VisionMode: RscText
+ {
+ idc = 152;
+ style = 0;
+ sizeEx = "0.0295*SafezoneH";
+ shadow = 0;
+ font = "EtelkaMonospacePro";
+ text = "VIS";
+ align = "right";
+ x = "2.6 * (0.01875 * SafezoneH)";
+ y = "12.0 * (0.025 * SafezoneH)";
+ w = "4 * (0.01875 * SafezoneH)";
+ h = "1.0 * (0.025 * SafezoneH)";
+ };
+ class CA_FlirMode: RscText
+ {
+ idc = 153;
+ style = 0;
+ sizeEx = "0.0295*SafezoneH";
+ shadow = 0;
+ font = "EtelkaMonospacePro";
+ text = "BHOT";
+ align = "right";
+ x = "6.18 * (0.01875 * SafezoneH)";
+ y = "12.0 * (0.025 * SafezoneH)";
+ w = "4.5 * (0.01875 * SafezoneH)";
+ h = "1.0 * (0.025 * SafezoneH)";
+ };
+ class TgT_Grid_text: RangeText
+ {
+ idc = 1005;
+ text = "TGT:";
+ font = "EtelkaMonospacePro";
+ style = 2;
+ sizeEx = "0.0295*SafezoneH";
+ shadow = 0;
+ x = "1.20 * (0.01875 * SafezoneH)";
+ y = "13.5 * (0.025 * SafezoneH)";
+ w = "6 * (0.01875 * SafezoneH)";
+ h = "1 * (0.025 * SafezoneH)";
+ };
+ class TGT_ValueGrid: RangeText
+ {
+ idc = 172;
+ font = "EtelkaMonospacePro";
+ colorText[] = {0.706,0.0745,0.0196,0.8};
+ style = 2;
+ sizeEx = "0.0295*SafezoneH";
+ shadow = 0;
+ x = "5.20 * (0.01875 * SafezoneH)";
+ y = "13.5 * (0.025 * SafezoneH)";
+ w = "6 * (0.01875 * SafezoneH)";
+ h = "1 * (0.025 * SafezoneH)";
+ };
+ class OWN_Grid_text: RangeText
+ {
+ idc = 1005;
+ text = "OWN:";
+ font = "EtelkaMonospacePro";
+ style = 2;
+ sizeEx = "0.0295*SafezoneH";
+ shadow = 0;
+ x = "1.20 * (0.01875 * SafezoneH)";
+ y = "15 * (0.025 * SafezoneH)";
+ w = "6 * (0.01875 * SafezoneH)";
+ h = "1 * (0.025 * SafezoneH)";
+ };
+ class OWN_ValueGrid: RangeText
+ {
+ idc = 171;
+ font = "EtelkaMonospacePro";
+ colorText[] = {0.15,1,0.15,0.8};
+ style = 2;
+ sizeEx = "0.0295*SafezoneH";
+ shadow = 0;
+ x = "5.20 * (0.01875 * SafezoneH)";
+ y = "15 * (0.025 * SafezoneH)";
+ w = "6 * (0.01875 * SafezoneH)";
+ h = "1 * (0.025 * SafezoneH)";
+ };
+ class CA_Laser: RscText
+ {
+ idc = 158;
+ style = "0x30 + 0x800";
+ sizeEx = "0.038*SafezoneH";
+ shadow = 0;
+ align = "right";
+ font = "EtelkaMonospacePro";
+ text = QPATHTOF(data\Helo_LaserON.paa);
+ x = "20.45 * (0.01875 * SafezoneH)";
+ y = "14.1 * (0.025 * SafezoneH)";
+ w = "12.5 * (0.01875 * SafezoneH)";
+ h = "12 * (0.025 * SafezoneH)";
+ };
+ class CA_Heading: RscText
+ {
+ idc = 156;
+ style = 0;
+ sizeEx = "0.038*SafezoneH";
+ shadow = 0;
+ font = "EtelkaMonospacePro";
+ text = "023";
+ align = "right";
+ x = "25 * (0.01875 * SafezoneH)";
+ y = "5 * (0.025 * SafezoneH)";
+ w = "4 * (0.01875 * SafezoneH)";
+ h = "1.2 * (0.025 * SafezoneH)";
+ };
+ };
+ };
+ };
+ class Rsc_ACE_Drones_UI_Pilots: RscUnitInfo
+ {
+ idd = 300;
+ controls[] = {"WeaponInfoControlsGroupRight","CA_BackgroundVehicle","CA_BackgroundVehicleTitle","CA_BackgroundVehicleTitleDark","CA_BackgroundFuel","CA_Vehicle","CA_VehicleRole","CA_HitZones","CA_SpeedBackground","CA_SpeedUnits","CA_Speed","CA_ValueFuel","CA_AltBackground","CA_AltUnits","CA_Alt","CA_VehicleToggles","CA_Radar","DriverOpticsGroup"};
+ class DriverOpticsGroup: RscControlsGroup
+ {
+ idc = 392;
+ class VScrollbar: VScrollbar
+ {
+ width = 0;
+ };
+ class HScrollbar: HScrollbar
+ {
+ height = 0;
+ };
+ x = "0 * (0.01875 * SafezoneH) + (SafezoneX + ((SafezoneW - SafezoneH) / 2))";
+ y = "0 * (0.025 * SafezoneH) + (SafezoneY)";
+ w = "53.5 * (0.01875 * SafezoneH)";
+ h = "40 * (0.025 * SafezoneH)";
+ class controls
+ {
+ class TextGrid: RscText
+ {
+ style = 0;
+ sizeEx = "0.02*SafezoneH";
+ shadow = 0;
+ font = "EtelkaMonospacePro";
+ idc = 1005;
+ text = "GRID:";
+ x = "5.8 * (0.01875 * SafezoneH)";
+ y = "31.8 * (0.025 * SafezoneH)";
+ w = "5 * (0.01875 * SafezoneH)";
+ h = "1 * (0.025 * SafezoneH)";
+ };
+ class ValueGrid: TextGrid
+ {
+ idc = 189;
+ text = "382546";
+ x = "10.3 * (0.01875 * SafezoneH)";
+ y = "31.8 * (0.025 * SafezoneH)";
+ w = "6 * (0.01875 * SafezoneH)";
+ h = "1 * (0.025 * SafezoneH)";
+ };
+ class TextTime: TextGrid
+ {
+ idc = 1010;
+ text = "TIME [UTC]:";
+ x = "5.8 * (0.01875 * SafezoneH)";
+ y = "32.6 * (0.025 * SafezoneH)";
+ w = "5 * (0.01875 * SafezoneH)";
+ h = "1 * (0.025 * SafezoneH)";
+ };
+ class ValueTime: TextGrid
+ {
+ idc = 101;
+ text = "20:28:35";
+ x = "10 * (0.01875 * SafezoneH)";
+ y = "32.6 * (0.025 * SafezoneH)";
+ w = "6 * (0.01875 * SafezoneH)";
+ h = "1 * (0.025 * SafezoneH)";
+ };
+ class TextMag: TextGrid
+ {
+ idc = 1011;
+ text = "CAM MAG:";
+ x = "5.8 * (0.01875 * SafezoneH)";
+ y = "7 * (0.025 * SafezoneH)";
+ w = "5 * (0.01875 * SafezoneH)";
+ h = "1 * (0.025 * SafezoneH)";
+ };
+ class OpticsZoom: TextGrid
+ {
+ idc = 192;
+ text = "28x";
+ x = "10.3 * (0.01875 * SafezoneH)";
+ y = "7 * (0.025 * SafezoneH)";
+ w = "6 * (0.01875 * SafezoneH)";
+ h = "1 * (0.025 * SafezoneH)";
+ };
+ class BorderLineSpdTop: RscPicture
+ {
+ idc = 1203;
+ text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\border_line_ca.paa";
+ x = "3.343 * (0.01875 * SafezoneH)";
+ y = "12.4 * (0.025 * SafezoneH)";
+ w = "3 * (0.01875 * SafezoneH)";
+ h = "1 * (0.025 * SafezoneH)";
+ };
+ class BorderLineSpdBottom: RscPicture
+ {
+ idc = 1207;
+ text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\border_line_ca.paa";
+ x = "3.343 * (0.01875 * SafezoneH)";
+ y = "26.5 * (0.025 * SafezoneH)";
+ w = "3 * (0.01875 * SafezoneH)";
+ h = "1 * (0.025 * SafezoneH)";
+ };
+ class BorderLineAltTop: RscPicture
+ {
+ idc = 1205;
+ text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\border_line_ca.paa";
+ x = "47.16 * (0.01875 * SafezoneH)";
+ y = "12.4 * (0.025 * SafezoneH)";
+ w = "3 * (0.01875 * SafezoneH)";
+ h = "1 * (0.025 * SafezoneH)";
+ };
+ class BorderLineAltBottom: RscPicture
+ {
+ idc = 1206;
+ text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\border_line_ca.paa";
+ x = "47.16 * (0.01875 * SafezoneH)";
+ y = "26.5 * (0.025 * SafezoneH)";
+ w = "3 * (0.01875 * SafezoneH)";
+ h = "1 * (0.025 * SafezoneH)";
+ };
+ class TextSpd: TextGrid
+ {
+ idc = 1004;
+ text = "SPD";
+ x = "4.8 * (0.01875 * SafezoneH)";
+ y = "11.8 * (0.025 * SafezoneH)";
+ w = "5 * (0.01875 * SafezoneH)";
+ h = "1.2 * (0.025 * SafezoneH)";
+ };
+ class SpeedValueBorder: RscPicture
+ {
+ idc = 1200;
+ text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\altimeter_value_ca.paa";
+ x = "6.3 * (0.01875 * SafezoneH)";
+ y = "19 * (0.025 * SafezoneH)";
+ w = "5 * (0.01875 * SafezoneH)";
+ h = "2 * (0.025 * SafezoneH)";
+ };
+ class CA_Speed: TextGrid
+ {
+ idc = 190;
+ sizeEx = "0.03*SafezoneH";
+ text = "120";
+ x = "7.5 * (0.01875 * SafezoneH)";
+ y = "19.5 * (0.025 * SafezoneH)";
+ w = "6 * (0.01875 * SafezoneH)";
+ h = "1.2 * (0.025 * SafezoneH)";
+ };
+ class AnalogueSpeed: RscLadderPicture
+ {
+ idc = 384;
+ topValue = 1312;
+ bottomValue = -345;
+ visibleRange = -1;
+ text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\UAVspeedLadder_ca.paa";
+ x = "1.5 * (0.01875 * SafezoneH)";
+ y = "13 * (0.025 * SafezoneH)";
+ w = "5 * (0.01875 * SafezoneH)";
+ h = "14 * (0.025 * SafezoneH)";
+ };
+ class TextAlt: TextGrid
+ {
+ idc = 1006;
+ text = "ALT";
+ x = "46.9 * (0.01875 * SafezoneH)";
+ y = "11.8 * (0.025 * SafezoneH)";
+ w = "5 * (0.01875 * SafezoneH)";
+ h = "1.2 * (0.025 * SafezoneH)";
+ };
+ class AltValueBorder: RscPicture
+ {
+ idc = 1201;
+ text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\airspeed_value_ca.paa";
+ x = "42.25 * (0.01875 * SafezoneH)";
+ y = "19 * (0.025 * SafezoneH)";
+ w = "5 * (0.01875 * SafezoneH)";
+ h = "2 * (0.025 * SafezoneH)";
+ };
+ class CA_Alt: TextGrid
+ {
+ idc = 191;
+ sizeEx = "0.03*SafezoneH";
+ style = 1;
+ text = "3825";
+ x = "43 * (0.01875 * SafezoneH)";
+ y = "19.5 * (0.025 * SafezoneH)";
+ w = "3.2 * (0.01875 * SafezoneH)";
+ h = "1.2 * (0.025 * SafezoneH)";
+ };
+ class AnalogueAlt: RscLadderPicture
+ {
+ idc = 385;
+ topValue = 14430;
+ bottomValue = -2110;
+ visibleRange = -1;
+ text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\UAValtLadder_ca.paa";
+ x = "47 * (0.01875 * SafezoneH)";
+ y = "13 * (0.025 * SafezoneH)";
+ w = "2.5 * (0.01875 * SafezoneH)";
+ h = "14 * (0.025 * SafezoneH)";
+ };
+ class AnalogueHorizon: RscLadderPicture
+ {
+ idc = 383;
+ topValue = 90;
+ bottomValue = -90;
+ visibleRange = -1;
+ text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\horizon_ladder_ca.paa";
+ x = "16.75 * (0.01875 * SafezoneH)";
+ y = "5 * (0.025 * SafezoneH)";
+ w = "20 * (0.01875 * SafezoneH)";
+ h = "30 * (0.025 * SafezoneH)";
+ };
+ class HorizonCenter: RscPicture
+ {
+ idc = 1202;
+ text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\horizon_aircraft_ca.paa";
+ x = "24.75 * (0.01875 * SafezoneH)";
+ y = "19 * (0.025 * SafezoneH)";
+ w = "4 * (0.01875 * SafezoneH)";
+ h = "2 * (0.025 * SafezoneH)";
+ };
+ };
+ };
+ };
};
\ No newline at end of file
diff --git a/addons/aircraft/config.cpp b/addons/aircraft/config.cpp
index 2ce2d0dc10..f989749383 100644
--- a/addons/aircraft/config.cpp
+++ b/addons/aircraft/config.cpp
@@ -6,8 +6,9 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
- author[] = {"KoffeinFlummi","Crusty","commy2","jaynus","Kimi"};
- authorUrl = "https://github.com/KoffeinFlummi/";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"KoffeinFlummi","Crusty","commy2","jaynus","Kimi"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
diff --git a/addons/aircraft/flightmodel_thunderbolt.hpp b/addons/aircraft/flightmodel_thunderbolt.hpp
index fa99f40424..2446e166bc 100644
--- a/addons/aircraft/flightmodel_thunderbolt.hpp
+++ b/addons/aircraft/flightmodel_thunderbolt.hpp
@@ -20,4 +20,3 @@ envelope[] = {0,0,0.75,2.4,3.6,3.8,3.7,3.2,2.2,1.7,0.9};
thrustCoef[] = {1,1.2,1.3,1.25,1.06,1.01,1,0.92,0.75,0.65,0.5,0.25,0};
acceleration = 265;
landingSpeed = 220;
-gunAimDown = 0.087266463;
diff --git a/addons/aircraft/stringtable.xml b/addons/aircraft/stringtable.xml
index d91af73a1c..5480cb9740 100644
--- a/addons/aircraft/stringtable.xml
+++ b/addons/aircraft/stringtable.xml
@@ -1,4 +1,4 @@
-
+
@@ -7,7 +7,7 @@
Ráfaga
Seria
Dávka
- Contre mesure
+ Contre mesures
Очередь
Sorozat
Rajada
@@ -29,7 +29,7 @@
Open Cargo Door
Laderampe öffnen
Abrir compuerta de carga
- Ourvir la rampe
+ Ouvrir la rampe
Otwórz drzwi ładowni
Otevřít nákladní prostor
Rakodórámpa nyitása
diff --git a/addons/apl/CfgEventHandlers.hpp b/addons/apl/CfgEventHandlers.hpp
deleted file mode 100644
index 5bacc02434..0000000000
--- a/addons/apl/CfgEventHandlers.hpp
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
-class Extended_PreInit_EventHandlers {
- class ADDON {
- init = QUOTE(call COMPILE_FILE(XEH_preInit));
- };
-};
-*/
\ No newline at end of file
diff --git a/addons/apl/config.cpp b/addons/apl/config.cpp
index fff902d962..bd97757a1c 100644
--- a/addons/apl/config.cpp
+++ b/addons/apl/config.cpp
@@ -6,10 +6,8 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_main"};
- author[] = {"Bohemia Interactive"};
- authorUrl = "http://ace3mod.com";
+ author = "Bohemia Interactive";
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
-
-#include "CfgEventHandlers.hpp"
diff --git a/addons/atragmx/CfgEventHandlers.hpp b/addons/atragmx/CfgEventHandlers.hpp
index 3996e3371d..1bd535a305 100644
--- a/addons/atragmx/CfgEventHandlers.hpp
+++ b/addons/atragmx/CfgEventHandlers.hpp
@@ -1,3 +1,10 @@
+
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE( call COMPILE_FILE(XEH_preInit) );
diff --git a/addons/atragmx/CfgVehicles.hpp b/addons/atragmx/CfgVehicles.hpp
index cc4a7880fe..6e8a136a03 100644
--- a/addons/atragmx/CfgVehicles.hpp
+++ b/addons/atragmx/CfgVehicles.hpp
@@ -9,7 +9,7 @@ class CfgVehicles {
statement = QUOTE(call FUNC(create_dialog));
showDisabled = 0;
priority = 2;
- icon = PATHTOF(UI\ATRAG_Icon.paa);
+ icon = QPATHTOF(UI\ATRAG_Icon.paa);
exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"};
};
};
diff --git a/addons/atragmx/CfgWeapons.hpp b/addons/atragmx/CfgWeapons.hpp
index 42d1e56ae2..af5e1a9955 100644
--- a/addons/atragmx/CfgWeapons.hpp
+++ b/addons/atragmx/CfgWeapons.hpp
@@ -8,8 +8,8 @@ class CfgWeapons {
scope = 2;
displayName = CSTRING(Name);
descriptionShort = CSTRING(Description);
- model = PATHTOF(data\tdsrecon.p3d);
- picture = PATHTOF(UI\ATRAG_Icon.paa);
+ model = QPATHTOF(data\tdsrecon.p3d);
+ picture = QPATHTOF(UI\ATRAG_Icon.paa);
icon = "iconObject_circle";
mapSize = 0.034;
diff --git a/addons/atragmx/RscTitles.hpp b/addons/atragmx/RscTitles.hpp
index 97dad6e7b6..625cd68deb 100644
--- a/addons/atragmx/RscTitles.hpp
+++ b/addons/atragmx/RscTitles.hpp
@@ -230,7 +230,7 @@ class ATragMX_Display {
idc=-1;
x=0.55*safezoneW+safezoneX+0.315;
};
-
+
class TEXT_GUN_FRAME: ATragMX_RscText {
idc=1001;
style=64;
@@ -610,7 +610,7 @@ class ATragMX_Display {
x=0.550*safezoneW+safezoneX+0.27;
text="4";
action=QUOTE(call FUNC(toggle_solution_setup));
- };
+ };
class TEXT_CALCULATE: TEXT_SCOPE_UNIT {
idc=3000;
style=ST_RIGHT;
@@ -1059,7 +1059,7 @@ class ATragMX_Display {
text="Cancel";
action=QUOTE(false call FUNC(show_add_new_gun); true call FUNC(show_gun_list));
};
-
+
class TEXT_GUN_AMMO_DATA_BORE_HEIGHT: TEXT_BORE_HEIGHT {
idc=12000;
w=0.22;
@@ -1147,7 +1147,7 @@ class ATragMX_Display {
class TEXT_GUN_AMMO_DATA_NEXT: TEXT_TARGET_SPEED_ASSIST_NEXT {
idc=12011;
};
-
+
class TEXT_ATMO_ENV_DATA_DEFAULT: TEXT_LEAD {
idc=13000;
w=0.08;
@@ -1231,7 +1231,7 @@ class ATragMX_Display {
y=0.265*safezoneH+safezoneY+0.29;
text="Calc Method";
};
-
+
class TEXT_TARGET_DATA_LATITUDE: TEXT_BORE_HEIGHT {
idc=14000;
w=0.22;
@@ -1379,7 +1379,7 @@ class ATragMX_Display {
class TEXT_TARGET_DATA_NEXT: TEXT_TARGET_SPEED_ASSIST_NEXT {
idc=14011;
};
-
+
class TEXT_SOLUTION_SETUP_SHOW_RESULT_IN: TEXT_GUN_AMMO_DATA_BORE_HEIGHT {
idc=15000;
style=64;
@@ -1469,4 +1469,4 @@ class ATragMX_Display {
action=QUOTE(0 call FUNC(toggle_solution_setup));
};
};
-};
\ No newline at end of file
+};
diff --git a/addons/atragmx/XEH_PREP.hpp b/addons/atragmx/XEH_PREP.hpp
new file mode 100644
index 0000000000..20900711c3
--- /dev/null
+++ b/addons/atragmx/XEH_PREP.hpp
@@ -0,0 +1,67 @@
+
+PREP(add_new_gun);
+PREP(calculate_range_card);
+PREP(calculate_solution);
+PREP(calculate_target_range_assist);
+PREP(calculate_target_solution);
+PREP(calculate_target_speed_assist);
+PREP(can_show);
+PREP(change_gun);
+PREP(change_target_slot);
+PREP(clear_user_data);
+PREP(create_dialog);
+PREP(cycle_gun_list);
+PREP(cycle_image_size_units);
+PREP(cycle_num_ticks_units);
+PREP(cycle_range_card_columns);
+PREP(cycle_scope_unit);
+PREP(cycle_target_size_units);
+PREP(cycle_target_speed_direction);
+PREP(delete_gun);
+PREP(init);
+PREP(parse_input);
+PREP(reset_relative_click_memory);
+PREP(restore_atmo_default);
+PREP(restore_user_data);
+PREP(save_gun);
+PREP(show_add_new_gun);
+PREP(show_atmo_env_data);
+PREP(show_gun_ammo_data);
+PREP(show_gun_list);
+PREP(show_main_page);
+PREP(show_range_card);
+PREP(show_range_card_setup);
+PREP(show_solution_setup);
+PREP(show_target_data);
+PREP(show_target_range_assist);
+PREP(show_target_speed_assist);
+PREP(show_target_speed_assist_timer);
+PREP(sord);
+PREP(store_user_data);
+PREP(target_speed_assist_timer);
+PREP(toggle_atmo_env_data);
+PREP(toggle_gun_ammo_data);
+PREP(toggle_gun_list);
+PREP(toggle_range_card);
+PREP(toggle_range_card_setup);
+PREP(toggle_solution_setup);
+PREP(toggle_target_data);
+PREP(toggle_target_range_assist);
+PREP(toggle_target_speed_assist);
+PREP(update_atmosphere);
+PREP(update_atmo_env_data);
+PREP(update_atmo_selection);
+PREP(update_gun);
+PREP(update_gun_ammo_data);
+PREP(update_inclination_angle);
+PREP(update_range_card);
+PREP(update_relative_click_memory);
+PREP(update_result);
+PREP(update_scope_unit);
+PREP(update_solution_setup);
+PREP(update_target);
+PREP(update_target_data);
+PREP(update_target_selection);
+PREP(update_unit_selection);
+PREP(update_zero_range);
+PREP(on_close_dialog);
diff --git a/addons/atragmx/XEH_postInit.sqf b/addons/atragmx/XEH_postInit.sqf
index 4b61a28551..82f3c25aeb 100644
--- a/addons/atragmx/XEH_postInit.sqf
+++ b/addons/atragmx/XEH_postInit.sqf
@@ -7,41 +7,41 @@ if ((profileNamespace getVariable ["ACE_ATragMX_profileNamespaceVersion", 0]) ==
} else {
// Profile Name, Muzzle Velocity, Zero Range, Scope Base Angle, AirFriction, Bore Height, Scope Unit, Scope Click Unit, Scope Click Number, Maximum Elevation, Dialed Elevation, Dialed Windage, Mass, Bullet Diameter, Rifle Twist, BC, Drag Model, Atmosphere Model
GVAR(gunList) = [["12.7x108mm" , 820, 100, 0.0657485, -0.00063800, 3.81, 0, 2, 10, 120, 0, 0, 48.28, 12.7, 38.10, 0.630, 1, "ASM" ],
-
+
["12.7x99mm AMAX" , 860, 100, 0.0611565, -0.00036645, 3.81, 0, 2, 10, 120, 0, 0, 48.60, 12.7, 38.10, 1.050, 1, "ASM" ],
["12.7x99mm" , 900, 100, 0.0582418, -0.00057503, 3.81, 0, 2, 10, 120, 0, 0, 41.92, 12.7, 38.10, 0.670, 1, "ASM" ],
-
+
["12.7x54mm" , 300, 100, 0.3394630, -0.00019268, 3.81, 0, 2, 10, 120, 0, 0, 48.60, 12.7, 24.13, 1.050, 1, "ASM" ],
-
+
[".408 Chey Tac" , 910, 100, 0.0569400, -0.00038944, 3.81, 0, 2, 10, 120, 0, 0, 27.15, 10.4, 33.02, 0.970, 1, "ASM" ],
-
+
["9.3×64mm" , 870, 100, 0.0619295, -0.00108571, 3.81, 0, 2, 10, 120, 0, 0, 14.90, 9.30, 35.56, 0.368, 1, "ASM" ],
-
+
[".338LM 250gr" , 880, 100, 0.0598469, -0.00059133, 3.81, 0, 2, 10, 120, 0, 0, 16.20, 8.58, 25.40, 0.322, 7, "ICAO"],
[".338LM 300gr" , 800, 100, 0.0677343, -0.00052190, 3.81, 0, 2, 10, 120, 0, 0, 19.44, 8.58, 25.40, 0.381, 7, "ICAO"],
[".338LM API526" , 895, 100, 0.0588865, -0.00069611, 3.81, 0, 2, 10, 120, 0, 0, 16.39, 8.58, 25.40, 0.560, 1, "ASM" ],
-
+
[".300WM Mk248 Mod 0", 900, 100, 0.0584442, -0.00070530, 3.81, 0, 2, 10, 120, 0, 0, 13.31, 7.80, 25.40, 0.268, 7, "ICAO"],
[".300WM Mk248 Mod 1", 867, 100, 0.0610738, -0.00061188, 3.81, 0, 2, 10, 120, 0, 0, 14.26, 7.80, 25.40, 0.310, 7, "ICAO"],
[".300WM Berger OTM" , 853, 100, 0.0622179, -0.00053733, 3.81, 0, 2, 10, 120, 0, 0, 14.90, 7.80, 25.40, 0.368, 7, "ICAO"],
-
+
["7.62x54mmR" , 800, 100, 0.0691878, -0.00100023, 3.81, 0, 2, 10, 120, 0, 0, 9.849, 7.92, 24.13, 0.400, 1, "ICAO"],
-
+
["7.62x51mm M80" , 810, 100, 0.0679374, -0.00100957, 3.81, 0, 2, 10, 120, 0, 0, 9.525, 7.82, 25.40, 0.200, 7, "ICAO"],
["7.62x51mm M118LR" , 780, 100, 0.0710319, -0.00082828, 3.81, 0, 2, 10, 120, 0, 0, 11.34, 7.82, 25.40, 0.243, 7, "ICAO"],
["7.62x51mm Mk319" , 910, 100, 0.0584524, -0.00102338, 3.81, 0, 2, 10, 120, 0, 0, 8.424, 7.82, 25.40, 0.377, 1, "ICAO"],
["7.62x51mm M993" , 930, 100, 0.0570316, -0.00107148, 3.81, 0, 2, 10, 120, 0, 0, 8.230, 7.82, 25.40, 0.359, 1, "ICAO"],
["7.62x51mm Subsonic", 320, 100, 0.3059680, -0.00049899, 3.81, 0, 2, 10, 120, 0, 0, 12.96, 7.82, 25.40, 0.235, 7, "ICAO"],
-
+
["6.5x39mm" , 800, 100, 0.0683482, -0.00075308, 3.81, 0, 2, 10, 120, 0, 0, 7.970, 6.71, 22.86, 0.263, 7, "ICAO"],
["6.5x47mm Lapua" , 800, 100, 0.0682221, -0.00067037, 3.81, 0, 2, 10, 120, 0, 0, 9.007, 6.71, 22.86, 0.290, 7, "ICAO"],
["6.5mm Creedmor" , 840, 100, 0.0636501, -0.00060887, 3.81, 0, 2, 10, 120, 0, 0, 9.072, 6.71, 22.86, 0.317, 7, "ICAO"],
-
+
["5.56x45mm M855" , 870, 100, 0.0626386, -0.00126466, 3.81, 0, 2, 10, 120, 0, 0, 4.018, 5.70, 17.78, 0.151, 7, "ASM" ],
["5.56x45mm Mk262" , 820, 100, 0.0671481, -0.00109563, 3.81, 0, 2, 10, 120, 0, 0, 4.990, 5.70, 17.78, 0.361, 1, "ASM" ],
["5.56x45mm Mk318" , 880, 100, 0.0615937, -0.00123318, 3.81, 0, 2, 10, 120, 0, 0, 4.018, 5.70, 17.78, 0.307, 1, "ASM" ],
["5.56x45mm M995" , 869, 100, 0.0626713, -0.00123272, 3.81, 0, 2, 10, 120, 0, 0, 4.536, 5.70, 17.78, 0.310, 1, "ASM" ]];
-
+
[] call FUNC(clear_user_data);
profileNamespace setVariable ["ACE_ATragMX_gunList", GVAR(gunList)];
};
@@ -49,4 +49,4 @@ if ((profileNamespace getVariable ["ACE_ATragMX_profileNamespaceVersion", 0]) ==
[] call FUNC(init);
[] call FUNC(restore_user_data);
-["RangerfinderData", {_this call FUNC(sord)}] call EFUNC(common,addEventHandler);
+[QEGVAR(vector,rangefinderData), {_this call FUNC(sord)}] call CBA_fnc_addEventHandler;
diff --git a/addons/atragmx/XEH_preInit.sqf b/addons/atragmx/XEH_preInit.sqf
index 0277de1c14..a7feade1c3 100644
--- a/addons/atragmx/XEH_preInit.sqf
+++ b/addons/atragmx/XEH_preInit.sqf
@@ -2,71 +2,6 @@
ADDON = false;
-PREP(add_new_gun);
-PREP(calculate_range_card);
-PREP(calculate_solution);
-PREP(calculate_target_range_assist);
-PREP(calculate_target_solution);
-PREP(calculate_target_speed_assist);
-PREP(can_show);
-PREP(change_gun);
-PREP(change_target_slot);
-PREP(clear_user_data);
-PREP(create_dialog);
-PREP(cycle_gun_list);
-PREP(cycle_image_size_units);
-PREP(cycle_num_ticks_units);
-PREP(cycle_range_card_columns);
-PREP(cycle_scope_unit);
-PREP(cycle_target_size_units);
-PREP(cycle_target_speed_direction);
-PREP(delete_gun);
-PREP(init);
-PREP(parse_input);
-PREP(reset_relative_click_memory);
-PREP(restore_atmo_default);
-PREP(restore_user_data);
-PREP(save_gun);
-PREP(show_add_new_gun);
-PREP(show_atmo_env_data);
-PREP(show_gun_ammo_data);
-PREP(show_gun_list);
-PREP(show_main_page);
-PREP(show_range_card);
-PREP(show_range_card_setup);
-PREP(show_solution_setup);
-PREP(show_target_data);
-PREP(show_target_range_assist);
-PREP(show_target_speed_assist);
-PREP(show_target_speed_assist_timer);
-PREP(sord);
-PREP(store_user_data);
-PREP(target_speed_assist_timer);
-PREP(toggle_atmo_env_data);
-PREP(toggle_gun_ammo_data);
-PREP(toggle_gun_list);
-PREP(toggle_range_card);
-PREP(toggle_range_card_setup);
-PREP(toggle_solution_setup);
-PREP(toggle_target_data);
-PREP(toggle_target_range_assist);
-PREP(toggle_target_speed_assist);
-PREP(update_atmosphere);
-PREP(update_atmo_env_data);
-PREP(update_atmo_selection);
-PREP(update_gun);
-PREP(update_gun_ammo_data);
-PREP(update_inclination_angle);
-PREP(update_range_card);
-PREP(update_relative_click_memory);
-PREP(update_result);
-PREP(update_scope_unit);
-PREP(update_solution_setup);
-PREP(update_target);
-PREP(update_target_data);
-PREP(update_target_selection);
-PREP(update_unit_selection);
-PREP(update_zero_range);
-PREP(on_close_dialog);
+#include "XEH_PREP.hpp"
ADDON = true;
diff --git a/addons/atragmx/XEH_preStart.sqf b/addons/atragmx/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/atragmx/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/atragmx/config.cpp b/addons/atragmx/config.cpp
index 3abe32ba34..4bbde93706 100644
--- a/addons/atragmx/config.cpp
+++ b/addons/atragmx/config.cpp
@@ -6,7 +6,9 @@ class CfgPatches {
weapons[] = {"ACE_ATragMX"};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ACE_common", "ACE_weather"};
- author = "Ruthberg";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"Ruthberg"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
@@ -14,4 +16,8 @@ class CfgPatches {
#include "CfgEventHandlers.hpp"
#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"
-#include "RscTitles.hpp"
\ No newline at end of file
+#include "RscTitles.hpp"
+
+class ACE_newEvents {
+ RangerfinderData = QEGVAR(vector,rangefinderData);
+};
diff --git a/addons/atragmx/functions/fnc_calculate_solution.sqf b/addons/atragmx/functions/fnc_calculate_solution.sqf
index 869ce8d098..e71658f490 100644
--- a/addons/atragmx/functions/fnc_calculate_solution.sqf
+++ b/addons/atragmx/functions/fnc_calculate_solution.sqf
@@ -42,31 +42,14 @@
* Public: No
*/
#include "script_component.hpp"
-
-private ["_scopeBaseAngle", "_bulletMass", "_boreHeight", "_airFriction", "_muzzleVelocity", "_temperature", "_barometricPressure", "_relativeHumidity", "_simSteps", "_windSpeed1", "_windSpeed2", "_windDirection", "_inclinationAngle", "_targetSpeed", "_targetRange", "_drag", "_bc", "_dragModel", "_atmosphereModel", "_storeRangeCardData", "_stabilityFactor", "_twistDirection", "_latitude", "_directionOfFire"];
-_scopeBaseAngle = _this select 0;
-_bulletMass = _this select 1;
-_boreHeight = _this select 2;
-_airFriction = _this select 3;
-_muzzleVelocity = _this select 4;
-_temperature = _this select 5;
-_barometricPressure = _this select 6;
-_relativeHumidity = _this select 7;
-_simSteps = _this select 8;
-_windSpeed1 = (_this select 9) select 0;
-_windSpeed2 = (_this select 9) select 1;
-_windDirection = _this select 10;
-_inclinationAngle = _this select 11;
-_targetSpeed = _this select 12;
-_targetRange = _this select 13;
-_bc = _this select 14;
-_dragModel = _this select 15;
-_atmosphereModel = _this select 16;
-_storeRangeCardData = _this select 17;
-_stabilityFactor = _this select 18;
-_twistDirection = _this select 19;
-_latitude = _this select 20;
-_directionOfFire = _this select 21;
+params [
+ "_scopeBaseAngle", "_bulletMass", "_boreHeight", "_airFriction", "_muzzleVelocity",
+ "_temperature", "_barometricPressure", "_relativeHumidity", "_simSteps", "_windSpeed",
+ "_windDirection", "_inclinationAngle", "_targetSpeed", "_targetRange", "_bc", "_dragModel",
+ "_atmosphereModel", "_storeRangeCardData", "_stabilityFactor", "_twistDirection", "_latitude",
+ "_directionOfFire"
+];
+_windSpeed params ["_windSpeed1", "_windSpeed2"];
private ["_bulletPos", "_bulletVelocity", "_bulletAccel", "_bulletSpeed", "_gravity", "_deltaT"];
_bulletPos = [0, 0, 0];
@@ -133,7 +116,7 @@ _bulletVelocity set [2, Sin(_scopeBaseAngle) * _muzzleVelocity];
while {_TOF < 15 && (_bulletPos select 1) < _targetRange} do {
_bulletSpeed = vectorMagnitude _bulletVelocity;
-
+
_speedTotal = _speedTotal + _bulletSpeed;
_stepsTotal = _stepsTotal + 1;
_speedAverage = (_speedTotal / _stepsTotal);
@@ -142,7 +125,7 @@ while {_TOF < 15 && (_bulletPos select 1) < _targetRange} do {
_trueSpeed = vectorMagnitude _trueVelocity;
if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then {
- _drag = if (missionNamespace getVariable [QEGVAR(advanced_ballistics,extensionAvailable), false]) then {
+ private _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))
@@ -173,7 +156,7 @@ while {_TOF < 15 && (_bulletPos select 1) < _targetRange} do {
};
_kineticEnergy = 0.5 * (_bulletMass / 1000 * (_bulletSpeed ^ 2));
_kineticEnergy = _kineticEnergy * 0.737562149;
-
+
if ((missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) && (_bulletPos select 1) > 0) then {
// Coriolis
_horizontalDeflection = 0.0000729 * ((_bulletPos select 1) ^ 2) * sin(_latitude) / _speedAverage;
@@ -190,7 +173,7 @@ while {_TOF < 15 && (_bulletPos select 1) < _targetRange} do {
_windage1 = _windage1 + _spinDrift;
_windage2 = _windage2 + _spinDrift;
};
-
+
GVAR(rangeCardData) set [_n, [_range, _elevation * 60, [_windage1 * 60, _windage2 * 60], _lead, _TOF, _bulletSpeed, _kineticEnergy]];
_n = _n + 1;
};
diff --git a/addons/atragmx/functions/fnc_change_gun.sqf b/addons/atragmx/functions/fnc_change_gun.sqf
index 7c5abac47e..8fe89dc4fe 100644
--- a/addons/atragmx/functions/fnc_change_gun.sqf
+++ b/addons/atragmx/functions/fnc_change_gun.sqf
@@ -17,10 +17,7 @@
*/
#include "script_component.hpp"
-private ["_gunID", "_restoreMemory", "_updateDisplay"];
-_gunID = _this select 0;
-_restoreMemory = _this select 1;
-_updateDisplay = _this select 2;
+params ["_gunID", "_restoreMemory", "_updateDisplay"];
if (_gunID < 0 || _gunID > (count GVAR(gunList)) - 1) exitWith {};
diff --git a/addons/atragmx/functions/fnc_create_dialog.sqf b/addons/atragmx/functions/fnc_create_dialog.sqf
index 07b93eb2da..a9912ccd34 100644
--- a/addons/atragmx/functions/fnc_create_dialog.sqf
+++ b/addons/atragmx/functions/fnc_create_dialog.sqf
@@ -39,7 +39,7 @@ if (GVAR(showRangeCard)) then {
};
GVAR(showRangeCardSetup) call FUNC(show_range_card_setup);
GVAR(showSolutionSetup) call FUNC(show_solution_setup);
-GVAR(showTargetData) call FUNC(show_target_data);
+GVAR(showTargetData) call FUNC(show_target_data);
GVAR(showTargetRangeAssist) call FUNC(show_target_range_assist);
GVAR(showTargetSpeedAssist) call FUNC(show_target_speed_assist);
GVAR(showTargetSpeedAssistTimer) call FUNC(show_target_speed_assist_timer);
@@ -56,7 +56,7 @@ GVAR(DialogPFH) = [{
if (!GVAR(active)) exitWith {
[_this select 1] call CBA_fnc_removePerFrameHandler;
};
- __ctrlBackground ctrlSetText format [QUOTE(PATHTOF(UI\ATRAG_%1.paa)), ["N", "D"] select (call EFUNC(common,ambientBrightness))];
+ __ctrlBackground ctrlSetText format [QPATHTOF(UI\ATRAG_%1.paa), ["N", "D"] select (call EFUNC(common,ambientBrightness))];
}, 60, []] call CBA_fnc_addPerFrameHandler;
true
diff --git a/addons/atragmx/functions/fnc_on_close_dialog.sqf b/addons/atragmx/functions/fnc_on_close_dialog.sqf
index 1f254c646a..fca60574a9 100644
--- a/addons/atragmx/functions/fnc_on_close_dialog.sqf
+++ b/addons/atragmx/functions/fnc_on_close_dialog.sqf
@@ -1,5 +1,5 @@
-#include "script_component.hpp"
-
-uiNamespace setVariable ['ATragMX_Display', nil];
-GVAR(active) = false;
+#include "script_component.hpp"
+
+uiNamespace setVariable ['ATragMX_Display', nil];
+GVAR(active) = false;
[GVAR(DialogPFH)] call CBA_fnc_removePerFrameHandler;
\ No newline at end of file
diff --git a/addons/atragmx/functions/fnc_show_gun_list.sqf b/addons/atragmx/functions/fnc_show_gun_list.sqf
index 5e1cdfa453..a3c45a977d 100644
--- a/addons/atragmx/functions/fnc_show_gun_list.sqf
+++ b/addons/atragmx/functions/fnc_show_gun_list.sqf
@@ -21,6 +21,5 @@ GVAR(showGunList) = _this;
if (_this) then {
ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 6002);
-
lbSetCurSel [6000, GVAR(currentGun)];
};
diff --git a/addons/atragmx/functions/fnc_show_range_card_setup.sqf b/addons/atragmx/functions/fnc_show_range_card_setup.sqf
index 3d44c14b53..b3457793b9 100644
--- a/addons/atragmx/functions/fnc_show_range_card_setup.sqf
+++ b/addons/atragmx/functions/fnc_show_range_card_setup.sqf
@@ -21,7 +21,7 @@ GVAR(showRangeCardSetup) = _this;
if (_this) then {
ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 10006);
-
+
ctrlSetText [10003, Str(Round(GVAR(rangeCardStartRange)))];
ctrlSetText [10004, Str(Round(GVAR(rangeCardEndRange)))];
ctrlSetText [10005, Str(Round(GVAR(rangeCardIncrement)))];
diff --git a/addons/atragmx/functions/fnc_show_target_range_assist.sqf b/addons/atragmx/functions/fnc_show_target_range_assist.sqf
index 4f46932a0b..ec61edd1f4 100644
--- a/addons/atragmx/functions/fnc_show_target_range_assist.sqf
+++ b/addons/atragmx/functions/fnc_show_target_range_assist.sqf
@@ -21,7 +21,6 @@ GVAR(showTargetRangeAssist) = _this;
if (_this) then {
ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 7018);
-
ctrlSetText [7012, Str(parseNumber(ctrlText 320))];
ctrlSetText [7013, Str(parseNumber(ctrlText 340))];
@@ -30,4 +29,4 @@ if (_this) then {
} else {
ctrlSetText [7016, "Meters"];
};
-};
\ No newline at end of file
+};
diff --git a/addons/atragmx/functions/fnc_show_target_speed_assist.sqf b/addons/atragmx/functions/fnc_show_target_speed_assist.sqf
index 2e66b5ea7b..b3cf1b4393 100644
--- a/addons/atragmx/functions/fnc_show_target_speed_assist.sqf
+++ b/addons/atragmx/functions/fnc_show_target_speed_assist.sqf
@@ -21,7 +21,7 @@ GVAR(showTargetSpeedAssist) = _this;
if (_this) then {
ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 8012);
-
+
ctrlSetText [8004, Str(Round((GVAR(targetRange) select GVAR(currentTarget))))];
if (GVAR(currentUnit) == 1) then {
@@ -29,7 +29,7 @@ if (_this) then {
} else {
ctrlSetText [8008, "Meters"];
};
-
+
if (GVAR(currentUnit) == 2) then {
ctrlSetText [8011, "m/s"];
} else {
diff --git a/addons/atragmx/functions/fnc_sord.sqf b/addons/atragmx/functions/fnc_sord.sqf
index a433153c0e..b342072018 100644
--- a/addons/atragmx/functions/fnc_sord.sqf
+++ b/addons/atragmx/functions/fnc_sord.sqf
@@ -17,10 +17,7 @@
*/
#include "script_component.hpp"
-private ["_slopeDistance", "_azimuth", "_inclination"];
-_slopeDistance = _this select 0;
-_azimuth = _this select 1;
-_inclination = _this select 2;
+params ["_slopeDistance", "_azimuth", "_inclination"];
GVAR(inclinationAngle) set [GVAR(currentTarget), round(_inclination)];
GVAR(directionOfFire) set [GVAR(currentTarget), round(_azimuth)];
diff --git a/addons/atragmx/functions/fnc_target_speed_assist_timer.sqf b/addons/atragmx/functions/fnc_target_speed_assist_timer.sqf
index 0f42f9637c..692de386af 100644
--- a/addons/atragmx/functions/fnc_target_speed_assist_timer.sqf
+++ b/addons/atragmx/functions/fnc_target_speed_assist_timer.sqf
@@ -21,26 +21,26 @@ if !(ctrlVisible 9000) then {
true call FUNC(show_target_speed_assist_timer);
ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 9002);
-
+
[{
private ["_args", "_startTime"];
_args = _this select 0;
_startTime = _args select 0;
-
+
if (!(GVAR(speedAssistTimer))) exitWith {
GVAR(speedAssistTimer) = true;
-
- ctrlSetText [8006, Str(Round((ACE_time - _startTime) * 10) / 10)];
+
+ ctrlSetText [8006, Str(Round((CBA_missionTime - _startTime) * 10) / 10)];
[] call FUNC(calculate_target_speed_assist);
false call FUNC(show_target_speed_assist_timer);
true call FUNC(show_target_speed_assist);
-
+
[_this select 1] call CBA_fnc_removePerFrameHandler;
};
-
- ctrlSetText [9001, Str(Round((ACE_time - _startTime) * 10) / 10)];
-
- }, 0.1, [ACE_time]] call CBA_fnc_addPerFrameHandler;
+
+ ctrlSetText [9001, Str(Round((CBA_missionTime - _startTime) * 10) / 10)];
+
+ }, 0.1, [CBA_missionTime]] call CBA_fnc_addPerFrameHandler;
};
diff --git a/addons/atragmx/functions/fnc_toggle_atmo_env_data.sqf b/addons/atragmx/functions/fnc_toggle_atmo_env_data.sqf
index ce761c2216..87e973c7c0 100644
--- a/addons/atragmx/functions/fnc_toggle_atmo_env_data.sqf
+++ b/addons/atragmx/functions/fnc_toggle_atmo_env_data.sqf
@@ -18,7 +18,7 @@
if (ctrlVisible 13000) then {
false call FUNC(show_atmo_env_data);
true call FUNC(show_main_page);
-
+
if (_this == 1) then {
call FUNC(calculate_target_solution);
};
diff --git a/addons/atragmx/functions/fnc_toggle_gun_ammo_data.sqf b/addons/atragmx/functions/fnc_toggle_gun_ammo_data.sqf
index 0fd4b913b8..f3eb814da7 100644
--- a/addons/atragmx/functions/fnc_toggle_gun_ammo_data.sqf
+++ b/addons/atragmx/functions/fnc_toggle_gun_ammo_data.sqf
@@ -18,7 +18,7 @@
if (ctrlVisible 12000) then {
false call FUNC(show_gun_ammo_data);
true call FUNC(show_main_page);
-
+
if (_this == 1) then {
call FUNC(update_zero_range);
call FUNC(calculate_target_solution);
diff --git a/addons/atragmx/functions/fnc_toggle_gun_list.sqf b/addons/atragmx/functions/fnc_toggle_gun_list.sqf
index 1cc1f9338b..e5dbf54bd5 100644
--- a/addons/atragmx/functions/fnc_toggle_gun_list.sqf
+++ b/addons/atragmx/functions/fnc_toggle_gun_list.sqf
@@ -18,7 +18,7 @@
if (ctrlVisible 6000) then {
false call FUNC(show_gun_list);
true call FUNC(show_main_page);
-
+
if (_this) then {
[lbCurSel 6000, true, true] call FUNC(change_gun);
};
diff --git a/addons/atragmx/functions/fnc_toggle_range_card.sqf b/addons/atragmx/functions/fnc_toggle_range_card.sqf
index 059bc7e40b..7d8b7a0239 100644
--- a/addons/atragmx/functions/fnc_toggle_range_card.sqf
+++ b/addons/atragmx/functions/fnc_toggle_range_card.sqf
@@ -21,9 +21,9 @@ if (ctrlVisible 5006) then {
} else {
false call FUNC(show_main_page);
true call FUNC(show_range_card);
-
+
ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 5001);
-
+
[] call FUNC(calculate_range_card);
[] call FUNC(update_range_card);
};
diff --git a/addons/atragmx/functions/fnc_toggle_range_card_setup.sqf b/addons/atragmx/functions/fnc_toggle_range_card_setup.sqf
index 738a154d17..96c31459b2 100644
--- a/addons/atragmx/functions/fnc_toggle_range_card_setup.sqf
+++ b/addons/atragmx/functions/fnc_toggle_range_card_setup.sqf
@@ -18,12 +18,12 @@
if (ctrlVisible 10000) then {
false call FUNC(show_range_card_setup);
true call FUNC(show_range_card);
-
+
if (_this == 1) then {
GVAR(rangeCardStartRange) = 0 max Round(parseNumber(ctrlText 10003)) min 3000;
GVAR(rangeCardEndRange) = 0 max Round(parseNumber(ctrlText 10004)) min 3000;
GVAR(rangeCardIncrement) = 1 max Round(parseNumber(ctrlText 10005)) min 3000;
-
+
[] call FUNC(calculate_range_card);
[] call FUNC(update_range_card);
};
diff --git a/addons/atragmx/functions/fnc_toggle_solution_setup.sqf b/addons/atragmx/functions/fnc_toggle_solution_setup.sqf
index 0e9f702383..5372b205d0 100644
--- a/addons/atragmx/functions/fnc_toggle_solution_setup.sqf
+++ b/addons/atragmx/functions/fnc_toggle_solution_setup.sqf
@@ -18,7 +18,7 @@
if (ctrlVisible 15000) then {
false call FUNC(show_solution_setup);
true call FUNC(show_main_page);
-
+
if (_this == 1) then {
GVAR(currentScopeClickUnit) = GVAR(currentScopeClickUnitTemp);
GVAR(currentScopeClickNumber) = GVAR(currentScopeClickNumberTemp);
@@ -30,9 +30,9 @@ if (ctrlVisible 15000) then {
} else {
true call FUNC(show_solution_setup);
false call FUNC(show_main_page);
-
+
GVAR(currentScopeClickUnitTemp) = GVAR(currentScopeClickUnit);
GVAR(currentScopeClickNumberTemp) = GVAR(currentScopeClickNumber);
-
+
[] call FUNC(update_solution_setup);
};
diff --git a/addons/atragmx/functions/fnc_toggle_target_data.sqf b/addons/atragmx/functions/fnc_toggle_target_data.sqf
index 90fefbf37e..2cfa2f8df5 100644
--- a/addons/atragmx/functions/fnc_toggle_target_data.sqf
+++ b/addons/atragmx/functions/fnc_toggle_target_data.sqf
@@ -18,7 +18,7 @@
if (ctrlVisible 14000) then {
false call FUNC(show_target_data);
true call FUNC(show_main_page);
-
+
if (_this == 1) then {
call FUNC(calculate_target_solution);
};
diff --git a/addons/atragmx/functions/fnc_toggle_target_range_assist.sqf b/addons/atragmx/functions/fnc_toggle_target_range_assist.sqf
index d13ef4fb2e..83d2daa95f 100644
--- a/addons/atragmx/functions/fnc_toggle_target_range_assist.sqf
+++ b/addons/atragmx/functions/fnc_toggle_target_range_assist.sqf
@@ -18,7 +18,7 @@
if (ctrlVisible 7000) then {
false call FUNC(show_target_range_assist);
true call FUNC(show_main_page);
-
+
if (_this == 1) then {
ctrlSetText [320, Str(parseNumber(ctrlText 7012))];
ctrlSetText [140040, Str(parseNumber(ctrlText 7012))];
diff --git a/addons/atragmx/functions/fnc_toggle_target_speed_assist.sqf b/addons/atragmx/functions/fnc_toggle_target_speed_assist.sqf
index 5b88a6cfce..4d1680d195 100644
--- a/addons/atragmx/functions/fnc_toggle_target_speed_assist.sqf
+++ b/addons/atragmx/functions/fnc_toggle_target_speed_assist.sqf
@@ -18,7 +18,7 @@
if (ctrlVisible 8000) then {
false call FUNC(show_target_speed_assist);
true call FUNC(show_main_page);
-
+
if (_this == 1) then {
[] call FUNC(calculate_target_speed_assist);
private ["_targetSpeed"];
diff --git a/addons/atragmx/functions/fnc_update_range_card.sqf b/addons/atragmx/functions/fnc_update_range_card.sqf
index d084754959..e8c910ca74 100644
--- a/addons/atragmx/functions/fnc_update_range_card.sqf
+++ b/addons/atragmx/functions/fnc_update_range_card.sqf
@@ -43,7 +43,7 @@ _speedOfSound = GVAR(temperature) call EFUNC(weather,calculateSpeedOfSound);
_TOF = _x select 4;
_velocity = _x select 5;
_kineticEnergy = _x select 6;
-
+
switch (GVAR(currentScopeUnit)) do {
case 0: {
_elevation = _elevation / 3.38;
@@ -63,25 +63,25 @@ _speedOfSound = GVAR(temperature) call EFUNC(weather,calculateSpeedOfSound);
};
_clickNumber = GVAR(workingMemory) select 8;
_clickInterval = _clickSize / _clickNumber;
-
+
_elevation = Round(_elevation / _clickInterval);
_windage1 = Round(_windage1 / _clickInterval);
_windage2 = Round(_windage2 / _clickInterval);
};
};
-
+
_elevationOutput = Str(Round(_elevation * 100) / 100);
_windageOutput = Str(Round(_windage1 * 100) / 100);
-
+
_rangeOutput = Str(_range);
if (_velocity < _speedOfSound) then {
_rangeOutput = _rangeOutput + "*";
};
-
+
if (GVAR(currentUnit) == 1) then {
_velocity = _velocity * 3.2808399;
};
-
+
switch (GVAR(rangeCardCurrentColumn)) do {
case 0: {
if (GVAR(showWind2)) then {
@@ -100,6 +100,6 @@ _speedOfSound = GVAR(temperature) call EFUNC(weather,calculateSpeedOfSound);
_lastColumnOutput = Str(Round(_TOF * 100) / 100);
}
};
-
+
lnbAddRow [5007, [_rangeOutput, _elevationOutput, _windageOutput, _lastColumnOutput]];
} forEach GVAR(rangeCardData);
diff --git a/addons/atragmx/functions/fnc_update_result.sqf b/addons/atragmx/functions/fnc_update_result.sqf
index bb708efaab..2b6ca29e23 100644
--- a/addons/atragmx/functions/fnc_update_result.sqf
+++ b/addons/atragmx/functions/fnc_update_result.sqf
@@ -33,24 +33,24 @@ switch (GVAR(currentScopeUnit)) do {
case 0: {
_elevationAbs = _elevationAbs / 3.38;
_windageAbs = _windageAbs / 3.38;
-
+
_wind2 = _wind2 / 3.38;
-
+
_elevationRel = _elevationRel / 3.38;
_windageRel = _windageRel / 3.38;
-
+
_elevationCur = _elevationCur / 3.38;
_windageCur = _windageCur / 3.38;
};
case 2: {
_elevationAbs = _elevationAbs * 1.047;
_windageAbs = _windageAbs * 1.047;
-
+
_wind2 = _wind2 / 1.047;
-
+
_elevationRel = _elevationRel * 1.047;
_windageRel = _windageRel * 1.047;
-
+
_elevationCur = _elevationCur * 1.047;
_windageCur = _windageCur * 1.047;
};
@@ -62,15 +62,15 @@ switch (GVAR(currentScopeUnit)) do {
};
_clickNumber = GVAR(workingMemory) select 8;
_clickInterval = _clickSize / _clickNumber;
-
+
_elevationAbs = Round(_elevationAbs / _clickInterval);
_windageAbs = Round(_windageAbs / _clickInterval);
-
+
_wind2 = Round(_wind2 / _clickInterval);
-
+
_elevationRel = Round(_elevationRel / _clickInterval);
_windageRel = Round(_windageRel / _clickInterval);
-
+
_elevationCur = Round(_elevationCur / _clickInterval);
_windageCur = Round(_windageCur / _clickInterval);
};
@@ -166,4 +166,4 @@ if (GVAR(showWind2)) then {
} else {
ctrlSetText [420, "0.0"];
};
-};
\ No newline at end of file
+};
diff --git a/addons/atragmx/initKeybinds.sqf b/addons/atragmx/initKeybinds.sqf
index 51d2338292..94704e8132 100644
--- a/addons/atragmx/initKeybinds.sqf
+++ b/addons/atragmx/initKeybinds.sqf
@@ -33,4 +33,4 @@ _closeCode = {
closeDialog 0;
};
};
-[(localize LSTRING(Name)), QUOTE(PATHTOF(UI\ATRAG_Icon.paa)), _conditonCode, _toggleCode, _closeCode] call EFUNC(common,deviceKeyRegisterNew);
+[(localize LSTRING(Name)), QPATHTOF(UI\ATRAG_Icon.paa), _conditonCode, _toggleCode, _closeCode] call EFUNC(common,deviceKeyRegisterNew);
diff --git a/addons/atragmx/stringtable.xml b/addons/atragmx/stringtable.xml
index a8e23ffbda..3790fb1f2d 100644
--- a/addons/atragmx/stringtable.xml
+++ b/addons/atragmx/stringtable.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/addons/attach/CfgEventHandlers.hpp b/addons/attach/CfgEventHandlers.hpp
index c050fbd1c7..73b8553839 100644
--- a/addons/attach/CfgEventHandlers.hpp
+++ b/addons/attach/CfgEventHandlers.hpp
@@ -1,3 +1,10 @@
+
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
diff --git a/addons/attach/CfgMagazines.hpp b/addons/attach/CfgMagazines.hpp
index f85cac82b4..7ba8cebbc5 100644
--- a/addons/attach/CfgMagazines.hpp
+++ b/addons/attach/CfgMagazines.hpp
@@ -3,17 +3,17 @@ class CfgMagazines {
class CA_Magazine;
class B_IR_Grenade: CA_Magazine {
ACE_Attachable = "B_IRStrobe";
- model = QUOTE(PATHTOF(data\ace_IRStrobe.p3d));
+ model = QPATHTOF(data\ace_IRStrobe.p3d);
};
class O_IR_Grenade: B_IR_Grenade {
ACE_Attachable = "O_IRStrobe";
- model = QUOTE(PATHTOF(data\ace_IRStrobe.p3d));
+ model = QPATHTOF(data\ace_IRStrobe.p3d);
};
class I_IR_Grenade: B_IR_Grenade {
ACE_Attachable = "I_IRStrobe";
- model = QUOTE(PATHTOF(data\ace_IRStrobe.p3d));
+ model = QPATHTOF(data\ace_IRStrobe.p3d);
};
class SmokeShell;
diff --git a/addons/attach/CfgVehicles.hpp b/addons/attach/CfgVehicles.hpp
index e462c0cefa..1e0c0f3e71 100644
--- a/addons/attach/CfgVehicles.hpp
+++ b/addons/attach/CfgVehicles.hpp
@@ -9,7 +9,7 @@
exceptions[] = {}; \
showDisabled = 0; \
priority = 0; \
- icon = PATHTOF(UI\attach_ca.paa); \
+ icon = QPATHTOF(UI\attach_ca.paa); \
distance = 4.5; \
}; \
class GVAR(DetachVehicle) { \
@@ -19,7 +19,7 @@
exceptions[] = {}; \
showDisabled = 0; \
priority = 0.1; \
- icon = PATHTOF(UI\detach_ca.paa); \
+ icon = QPATHTOF(UI\detach_ca.paa); \
distance = 4.5; \
}; \
}; \
@@ -60,7 +60,7 @@ class CfgVehicles {
exceptions[] = {"isNotDragging"};
showDisabled = 0;
priority = 5;
- icon = PATHTOF(UI\attach_ca.paa);
+ icon = QPATHTOF(UI\attach_ca.paa);
};
class GVAR(Detach) {
displayName = CSTRING(Detach);
@@ -69,7 +69,7 @@ class CfgVehicles {
exceptions[] = {"isNotDragging"};
showDisabled = 0;
priority = 5;
- icon = PATHTOF(UI\detach_ca.paa);
+ icon = QPATHTOF(UI\detach_ca.paa);
};
};
};
diff --git a/addons/attach/CfgWeapons.hpp b/addons/attach/CfgWeapons.hpp
index dfea64678d..cc50b3be5e 100644
--- a/addons/attach/CfgWeapons.hpp
+++ b/addons/attach/CfgWeapons.hpp
@@ -8,8 +8,8 @@ class CfgWeapons {
scope = 2;
displayName = CSTRING(IrStrobe_Name);
descriptionShort = CSTRING(IrStrobe_Description);
- model = QUOTE(PATHTOF(data\ace_IRStrobe.p3d));
- picture = PATHTOF(UI\irstrobe_item.paa);
+ model = QPATHTOF(data\ace_IRStrobe.p3d);
+ picture = QPATHTOF(UI\irstrobe_item.paa);
class ItemInfo: InventoryItem_Base_F {
mass = 1;
diff --git a/addons/attach/XEH_PREP.hpp b/addons/attach/XEH_PREP.hpp
new file mode 100644
index 0000000000..5dedc2254e
--- /dev/null
+++ b/addons/attach/XEH_PREP.hpp
@@ -0,0 +1,10 @@
+
+PREP(attach);
+PREP(canAttach);
+PREP(canDetach);
+PREP(detach);
+PREP(getChildrenAttachActions);
+PREP(handleGetIn);
+PREP(handleGetOut);
+PREP(handleKilled);
+PREP(placeApprove);
diff --git a/addons/attach/XEH_clientInit.sqf b/addons/attach/XEH_clientInit.sqf
index f7e663c2ae..feb7216e6b 100644
--- a/addons/attach/XEH_clientInit.sqf
+++ b/addons/attach/XEH_clientInit.sqf
@@ -3,4 +3,4 @@
if (!hasInterface) exitWith {};
//If attach placing, stop when opening menu:
-["interactMenuOpened", {GVAR(placeAction) = 0;}] call EFUNC(common,addEventHandler);
+["ace_interactMenuOpened", {GVAR(placeAction) = 0;}] call CBA_fnc_addEventHandler;
diff --git a/addons/attach/XEH_preInit.sqf b/addons/attach/XEH_preInit.sqf
index 17b8490a77..a7feade1c3 100644
--- a/addons/attach/XEH_preInit.sqf
+++ b/addons/attach/XEH_preInit.sqf
@@ -2,14 +2,6 @@
ADDON = false;
-PREP(attach);
-PREP(canAttach);
-PREP(canDetach);
-PREP(detach);
-PREP(getChildrenAttachActions);
-PREP(handleGetIn);
-PREP(handleGetOut);
-PREP(handleKilled);
-PREP(placeApprove);
+#include "XEH_PREP.hpp"
ADDON = true;
diff --git a/addons/attach/XEH_preStart.sqf b/addons/attach/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/attach/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/attach/config.cpp b/addons/attach/config.cpp
index 0ecc37788a..59f733f9ea 100644
--- a/addons/attach/config.cpp
+++ b/addons/attach/config.cpp
@@ -6,8 +6,9 @@ class CfgPatches {
weapons[] = {"ACE_IR_Strobe_Item"};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_interaction"};
- author[] = {"KoffeinFlummi","eRazeri","esteldunedain"};
- authorUrl = "https://github.com/KoffeinFlummi/";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"KoffeinFlummi","eRazeri","esteldunedain"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
@@ -17,3 +18,7 @@ class CfgPatches {
#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"
#include "GUI_VirtualAmmo.hpp"
+
+class ACE_newEvents {
+ interactMenuOpened = "ace_interactMenuOpened";
+};
\ No newline at end of file
diff --git a/addons/attach/functions/fnc_attach.sqf b/addons/attach/functions/fnc_attach.sqf
index 305c3c0960..cf80e74b1c 100644
--- a/addons/attach/functions/fnc_attach.sqf
+++ b/addons/attach/functions/fnc_attach.sqf
@@ -40,7 +40,7 @@ _onAtachText = format [localize LSTRING(Item_Attached), _onAtachText];
if (_unit == _attachToVehicle) then { //Self Attachment
_attachedItem = _itemVehClass createVehicle [0,0,0];
- _attachedItem attachTo [_unit, [-0.05, 0, 0.12], "rightshoulder"];
+ _attachedItem attachTo [_unit, [0.05, -0.09, 0.1], "leftshoulder"];
if (!_silentScripted) then {
_unit removeItem _itemClassname; // Remove item
[_onAtachText] call EFUNC(common,displayTextStructured);
@@ -51,7 +51,7 @@ if (_unit == _attachToVehicle) then { //Self Attachment
[_unit, "forceWalk", "ACE_Attach", true] call EFUNC(common,statusEffect_set);
- [{[localize LSTRING(PlaceAction), ""] call EFUNC(interaction,showMouseHint)}, []] call EFUNC(common,execNextFrame);
+ [{[localize LSTRING(PlaceAction), ""] call EFUNC(interaction,showMouseHint)}, []] call CBA_fnc_execNextFrame;
_unit setVariable [QGVAR(placeActionEH), [_unit, "DefaultAction", {true}, {GVAR(placeAction) = PLACE_APPROVE;}] call EFUNC(common,AddActionEventHandler)];
_actionID = _unit addAction [format ["%1 ", localize LSTRING(CancelAction)], {GVAR(placeAction) = PLACE_CANCEL}];
diff --git a/addons/attach/functions/fnc_detach.sqf b/addons/attach/functions/fnc_detach.sqf
index 05c625b374..0cf5c78082 100644
--- a/addons/attach/functions/fnc_detach.sqf
+++ b/addons/attach/functions/fnc_detach.sqf
@@ -57,7 +57,7 @@ if (toLower _itemName in ["b_ir_grenade", "o_ir_grenade", "i_ir_grenade"]) then
detach _attachedObject;
_attachedObject setPos ((getPos _unit) vectorAdd [0, 0, -1000]);
// Delete attached item after 0.5 seconds
- [{deleteVehicle (_this select 0)}, [_attachedObject], 2] call EFUNC(common,waitAndExecute);
+ [{deleteVehicle (_this select 0)}, [_attachedObject], 2] call CBA_fnc_waitAndExecute;
} else {
// Delete attached item
deleteVehicle _attachedObject;
diff --git a/addons/attach/functions/fnc_getChildrenAttachActions.sqf b/addons/attach/functions/fnc_getChildrenAttachActions.sqf
index aeb75c00d4..9f811197e0 100644
--- a/addons/attach/functions/fnc_getChildrenAttachActions.sqf
+++ b/addons/attach/functions/fnc_getChildrenAttachActions.sqf
@@ -31,7 +31,7 @@ _actions = [];
if (getText (_item >> "ACE_Attachable") != "") then {
_displayName = getText(_item >> "displayName");
_picture = getText(_item >> "picture");
- _action = [_x, _displayName, _picture, {[{_this call FUNC(attach)}, _this] call EFUNC(common,execNextFrame)}, {_this call FUNC(canAttach)}, {}, [_x]] call EFUNC(interact_menu,createAction);
+ _action = [_x, _displayName, _picture, {[{_this call FUNC(attach)}, _this] call CBA_fnc_execNextFrame}, {_this call FUNC(canAttach)}, {}, [_x]] call EFUNC(interact_menu,createAction);
_actions pushBack [_action, [], _target];
};
};
@@ -44,7 +44,7 @@ _actions = [];
if (getText (_item >> "ACE_Attachable") != "") then {
_displayName = getText(_item >> "displayName");
_picture = getText(_item >> "picture");
- _action = [_x, _displayName, _picture, {[{_this call FUNC(attach)}, _this] call EFUNC(common,execNextFrame)}, {_this call FUNC(canAttach)}, {}, [_x]] call EFUNC(interact_menu,createAction);
+ _action = [_x, _displayName, _picture, {[{_this call FUNC(attach)}, _this] call CBA_fnc_execNextFrame}, {_this call FUNC(canAttach)}, {}, [_x]] call EFUNC(interact_menu,createAction);
_actions pushBack [_action, [], _target];
};
};
diff --git a/addons/attach/functions/fnc_handleGetIn.sqf b/addons/attach/functions/fnc_handleGetIn.sqf
index d9f469eee2..dd173c4125 100644
--- a/addons/attach/functions/fnc_handleGetIn.sqf
+++ b/addons/attach/functions/fnc_handleGetIn.sqf
@@ -36,7 +36,7 @@ if (!isNull _xObject) then {
params ["_detachedLight"];
TRACE_1("delayed delete",_detachedLight);
deleteVehicle _detachedLight;
- }, [_xObject], 2] call EFUNC(common,waitAndExecute);
+ }, [_xObject], 2] call CBA_fnc_waitAndExecute;
(_attachedList select 0) set [0, objNull];
};
diff --git a/addons/attach/functions/fnc_handleKilled.sqf b/addons/attach/functions/fnc_handleKilled.sqf
index 06c5473c88..69ab31122b 100644
--- a/addons/attach/functions/fnc_handleKilled.sqf
+++ b/addons/attach/functions/fnc_handleKilled.sqf
@@ -32,7 +32,7 @@ if ((count _attachedList) == 0) exitWith {};
//If it's a vehicle, also delete the attached
if (!(_deadUnit isKindOf "CAManBase")) then {
_xObject setPos ((getPos _deadUnit) vectorAdd [0, 0, -1000]);
- [{deleteVehicle (_this select 0)}, [_xObject], 2] call EFUNC(common,waitAndExecute);
+ [{deleteVehicle (_this select 0)}, [_xObject], 2] call CBA_fnc_waitAndExecute;
};
} forEach _attachedList;
diff --git a/addons/attach/stringtable.xml b/addons/attach/stringtable.xml
index 4ef82229fd..462e3d725c 100644
--- a/addons/attach/stringtable.xml
+++ b/addons/attach/stringtable.xml
@@ -90,7 +90,7 @@
Leuchtstab befestigt
Barra de luz acoplada
Przyczepiono światło chemiczne
- Chemlight attachée
+ Cyalume attachée
Chemické světlo připnuto
Chemlight Fixada
Chemlight attaccata
@@ -102,7 +102,7 @@
Leuchtstab entfernt
Barra de luz quitada
Odczepiono światło chemiczne
- Chemlight détachée
+ Cyalume détachée
Chemické světlo odepnuto
Chemlight Separada
Chemlight staccata
@@ -138,7 +138,7 @@
Das IR-Stroboskop erlaubt es dir deine Position mit einem blinkenden Leuchtfeuer zu signalisieren, welches nur mit Nachtsichtgerät zu erkennen ist.
Stroboskop światła podczerwieni umożliwia oznaczenie swojej pozycji pulsacyjnym światłem widocznym tylko przez optykę noktowizyjną i gogle noktowizyjne.
El Marcador IR permite señalizar su posisición a través de una baliza visible solo a través de dispositivos de visión nocturna.
- La balise IR permet de signaler votre position grace à un clignotement visible par des JVN.
+ La balise IR permet de signaler votre position grâce à un clignotement visible par des JVN.
IR Značkovač je Infračerveně zářící stroboskop umožňující signalizaci vaší pozice díky blikajícímu světlu, které je vidět pouze při užití noktovizoru.
O Marcador IV permite que você sinalize sua posição através de um pulso visível somente com equipamento de visão noturna.
La Strobo IR è una luce stroboscopica che ti permette di segnalare la tua posizione grazie all'emissione di impulsi ad infrarossi visibili solo con i visori notturni.
@@ -206,4 +206,4 @@
%1<br/>отсоединен(-а)
-
\ No newline at end of file
+
diff --git a/addons/backpacks/CfgEventHandlers.hpp b/addons/backpacks/CfgEventHandlers.hpp
index 1aad146690..20cf8f83bf 100644
--- a/addons/backpacks/CfgEventHandlers.hpp
+++ b/addons/backpacks/CfgEventHandlers.hpp
@@ -1,4 +1,10 @@
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
diff --git a/addons/backpacks/XEH_PREP.hpp b/addons/backpacks/XEH_PREP.hpp
new file mode 100644
index 0000000000..8c8a014235
--- /dev/null
+++ b/addons/backpacks/XEH_PREP.hpp
@@ -0,0 +1,4 @@
+
+PREP(backpackOpened);
+PREP(isBackpack);
+PREP(onOpenInventory);
diff --git a/addons/backpacks/XEH_postInit.sqf b/addons/backpacks/XEH_postInit.sqf
index 375fcd5f89..de5ffa4bee 100644
--- a/addons/backpacks/XEH_postInit.sqf
+++ b/addons/backpacks/XEH_postInit.sqf
@@ -1,3 +1,3 @@
#include "script_component.hpp"
-["backpackOpened", {_this call FUNC(backpackOpened)}] call EFUNC(common,addEventHandler);
+["ace_backpackOpened", {_this call FUNC(backpackOpened)}] call CBA_fnc_addEventHandler;
diff --git a/addons/backpacks/XEH_preInit.sqf b/addons/backpacks/XEH_preInit.sqf
index f4c6a1a5d8..a7feade1c3 100644
--- a/addons/backpacks/XEH_preInit.sqf
+++ b/addons/backpacks/XEH_preInit.sqf
@@ -2,8 +2,6 @@
ADDON = false;
-PREP(backpackOpened);
-PREP(isBackpack);
-PREP(onOpenInventory);
+#include "XEH_PREP.hpp"
ADDON = true;
diff --git a/addons/backpacks/XEH_preStart.sqf b/addons/backpacks/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/backpacks/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/backpacks/config.cpp b/addons/backpacks/config.cpp
index ddc7639921..5328a1e4ee 100644
--- a/addons/backpacks/config.cpp
+++ b/addons/backpacks/config.cpp
@@ -6,10 +6,15 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
- author[] = {"bux","commy2"};
- authorUrl = "https://github.com/commy2/";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"bux","commy2"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
#include "CfgEventHandlers.hpp"
+
+class ACE_newEvents {
+ backpackOpened = "ace_backpackOpened";
+};
diff --git a/addons/backpacks/functions/fnc_isBackpack.sqf b/addons/backpacks/functions/fnc_isBackpack.sqf
index d6b0fb1071..aa12b85ad9 100644
--- a/addons/backpacks/functions/fnc_isBackpack.sqf
+++ b/addons/backpacks/functions/fnc_isBackpack.sqf
@@ -12,7 +12,7 @@
*/
#include "script_component.hpp"
-params [["_backpack", objNull, [objNull]]];
+params [["_backpack", objNull, [objNull, ""]]];
if (_backpack isEqualType objNull) then {
_backpack = typeOf _backpack;
diff --git a/addons/backpacks/functions/fnc_onOpenInventory.sqf b/addons/backpacks/functions/fnc_onOpenInventory.sqf
index d9a99535eb..0857f6b7ab 100644
--- a/addons/backpacks/functions/fnc_onOpenInventory.sqf
+++ b/addons/backpacks/functions/fnc_onOpenInventory.sqf
@@ -24,7 +24,7 @@ private _target = objectParent _backpack;
if (isNull _target) exitWith {false};
// raise event on target unit
-["backpackOpened", _target, [_target, _backpack]] call EFUNC(common,targetEvent);
+["ace_backpackOpened", [_target, _backpack], _target] call CBA_fnc_targetEvent;
// return false to open inventory as usual
false
diff --git a/addons/ballistics/CfgAmmo.hpp b/addons/ballistics/CfgAmmo.hpp
index eeb64fec47..0819f8aa4b 100644
--- a/addons/ballistics/CfgAmmo.hpp
+++ b/addons/ballistics/CfgAmmo.hpp
@@ -1,806 +1,806 @@
-
-class CfgAmmo {
- class BulletCore;
-
- class BulletBase: BulletCore {
- timeToLive=6;
- };
-
- class B_556x45_Ball : BulletBase {
- airFriction=-0.00126466;
- hit=8;
- typicalSpeed=750;
- tracerScale = 1;
- tracerStartTime=0.073; // M856 tracer burns out to 800m
- tracerEndTime=1.57123; // Time in seconds calculated with ballistics calculator
- ACE_caliber=5.69;
- ACE_bulletLength=23.012;
- ACE_bulletMass=4.0176;
- 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[]={210.82, 238.76, 269.24, 299.72, 330.2, 360.68, 391.16, 419.1, 449.58, 480.06, 508.0, 609.6};
- };
- class ACE_556x45_Ball_Mk262 : B_556x45_Ball {
- airFriction=-0.00109563;
- caliber=0.8;
- deflecting=18;
- hit=11;
- typicalSpeed=836;
- ACE_caliber=5.69;
- ACE_bulletLength=23.012;
- ACE_bulletMass=4.9896;
- 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[]={190.5, 368.3, 457.2, 508.0};
- };
- class ACE_556x45_Ball_Mk318 : B_556x45_Ball {
- airFriction=-0.00123318;
- caliber=0.8;
- deflecting=18;
- hit=9;
- typicalSpeed=886;
- ACE_caliber=5.69;
- ACE_bulletLength=23.012;
- ACE_bulletMass=4.0176;
- 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[]={254.0, 393.7, 508.0};
- };
- class ACE_556x45_Ball_M995_AP : B_556x45_Ball {
- airFriction=-0.00123272;
- caliber=1.6;
- deflecting=18;
- hit=6;
- typicalSpeed=869;
- ACE_caliber=5.69;
- ACE_bulletLength=23.012;
- ACE_bulletMass=4.5359237;
- 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.310};
- ACE_velocityBoundaries[]={};
- ACE_standardAtmosphere="ASM";
- ACE_dragModel=1;
- ACE_muzzleVelocities[]={820, 865, 880};
- ACE_barrelLengths[]={254.0, 368.3, 508.0};
- };
- 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.00114744;
- caliber=0.6;
- deflecting=18;
- hit=7;
- typicalSpeed=880;
- ACE_caliber=5.588;
- ACE_bulletLength=21.59;
- ACE_bulletMass=3.42792;
- 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="ICAO";
- ACE_dragModel=7;
- ACE_muzzleVelocities[]={780, 880, 920};
- ACE_barrelLengths[]={254.0, 414.02, 508.0};
- };
- class B_556x45_Ball_Tracer_Green;
- class ACE_545x39_Ball_7T3M : B_556x45_Ball_Tracer_Green {
- airFriction=-0.00114744;
- caliber=0.6;
- deflecting=18;
- hit=7;
- typicalSpeed=883;
- tracerStartTime=0.073; // 7T3M tracer burns out to 850m
- tracerEndTime=1.70236; // Time in seconds calculated with ballistics calculator
- ACE_caliber=5.588;
- ACE_bulletLength=21.59;
- ACE_bulletMass=3.22704;
- 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="ICAO";
- ACE_dragModel=7;
- ACE_muzzleVelocities[]={785, 883, 925};
- ACE_barrelLengths[]={254.0, 414.02, 508.0};
- };
- class B_56x15_dual: BulletBase {
- tracerScale = 0.5;
- };
- class B_65x39_Caseless : BulletBase {
- airFriction=-0.00075308;
- typicalSpeed=800;
- tracerScale = 1.1; //1.0;
- ACE_caliber=6.706;
- ACE_bulletLength=32.893;
- ACE_bulletMass=7.9704;
- 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.263};
- ACE_velocityBoundaries[]={};
- ACE_standardAtmosphere="ICAO";
- ACE_dragModel=7;
- ACE_muzzleVelocities[]={730, 760, 788, 800, 810, 830};
- ACE_barrelLengths[]={254.0, 406.4, 508.0, 609.6, 660.4, 762.0};
- };
- class B_65x39_Case_yellow;
- class ACE_65x39_Caseless_Tracer_Dim : B_65x39_Case_yellow {
- nvgOnly = 1;
- };
- class B_65x39_Caseless_green;
- class ACE_65x39_Caseless_green_Tracer_Dim : B_65x39_Caseless_green {
- nvgOnly = 1;
- };
- class ACE_65x47_Ball_Scenar: B_65x39_Caseless {
- airFriction=-0.00067037;
- typicalSpeed=820 ;
- caliber=0.9;
- ACE_caliber=6.706;
- ACE_bulletLength=34.646;
- ACE_bulletMass=9.0072;
- ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19};
- ACE_ballisticCoefficients[]={0.290};
- ACE_velocityBoundaries[]={};
- ACE_standardAtmosphere="ICAO";
- ACE_dragModel=7;
- ACE_muzzleVelocities[]={730, 760, 790, 820, 830};
- ACE_barrelLengths[]={254.0, 406.4, 508.0, 609.6, 660.4};
- };
- class ACE_65_Creedmor_Ball: B_65x39_Caseless {
- airFriction=-0.00060887;
- typicalSpeed=860 ;
- caliber=1.1;
- ACE_caliber=6.706;
- ACE_bulletLength=36.22;
- ACE_bulletMass=9.072;
- ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19};
- ACE_ballisticCoefficients[]={0.317};
- ACE_velocityBoundaries[]={};
- ACE_standardAtmosphere="ICAO";
- ACE_dragModel=7;
- ACE_muzzleVelocities[]={750, 820, 840, 852, 860};
- ACE_barrelLengths[]={254.0, 406.4, 508.0, 609.6, 660.4};
- };
- class SubmunitionBullet;
- class B_65x39_Minigun_Caseless: SubmunitionBullet {
- tracerScale = 1.1; //1.0;
- };
- class B_762x51_Ball : BulletBase {
- airFriction=-0.00100957;
- typicalSpeed=833;
- hit=9;
- tracerScale = 1.2; //0.6;
- tracerStartTime=0.073; // Based on the British L5A1 which burns out to 1000m
- tracerEndTime=2.15957; // Time in seconds calculated with ballistics calculator
- ACE_caliber=7.823;
- ACE_bulletLength=28.956;
- ACE_bulletMass=9.4608;
- 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[]={254.0, 406.4, 508.0, 609.6, 660.4};
- };
- class B_762x51_Tracer_Yellow;
- class ACE_B_762x51_Tracer_Dim: B_762x51_Tracer_Yellow {
- nvgOnly = 1;
- };
- class ACE_762x51_Ball_M118LR : B_762x51_Ball {
- airFriction=-0.00082828;
- caliber=1.8;
- hit=16;
- typicalSpeed=790;
- ACE_caliber=7.823;
- ACE_bulletLength=31.496;
- ACE_bulletMass=11.34;
- ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19};
- ACE_ballisticCoefficients[]={0.243};
- ACE_velocityBoundaries[]={};
- ACE_standardAtmosphere="ICAO";
- ACE_dragModel=7;
- ACE_muzzleVelocities[]={750, 780, 790, 794};
- ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4};
- };
- class ACE_762x51_Ball_Mk316_Mod_0 : B_762x51_Ball {
- airFriction=-0.00082029;
- caliber=1.8;
- hit=16;
- typicalSpeed=790;
- ACE_caliber=7.823;
- ACE_bulletLength=31.496;
- ACE_bulletMass=11.34;
- 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[]={406.4, 508.0, 609.6, 660.4};
- };
- class ACE_762x51_Ball_Mk319_Mod_0 : B_762x51_Ball {
- airFriction=-0.00102338;
- caliber=1.5;
- hit=14;
- typicalSpeed=900;
- ACE_caliber=7.823;
- ACE_bulletLength=31.496;
- ACE_bulletMass=8.424;
- 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[]={330.2, 406.4, 508.0};
- };
- class ACE_762x51_Ball_M993_AP : B_762x51_Ball {
- airFriction=-0.00107148;
- caliber=2.2;
- hit=11;
- typicalSpeed=910;
- ACE_caliber=7.823;
- ACE_bulletLength=31.496;
- ACE_bulletMass=8.22946157;
- 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.359};
- ACE_velocityBoundaries[]={};
- ACE_standardAtmosphere="ICAO";
- ACE_dragModel=1;
- ACE_muzzleVelocities[]={875, 910, 930};
- ACE_barrelLengths[]={330.2, 406.4, 508.0};
- };
- class ACE_762x51_Ball_Subsonic : B_762x51_Ball {
- airFriction=-0.00049899;
- caliber=1;
- hit=6;
- typicalSpeed=320;
- ACE_caliber=7.823;
- ACE_bulletLength=34.036;
- ACE_bulletMass=12.96;
- 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[]={406.4, 508.0, 609.6, 660.4};
- };
- class ACE_30_06_M1_Ball : B_762x51_Ball {
- airFriction=-0.00080900;
- typicalSpeed=800;
- caliber=2.0;
- hit=10;
- ACE_caliber=7.823;
- ACE_bulletLength=30.734;
- ACE_bulletMass=11.2752;
- 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.494};
- ACE_velocityBoundaries[]={};
- ACE_standardAtmosphere="ASM";
- ACE_dragModel=1;
- ACE_muzzleVelocities[]={700, 785, 800, 830, 840};
- ACE_barrelLengths[]={254.0, 406.4, 508.0, 609.6, 660.4};
- };
- class ACE_7_Remington_Magnum_Ball : B_762x51_Ball {
- airFriction=-0.00056738;
- typicalSpeed=820;
- caliber=2.1;
- hit=8;
- ACE_caliber=7.214;
- ACE_bulletLength=38.837;
- ACE_bulletMass=11.664;
- 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.345};
- ACE_velocityBoundaries[]={};
- ACE_standardAtmosphere="ICAO";
- ACE_dragModel=7;
- ACE_muzzleVelocities[]={720, 780, 812, 822, 830};
- ACE_barrelLengths[]={254.0, 406.4, 508.0, 609.6, 660.4};
- };
- class ACE_243_Winchester_Ball : B_762x51_Ball {
- airFriction=-0.00067875;
- typicalSpeed=915;
- caliber=2.3;
- hit=6;
- ACE_caliber=6.172;
- ACE_bulletLength=32.563;
- ACE_bulletMass=11.664;
- 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.278};
- ACE_velocityBoundaries[]={};
- ACE_standardAtmosphere="ICAO";
- ACE_dragModel=7;
- ACE_muzzleVelocities[]={830, 875, 900, 915, 920};
- ACE_barrelLengths[]={254.0, 406.4, 508.0, 609.6, 660.4};
- };
- class ACE_762x67_Ball_Mk248_Mod_0 : B_762x51_Ball {
- airFriction=-0.00070530;
- caliber=1.8;
- hit=17;
- typicalSpeed=900;
- ACE_caliber=7.823;
- ACE_bulletLength=34.366;
- ACE_bulletMass=12.312;
- 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";
- ACE_dragModel=7;
- ACE_muzzleVelocities[]={865, 900, 924};
- ACE_barrelLengths[]={508.0, 609.6, 660.4};
- };
- class ACE_762x67_Ball_Mk248_Mod_1 : B_762x51_Ball {
- airFriction=-0.00061188;
- caliber=1.9;
- hit=18;
- typicalSpeed=867;
- ACE_caliber=7.823;
- ACE_bulletLength=37.821;
- ACE_bulletMass=14.256;
- 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";
- ACE_dragModel=7;
- ACE_muzzleVelocities[]={847, 867, 877};
- ACE_barrelLengths[]={508.0, 609.6, 660.4};
- };
- class ACE_762x67_Ball_Berger_Hybrid_OTM : B_762x51_Ball {
- airFriction=-0.00053733;
- caliber=2.0;
- hit=19;
- typicalSpeed=853;
- ACE_caliber=7.823;
- ACE_bulletLength=40.691;
- ACE_bulletMass=14.904;
- 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[]={};
- ACE_standardAtmosphere="ICAO";
- ACE_dragModel=7;
- ACE_muzzleVelocities[]={800, 853, 884};
- ACE_barrelLengths[]={508.0, 609.6, 660.4};
- };
- class B_762x54_Ball: B_762x51_Ball {
- airFriction=-0.00100023;
- typicalSpeed=820;
- ACE_caliber=7.925;
- ACE_bulletLength=28.956;
- ACE_bulletMass=9.8496;
- 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[]={406.4, 508.0, 609.6, 660.4};
- };
- class ACE_762x54_Ball_7N14 : B_762x51_Ball {
- airFriction=-0.00100023;
- caliber=1.5;
- hit=15;
- typicalSpeed=820;
- ACE_caliber=7.925;
- ACE_bulletLength=28.956;
- ACE_bulletMass=9.8496;
- 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[]={406.4, 508.0, 609.6, 660.4};
- };
- class B_762x54_Tracer_Green;
- class ACE_762x54_Ball_7T2 : B_762x54_Tracer_Green {
- airFriction=-0.00103989;
- caliber=1.5;
- hit=15;
- typicalSpeed=800;
- tracerStartTime=0.073; // Based on the 7T2 which burns three seconds
- tracerEndTime=3;
- ACE_caliber=7.925;
- ACE_bulletLength=28.956;
- ACE_bulletMass=9.6552;
- 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[]={406.4, 508.0, 609.6, 660.4};
- };
- class ACE_762x35_Ball : B_762x51_Ball {
- airFriction=-0.00128942;
- caliber=1.5;
- hit=11;
- typicalSpeed=790;
- ACE_caliber=7.823;
- ACE_bulletLength=29.286;
- ACE_bulletMass=8.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.349, 0.338, 0.330, 0.310};
- ACE_velocityBoundaries[]={792, 610, 488};
- ACE_standardAtmosphere="ICAO";
- ACE_dragModel=1;
- ACE_muzzleVelocities[]={620, 655, 675};
- ACE_barrelLengths[]={228.6, 406.4, 508.0};
- };
- class ACE_762x39_Ball : B_762x51_Ball {
- airFriction=-0.00151621;
- hit=12;
- caliber=1.5;
- typicalSpeed=716;
- ACE_caliber=7.823;
- ACE_bulletLength=28.956;
- ACE_bulletMass=7.9704;
- 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[]={254.0, 414.02, 508.0};
- };
- class ACE_762x39_Ball_57N231P : B_762x54_Tracer_Green {
- airFriction=-0.00151621;
- 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=7.823;
- ACE_bulletLength=28.956;
- ACE_bulletMass=7.5816;
- 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[]={254.0, 414.02, 508.0};
- };
- class B_9x21_Ball : BulletBase {
- airFriction=-0.00226847;
- typicalSpeed=390;
- tracerScale = 0.5;
- hit=6;
- ACE_caliber=9.042;
- ACE_bulletLength=15.494;
- ACE_bulletMass=7.452;
- 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="ICAO";
- ACE_dragModel=1;
- ACE_muzzleVelocities[]={440, 460, 480};
- ACE_barrelLengths[]={101.6, 127.0, 228.6};
- };
- class B_9x21_Ball_Tracer_Green: B_9x21_Ball {
- tracerScale = 0.5;
- };
- class ACE_9x18_Ball_57N181S : B_9x21_Ball {
- hit=5;
- airFriction=-0.00190333;
- typicalSpeed=298;
- ACE_caliber=9.271;
- ACE_bulletLength=15.494;
- ACE_bulletMass=6.00048;
- 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="ICAO";
- ACE_dragModel=1;
- ACE_muzzleVelocities[]={298, 330, 350};
- ACE_barrelLengths[]={96.52, 127.0, 228.6};
- };
- class ACE_9x19_Ball : B_9x21_Ball {
- airFriction=-0.0018577;
- typicalSpeed=370;
- hit=6;
- ACE_caliber=9.017;
- ACE_bulletLength=15.494;
- ACE_bulletMass=8.0352;
- 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[]={101.6, 127.0, 228.6};
- };
- class ACE_10x25_Ball : B_9x21_Ball {
- airFriction=-0.00181928;
- typicalSpeed=425;
- hit=7;
- ACE_caliber=12.7;
- ACE_bulletLength=19.406;
- ACE_bulletMass=10.692;
- 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="ICAO";
- ACE_dragModel=1;
- ACE_muzzleVelocities[]={360, 400, 430};
- ACE_barrelLengths[]={101.6, 117.094, 228.6};
- };
- class ACE_765x17_Ball: B_9x21_Ball {
- airFriction=-0.00163356;
- typicalSpeed=282;
- hit=7;
- ACE_caliber=7.938;
- ACE_bulletLength=15.494;
- ACE_bulletMass=4.212;
- 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[]={101.6, 127.0, 228.6};
- };
- class ACE_303_Ball : ACE_762x51_Ball_M118LR {
- airFriction=-0.0008349;
- typicalSpeed=761;
- caliber=2.0;
- ACE_caliber=7.899;
- ACE_bulletLength=31.166;
- ACE_bulletMass=11.2752;
- 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[]={508.0, 609.6, 660.4};
- };
- class B_93x64_Ball : BulletBase {
- airFriction=-0.00108571;
- typicalSpeed=880;
- ACE_caliber=9.296;
- ACE_bulletLength=34.29;
- ACE_bulletMass=14.904;
- 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[]={};
- ACE_standardAtmosphere="ASM";
- ACE_dragModel=1;
- ACE_muzzleVelocities[]={850, 870, 880};
- ACE_barrelLengths[]={508.0, 620.014, 660.4};
- };
- class B_408_Ball : BulletBase {
- timeToLive=10;
- airFriction=-0.00038944;
- typicalSpeed=910;
- tracerScale = 1.3; //1.2;
- ACE_caliber=10.363;
- ACE_bulletLength=54.0;
- ACE_bulletMass=26.568;
- 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.97};
- ACE_velocityBoundaries[]={};
- ACE_standardAtmosphere="ASM";
- ACE_dragModel=1;
- ACE_muzzleVelocities[]={910};
- ACE_barrelLengths[]={736.6};
- };
- class ACE_106x83mm_Ball : B_408_Ball {
- timeToLive=10;
- airFriction=-0.00052047;
- ACE_caliber=10.566;
- ACE_bulletLength=53.061;
- ACE_bulletMass=25.7904;
- 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.72};
- ACE_velocityBoundaries[]={};
- ACE_standardAtmosphere="ASM";
- ACE_dragModel=1;
- ACE_muzzleVelocities[]={960};
- ACE_barrelLengths[]={736.6};
- };
- class B_338_Ball : BulletBase {
- timeToLive=10;
- airFriction=-0.00059133;
- typicalSpeed=915;
- ACE_caliber=8.585;
- ACE_bulletLength=39.573;
- ACE_bulletMass=16.2;
- ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19};
- ACE_ballisticCoefficients[]={0.322};
- ACE_velocityBoundaries[]={};
- ACE_standardAtmosphere="ICAO";
- ACE_dragModel=7;
- ACE_muzzleVelocities[]={880, 915, 925};
- ACE_barrelLengths[]={508.0, 660.4, 711.2};
- };
- class B_338_NM_Ball : BulletBase {
- airFriction=-0.00052201;
- typicalSpeed=820;
- ACE_caliber=8.585;
- ACE_bulletLength=43.18;
- ACE_bulletMass=19.44;
- 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[]={790, 807, 820};
- ACE_barrelLengths[]={508.0, 609.6, 660.4};
- };
- class ACE_338_Ball : B_338_Ball {
- timeToLive=10;
- airFriction=-0.00052190;
- typicalSpeed=826;
- ACE_caliber=8.585;
- ACE_bulletLength=43.18;
- ACE_bulletMass=19.44;
- 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[]={800, 820, 826, 830};
- ACE_barrelLengths[]={508.0, 609.6, 673.1, 711.2};
- };
- class ACE_338_Ball_API526 : B_338_Ball {
- timeToLive=10;
- airFriction=-0.00069611;
- caliber=2.8;
- typicalSpeed=895;
- ACE_caliber=8.585;
- ACE_bulletLength=38.989;
- ACE_bulletMass=16.3941242;
- 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.560};
- ACE_velocityBoundaries[]={};
- ACE_standardAtmosphere="ICAO";
- ACE_dragModel=1;
- ACE_muzzleVelocities[]={880, 915, 925};
- ACE_barrelLengths[]={508.0, 660.4, 711.2};
- };
- class B_127x33_Ball: BulletBase {
- tracerScale = 1.3; //1.2;
- };
- class B_127x54_Ball : BulletBase {
- airFriction=-0.00019268;
- typicalSpeed=300;
- tracerScale = 1.3;//
- ACE_caliber=12.954;
- ACE_bulletLength=64.516;
- ACE_bulletMass=48.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[]={1.050};
- ACE_velocityBoundaries[]={};
- ACE_standardAtmosphere="ASM";
- ACE_dragModel=1;
- ACE_muzzleVelocities[]={300};
- ACE_barrelLengths[]={436.88};
- };
- class B_127x99_Ball : BulletBase {
- timeToLive=10;
- airFriction=-0.00057503;
- typicalSpeed=900;
- tracerScale = 1.3; //1.2;
- ACE_caliber=12.954;
- ACE_bulletLength=58.674;
- ACE_bulletMass=41.9256;
- 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[]={736.6};
- };
- class ACE_127x99_API : BulletBase {
- timeToLive=10;
- airFriction=-0.00057503;
- typicalSpeed=900;
- tracerScale = 1.3;//
- hit=25;
- caliber=4.0;
- ACE_caliber=12.954;
- ACE_bulletLength=58.674;
- ACE_bulletMass=41.9904;
- 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[]={736.6};
- };
- class ACE_127x99_Ball_AMAX : B_127x99_Ball {
- timeToLive=10;
- airFriction=-0.00036645;
- typicalSpeed=860;
- caliber=3.0;
- ACE_caliber=12.954;
- ACE_bulletLength=64.516;
- ACE_bulletMass=48.6;
- ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19};
- ACE_ballisticCoefficients[]={1.050};
- ACE_velocityBoundaries[]={};
- ACE_standardAtmosphere="ASM";
- ACE_dragModel=1;
- ACE_muzzleVelocities[]={860};
- ACE_barrelLengths[]={736.6};
- };
- class B_127x108_Ball : BulletBase {
- timeToLive=10;
- airFriction=-0.00063800;
- typicalSpeed=820;
- tracerScale = 1.3; //1.5;
- ACE_caliber=12.979;
- ACE_bulletLength=64.008;
- ACE_bulletMass=48.276;
- 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[]={728.98};
- };
- class B_45ACP_Ball : BulletBase {
- airFriction=-0.00081221;
- typicalSpeed=250;
- tracerScale = 0.6;
- ACE_caliber=11.481;
- ACE_bulletLength=17.272;
- ACE_bulletMass=14.904;
- 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[]={101.6, 127.0, 228.6};
- };
- class B_19mm_HE: BulletBase {
- tracerScale = 1;
- };
- class B_30mm_HE: B_19mm_HE {
- tracerScale = 2.5;
- };
- class B_20mm: BulletBase {
- timeToLive=30;
- tracerScale = 1.5; //1;
- };
- class B_25mm: BulletBase {
- timeToLive=30;
- tracerScale = 2.0; //1;
- };
- class B_30mm_AP: BulletBase {
- timeToLive=30;
- tracerScale = 2.5;
- };
- class B_35mm_AA: BulletBase {
- timeToLive=30;
- tracerScale = 2.75; //1.85;
- };
- class ShellBase;
- class Sh_120mm_HE: ShellBase {
- tracerScale = 3;
- };
- class Sh_120mm_APFSDS: ShellBase {
- tracerScale = 3;
- };
- class Gatling_30mm_HE_Plane_CAS_01_F: BulletBase {
- tracerScale = 2.5;
- };
-};
+
+class CfgAmmo {
+ class BulletCore;
+
+ class BulletBase: BulletCore {
+ timeToLive=6;
+ };
+
+ class B_556x45_Ball : BulletBase {
+ airFriction=-0.00126466;
+ hit=8;
+ typicalSpeed=750;
+ tracerScale = 1;
+ tracerStartTime=0.073; // M856 tracer burns out to 800m
+ tracerEndTime=1.57123; // Time in seconds calculated with ballistics calculator
+ ACE_caliber=5.69;
+ ACE_bulletLength=23.012;
+ ACE_bulletMass=4.0176;
+ 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[]={210.82, 238.76, 269.24, 299.72, 330.2, 360.68, 391.16, 419.1, 449.58, 480.06, 508.0, 609.6};
+ };
+ class ACE_556x45_Ball_Mk262 : B_556x45_Ball {
+ airFriction=-0.00109563;
+ caliber=0.8;
+ deflecting=18;
+ hit=11;
+ typicalSpeed=836;
+ ACE_caliber=5.69;
+ ACE_bulletLength=23.012;
+ ACE_bulletMass=4.9896;
+ 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[]={190.5, 368.3, 457.2, 508.0};
+ };
+ class ACE_556x45_Ball_Mk318 : B_556x45_Ball {
+ airFriction=-0.00123318;
+ caliber=0.8;
+ deflecting=18;
+ hit=9;
+ typicalSpeed=886;
+ ACE_caliber=5.69;
+ ACE_bulletLength=23.012;
+ ACE_bulletMass=4.0176;
+ 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[]={254.0, 393.7, 508.0};
+ };
+ class ACE_556x45_Ball_M995_AP : B_556x45_Ball {
+ airFriction=-0.00123272;
+ caliber=1.6;
+ deflecting=18;
+ hit=6;
+ typicalSpeed=869;
+ ACE_caliber=5.69;
+ ACE_bulletLength=23.012;
+ ACE_bulletMass=4.5359237;
+ 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.310};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={820, 865, 880};
+ ACE_barrelLengths[]={254.0, 368.3, 508.0};
+ };
+ 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.00114744;
+ caliber=0.6;
+ deflecting=18;
+ hit=7;
+ typicalSpeed=880;
+ ACE_caliber=5.588;
+ ACE_bulletLength=21.59;
+ ACE_bulletMass=3.42792;
+ 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="ICAO";
+ ACE_dragModel=7;
+ ACE_muzzleVelocities[]={780, 880, 920};
+ ACE_barrelLengths[]={254.0, 414.02, 508.0};
+ };
+ class B_556x45_Ball_Tracer_Green;
+ class ACE_545x39_Ball_7T3M : B_556x45_Ball_Tracer_Green {
+ airFriction=-0.00114744;
+ caliber=0.6;
+ deflecting=18;
+ hit=7;
+ typicalSpeed=883;
+ tracerStartTime=0.073; // 7T3M tracer burns out to 850m
+ tracerEndTime=1.70236; // Time in seconds calculated with ballistics calculator
+ ACE_caliber=5.588;
+ ACE_bulletLength=21.59;
+ ACE_bulletMass=3.22704;
+ 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="ICAO";
+ ACE_dragModel=7;
+ ACE_muzzleVelocities[]={785, 883, 925};
+ ACE_barrelLengths[]={254.0, 414.02, 508.0};
+ };
+ class B_56x15_dual: BulletBase {
+ tracerScale = 0.5;
+ };
+ class B_65x39_Caseless : BulletBase {
+ airFriction=-0.00075308;
+ typicalSpeed=800;
+ tracerScale = 1.1; //1.0;
+ ACE_caliber=6.706;
+ ACE_bulletLength=32.893;
+ ACE_bulletMass=7.9704;
+ 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.263};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ICAO";
+ ACE_dragModel=7;
+ ACE_muzzleVelocities[]={730, 760, 788, 800, 810, 830};
+ ACE_barrelLengths[]={254.0, 406.4, 508.0, 609.6, 660.4, 762.0};
+ };
+ class B_65x39_Case_yellow;
+ class ACE_65x39_Caseless_Tracer_Dim : B_65x39_Case_yellow {
+ nvgOnly = 1;
+ };
+ class B_65x39_Caseless_green;
+ class ACE_65x39_Caseless_green_Tracer_Dim : B_65x39_Caseless_green {
+ nvgOnly = 1;
+ };
+ class ACE_65x47_Ball_Scenar: B_65x39_Caseless {
+ airFriction=-0.00067037;
+ typicalSpeed=820 ;
+ caliber=0.9;
+ ACE_caliber=6.706;
+ ACE_bulletLength=34.646;
+ ACE_bulletMass=9.0072;
+ ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19};
+ ACE_ballisticCoefficients[]={0.290};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ICAO";
+ ACE_dragModel=7;
+ ACE_muzzleVelocities[]={730, 760, 790, 820, 830};
+ ACE_barrelLengths[]={254.0, 406.4, 508.0, 609.6, 660.4};
+ };
+ class ACE_65_Creedmor_Ball: B_65x39_Caseless {
+ airFriction=-0.00060887;
+ typicalSpeed=860 ;
+ caliber=1.1;
+ ACE_caliber=6.706;
+ ACE_bulletLength=36.22;
+ ACE_bulletMass=9.072;
+ ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19};
+ ACE_ballisticCoefficients[]={0.317};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ICAO";
+ ACE_dragModel=7;
+ ACE_muzzleVelocities[]={750, 820, 840, 852, 860};
+ ACE_barrelLengths[]={254.0, 406.4, 508.0, 609.6, 660.4};
+ };
+ class SubmunitionBullet;
+ class B_65x39_Minigun_Caseless: SubmunitionBullet {
+ tracerScale = 1.1; //1.0;
+ };
+ class B_762x51_Ball : BulletBase {
+ airFriction=-0.00100957;
+ typicalSpeed=833;
+ hit=9;
+ tracerScale = 1.2; //0.6;
+ tracerStartTime=0.073; // Based on the British L5A1 which burns out to 1000m
+ tracerEndTime=2.15957; // Time in seconds calculated with ballistics calculator
+ ACE_caliber=7.823;
+ ACE_bulletLength=28.956;
+ ACE_bulletMass=9.4608;
+ 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[]={254.0, 406.4, 508.0, 609.6, 660.4};
+ };
+ class B_762x51_Tracer_Yellow;
+ class ACE_B_762x51_Tracer_Dim: B_762x51_Tracer_Yellow {
+ nvgOnly = 1;
+ };
+ class ACE_762x51_Ball_M118LR : B_762x51_Ball {
+ airFriction=-0.00082828;
+ caliber=1.8;
+ hit=16;
+ typicalSpeed=790;
+ ACE_caliber=7.823;
+ ACE_bulletLength=31.496;
+ ACE_bulletMass=11.34;
+ ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19};
+ ACE_ballisticCoefficients[]={0.243};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ICAO";
+ ACE_dragModel=7;
+ ACE_muzzleVelocities[]={750, 780, 790, 794};
+ ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4};
+ };
+ class ACE_762x51_Ball_Mk316_Mod_0 : B_762x51_Ball {
+ airFriction=-0.00082029;
+ caliber=1.8;
+ hit=16;
+ typicalSpeed=790;
+ ACE_caliber=7.823;
+ ACE_bulletLength=31.496;
+ ACE_bulletMass=11.34;
+ 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[]={406.4, 508.0, 609.6, 660.4};
+ };
+ class ACE_762x51_Ball_Mk319_Mod_0 : B_762x51_Ball {
+ airFriction=-0.00102338;
+ caliber=1.5;
+ hit=14;
+ typicalSpeed=900;
+ ACE_caliber=7.823;
+ ACE_bulletLength=31.496;
+ ACE_bulletMass=8.424;
+ 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[]={330.2, 406.4, 508.0};
+ };
+ class ACE_762x51_Ball_M993_AP : B_762x51_Ball {
+ airFriction=-0.00107148;
+ caliber=2.2;
+ hit=11;
+ typicalSpeed=910;
+ ACE_caliber=7.823;
+ ACE_bulletLength=31.496;
+ ACE_bulletMass=8.22946157;
+ 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.359};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ICAO";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={875, 910, 930};
+ ACE_barrelLengths[]={330.2, 406.4, 508.0};
+ };
+ class ACE_762x51_Ball_Subsonic : B_762x51_Ball {
+ airFriction=-0.00049899;
+ caliber=1;
+ hit=6;
+ typicalSpeed=320;
+ ACE_caliber=7.823;
+ ACE_bulletLength=34.036;
+ ACE_bulletMass=12.96;
+ 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[]={406.4, 508.0, 609.6, 660.4};
+ };
+ class ACE_30_06_M1_Ball : B_762x51_Ball {
+ airFriction=-0.00080900;
+ typicalSpeed=800;
+ caliber=2.0;
+ hit=10;
+ ACE_caliber=7.823;
+ ACE_bulletLength=30.734;
+ ACE_bulletMass=11.2752;
+ 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.494};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={700, 785, 800, 830, 840};
+ ACE_barrelLengths[]={254.0, 406.4, 508.0, 609.6, 660.4};
+ };
+ class ACE_7_Remington_Magnum_Ball : B_762x51_Ball {
+ airFriction=-0.00056738;
+ typicalSpeed=820;
+ caliber=2.1;
+ hit=8;
+ ACE_caliber=7.214;
+ ACE_bulletLength=38.837;
+ ACE_bulletMass=11.664;
+ 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.345};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ICAO";
+ ACE_dragModel=7;
+ ACE_muzzleVelocities[]={720, 780, 812, 822, 830};
+ ACE_barrelLengths[]={254.0, 406.4, 508.0, 609.6, 660.4};
+ };
+ class ACE_243_Winchester_Ball : B_762x51_Ball {
+ airFriction=-0.00067875;
+ typicalSpeed=915;
+ caliber=2.3;
+ hit=6;
+ ACE_caliber=6.172;
+ ACE_bulletLength=32.563;
+ ACE_bulletMass=11.664;
+ 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.278};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ICAO";
+ ACE_dragModel=7;
+ ACE_muzzleVelocities[]={830, 875, 900, 915, 920};
+ ACE_barrelLengths[]={254.0, 406.4, 508.0, 609.6, 660.4};
+ };
+ class ACE_762x67_Ball_Mk248_Mod_0 : B_762x51_Ball {
+ airFriction=-0.00070530;
+ caliber=1.8;
+ hit=17;
+ typicalSpeed=900;
+ ACE_caliber=7.823;
+ ACE_bulletLength=34.366;
+ ACE_bulletMass=12.312;
+ 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";
+ ACE_dragModel=7;
+ ACE_muzzleVelocities[]={865, 900, 924};
+ ACE_barrelLengths[]={508.0, 609.6, 660.4};
+ };
+ class ACE_762x67_Ball_Mk248_Mod_1 : B_762x51_Ball {
+ airFriction=-0.00061188;
+ caliber=1.9;
+ hit=18;
+ typicalSpeed=867;
+ ACE_caliber=7.823;
+ ACE_bulletLength=37.821;
+ ACE_bulletMass=14.256;
+ 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";
+ ACE_dragModel=7;
+ ACE_muzzleVelocities[]={847, 867, 877};
+ ACE_barrelLengths[]={508.0, 609.6, 660.4};
+ };
+ class ACE_762x67_Ball_Berger_Hybrid_OTM : B_762x51_Ball {
+ airFriction=-0.00053733;
+ caliber=2.0;
+ hit=19;
+ typicalSpeed=853;
+ ACE_caliber=7.823;
+ ACE_bulletLength=40.691;
+ ACE_bulletMass=14.904;
+ 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[]={};
+ ACE_standardAtmosphere="ICAO";
+ ACE_dragModel=7;
+ ACE_muzzleVelocities[]={800, 853, 884};
+ ACE_barrelLengths[]={508.0, 609.6, 660.4};
+ };
+ class B_762x54_Ball: B_762x51_Ball {
+ airFriction=-0.00100023;
+ typicalSpeed=820;
+ ACE_caliber=7.925;
+ ACE_bulletLength=28.956;
+ ACE_bulletMass=9.8496;
+ 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[]={406.4, 508.0, 609.6, 660.4};
+ };
+ class ACE_762x54_Ball_7N14 : B_762x51_Ball {
+ airFriction=-0.00100023;
+ caliber=1.5;
+ hit=15;
+ typicalSpeed=820;
+ ACE_caliber=7.925;
+ ACE_bulletLength=28.956;
+ ACE_bulletMass=9.8496;
+ 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[]={406.4, 508.0, 609.6, 660.4};
+ };
+ class B_762x54_Tracer_Green;
+ class ACE_762x54_Ball_7T2 : B_762x54_Tracer_Green {
+ airFriction=-0.00103989;
+ caliber=1.5;
+ hit=15;
+ typicalSpeed=800;
+ tracerStartTime=0.073; // Based on the 7T2 which burns three seconds
+ tracerEndTime=3;
+ ACE_caliber=7.925;
+ ACE_bulletLength=28.956;
+ ACE_bulletMass=9.6552;
+ 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[]={406.4, 508.0, 609.6, 660.4};
+ };
+ class ACE_762x35_Ball : B_762x51_Ball {
+ airFriction=-0.00128942;
+ caliber=1.5;
+ hit=11;
+ typicalSpeed=790;
+ ACE_caliber=7.823;
+ ACE_bulletLength=29.286;
+ ACE_bulletMass=8.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.349, 0.338, 0.330, 0.310};
+ ACE_velocityBoundaries[]={792, 610, 488};
+ ACE_standardAtmosphere="ICAO";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={620, 655, 675};
+ ACE_barrelLengths[]={228.6, 406.4, 508.0};
+ };
+ class ACE_762x39_Ball : B_762x51_Ball {
+ airFriction=-0.00151621;
+ hit=12;
+ caliber=1.5;
+ typicalSpeed=716;
+ ACE_caliber=7.823;
+ ACE_bulletLength=28.956;
+ ACE_bulletMass=7.9704;
+ 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[]={254.0, 414.02, 508.0};
+ };
+ class ACE_762x39_Ball_57N231P : B_762x54_Tracer_Green {
+ airFriction=-0.00151621;
+ 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=7.823;
+ ACE_bulletLength=28.956;
+ ACE_bulletMass=7.5816;
+ 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[]={254.0, 414.02, 508.0};
+ };
+ class B_9x21_Ball : BulletBase {
+ airFriction=-0.00226847;
+ typicalSpeed=390;
+ tracerScale = 0.5;
+ hit=6;
+ ACE_caliber=9.042;
+ ACE_bulletLength=15.494;
+ ACE_bulletMass=7.452;
+ 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="ICAO";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={440, 460, 480};
+ ACE_barrelLengths[]={101.6, 127.0, 228.6};
+ };
+ class B_9x21_Ball_Tracer_Green: B_9x21_Ball {
+ tracerScale = 0.5;
+ };
+ class ACE_9x18_Ball_57N181S : B_9x21_Ball {
+ hit=5;
+ airFriction=-0.00190333;
+ typicalSpeed=298;
+ ACE_caliber=9.271;
+ ACE_bulletLength=15.494;
+ ACE_bulletMass=6.00048;
+ 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="ICAO";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={298, 330, 350};
+ ACE_barrelLengths[]={96.52, 127.0, 228.6};
+ };
+ class ACE_9x19_Ball : B_9x21_Ball {
+ airFriction=-0.0018577;
+ typicalSpeed=370;
+ hit=6;
+ ACE_caliber=9.017;
+ ACE_bulletLength=15.494;
+ ACE_bulletMass=8.0352;
+ 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[]={101.6, 127.0, 228.6};
+ };
+ class ACE_10x25_Ball : B_9x21_Ball {
+ airFriction=-0.00181928;
+ typicalSpeed=425;
+ hit=7;
+ ACE_caliber=12.7;
+ ACE_bulletLength=19.406;
+ ACE_bulletMass=10.692;
+ 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="ICAO";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={360, 400, 430};
+ ACE_barrelLengths[]={101.6, 117.094, 228.6};
+ };
+ class ACE_765x17_Ball: B_9x21_Ball {
+ airFriction=-0.00163356;
+ typicalSpeed=282;
+ hit=7;
+ ACE_caliber=7.938;
+ ACE_bulletLength=15.494;
+ ACE_bulletMass=4.212;
+ 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[]={101.6, 127.0, 228.6};
+ };
+ class ACE_303_Ball : ACE_762x51_Ball_M118LR {
+ airFriction=-0.0008349;
+ typicalSpeed=761;
+ caliber=2.0;
+ ACE_caliber=7.899;
+ ACE_bulletLength=31.166;
+ ACE_bulletMass=11.2752;
+ 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[]={508.0, 609.6, 660.4};
+ };
+ class B_93x64_Ball : BulletBase {
+ airFriction=-0.00108571;
+ typicalSpeed=880;
+ ACE_caliber=9.296;
+ ACE_bulletLength=34.29;
+ ACE_bulletMass=14.904;
+ 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[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={850, 870, 880};
+ ACE_barrelLengths[]={508.0, 620.014, 660.4};
+ };
+ class B_408_Ball : BulletBase {
+ timeToLive=10;
+ airFriction=-0.00038944;
+ typicalSpeed=910;
+ tracerScale = 1.3; //1.2;
+ ACE_caliber=10.363;
+ ACE_bulletLength=54.0;
+ ACE_bulletMass=26.568;
+ 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.97};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={910};
+ ACE_barrelLengths[]={736.6};
+ };
+ class ACE_106x83mm_Ball : B_408_Ball {
+ timeToLive=10;
+ airFriction=-0.00052047;
+ ACE_caliber=10.566;
+ ACE_bulletLength=53.061;
+ ACE_bulletMass=25.7904;
+ 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.72};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={960};
+ ACE_barrelLengths[]={736.6};
+ };
+ class B_338_Ball : BulletBase {
+ timeToLive=10;
+ airFriction=-0.00059133;
+ typicalSpeed=915;
+ ACE_caliber=8.585;
+ ACE_bulletLength=39.573;
+ ACE_bulletMass=16.2;
+ ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19};
+ ACE_ballisticCoefficients[]={0.322};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ICAO";
+ ACE_dragModel=7;
+ ACE_muzzleVelocities[]={880, 915, 925};
+ ACE_barrelLengths[]={508.0, 660.4, 711.2};
+ };
+ class B_338_NM_Ball : BulletBase {
+ airFriction=-0.00052201;
+ typicalSpeed=820;
+ ACE_caliber=8.585;
+ ACE_bulletLength=43.18;
+ ACE_bulletMass=19.44;
+ 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[]={790, 807, 820};
+ ACE_barrelLengths[]={508.0, 609.6, 660.4};
+ };
+ class ACE_338_Ball : B_338_Ball {
+ timeToLive=10;
+ airFriction=-0.00052190;
+ typicalSpeed=826;
+ ACE_caliber=8.585;
+ ACE_bulletLength=43.18;
+ ACE_bulletMass=19.44;
+ 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[]={800, 820, 826, 830};
+ ACE_barrelLengths[]={508.0, 609.6, 673.1, 711.2};
+ };
+ class ACE_338_Ball_API526 : B_338_Ball {
+ timeToLive=10;
+ airFriction=-0.00069611;
+ caliber=2.8;
+ typicalSpeed=895;
+ ACE_caliber=8.585;
+ ACE_bulletLength=38.989;
+ ACE_bulletMass=16.3941242;
+ 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.560};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ICAO";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={880, 915, 925};
+ ACE_barrelLengths[]={508.0, 660.4, 711.2};
+ };
+ class B_127x33_Ball: BulletBase {
+ tracerScale = 1.3; //1.2;
+ };
+ class B_127x54_Ball : BulletBase {
+ airFriction=-0.00019268;
+ typicalSpeed=300;
+ tracerScale = 1.3;//
+ ACE_caliber=12.954;
+ ACE_bulletLength=64.516;
+ ACE_bulletMass=48.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[]={1.050};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={300};
+ ACE_barrelLengths[]={436.88};
+ };
+ class B_127x99_Ball : BulletBase {
+ timeToLive=10;
+ airFriction=-0.00057503;
+ typicalSpeed=900;
+ tracerScale = 1.3; //1.2;
+ ACE_caliber=12.954;
+ ACE_bulletLength=58.674;
+ ACE_bulletMass=41.9256;
+ 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[]={736.6};
+ };
+ class ACE_127x99_API : BulletBase {
+ timeToLive=10;
+ airFriction=-0.00057503;
+ typicalSpeed=900;
+ tracerScale = 1.3;//
+ hit=25;
+ caliber=4.0;
+ ACE_caliber=12.954;
+ ACE_bulletLength=58.674;
+ ACE_bulletMass=41.9904;
+ 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[]={736.6};
+ };
+ class ACE_127x99_Ball_AMAX : B_127x99_Ball {
+ timeToLive=10;
+ airFriction=-0.00036645;
+ typicalSpeed=860;
+ caliber=3.0;
+ ACE_caliber=12.954;
+ ACE_bulletLength=64.516;
+ ACE_bulletMass=48.6;
+ ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19};
+ ACE_ballisticCoefficients[]={1.050};
+ ACE_velocityBoundaries[]={};
+ ACE_standardAtmosphere="ASM";
+ ACE_dragModel=1;
+ ACE_muzzleVelocities[]={860};
+ ACE_barrelLengths[]={736.6};
+ };
+ class B_127x108_Ball : BulletBase {
+ timeToLive=10;
+ airFriction=-0.00063800;
+ typicalSpeed=820;
+ tracerScale = 1.3; //1.5;
+ ACE_caliber=12.979;
+ ACE_bulletLength=64.008;
+ ACE_bulletMass=48.276;
+ 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[]={728.98};
+ };
+ class B_45ACP_Ball : BulletBase {
+ airFriction=-0.00081221;
+ typicalSpeed=250;
+ tracerScale = 0.6;
+ ACE_caliber=11.481;
+ ACE_bulletLength=17.272;
+ ACE_bulletMass=14.904;
+ 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[]={101.6, 127.0, 228.6};
+ };
+ class B_19mm_HE: BulletBase {
+ tracerScale = 1;
+ };
+ class B_30mm_HE: B_19mm_HE {
+ tracerScale = 2.5;
+ };
+ class B_20mm: BulletBase {
+ timeToLive=30;
+ tracerScale = 1.5; //1;
+ };
+ class B_25mm: BulletBase {
+ timeToLive=30;
+ tracerScale = 2.0; //1;
+ };
+ class B_30mm_AP: BulletBase {
+ timeToLive=30;
+ tracerScale = 2.5;
+ };
+ class B_35mm_AA: BulletBase {
+ timeToLive=30;
+ tracerScale = 2.75; //1.85;
+ };
+ class ShellBase;
+ class Sh_120mm_HE: ShellBase {
+ tracerScale = 3;
+ };
+ class Sh_120mm_APFSDS: ShellBase {
+ tracerScale = 3;
+ };
+ class Gatling_30mm_HE_Plane_CAS_01_F: BulletBase {
+ tracerScale = 2.5;
+ };
+};
diff --git a/addons/ballistics/CfgMagazines.hpp b/addons/ballistics/CfgMagazines.hpp
index e368381333..931a6c2309 100644
--- a/addons/ballistics/CfgMagazines.hpp
+++ b/addons/ballistics/CfgMagazines.hpp
@@ -83,7 +83,7 @@ class CfgMagazines {
descriptionShort = CSTRING(30Rnd_556x45_mag_Tracer_DimDescription);
picture = "\A3\weapons_f\data\ui\m_20stanag_red_ca.paa";
};
-
+
class 20Rnd_762x51_Mag: CA_Magazine {
initSpeed = 833;
};
@@ -121,7 +121,7 @@ class CfgMagazines {
descriptionShort = CSTRING(20Rnd_762x51_mag_SDDescription);
initSpeed = 325;
};
-
+
class ACE_10Rnd_762x51_M118LR_Mag: 10Rnd_762x51_Mag {
author = ECSTRING(common,ACETeam);
ammo = "ACE_762x51_Ball_M118LR";
@@ -247,7 +247,7 @@ class CfgMagazines {
descriptionShort = CSTRING(10Rnd_338_API526_Mag_Description);
initSpeed = 880;
};
-
+
class 5Rnd_127x108_Mag;
class ACE_5Rnd_127x99_Mag: 5Rnd_127x108_Mag {
author = ECSTRING(common,ACETeam);
@@ -273,8 +273,8 @@ class CfgMagazines {
descriptionShort = CSTRING(5Rnd_127x99_AMAX_Mag_Description);
initSpeed = 860;
};
-
-
+
+
class 30Rnd_9x21_Mag: CA_Magazine {
initSpeed = 450;
};
@@ -286,27 +286,27 @@ class CfgMagazines {
descriptionShort = CSTRING(30Rnd_9x19_mag_Description);
initSpeed = 370;
};
-
+
class 11Rnd_45ACP_Mag: CA_Magazine {
initSpeed = 250;
};
-
+
class 6Rnd_45ACP_Cylinder : 11Rnd_45ACP_Mag {
initSpeed = 250;
};
-
+
class 30Rnd_45ACP_Mag_SMG_01: 30Rnd_9x21_Mag {
initSpeed = 250;
};
-
+
class 9Rnd_45ACP_Mag: 30Rnd_45ACP_Mag_SMG_01 {
initSpeed = 250;
};
-
+
class 30Rnd_45ACP_Mag_SMG_01_Tracer_Green: 30Rnd_45ACP_Mag_SMG_01 {
initSpeed = 250;
};
-
+
class 16Rnd_9x21_Mag: 30Rnd_9x21_Mag {
initSpeed = 450;
};
@@ -318,7 +318,7 @@ class CfgMagazines {
descriptionShort = CSTRING(16Rnd_9x19_mag_Description);
initSpeed = 370;
};
-
+
class 10Rnd_762x54_Mag: 10Rnd_762x51_Mag {
initSpeed = 800;
};
@@ -331,15 +331,15 @@ class CfgMagazines {
initSpeed = 800;
tracersEvery = 1;
};
-
+
class 150Rnd_762x54_Box: 150Rnd_762x51_Box {
initSpeed = 750;
};
-
+
class 150Rnd_93x64_Mag: CA_Magazine {
initSpeed = 860;
};
-
+
class 10Rnd_127x54_Mag: CA_Magazine {
initSpeed = 300;
};
diff --git a/addons/ballistics/CfgWeapons.hpp b/addons/ballistics/CfgWeapons.hpp
index e0cc3f203d..1cd705f63f 100644
--- a/addons/ballistics/CfgWeapons.hpp
+++ b/addons/ballistics/CfgWeapons.hpp
@@ -14,100 +14,83 @@ class CfgWeapons {
class MMG_02_base_F;
class Rifle_Base_F;
class Rifle_Long_Base_F;
- class WeaponSlotsInfo;
class MuzzleSlot;
-
+
/* Long Rifles */
-
+
class GM6_base_F: Rifle_Long_Base_F {
class Single: Mode_SemiAuto {
dispersion = 0.00029; // radians. Equal to 1.00 MOA.
};
};
-
+
class LRR_base_F: Rifle_Long_Base_F {
class Single: Mode_SemiAuto {
dispersion = 0.00020; // radians. Equal to 0.70 MOA.
};
};
-
+
class DMR_06_base_F: Rifle_Long_Base_F {
class Single: Mode_SemiAuto {
dispersion = 0.00029; // radians. Equal to 1.00 MOA.
};
-
+
class FullAuto: Mode_FullAuto {
dispersion = 0.00029; // radians. Equal to 1.00 MOA.
};
};
-
+
class DMR_05_base_F: Rifle_Long_Base_F {
class Single: Mode_SemiAuto {
dispersion = 0.00029; // radians. Equal to 1.00 MOA.
};
-
+
class FullAuto: Mode_FullAuto {
dispersion = 0.00029; // radians. Equal to 1.00 MOA.
};
};
-
+
class DMR_04_base_F: Rifle_Long_Base_F {
class Single: Mode_SemiAuto {
dispersion = 0.00029; // radians. Equal to 1.00 MOA.
};
};
-
+
class DMR_03_base_F: Rifle_Long_Base_F {
class Single: Mode_SemiAuto {
dispersion = 0.00032; // radians. Equal to 1.10 MOA.
};
-
+
class FullAuto: Mode_FullAuto {
dispersion = 0.00032; // radians. Equal to 1.10 MOA.
};
};
-
+
class DMR_02_base_F: Rifle_Long_Base_F {
class Single: Mode_SemiAuto {
dispersion = 0.000262; // radians. Equal to 0.90 MOA.
};
};
-
+
class DMR_01_base_F: Rifle_Long_Base_F {
- class WeaponSlotsInfo: WeaponSlotsInfo {
- class MuzzleSlot: MuzzleSlot {
- compatibleItems[] += {"ACE_muzzle_mzls_B"};
- };
- };
class Single: Mode_SemiAuto {
dispersion = 0.0004; // radians. Equal to 1.375 MOA.
};
};
-
+
class EBR_base_F: Rifle_Long_Base_F {
- class WeaponSlotsInfo: WeaponSlotsInfo {
- class MuzzleSlot: MuzzleSlot {
- compatibleItems[] += {"ACE_muzzle_mzls_B"};
- };
- };
class Single: Mode_SemiAuto {
dispersion = 0.00029; // radians. Equal to 1.00 MOA.
};
-
+
class FullAuto: Mode_FullAuto {
dispersion = 0.00029; // radians. Equal to 1.00 MOA.
};
};
-
+
/* MX */
-
- class arifle_MX_Base_F: Rifle_Base_F {
- class WeaponSlotsInfo: WeaponSlotsInfo {
- class MuzzleSlot: MuzzleSlot {
- compatibleItems[] += {"ACE_muzzle_mzls_H"};
- };
- };
- };
+
+ class arifle_MX_Base_F: Rifle_Base_F {};
class arifle_MX_SW_F: arifle_MX_Base_F {
magazines[] = {
"100Rnd_65x39_caseless_mag_Tracer",
@@ -120,13 +103,6 @@ class CfgWeapons {
initSpeed = -1.0;
ACE_barrelTwist=228.6;
ACE_barrelLength=406.4;
- class WeaponSlotsInfo: WeaponSlotsInfo {
- class MuzzleSlot: MuzzleSlot {
- // Shit is broken again
- //compatibleItems[] += {"ACE_muzzle_mzls_H"};
- compatibleItems[] = {"muzzle_snds_H","muzzle_snds_H_SW","ACE_muzzle_mzls_H"};
- };
- };
};
class arifle_MXM_F: arifle_MX_Base_F {
magazines[] = {
@@ -150,13 +126,7 @@ class CfgWeapons {
/* Katiba */
- class arifle_katiba_Base_F: Rifle_Base_F {
- class WeaponSlotsInfo: WeaponSlotsInfo {
- class MuzzleSlot: MuzzleSlot {
- compatibleItems[] += {"ACE_muzzle_mzls_H"};
- };
- };
- };
+ class arifle_katiba_Base_F: Rifle_Base_F {};
/* Other */
@@ -167,42 +137,16 @@ class CfgWeapons {
"ACE_200Rnd_65x39_cased_Box_Tracer_Dim"
};
initSpeed = -0.9763;
- class WeaponSlotsInfo: WeaponSlotsInfo {
- class MuzzleSlot: MuzzleSlot {
- compatibleItems[] += {"ACE_muzzle_mzls_H"};
- };
- };
ACE_barrelTwist=177.8;
ACE_barrelLength=317.5;
};
class LMG_Zafir_F: Rifle_Long_Base_F {
initSpeed = -1.0;
- class WeaponSlotsInfo: WeaponSlotsInfo {
- class MuzzleSlot: MuzzleSlot {
- compatibleItems[] += {"ACE_muzzle_mzls_B"};
- };
- };
ACE_barrelTwist=304.8;
ACE_barrelLength=459.74;
};
-
-
- /* Assault Rifles */
- class Tavor_base_F: Rifle_Base_F {
- class WeaponSlotsInfo: WeaponSlotsInfo {
- class MuzzleSlot: MuzzleSlot {
- compatibleItems[] += {"ACE_muzzle_mzls_L"};
- };
- };
- };
- class mk20_base_F: Rifle_Base_F {
- class WeaponSlotsInfo: WeaponSlotsInfo {
- class MuzzleSlot: MuzzleSlot {
- compatibleItems[] += {"ACE_muzzle_mzls_L"};
- };
- };
- };
-
+ class Tavor_base_F: Rifle_Base_F {};
+ class mk20_base_F: Rifle_Base_F {};
/* SMGs */
class SDAR_base_F: Rifle_Base_F {
@@ -214,98 +158,48 @@ class CfgWeapons {
class Burst: Mode_Burst {
dispersion = 0.0008727; // radians. Equal to 3 MOA.
};
-
+
class FullAuto: Mode_FullAuto {
dispersion = 0.0008727; // radians. Equal to 3 MOA.
};
};
- class pdw2000_base_F: Rifle_Base_F {
- class WeaponSlotsInfo: WeaponSlotsInfo {
- class MuzzleSlot: MuzzleSlot {
- compatibleItems[] += {"ACE_muzzle_mzls_smg_02"};
- };
- };
- };
- class SMG_01_Base: Rifle_Base_F {
- class WeaponSlotsInfo: WeaponSlotsInfo {
- class MuzzleSlot: MuzzleSlot {
- compatibleItems[] += {"ACE_muzzle_mzls_smg_01"};
- };
- };
- };
- class SMG_02_base_F: Rifle_Base_F {
- class WeaponSlotsInfo: WeaponSlotsInfo {
- class MuzzleSlot: MuzzleSlot {
- compatibleItems[] += {"ACE_muzzle_mzls_smg_02"};
- };
- };
- };
-
+ class pdw2000_base_F: Rifle_Base_F {};
+ class SMG_01_Base: Rifle_Base_F {};
+ class SMG_02_base_F: Rifle_Base_F {};
+
/* Pistols */
class Pistol;
- class Pistol_Base_F: Pistol {
- class WeaponSlotsInfo;
- };
+ class Pistol_Base_F: Pistol {};
class hgun_P07_F: Pistol_Base_F {
initSpeed = -0.9778;
ACE_barrelTwist=254.0;
ACE_barrelLength=101.6;
- class WeaponSlotsInfo: WeaponSlotsInfo {
- class MuzzleSlot: MuzzleSlot {
- linkProxy = "\A3\data_f\proxies\weapon_slots\MUZZLE";
- compatibleItems[] += {"ACE_muzzle_mzls_smg_02"};
- };
- };
};
class hgun_Rook40_F: Pistol_Base_F {
initSpeed = -1.0;
ACE_barrelTwist=254.0;
ACE_barrelLength=111.76;
- class WeaponSlotsInfo: WeaponSlotsInfo {
- class MuzzleSlot: MuzzleSlot {
- linkProxy = "\A3\data_f\proxies\weapon_slots\MUZZLE";
- compatibleItems[] += {"ACE_muzzle_mzls_smg_02"};
- };
- };
};
class hgun_ACPC2_F: Pistol_Base_F {
initSpeed = -1.0;
ACE_barrelTwist=406.4;
ACE_barrelLength=127.0;
- class WeaponSlotsInfo: WeaponSlotsInfo {
- class MuzzleSlot: MuzzleSlot {
- compatibleItems[] += {"ACE_muzzle_mzls_smg_01"};
- };
- };
};
class hgun_Pistol_heavy_01_F: Pistol_Base_F {
initSpeed = -0.96;
ACE_barrelTwist=406.4;
ACE_barrelLength=114.3;
- class WeaponSlotsInfo: WeaponSlotsInfo {
- class MuzzleSlot: MuzzleSlot {
- compatibleItems[] += {"ACE_muzzle_mzls_smg_01"};
- };
- };
};
class hgun_Pistol_heavy_02_F: Pistol_Base_F {
initSpeed = -0.92;
ACE_barrelTwist=406.4;
ACE_barrelLength=76.2;
- /*
- class WeaponSlotsInfo: WeaponSlotsInfo {
- class MuzzleSlot {
- linkProxy = "\A3\data_f\proxies\weapon_slots\MUZZLE";
- compatibleItems[] += {"ACE_muzzle_mzls_smg_01"};
- };
- };
- */
};
class hgun_PDW2000_F: pdw2000_base_F {
initSpeed = -1.157;
@@ -391,6 +285,8 @@ class CfgWeapons {
"30Rnd_556x45_Stanag_Tracer_Red",
"30Rnd_556x45_Stanag_Tracer_Green",
"30Rnd_556x45_Stanag_Tracer_Yellow",
+ "30Rnd_556x45_Stanag_red",
+ "30Rnd_556x45_Stanag_green",
"ACE_30Rnd_556x45_Stanag_M995_AP_mag",
"ACE_30Rnd_556x45_Stanag_Mk262_mag",
"ACE_30Rnd_556x45_Stanag_Mk318_mag",
@@ -411,6 +307,8 @@ class CfgWeapons {
"30Rnd_556x45_Stanag_Tracer_Red",
"30Rnd_556x45_Stanag_Tracer_Green",
"30Rnd_556x45_Stanag_Tracer_Yellow",
+ "30Rnd_556x45_Stanag_red",
+ "30Rnd_556x45_Stanag_green",
"ACE_30Rnd_556x45_Stanag_M995_AP_mag",
"ACE_30Rnd_556x45_Stanag_Mk262_mag",
"ACE_30Rnd_556x45_Stanag_Mk318_mag",
@@ -426,6 +324,8 @@ class CfgWeapons {
"30Rnd_556x45_Stanag_Tracer_Red",
"30Rnd_556x45_Stanag_Tracer_Green",
"30Rnd_556x45_Stanag_Tracer_Yellow",
+ "30Rnd_556x45_Stanag_red",
+ "30Rnd_556x45_Stanag_green",
"ACE_30Rnd_556x45_Stanag_M995_AP_mag",
"ACE_30Rnd_556x45_Stanag_Mk262_mag",
"ACE_30Rnd_556x45_Stanag_Mk318_mag",
@@ -441,6 +341,8 @@ class CfgWeapons {
"30Rnd_556x45_Stanag_Tracer_Red",
"30Rnd_556x45_Stanag_Tracer_Green",
"30Rnd_556x45_Stanag_Tracer_Yellow",
+ "30Rnd_556x45_Stanag_red",
+ "30Rnd_556x45_Stanag_green",
"ACE_30Rnd_556x45_Stanag_M995_AP_mag",
"ACE_30Rnd_556x45_Stanag_Mk262_mag",
"ACE_30Rnd_556x45_Stanag_Mk318_mag",
@@ -462,6 +364,8 @@ class CfgWeapons {
"30Rnd_556x45_Stanag_Tracer_Red",
"30Rnd_556x45_Stanag_Tracer_Green",
"30Rnd_556x45_Stanag_Tracer_Yellow",
+ "30Rnd_556x45_Stanag_red",
+ "30Rnd_556x45_Stanag_green",
"ACE_30Rnd_556x45_Stanag_M995_AP_mag",
"ACE_30Rnd_556x45_Stanag_Mk262_mag",
"ACE_30Rnd_556x45_Stanag_Mk318_mag",
@@ -477,6 +381,8 @@ class CfgWeapons {
"30Rnd_556x45_Stanag_Tracer_Red",
"30Rnd_556x45_Stanag_Tracer_Green",
"30Rnd_556x45_Stanag_Tracer_Yellow",
+ "30Rnd_556x45_Stanag_red",
+ "30Rnd_556x45_Stanag_green",
"ACE_30Rnd_556x45_Stanag_M995_AP_mag",
"ACE_30Rnd_556x45_Stanag_Mk262_mag",
"ACE_30Rnd_556x45_Stanag_Mk318_mag",
@@ -492,6 +398,8 @@ class CfgWeapons {
"30Rnd_556x45_Stanag_Tracer_Red",
"30Rnd_556x45_Stanag_Tracer_Green",
"30Rnd_556x45_Stanag_Tracer_Yellow",
+ "30Rnd_556x45_Stanag_red",
+ "30Rnd_556x45_Stanag_green",
"ACE_30Rnd_556x45_Stanag_M995_AP_mag",
"ACE_30Rnd_556x45_Stanag_Mk262_mag",
"ACE_30Rnd_556x45_Stanag_Mk318_mag",
@@ -617,7 +525,7 @@ class CfgWeapons {
ACE_barrelTwist=234.95;
ACE_barrelLength=609.6;
};
-
+
class HMG_127 : LMG_RCWS {
};
class HMG_01: HMG_127 {
@@ -627,7 +535,7 @@ class CfgWeapons {
ACE_barrelTwist=304.8;
ACE_barrelLength=1143.0;
};
-
+
/* Silencers */
class ItemCore;
diff --git a/addons/ballistics/config.cpp b/addons/ballistics/config.cpp
index 768ba63e02..59c29f0a7f 100644
--- a/addons/ballistics/config.cpp
+++ b/addons/ballistics/config.cpp
@@ -6,7 +6,9 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
- author[] = {"commy2","Ruthberg"};
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"commy2","Ruthberg"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
diff --git a/addons/ballistics/scripts/initTargetWall.sqf b/addons/ballistics/scripts/initTargetWall.sqf
index d9b16eec10..0ce3950de1 100644
--- a/addons/ballistics/scripts/initTargetWall.sqf
+++ b/addons/ballistics/scripts/initTargetWall.sqf
@@ -11,5 +11,5 @@ if (local _wall) then {
_paper attachTo [_wall, [0,-0.02,0.6]];
_paper setDir getDir _wall;
- _paper setObjectTextureGlobal [0, QUOTE(PATHTOF(textures\target_ca.paa))];
+ _paper setObjectTextureGlobal [0, QPATHTOF(textures\target_ca.paa)];
};
diff --git a/addons/ballistics/stringtable.xml b/addons/ballistics/stringtable.xml
index d473a5763f..b51303fa6d 100644
--- a/addons/ballistics/stringtable.xml
+++ b/addons/ballistics/stringtable.xml
@@ -1602,6 +1602,7 @@
[ACE] Caisse de munitions
[ACE] Lőszeres láda
[ACE] Ящик с боеприпасами
+ [ACE] Cassa munizioni
\ No newline at end of file
diff --git a/addons/captives/CfgEden.hpp b/addons/captives/CfgEden.hpp
new file mode 100644
index 0000000000..98757bd86c
--- /dev/null
+++ b/addons/captives/CfgEden.hpp
@@ -0,0 +1,30 @@
+class Cfg3DEN {
+ class Object {
+ class AttributeCategories {
+ class ace_attributes {
+ class Attributes {
+ class ace_isHandcuffed {
+ property = QUOTE(ace_isHandcuffed);
+ control = "Checkbox";
+ displayName = CSTRING(ModuleHandcuffed_DisplayName);
+ tooltip = CSTRING(ModuleHandcuffed_Description);
+ expression = QUOTE(if (_value) then {[ARR_3(objNull,[_this],true)] call FUNC(moduleHandcuffed)});
+ typeName = "BOOL";
+ condition = "objectBrain";
+ defaultValue = false;
+ };
+ class ace_isSurrendered {
+ property = QUOTE(ace_isSurrendered);
+ control = "Checkbox";
+ displayName = CSTRING(ModuleSurrender_DisplayName);
+ tooltip = CSTRING(ModuleSurrender_Description);
+ expression = QUOTE(if (_value) then {[ARR_3(objNull,[_this],true)] call FUNC(moduleSurrender)});
+ typeName = "BOOL";
+ condition = "objectBrain";
+ defaultValue = false;
+ };
+ };
+ };
+ };
+ };
+};
diff --git a/addons/captives/CfgEventHandlers.hpp b/addons/captives/CfgEventHandlers.hpp
index 4d12dc10c4..916990f1b5 100644
--- a/addons/captives/CfgEventHandlers.hpp
+++ b/addons/captives/CfgEventHandlers.hpp
@@ -1,3 +1,10 @@
+
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
@@ -9,6 +16,13 @@ class Extended_PostInit_EventHandlers {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
};
};
+
+class Extended_DisplayUnload_EventHandlers {
+ class RscDisplayCurator {
+ ADDON = QUOTE(call FUNC(handleZeusDisplayChanged));
+ };
+};
+
//release escorted captive when entering a vehicle
class Extended_GetIn_EventHandlers {
class All {
diff --git a/addons/captives/CfgVehicles.hpp b/addons/captives/CfgVehicles.hpp
index a8215c0cdc..2afa1cfea4 100644
--- a/addons/captives/CfgVehicles.hpp
+++ b/addons/captives/CfgVehicles.hpp
@@ -10,7 +10,7 @@ class CfgVehicles {
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canApplyHandcuffs));
statement = QUOTE([ARR_2(_player, _target)] call FUNC(doApplyHandcuffs));
exceptions[] = {};
- icon = QUOTE(PATHTOF(UI\handcuff_ca.paa));
+ icon = QPATHTOF(UI\handcuff_ca.paa);
};
class ACE_MainActions {
@@ -21,7 +21,7 @@ class CfgVehicles {
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canRemoveHandcuffs));
statement = QUOTE([ARR_2(_player, _target)] call FUNC(doRemoveHandcuffs));
exceptions[] = {};
- icon = QUOTE(PATHTOF(UI\handcuff_ca.paa));
+ icon = QPATHTOF(UI\handcuff_ca.paa);
};
class ACE_EscortCaptive {
displayName = CSTRING(EscortCaptive);
@@ -30,7 +30,7 @@ class CfgVehicles {
statement = QUOTE([ARR_3(_player, _target, true)] call FUNC(doEscortCaptive));
exceptions[] = {};
showDisabled = 0;
- icon = QUOTE(PATHTOF(UI\captive_ca.paa));
+ icon = QPATHTOF(UI\captive_ca.paa);
priority = 2.3;
};
class ACE_StopEscorting {
@@ -40,7 +40,7 @@ class CfgVehicles {
statement = QUOTE([ARR_3(_player,_target, false)] call FUNC(doEscortCaptive));
exceptions[] = {"isNotEscorting"};
showDisabled = 0;
- icon = QUOTE(PATHTOF(UI\captive_ca.paa));
+ icon = QPATHTOF(UI\captive_ca.paa);
priority = 2.3;
};
class ACE_LoadCaptive {
@@ -50,7 +50,7 @@ class CfgVehicles {
statement = QUOTE([ARR_3(_player, _target, objNull)] call FUNC(doLoadCaptive));
exceptions[] = {"isNotEscorting"};
showDisabled = 0;
- icon = QUOTE(PATHTOF(UI\captive_ca.paa));
+ icon = QPATHTOF(UI\captive_ca.paa);
priority = 2.2;
};
class GVAR(UnloadCaptive) {
@@ -79,7 +79,7 @@ class CfgVehicles {
exceptions[] = {};
showDisabled = 0;
priority = 0;
- icon = QUOTE(PATHTOF(UI\Surrender_ca.paa));
+ icon = QPATHTOF(UI\Surrender_ca.paa);
};
class ACE_StopSurrenderingSelf {
displayName = CSTRING(StopSurrendering);
@@ -88,7 +88,7 @@ class CfgVehicles {
exceptions[] = {"isNotSurrendering"};
showDisabled = 0;
priority = 0;
- icon = QUOTE(PATHTOF(UI\Surrender_ca.paa));
+ icon = QPATHTOF(UI\Surrender_ca.paa);
};
};
};
@@ -154,7 +154,7 @@ class CfgVehicles {
scope = 2; //show in editor
isGlobal = 0; //run on server
isTriggerActivated = 1; //Wait for triggers
- icon = QUOTE(PATHTOF(UI\Icon_Module_Make_Unit_Surrender_ca.paa));
+ icon = QPATHTOF(UI\Icon_Module_Make_Unit_Surrender_ca.paa);
functionPriority = 0;
class Arguments {};
class ModuleDescription: ModuleDescription {
@@ -170,7 +170,7 @@ class CfgVehicles {
scope = 2; //show in editor
isGlobal = 0; //run on server
isTriggerActivated = 1; //Wait for triggers
- icon = QUOTE(PATHTOF(UI\Icon_Module_Make_Unit_Handcuffed_ca.paa));
+ icon = QPATHTOF(UI\Icon_Module_Make_Unit_Handcuffed_ca.paa);
functionPriority = 0;
class Arguments {};
class ModuleDescription: ModuleDescription {
@@ -186,7 +186,7 @@ class CfgVehicles {
displayName = CSTRING(ModuleSettings_DisplayName);
function = QFUNC(moduleSettings);
scope = 2;
- icon = QUOTE(PATHTOF(UI\Icon_Module_settings_ca.paa));
+ icon = QPATHTOF(UI\Icon_Module_settings_ca.paa);
isGlobal = 1;
isSingular = 1;
class Arguments {
diff --git a/addons/captives/CfgWeapons.hpp b/addons/captives/CfgWeapons.hpp
index 7092962519..1b65a0a4bf 100644
--- a/addons/captives/CfgWeapons.hpp
+++ b/addons/captives/CfgWeapons.hpp
@@ -5,8 +5,8 @@ class CfgWeapons {
class ACE_CableTie: ACE_ItemCore {
displayName = CSTRING(CableTie);
descriptionShort = CSTRING(CableTieDescription);
- model = QUOTE(PATHTOF(models\ace_cabletie.p3d));
- picture = QUOTE(PATHTOF(UI\ace_cabletie_ca.paa));
+ model = QPATHTOF(models\ace_cabletie.p3d);
+ picture = QPATHTOF(UI\ace_cabletie_ca.paa);
scope = 2;
class ItemInfo: InventoryItem_Base_F {
mass = 1;
diff --git a/addons/captives/XEH_PREP.hpp b/addons/captives/XEH_PREP.hpp
new file mode 100644
index 0000000000..2722214e1b
--- /dev/null
+++ b/addons/captives/XEH_PREP.hpp
@@ -0,0 +1,30 @@
+
+PREP(canApplyHandcuffs);
+PREP(canEscortCaptive);
+PREP(canFriskPerson);
+PREP(canLoadCaptive);
+PREP(canRemoveHandcuffs);
+PREP(canStopEscorting);
+PREP(canSurrender);
+PREP(canUnloadCaptive);
+PREP(doApplyHandcuffs);
+PREP(doEscortCaptive);
+PREP(doFriskPerson);
+PREP(doLoadCaptive);
+PREP(doRemoveHandcuffs);
+PREP(doUnloadCaptive);
+PREP(findEmptyNonFFVCargoSeat);
+PREP(handleGetIn);
+PREP(handleGetOut);
+PREP(handleOnUnconscious);
+PREP(handlePlayerChanged);
+PREP(handleRespawn);
+PREP(handleUnitInitPost);
+PREP(handleZeusDisplayChanged);
+PREP(moduleHandcuffed);
+PREP(moduleSettings);
+PREP(moduleSurrender);
+PREP(setHandcuffed);
+PREP(setSurrendered);
+PREP(vehicleCaptiveMoveIn);
+PREP(vehicleCaptiveMoveOut);
diff --git a/addons/captives/XEH_postInit.sqf b/addons/captives/XEH_postInit.sqf
index 26f84e6bd9..9709508fa2 100644
--- a/addons/captives/XEH_postInit.sqf
+++ b/addons/captives/XEH_postInit.sqf
@@ -1,5 +1,11 @@
#include "script_component.hpp"
+["ace_settingsInitialized", {
+ // Hold on a little bit longer to ensure anims will work
+ [{
+ GVAR(captivityEnabled) = true;
+ }, [], 0.05] call CBA_fnc_waitAndExecute;
+}] call CBA_fnc_addEventHandler;
//Handles when someone starts escorting and then disconnects, leaving the captive attached
//This is normaly handled by the PFEH in doEscortCaptive, but that won't be running if they DC
@@ -18,16 +24,15 @@ if (isServer) then {
}];
};
-["zeusDisplayChanged", {_this call FUNC(handleZeusDisplayChanged)}] call EFUNC(common,addEventHandler);
-["playerChanged", {_this call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler);
-["MoveInCaptive", {_this call FUNC(vehicleCaptiveMoveIn)}] call EFUNC(common,addEventHandler);
-["MoveOutCaptive", {_this call FUNC(vehicleCaptiveMoveOut)}] call EFUNC(common,addEventHandler);
+["ace_playerChanged", {_this call FUNC(handlePlayerChanged)}] call CBA_fnc_addEventHandler;
+[QGVAR(moveInCaptive), {_this call FUNC(vehicleCaptiveMoveIn)}] call CBA_fnc_addEventHandler;
+[QGVAR(moveOutCaptive), {_this call FUNC(vehicleCaptiveMoveOut)}] call CBA_fnc_addEventHandler;
-["SetHandcuffed", {_this call FUNC(setHandcuffed)}] call EFUNC(common,addEventHandler);
-["SetSurrendered", {_this call FUNC(setSurrendered)}] call EFUNC(common,addEventHandler);
+[QGVAR(setHandcuffed), {_this call FUNC(setHandcuffed)}] call CBA_fnc_addEventHandler;
+[QGVAR(setSurrendered), {_this call FUNC(setSurrendered)}] call CBA_fnc_addEventHandler;
//Medical Integration Events
-["medical_onUnconscious", {_this call ACE_Captives_fnc_handleOnUnconscious}] call EFUNC(common,addEventHandler);
+["ace_unconscious", {_this call ACE_Captives_fnc_handleOnUnconscious}] call CBA_fnc_addEventHandler;
if (!hasInterface) exitWith {};
diff --git a/addons/captives/XEH_preInit.sqf b/addons/captives/XEH_preInit.sqf
index dcc585ef8e..81657a8960 100644
--- a/addons/captives/XEH_preInit.sqf
+++ b/addons/captives/XEH_preInit.sqf
@@ -2,34 +2,8 @@
ADDON = false;
-PREP(canApplyHandcuffs);
-PREP(canEscortCaptive);
-PREP(canFriskPerson);
-PREP(canLoadCaptive);
-PREP(canRemoveHandcuffs);
-PREP(canStopEscorting);
-PREP(canSurrender);
-PREP(canUnloadCaptive);
-PREP(doApplyHandcuffs);
-PREP(doEscortCaptive);
-PREP(doFriskPerson);
-PREP(doLoadCaptive);
-PREP(doRemoveHandcuffs);
-PREP(doUnloadCaptive);
-PREP(findEmptyNonFFVCargoSeat);
-PREP(handleGetIn);
-PREP(handleGetOut);
-PREP(handleOnUnconscious);
-PREP(handlePlayerChanged);
-PREP(handleRespawn);
-PREP(handleUnitInitPost);
-PREP(handleZeusDisplayChanged);
-PREP(moduleHandcuffed);
-PREP(moduleSettings);
-PREP(moduleSurrender);
-PREP(setHandcuffed);
-PREP(setSurrendered);
-PREP(vehicleCaptiveMoveIn);
-PREP(vehicleCaptiveMoveOut);
+#include "XEH_PREP.hpp"
+
+GVAR(captivityEnabled) = false;
ADDON = true;
diff --git a/addons/captives/XEH_preStart.sqf b/addons/captives/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/captives/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/captives/config.cpp b/addons/captives/config.cpp
index a9ec2950ee..883fbebe32 100644
--- a/addons/captives/config.cpp
+++ b/addons/captives/config.cpp
@@ -6,8 +6,9 @@ class CfgPatches {
weapons[] = {"ACE_CableTie"};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ACE_Interaction"};
- author[] = {"commy2", "KoffeinFlummi"};
- authorUrl = "https://github.com/commy2/";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"commy2", "KoffeinFlummi"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
@@ -17,3 +18,12 @@ class CfgPatches {
#include "CfgMoves.hpp"
#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"
+#include "CfgEden.hpp"
+
+class ACE_newEvents {
+ SetSurrendered = QGVAR(setSurrendered);
+ SetHandcuffed = QGVAR(setHandcuffed);
+ MoveOutCaptive = QGVAR(moveOutCaptive);
+ MoveInCaptive = QGVAR(moveInCaptive);
+ CaptiveStatusChanged = "ace_captiveStatusChanged";
+};
diff --git a/addons/captives/functions/fnc_doApplyHandcuffs.sqf b/addons/captives/functions/fnc_doApplyHandcuffs.sqf
index 21bfe58747..d80ffc40a1 100644
--- a/addons/captives/functions/fnc_doApplyHandcuffs.sqf
+++ b/addons/captives/functions/fnc_doApplyHandcuffs.sqf
@@ -21,6 +21,6 @@ params ["_unit", "_target"];
playSound3D [QUOTE(PATHTO_R(sounds\cable_tie_zipping.ogg)), objNull, false, (getPosASL _target), 1, 1, 10];
-["SetHandcuffed", [_target], [_target, true]] call EFUNC(common,targetEvent);
+[QGVAR(setHandcuffed), [_target, true], [_target]] call CBA_fnc_targetEvent;
_unit removeItem "ACE_CableTie";
diff --git a/addons/captives/functions/fnc_doEscortCaptive.sqf b/addons/captives/functions/fnc_doEscortCaptive.sqf
index 484151853b..e0d3ae8fa6 100644
--- a/addons/captives/functions/fnc_doEscortCaptive.sqf
+++ b/addons/captives/functions/fnc_doEscortCaptive.sqf
@@ -37,7 +37,7 @@ if (_state) then {
[{
params ["_args", "_pfID"];
_args params ["_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 {
_unit setVariable [QGVAR(isEscorting), false, true];
diff --git a/addons/captives/functions/fnc_doLoadCaptive.sqf b/addons/captives/functions/fnc_doLoadCaptive.sqf
index a4d7df8892..2a8bc055ec 100644
--- a/addons/captives/functions/fnc_doLoadCaptive.sqf
+++ b/addons/captives/functions/fnc_doLoadCaptive.sqf
@@ -47,4 +47,4 @@ if (isNull _vehicle) then {
if (isNull _vehicle) exitWith {ERROR("");};
_unit setVariable [QGVAR(isEscorting), false, true];
-["MoveInCaptive", [_target], [_target, _vehicle]] call EFUNC(common,targetEvent);
+[QGVAR(moveInCaptive), [_target, _vehicle], [_target]] call CBA_fnc_targetEvent;
diff --git a/addons/captives/functions/fnc_doRemoveHandcuffs.sqf b/addons/captives/functions/fnc_doRemoveHandcuffs.sqf
index 681b698de3..7f445440ba 100644
--- a/addons/captives/functions/fnc_doRemoveHandcuffs.sqf
+++ b/addons/captives/functions/fnc_doRemoveHandcuffs.sqf
@@ -17,4 +17,4 @@
params ["_unit", "_target"];
-["SetHandcuffed", [_target], [_target, false]] call EFUNC(common,targetEvent);
+[QGVAR(setHandcuffed), [_target, false], [_target]] call CBA_fnc_targetEvent;
diff --git a/addons/captives/functions/fnc_doUnloadCaptive.sqf b/addons/captives/functions/fnc_doUnloadCaptive.sqf
index 46ba618010..fd4375e4b7 100644
--- a/addons/captives/functions/fnc_doUnloadCaptive.sqf
+++ b/addons/captives/functions/fnc_doUnloadCaptive.sqf
@@ -18,4 +18,4 @@
params ["_unit", "_target"];
-["MoveOutCaptive", [_target], [_target]] call EFUNC(common,targetEvent);
+[QGVAR(moveOutCaptive), [_target], [_target]] call CBA_fnc_targetEvent;
diff --git a/addons/captives/functions/fnc_handleOnUnconscious.sqf b/addons/captives/functions/fnc_handleOnUnconscious.sqf
index ca6362d3da..456161d9de 100644
--- a/addons/captives/functions/fnc_handleOnUnconscious.sqf
+++ b/addons/captives/functions/fnc_handleOnUnconscious.sqf
@@ -1,6 +1,6 @@
/*
* Author: commy2, PabstMirror
- * Handles the "medical_onUnconscious" event
+ * Handles the "ace_unconscious" event
*
* Arguments:
* 0: Unit
diff --git a/addons/captives/functions/fnc_handleZeusDisplayChanged.sqf b/addons/captives/functions/fnc_handleZeusDisplayChanged.sqf
index ef8aedbbe1..433c1fc259 100644
--- a/addons/captives/functions/fnc_handleZeusDisplayChanged.sqf
+++ b/addons/captives/functions/fnc_handleZeusDisplayChanged.sqf
@@ -17,15 +17,10 @@
*/
#include "script_component.hpp"
-params ["_unit","_zeusIsOpen"];
-
-//set showHUD based on unit status:
-if (!_zeusIsOpen) then {
- if ((_unit getVariable [QGVAR(isHandcuffed), false]) || {_unit getVariable [QGVAR(isSurrendering), false]}) then {
- TRACE_1("Player Change (showHUD false)",_unit);
- ["captive", [false, false, false, false, false, false, false, false]] call EFUNC(common,showHud);
- } else {
- TRACE_1("Player Change (showHUD true)",_unit);
- ["captive", []] call EFUNC(common,showHud); //same as showHud true;
- };
+if ((ACE_player getVariable [QGVAR(isHandcuffed), false]) || {ACE_player getVariable [QGVAR(isSurrendering), false]}) then {
+ TRACE_1("Player Change (showHUD false)",ACE_player);
+ ["captive", [false, false, false, false, false, false, false, false]] call EFUNC(common,showHud);
+} else {
+ TRACE_1("Player Change (showHUD true)",ACE_player);
+ ["captive", []] call EFUNC(common,showHud); //same as showHud true;
};
diff --git a/addons/captives/functions/fnc_moduleHandcuffed.sqf b/addons/captives/functions/fnc_moduleHandcuffed.sqf
index 4c6cc4c6fc..b2e0b431b3 100644
--- a/addons/captives/functions/fnc_moduleHandcuffed.sqf
+++ b/addons/captives/functions/fnc_moduleHandcuffed.sqf
@@ -1,6 +1,7 @@
/*
* Author: PabstMirror
* Module Function to make a unit handcuffed (can be called from editor)
+ * Also used for threeden attribute expression with dummy Logic Object
*
* Arguments:
* 0: The Module Logic
@@ -11,7 +12,7 @@
* Nothing
*
* Example:
- * Called from module
+ * [objNull, [player], true] call ace_captives_fnc_moduleHandcuffed
*
* Public: No
*/
@@ -28,8 +29,11 @@ if (!isServer) exitWith {};
[{
params ["_units"];
{
- ["SetHandcuffed", [_x], [_x, true]] call EFUNC(common,targetEvent);
+ TRACE_2("event",_x,local _x);
+ [QGVAR(setHandcuffed), [_x, true], [_x]] call CBA_fnc_targetEvent;
} forEach _units;
-}, [_units], 0.05] call EFUNC(common,waitAndExecute);
+}, [_units], 0.05] call CBA_fnc_waitAndExecute;
-deleteVehicle _logic;
+if (!isNull _logic) then {
+ deleteVehicle _logic;
+};
diff --git a/addons/captives/functions/fnc_moduleSurrender.sqf b/addons/captives/functions/fnc_moduleSurrender.sqf
index f5c091a78a..c4482ce904 100644
--- a/addons/captives/functions/fnc_moduleSurrender.sqf
+++ b/addons/captives/functions/fnc_moduleSurrender.sqf
@@ -1,6 +1,7 @@
/*
* Author: PabstMirror
* Module Function to make a unit surrender (can be called from editor)
+ * Also used for threeden attribute expression with dummy Logic Object
*
* Arguments:
* 0: The Module Logic
@@ -11,7 +12,7 @@
* Nothing
*
* Example:
- * Called from module
+ * [objNull, [player], true] call ace_captives_fnc_moduleSurrender
*
* Public: No
*/
@@ -28,8 +29,11 @@ if (!isServer) exitWith {};
[{
params ["_units"];
{
- ["SetSurrendered", [_x], [_x, true]] call EFUNC(common,targetEvent);
+ TRACE_2("event",_x,local _x);
+ [QGVAR(setSurrendered), [_x, true], [_x]] call CBA_fnc_targetEvent;
} forEach _units;
-}, [_units], 0.05] call EFUNC(common,waitAndExecute);
+}, [_units], 0.05] call CBA_fnc_waitAndExecute;
-deleteVehicle _logic;
+if (!isNull _logic) then {
+ deleteVehicle _logic;
+};
diff --git a/addons/captives/functions/fnc_setHandcuffed.sqf b/addons/captives/functions/fnc_setHandcuffed.sqf
index 0a17e0378c..4fbedaef87 100644
--- a/addons/captives/functions/fnc_setHandcuffed.sqf
+++ b/addons/captives/functions/fnc_setHandcuffed.sqf
@@ -22,6 +22,18 @@ TRACE_2("params",_unit,_state);
if (!local _unit) exitWith {
ERROR("running setHandcuffed on remote unit");
};
+
+if !(missionNamespace getVariable [QGVAR(captivityEnabled), false]) exitWith {
+ // It's to soon to call this function, delay it
+ if (EGVAR(common,settingsInitFinished)) then {
+ // Settings are already initialized, but the small wait isn't over
+ [DFUNC(setHandCuffed), _this, 0.05] call CBA_fnc_waitAndExecute;
+ } else {
+ // Settings are not initialized yet
+ [DFUNC(setHandCuffed), _this] call EFUNC(common,runAfterSettingsInit);
+ };
+};
+
if ((_unit getVariable [QGVAR(isHandcuffed), false]) isEqualTo _state) exitWith {
ERROR("setHandcuffed: current state same as new");
};
@@ -86,7 +98,7 @@ if (_state) then {
TRACE_2("Adding animChangedEH",_unit,_animChangedEHID);
_unit setVariable [QGVAR(handcuffAnimEHID), _animChangedEHID];
- }, [_unit], 0.01] call EFUNC(common,waitAndExecute);
+ }, [_unit], 0.01] call CBA_fnc_waitAndExecute;
} else {
_unit setVariable [QGVAR(isHandcuffed), false, true];
[_unit, "setCaptive", QGVAR(Handcuffed), false] call EFUNC(common,statusEffect_set);
@@ -112,4 +124,4 @@ if (_state) then {
};
//Global Event after changes:
-["CaptiveStatusChanged", [_unit, _state, "SetHandcuffed"]] call EFUNC(common,globalEvent);
+["ace_captiveStatusChanged", [_unit, _state, "SetHandcuffed"]] call CBA_fnc_globalEvent;
diff --git a/addons/captives/functions/fnc_setSurrendered.sqf b/addons/captives/functions/fnc_setSurrendered.sqf
index e65bd86bd0..ba7468da0d 100644
--- a/addons/captives/functions/fnc_setSurrendered.sqf
+++ b/addons/captives/functions/fnc_setSurrendered.sqf
@@ -23,6 +23,17 @@ if (!local _unit) exitWith {
ERROR("running surrender on remote unit");
};
+if !(missionNamespace getVariable [QGVAR(captivityEnabled), false]) exitWith {
+ // It's to soon to call this function, delay it
+ if (EGVAR(common,settingsInitFinished)) then {
+ // Settings are already initialized, but the small wait isn't over
+ [DFUNC(setSurrendered), _this, 0.05] call CBA_fnc_waitAndExecute;
+ } else {
+ // Settings are not initialized yet
+ [DFUNC(setSurrendered), _this] call EFUNC(common,runAfterSettingsInit);
+ };
+};
+
if ((_unit getVariable [QGVAR(isSurrendering), false]) isEqualTo _state) exitWith {
ERROR("Surrender: current state same as new");
};
@@ -62,7 +73,7 @@ if (_state) then {
}];
_unit setVariable [QGVAR(surrenderAnimEHID), _animChangedEHID];
};
- }, [_unit], 0.01] call EFUNC(common,waitAndExecute);
+ }, [_unit], 0.01] call CBA_fnc_waitAndExecute;
} else {
_unit setVariable [QGVAR(isSurrendering), false, true];
[_unit, "setCaptive", QGVAR(Surrendered), false] call EFUNC(common,statusEffect_set);
@@ -92,7 +103,7 @@ if (_state) then {
params ["_args", "_pfID"];
_args params ["_unit", "_maxTime"];
//If waited long enough or they re-surrendered or they are unconscious, exit loop
- if ((ACE_time > _maxTime) || {_unit getVariable [QGVAR(isSurrendering), false]} || {_unit getVariable ["ACE_isUnconscious", false]}) exitWith {
+ if ((CBA_missionTime > _maxTime) || {_unit getVariable [QGVAR(isSurrendering), false]} || {_unit getVariable ["ACE_isUnconscious", false]}) exitWith {
[_pfID] call CBA_fnc_removePerFrameHandler;
};
//Only break animation if they are actualy the "hands up" animation (because we are using switchmove there won't be an transition)
@@ -101,9 +112,9 @@ if (_state) then {
//Break out of hands up animation loop
[_unit, "ACE_AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon", 2] call EFUNC(common,doAnimation);
};
- }, 0, [_unit, (ACE_time + 20)]] call CBA_fnc_addPerFrameHandler;
+ }, 0, [_unit, (CBA_missionTime + 20)]] call CBA_fnc_addPerFrameHandler;
};
};
//Global Event after changes:
-["CaptiveStatusChanged", [_unit, _state, "SetSurrendered"]] call EFUNC(common,globalEvent);
+["ace_captiveStatusChanged", [_unit, _state, "SetSurrendered"]] call CBA_fnc_globalEvent;
diff --git a/addons/captives/stringtable.xml b/addons/captives/stringtable.xml
index 9391cb7da3..4044723c4a 100644
--- a/addons/captives/stringtable.xml
+++ b/addons/captives/stringtable.xml
@@ -5,7 +5,7 @@
Take Prisoner
Gefangen nehmen
Tomar prisionero
- Capturer le prisonnier
+ Prendre prisonnier
Aresztuj
Zajmout osobu
Arresta il prigioniero
@@ -54,7 +54,7 @@
Du musst ihn zuerst gefangen nehmen.
Necesitas hacerle prisionero primero!
Najpierw musisz go aresztować!
- Vous devez d'abord le capturer!
+ Vous devez d'abord le capturer !
Musíš ho nejdříve zajmout!
Prima devi arrestarlo!
Você deve tomá-lo como prisioneiro primeiro!
@@ -112,7 +112,7 @@
Unload
@@ -18,6 +20,8 @@
Выгрузить
Vyložit
Descargar
+ Scarica
+ Décharger
Cargo space left: %1
@@ -45,6 +53,8 @@
Осталось мест: %1
Zbývající prostor: %1
Espacio de carga restante: %1
+ Spazio cargo rimanente: %1
+ Espace de cargaison restant : %1
Enable Cargo
@@ -54,6 +64,8 @@
Включить модуль перевозки грузов
Povolit náklad
Habilitar carga
+ Abilita Cargo
+ Activer la cargaison
Enable the load in cargo module
@@ -63,6 +75,8 @@
Включает модуль погрузки и перевозки грузов
Habilitar la carga en el módulo de carga
Umožňuje naložit předměty do nákladového prostoru vozidla
+ Abilita il modulo di caricamento in cargo
+ Activer le chargement dans le module de cargaison.
Cargo Settings
@@ -72,6 +86,8 @@
Перевозка грузов
Nastavení nákladu
Ajustes de carga
+ Impostazioni Cargo
+ Réglages de cargaison
Configure the cargo module settings
@@ -81,6 +97,8 @@
Конфигурирует настройки модуля перевозки грузов
Configure los ajustes del módulo de carga
Konfigurace nákladního modulu
+ Configura le impostazioni del modulo cargo
+ Configurer les réglages du module de cargaison
%1<br/>loaded into<br/>%2
@@ -108,40 +126,77 @@
Loading Cargo
+ Belade
Carregando carga
Ładowanie cargo
Nakládám
Погрузка
+ Caricando
+ Cargando
+ Chargement de la cargaison
Unloading Cargo
+ Entlade
Descarregando carga
Rozładowywanie cargo
Vykládám
Выгрузка
+ Scaricando
+ Descargando
+ Déchargement de la cargaison
%1<br/>could not be loaded
+ %1<br/>konnte nicht eingeladen werden
%1<br/>não pode ser carregado
%1<br/>nie mógł zostać załadowany
%1<br/>nemůže být naloženo
%1<br/>не может быть погружен
+ %1<br/>non può essere caricato
+ %1<br/>no pudo ser cargado
+ %1<br /> n'a pas pu être chargé
%1<br/>could not be unloaded
+ %1<br/>konnte nicht entladen werden
%1<br/>não pode ser descarregado
%1<br/>nie mógł zostać rozładowany
%1<br/>nemůže být vyloženo
%1<br/>не может быть выгружен
+ %1<br/>non può essere scaricato
+ %1<br/>no pudo ser descargado
+ %1<br /> n'a pas pu être déchargé
Make Object Loadable
+ Füge Objekt zum Frachtsystem hinzu
+ Ustaw jako ładowalny
+ Rendi oggetto caricabile
+ Hacer objeto cargable
+ Rendre l'objet chargeable
+ Vytvořit objekt nakladatelným
+ Fazer objeto carregável
Sets the synced object as loadable by the cargo system.
+ Das synchronisierte Objekt wird dem Frachtsystem hinzugefügt und ist be- und entladbar.
+ Ustawia zsynchronizowany obiekt jako możliwy do załadowania poprzez system cargo
+ Imposta l'oggetto sincronizzato come caricabile dal sistema cargo
+ Sincronizar un objecto para hacerlo cargable.
+ Rend l'objet synchronisé comme chargeable par le système de cargaison.
+ Nastaví synchronizované objekty nakladatelnými za pomocí Nákladního systému.
+ Seta o objeto sincronizado como carregável
Object's Size
+ Objektgröße
+ Rozmiar obiektu
+ Dimensioni dell'oggetto
+ Tamaño del objeto
+ Taille de l'objet
+ Velikost objektu
+ Tamanho do objeto
\ No newline at end of file
diff --git a/addons/common/ACE_Settings.hpp b/addons/common/ACE_Settings.hpp
index d6226fd0ab..2d8a5d7a27 100644
--- a/addons/common/ACE_Settings.hpp
+++ b/addons/common/ACE_Settings.hpp
@@ -49,7 +49,7 @@ class ACE_Settings {
description = CSTRING(SettingFeedbackIconsDesc);
values[] = {ECSTRING(optionsmenu,Hide), ECSTRING(optionsmenu,TopRightDown), ECSTRING(optionsmenu,TopRightLeft), ECSTRING(optionsmenu,TopLeftDown), ECSTRING(optionsmenu,TopLeftRight)};
};
- class GVAR(SettingProgressBarLocation) {
+ class GVAR(settingProgressBarLocation) {
value = 0;
typeName = "SCALAR";
force = 0;
diff --git a/addons/common/CfgEden.hpp b/addons/common/CfgEden.hpp
new file mode 100644
index 0000000000..1b833b0342
--- /dev/null
+++ b/addons/common/CfgEden.hpp
@@ -0,0 +1,11 @@
+class Cfg3DEN {
+ class Object {
+ class AttributeCategories {
+ class ace_attributes {
+ displayName = CSTRING(Options);
+ collapsed = 1;
+ class Attributes {};
+ };
+ };
+ };
+};
diff --git a/addons/common/CfgEventHandlers.hpp b/addons/common/CfgEventHandlers.hpp
index 1afbe16512..beb07e35e7 100644
--- a/addons/common/CfgEventHandlers.hpp
+++ b/addons/common/CfgEventHandlers.hpp
@@ -1,4 +1,10 @@
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
@@ -13,6 +19,12 @@ class Extended_PostInit_EventHandlers {
};
};
+class Extended_DisplayLoad_EventHandlers {
+ class RscDisplayMission {
+ ADDON = QUOTE(_this call COMPILE_FILE(XEH_missionDisplayLoad));
+ };
+};
+
class Extended_InitPost_EventHandlers {
class All {
class GVAR(executePersistent) {
@@ -21,7 +33,7 @@ class Extended_InitPost_EventHandlers {
};
class CAManBase {
class GVAR(setName) {
- init = QUOTE(if (local (_this select 0)) then {_this call FUNC(setName)};);
+ init = QUOTE(if (local (_this select 0)) then {[ARR_2(FUNC(setName),_this)] call CBA_fnc_execNextFrame};);
};
class GVAR(muteUnit) {
init = QUOTE(_this call FUNC(muteUnitHandleInitPost));
@@ -64,3 +76,9 @@ class Extended_FiredBIS_EventHandlers {
ADDON = QUOTE(_this call FUNC(firedEH));
};
};
+
+class Extended_Engine_EventHandlers {
+ class All {
+ ADDON = QUOTE(_this call FUNC(handleEngine));
+ };
+};
diff --git a/addons/common/CfgLocationTypes.hpp b/addons/common/CfgLocationTypes.hpp
index 8ff7ba8674..15b56c120c 100644
--- a/addons/common/CfgLocationTypes.hpp
+++ b/addons/common/CfgLocationTypes.hpp
@@ -5,7 +5,7 @@ class CfgLocationTypes {
class ACE_HashLocation {
color[] = {0,0,0,0};
drawStyle = "bananas";
- font = "PuristaMedium";
+ font = "RobotoCondensed";
importance = 5;
name = "HashLocation";
shadow = 0;
diff --git a/addons/common/CfgUnitInsignia.hpp b/addons/common/CfgUnitInsignia.hpp
index c1cd541e9c..337baa4235 100644
--- a/addons/common/CfgUnitInsignia.hpp
+++ b/addons/common/CfgUnitInsignia.hpp
@@ -3,13 +3,13 @@ class CfgUnitInsignia {
class ACE_insignia_logo {
displayName = "ACE3";
author = CSTRING(ACETeam);
- texture = PATHTOF(data\Insignia_ace3logo_ca.paa);
+ texture = QPATHTOF(data\Insignia_ace3logo_ca.paa);
textureVehicle = "";
};
class ACE_insignia_banana {
displayName = "ABE3";
author = CSTRING(ACETeam);
- texture = PATHTOF(data\insignia_banana_ca.paa);
+ texture = QPATHTOF(data\insignia_banana_ca.paa);
textureVehicle = "";
};
};
diff --git a/addons/common/CfgVehicles.hpp b/addons/common/CfgVehicles.hpp
index de1f7f7cf4..1e958027be 100644
--- a/addons/common/CfgVehicles.hpp
+++ b/addons/common/CfgVehicles.hpp
@@ -36,7 +36,7 @@ class CfgVehicles {
scope = 2;
isGlobal = 1;
isSingular = 1;
- icon = QUOTE(PATHTOF(UI\Icon_Module_CheckPBO_ca.paa));
+ icon = QPATHTOF(UI\Icon_Module_CheckPBO_ca.paa);
class Arguments {
class Action {
displayName = CSTRING(CheckPBO_Action_DisplayName);
@@ -82,7 +82,7 @@ class CfgVehicles {
displayName = CSTRING(LSDVehicles_DisplayName);
function = "ACE_Common_fnc_moduleLSDVehicles";
scope = 2;
- icon = QUOTE(PATHTOF(UI\Icon_Module_LSD_ca.paa));
+ icon = QPATHTOF(UI\Icon_Module_LSD_ca.paa);
isGlobal = 1;
class Arguments {};
class ModuleDescription: ModuleDescription {
@@ -132,7 +132,7 @@ class CfgVehicles {
class ACE_Headbug_Fix: Bicycle {
scope = 1;
side = 3;
- model = PATHTOF(data\ACE_HeadBanger.p3d);
+ model = QPATHTOF(data\ACE_HeadBanger.p3d);
//model = QPATHTO_M(ACE_HeadBanger.p3d);
author = CSTRING(ACETeam);
displayName = " ";
diff --git a/addons/common/CfgWeapons.hpp b/addons/common/CfgWeapons.hpp
index 22075e2903..488d4210c4 100644
--- a/addons/common/CfgWeapons.hpp
+++ b/addons/common/CfgWeapons.hpp
@@ -34,8 +34,8 @@ class CfgWeapons {
scope = 2;
displayName = CSTRING(bananaDisplayName);
descriptionShort = CSTRING(bananaDescr);
- model = PATHTOF(data\banana.p3d);
- picture = PATHTOF(data\icon_banana_ca.paa);
+ model = QPATHTOF(data\banana.p3d);
+ picture = QPATHTOF(data\icon_banana_ca.paa);
icon = "iconObject_circle";
mapSize = 0.034;
class ItemInfo: InventoryItem_Base_F {
diff --git a/addons/common/HintConfig.hpp b/addons/common/HintConfig.hpp
index bd74ac510a..04c6995318 100644
--- a/addons/common/HintConfig.hpp
+++ b/addons/common/HintConfig.hpp
@@ -25,7 +25,7 @@ class RscTitles {
y = safeZoneY + 0.2 * safezoneH;
w = 0.2 * safeZoneW;
h = 0.1 * SafeZoneH;
- font = "PuristaMedium";
+ font = "RobotoCondensed";
};
};
};
diff --git a/addons/common/RscInfoType.hpp b/addons/common/RscInfoType.hpp
index 4d94f8ae2c..97d4b325e9 100644
--- a/addons/common/RscInfoType.hpp
+++ b/addons/common/RscInfoType.hpp
@@ -1,136 +1,118 @@
class RscInGameUI {
class RscUnitInfo {
- onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call FUNC(localEvent););
+ onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
};
class RscUnitInfoNoHUD {
- onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call FUNC(localEvent););
+ onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
};
class RscUnitInfoSoldier: RscUnitInfo {
- onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""; uiNamespace setVariable [ARR_2('ACE_dlgSoldier', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Soldier')])] call FUNC(localEvent););
+ onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgSoldier', _this select 0)]; [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Soldier')])] call CBA_fnc_localEvent;);
};
class RscUnitInfoTank: RscUnitInfo {
- onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""; uiNamespace setVariable [ARR_2('ACE_dlgVehicle', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Vehicle')])] call FUNC(localEvent););
+ onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgVehicle', _this select 0)]; [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Vehicle')])] call CBA_fnc_localEvent;);
};
-
+
class RscUnitInfoAirNoWeapon: RscUnitInfo {
- onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""; uiNamespace setVariable [ARR_2('ACE_dlgAircraft', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Aircraft')])] call FUNC(localEvent););
+ onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgAircraft', _this select 0)]; [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Aircraft')])] call CBA_fnc_localEvent;);
};
class RscUnitInfoAir: RscUnitInfoAirNoWeapon {
- onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""; uiNamespace setVariable [ARR_2('ACE_dlgAircraft', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Aircraft')])] call FUNC(localEvent););
+ onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgAircraft', _this select 0)]; [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Aircraft')])] call CBA_fnc_localEvent;);
};
class RscUnitInfo_AH64D_gunner {
- onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_dlgAircraft', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Aircraft')])] call FUNC(localEvent););
+ onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_dlgAircraft', _this select 0)]; [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Aircraft')])] call CBA_fnc_localEvent;);
};
class RscUnitInfoUAV {
- onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_dlgUAV', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'UAV')])] call FUNC(localEvent););
+ onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_dlgUAV', _this select 0)]; [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'UAV')])] call CBA_fnc_localEvent;);
};
class RscUnitInfoSubmarine: RscUnitInfo {
- onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""; uiNamespace setVariable [ARR_2('ACE_dlgSubmarine', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Submarine')])] call FUNC(localEvent););
+ onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgSubmarine', _this select 0)]; [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Submarine')])] call CBA_fnc_localEvent;);
};
class RscUnitInfoShip: RscUnitInfo {
- onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""; uiNamespace setVariable [ARR_2('ACE_dlgShip', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Ship')])] call FUNC(localEvent););
+ onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgShip', _this select 0)]; [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Ship')])] call CBA_fnc_localEvent;);
};
class RscWeaponEmpty {
- onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call FUNC(localEvent););
+ onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
};
class RscWeaponRangeFinder {
- onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call FUNC(localEvent););
+ onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
};
class RscWeaponRangeArtillery {
- onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_dlgArtillery', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Artillery')])] call FUNC(localEvent););
+ onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_dlgArtillery', _this select 0)]; [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Artillery')])] call CBA_fnc_localEvent;);
};
class RscWeaponRangeArtilleryAuto {
- onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_dlgArtillery', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Artillery')])] call FUNC(localEvent););
+ onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_dlgArtillery', _this select 0)]; [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Artillery')])] call CBA_fnc_localEvent;);
};
class RscWeaponRangeFinderPAS13 {
- onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call FUNC(localEvent););
+ onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
};
class RscOptics_LaserDesignator {
- onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call FUNC(localEvent););
+ onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
};
class RscWeaponRangeFinderMAAWS {
- onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call FUNC(localEvent););
+ onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
};
class RscWeaponRangeFinderAbramsCom {
- onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call FUNC(localEvent););
+ onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
};
class RscWeaponRangeFinderAbramsGun {
- onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call FUNC(localEvent););
+ onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
};
class RscWeaponRangeFinderStrykerMGSGun {
- onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call FUNC(localEvent););
+ onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
};
class RscOptics_strider_commander {
- onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call FUNC(localEvent););
+ onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
};
class RscOptics_titan {
- onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call FUNC(localEvent););
+ onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
};
class RscOptics_punisher {
- onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call FUNC(localEvent););
+ onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
};
class RscOptics_SDV_periscope {
- onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call FUNC(localEvent););
+ onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
};
class RscUnitInfoParachute: RscUnitInfo {
- onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""; uiNamespace setVariable [ARR_2('ACE_dlgParachute', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Parachute')])] call FUNC(localEvent););
+ onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgParachute', _this select 0)]; [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Parachute')])] call CBA_fnc_localEvent;);
};
class RscUnitVehicle {
- onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call FUNC(localEvent););
+ onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
};
class RscOptics_LaserDesignator_02 {
- onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call FUNC(localEvent););
+ onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
};
class RscStaminaBar {
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscStaminaBar"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2(QUOTE(QGVAR(dlgStaminaBar)),_this select 0)]);
};
-};
-class RscDisplayInventory {
- onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDisplayInventory"",'IGUI')] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""; [ARR_2('inventoryDisplayLoaded', _this)] call FUNC(localEvent););
-};
-
-// map
-class RscDisplayMainMap {
- onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDiary"",'GUI')] call (uinamespace getVariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgMap', _this select 0)]; [ARR_2('mapDisplayLoaded', [ARR_2(_this select 0, 'Ingame')])] call FUNC(localEvent););
-};
-
-class RscDisplayGetReady: RscDisplayMainMap {
- onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDiary"",'GUI')] call (uinamespace getVariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgMap', _this select 0)]; [ARR_2('mapDisplayLoaded', [ARR_2(_this select 0, 'Briefing')])] call FUNC(localEvent););
-};
-
-class RscDisplayServerGetReady: RscDisplayGetReady {
- onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDiary"",'GUI')] call (uinamespace getVariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgMap', _this select 0)]; [ARR_2('mapDisplayLoaded', [ARR_2(_this select 0, 'ServerBriefing')])] call FUNC(localEvent););
-};
-
-
-class RscDisplayClientGetReady: RscDisplayGetReady {
- onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDiary"",'GUI')] call (uinamespace getVariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgMap', _this select 0)]; [ARR_2('mapDisplayLoaded', [ARR_2(_this select 0, 'ClientBriefing')])] call FUNC(localEvent););
+ class RscStanceInfo {
+ onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscStanceInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Stance')])] call CBA_fnc_localEvent;);
+ };
};
diff --git a/addons/common/XEH_PREP.hpp b/addons/common/XEH_PREP.hpp
new file mode 100644
index 0000000000..4f56dd4d86
--- /dev/null
+++ b/addons/common/XEH_PREP.hpp
@@ -0,0 +1,280 @@
+
+PREP(addCanInteractWithCondition);
+PREP(addLineToDebugDraw);
+PREP(addSetting);
+PREP(addToInventory);
+PREP(assignedItemFix);
+PREP(assignObjectsInList);
+PREP(ambientBrightness);
+PREP(ASLToPosition);
+PREP(binarizeNumber);
+PREP(blurScreen);
+PREP(cachedCall);
+PREP(canGetInPosition);
+PREP(canInteractWith);
+PREP(changeProjectileDirection);
+PREP(checkFiles);
+PREP(checkPBOs);
+PREP(claim);
+PREP(codeToString);
+PREP(createOrthonormalReference);
+PREP(currentChannel);
+PREP(debug);
+PREP(debugModule);
+PREP(defineVariable);
+PREP(deviceKeyFindValidIndex);
+PREP(deviceKeyRegisterNew);
+PREP(deprecateComponent);
+PREP(disableAI);
+PREP(disableUserInput);
+PREP(displayIcon);
+PREP(displayText);
+PREP(displayTextPicture);
+PREP(displayTextStructured);
+PREP(doAnimation);
+PREP(dropBackpack);
+PREP(endRadioTransmission);
+PREP(eraseCache);
+PREP(errorMessage);
+PREP(execNextFrame);
+PREP(execPersistentFnc);
+PREP(execRemoteFnc);
+PREP(executePersistent);
+PREP(filter);
+PREP(findUnloadPosition);
+PREP(firedEH);
+PREP(fixCollision);
+PREP(fixFloating);
+PREP(fixLoweredRifleAnimation);
+PREP(fixPosition);
+PREP(getAllDefinedSetVariables);
+PREP(getAllGear);
+PREP(getDeathAnim);
+PREP(getCaptivityStatus);
+PREP(getDefaultAnim);
+PREP(getDefinedVariable);
+PREP(getDefinedVariableDefault);
+PREP(getDefinedVariableInfo);
+PREP(getFirstObjectIntersection);
+PREP(getFirstTerrainIntersection);
+PREP(getForceWalkStatus);
+PREP(getGunner);
+PREP(getInPosition);
+PREP(getMapData);
+PREP(getMapGridData);
+PREP(getMapGridFromPos);
+PREP(getMapPosFromGrid);
+PREP(getMarkerType);
+PREP(getMGRSdata);
+PREP(getName);
+PREP(getNumberFromMissionSQM);
+PREP(getNumberMagazinesIn);
+PREP(getPitchBankYaw);
+PREP(getSettingData);
+PREP(getStaminaBarControl);
+PREP(getStringFromMissionSQM);
+PREP(getTargetAzimuthAndInclination);
+PREP(getTargetDistance);
+PREP(getTargetObject);
+PREP(getTurnedOnLights);
+PREP(getTurretDirection);
+PREP(getUavControlPosition);
+PREP(getVehicleCargo);
+PREP(getVehicleCodriver);
+PREP(getVersion);
+PREP(getWeaponAzimuthAndInclination);
+PREP(getWeaponIndex);
+PREP(getWeaponState);
+PREP(getWindDirection);
+PREP(getZoom);
+PREP(goKneeling);
+PREP(hadamardProduct);
+PREP(handleEngine);
+PREP(handleModifierKey);
+PREP(handleModifierKeyUp);
+PREP(handleScrollWheel);
+PREP(hasItem);
+PREP(hasMagazine);
+PREP(headBugFix);
+PREP(hideUnit);
+PREP(insertionSort);
+PREP(interpolateFromArray);
+PREP(inTransitionAnim);
+PREP(isAutoWind);
+PREP(isAwake);
+PREP(isEngineer);
+PREP(isEOD);
+PREP(isFeatureCameraActive);
+PREP(isInBuilding);
+PREP(isModLoaded);
+PREP(isPlayer);
+PREP(isUnderwater);
+PREP(lightIntensityFromObject);
+PREP(loadPerson);
+PREP(loadPersonLocal);
+PREP(loadSettingsFromProfile);
+PREP(loadSettingsOnServer);
+PREP(loadSettingsLocalizedText);
+PREP(map);
+PREP(moduleCheckPBOs);
+PREP(moduleLSDVehicles);
+PREP(muteUnit);
+PREP(muteUnitHandleInitPost);
+PREP(muteUnitHandleRespawn);
+PREP(numberToDigits);
+PREP(numberToDigitsString);
+PREP(numberToString);
+PREP(onAnswerRequest);
+PREP(owned);
+PREP(parseList);
+PREP(player);
+PREP(playerSide);
+PREP(positionToASL);
+PREP(progressBar);
+PREP(readSettingFromModule);
+PREP(readSettingsFromParamsArray);
+PREP(receiveRequest);
+PREP(removeCanInteractWithCondition);
+PREP(removeSpecificMagazine);
+PREP(requestCallback);
+PREP(resetAllDefaults);
+PREP(restoreVariablesJIP);
+PREP(runAfterSettingsInit);
+PREP(sanitizeString);
+PREP(sendRequest);
+PREP(serverLog);
+PREP(setAllGear);
+PREP(setApproximateVariablePublic);
+PREP(setCaptivityStatus);
+PREP(setDefinedVariable);
+PREP(setDisableUserInputStatus);
+PREP(setForceWalkStatus);
+PREP(setHearingCapability);
+PREP(setName);
+PREP(setParameter);
+PREP(setPitchBankYaw);
+PREP(setProne);
+PREP(setSetting);
+PREP(setSettingFromConfig);
+PREP(setVariableJIP);
+PREP(setVariablePublic);
+PREP(setVolume);
+PREP(showHud);
+PREP(statusEffect_addType);
+PREP(statusEffect_get);
+PREP(statusEffect_localEH);
+PREP(statusEffect_resetVariables);
+PREP(statusEffect_respawnEH);
+PREP(statusEffect_sendEffects);
+PREP(statusEffect_set);
+PREP(stringCompare);
+PREP(stringToColoredText);
+PREP(stringRemoveWhiteSpace);
+PREP(switchToGroupSide);
+PREP(throttledPublicVariable);
+PREP(toBin);
+PREP(toBitmask);
+PREP(toHex);
+PREP(toNumber);
+PREP(unhideUnit);
+PREP(uniqueElements);
+PREP(unloadPerson);
+PREP(unloadPersonLocal);
+PREP(unmuteUnit);
+PREP(useItem);
+PREP(useMagazine);
+PREP(waitAndExecute);
+PREP(waitUntilAndExecute);
+PREP(waveHeightAt);
+
+PREP(translateToWeaponSpace);
+PREP(translateToModelSpace);
+
+// Model and drawing helpers
+PREP(worldToScreenBounds);
+
+// config items
+PREP(getConfigType);
+PREP(getItemType);
+PREP(getWeaponType);
+PREP(getWeaponModes);
+PREP(getWeaponMuzzles);
+
+// config objects
+PREP(getConfigTypeObject);
+PREP(getConfigGunner);
+PREP(getConfigCommander);
+PREP(getSelectionsWithoutHitPoints);
+PREP(getReflectorsWithSelections);
+PREP(getLightProperties);
+PREP(getLightPropertiesWeapon);
+PREP(getVehicleCrew);
+PREP(getVehicleUAVCrew);
+
+// turrets
+PREP(getTurrets);
+PREP(getTurretIndex);
+PREP(getTurretConfigPath);
+PREP(getTurretGunner);
+PREP(getTurretCommander);
+PREP(getTurretCopilot);
+PREP(getDoorTurrets);
+PREP(getTurretsFFV);
+PREP(getTurretsOther);
+PREP(hasHatch);
+
+// missing inventory commands
+PREP(binocularMagazine);
+PREP(removeBinocularMagazine);
+
+// ACE_Debug
+PREP(getChildren);
+PREP(getDisplayConfigName);
+PREP(monitor);
+PREP(showUser);
+
+PREP(dumpPerformanceCounters);
+PREP(dumpArray);
+
+PREP(globalEvent);
+PREP(addEventHandler);
+PREP(objectEvent);
+PREP(targetEvent);
+PREP(serverEvent);
+PREP(localEvent);
+PREP(removeEventHandler);
+PREP(removeAlLEventHandlers);
+
+// Synchronized Events
+PREP(syncedEventPFH);
+PREP(addSyncedEventHandler);
+PREP(removeSyncedEventHandler);
+PREP(requestSyncedEvent);
+PREP(syncedEvent);
+
+PREP(_handleSyncedEvent);
+PREP(_handleRequestSyncedEvent);
+PREP(_handleRequestAllSyncedEvents);
+
+// other eventhandlers
+PREP(addActionEventHandler);
+PREP(addActionMenuEventHandler);
+PREP(addScrollWheelEventHandler);
+PREP(addMapMarkerCreatedEventHandler);
+
+PREP(removeActionEventHandler);
+PREP(removeActionMenuEventHandler);
+PREP(removeScrollWheelEventHandler);
+PREP(removeMapMarkerCreatedEventHandler);
+
+// hashes
+PREP(hashCreate);
+PREP(hashSet);
+PREP(hashGet);
+PREP(hashHasKey);
+PREP(hashRem);
+PREP(hashListCreateList);
+PREP(hashListCreateHash);
+PREP(hashListSelect);
+PREP(hashListSet);
+PREP(hashListPush);
diff --git a/addons/common/XEH_missionDisplayLoad.sqf b/addons/common/XEH_missionDisplayLoad.sqf
new file mode 100644
index 0000000000..a07c301288
--- /dev/null
+++ b/addons/common/XEH_missionDisplayLoad.sqf
@@ -0,0 +1,4 @@
+#include "script_component.hpp"
+
+call COMPILE_FILE(init_handleScrollWheel);
+call COMPILE_FILE(init_handleModifierKey);
diff --git a/addons/common/XEH_postInit.sqf b/addons/common/XEH_postInit.sqf
index 65b9804da5..93589bb7f5 100644
--- a/addons/common/XEH_postInit.sqf
+++ b/addons/common/XEH_postInit.sqf
@@ -3,47 +3,6 @@
// #define DEBUG_MODE_FULL
#include "script_component.hpp"
-
-//////////////////////////////////////////////////
-// PFHs
-//////////////////////////////////////////////////
-
-//Singe PFEH to handle execNextFrame, waitAndExec and waitUntilAndExec:
-[{
- BEGIN_COUNTER(waitAndExec);
-
- //Handle the waitAndExec array:
- while {!(GVAR(waitAndExecArray) isEqualTo []) && {GVAR(waitAndExecArray) select 0 select 0 <= ACE_Time}} do {
- private _entry = GVAR(waitAndExecArray) deleteAt 0;
- (_entry select 2) call (_entry select 1);
- };
-
- //Handle the execNextFrame array:
- {
- (_x select 0) call (_x select 1);
- false
- } count GVAR(nextFrameBufferA);
-
- //Swap double-buffer:
- GVAR(nextFrameBufferA) = GVAR(nextFrameBufferB);
- GVAR(nextFrameBufferB) = [];
- GVAR(nextFrameNo) = diag_frameno + 1;
-
- //Handle the waitUntilAndExec array:
- {
- // if condition is satisifed call statement
- if ((_x select 2) call (_x select 0)) then {
- // make sure to delete the correct handle when multiple conditions are met in one frame
- GVAR(waitUntilAndExecArray) deleteAt (GVAR(waitUntilAndExecArray) find _x);
- (_x select 2) call (_x select 1);
- };
- nil
- } count +GVAR(waitUntilAndExecArray);
-
- END_COUNTER(waitAndExec);
-}, 0, []] call CBA_fnc_addPerFrameHandler;
-
-
//////////////////////////////////////////////////
// Get Map Data
//////////////////////////////////////////////////
@@ -59,28 +18,29 @@
//////////////////////////////////////////////////
//Status Effect EHs:
-["setStatusEffect", {_this call FUNC(statusEffect_set)}] call FUNC(addEventHandler);
+[QGVAR(setStatusEffect), {_this call FUNC(statusEffect_set)}] call CBA_fnc_addEventHandler;
["forceWalk", false, ["ACE_SwitchUnits", "ACE_Attach", "ACE_dragging", "ACE_Explosives", "ACE_Ladder", "ACE_Sandbag", "ACE_refuel", "ACE_rearm", "ACE_dragging"]] call FUNC(statusEffect_addType);
["blockSprint", false, []] call FUNC(statusEffect_addType);
-["setCaptive", true, [QEGVAR(captives,Handcuffed), QEGVAR(captives,Surrendered), QEGVAR(medical,unconscious)]] call FUNC(statusEffect_addType);
+["setCaptive", true, [QEGVAR(captives,Handcuffed), QEGVAR(captives,Surrendered), "ace_unconscious"]] call FUNC(statusEffect_addType);
["blockDamage", false, ["fixCollision"]] call FUNC(statusEffect_addType);
+["blockEngine", false, ["ACE_Refuel"]] call FUNC(statusEffect_addType);
-["forceWalk", {
+[QGVAR(forceWalk), {
params ["_object", "_set"];
TRACE_2("forceWalk EH",_object,_set);
_object forceWalk (_set > 0);
-}] call FUNC(addEventHandler);
-["blockSprint", { //Name reversed from `allowSprint` because we want NOR logic
+}] call CBA_fnc_addEventHandler;
+[QGVAR(blockSprint), { //Name reversed from `allowSprint` because we want NOR logic
params ["_object", "_set"];
TRACE_2("blockSprint EH",_object,_set);
_object allowSprint (_set == 0);
-}] call FUNC(addEventHandler);
-["setCaptive", {
+}] call CBA_fnc_addEventHandler;
+[QGVAR(setCaptive), {
params ["_object", "_set"];
TRACE_2("setCaptive EH",_object,_set);
_object setCaptive (_set > 0);
-}] call FUNC(addEventHandler);
-["blockDamage", { //Name reversed from `allowDamage` because we want NOR logic
+}] call CBA_fnc_addEventHandler;
+[QGVAR(blockDamage), { //Name reversed from `allowDamage` because we want NOR logic
params ["_object", "_set"];
if ((_object isKindOf "CAManBase") && {(["ace_medical"] call FUNC(isModLoaded))}) then {
TRACE_2("blockDamage EH (using medical)",_object,_set);
@@ -89,7 +49,12 @@
TRACE_2("blockDamage EH (using allowDamage)",_object,_set);
_object allowDamage (_set == 0);
};
-}] call FUNC(addEventHandler);
+}] call CBA_fnc_addEventHandler;
+[QGVAR(blockEngine), {
+ params ["_vehicle", "_set"];
+ _vehicle setVariable [QGVAR(blockEngine), _set > 0, true];
+ _vehicle engineOn false;
+}] call CBA_fnc_addEventHandler;
//Add a fix for BIS's zeus remoteControl module not reseting variables on DC when RC a unit
//This variable is used for isPlayer checks
@@ -110,7 +75,7 @@ if (isServer) then {
};
// Listens for global "SettingChanged" events, to update the force status locally
-["SettingChanged", {
+["ace_settingChanged", {
params ["_name", "_value", "_force"];
if (_force) then {
@@ -120,39 +85,54 @@ if (isServer) then {
_settingData set [6, _force];
};
-}] call FUNC(addEventhandler);
+}] call CBA_fnc_addEventHandler;
// Event to log Fix Headbug output
-["HeadbugFixUsed", {
+[QGVAR(headbugFixUsed), {
params ["_profileName", "_animation"];
ACE_LOGINFO_2("Headbug Used: Name: %1, Animation: %2",_profileName,_animation);
-}] call FUNC(addEventHandler);
+}] call CBA_fnc_addEventHandler;
-["fixCollision", FUNC(fixCollision)] call FUNC(addEventhandler);
-["fixFloating", FUNC(fixFloating)] call FUNC(addEventhandler);
-["fixPosition", FUNC(fixPosition)] call FUNC(addEventhandler);
+[QGVAR(fixCollision), FUNC(fixCollision)] call CBA_fnc_addEventHandler;
+[QGVAR(fixFloating), FUNC(fixFloating)] call CBA_fnc_addEventHandler;
+[QGVAR(fixPosition), FUNC(fixPosition)] call CBA_fnc_addEventHandler;
-["unloadPersonEvent", FUNC(unloadPersonLocal)] call FUNC(addEventhandler);
+["ace_loadPersonEvent", FUNC(loadPersonLocal)] call CBA_fnc_addEventHandler;
+["ace_unloadPersonEvent", FUNC(unloadPersonLocal)] call CBA_fnc_addEventHandler;
-["lockVehicle", {
+[QGVAR(lockVehicle), {
_this setVariable [QGVAR(lockStatus), locked _this];
_this lock 2;
-}] call FUNC(addEventhandler);
+}] call CBA_fnc_addEventHandler;
-["unlockVehicle", {
+[QGVAR(unlockVehicle), {
_this lock (_this getVariable [QGVAR(lockStatus), locked _this]);
-}] call FUNC(addEventhandler);
+}] call CBA_fnc_addEventHandler;
-["setDir", {(_this select 0) setDir (_this select 1)}] call FUNC(addEventhandler);
-["setFuel", {(_this select 0) setFuel (_this select 1)}] call FUNC(addEventhandler);
-["setSpeaker", {(_this select 0) setSpeaker (_this select 1)}] call FUNC(addEventhandler);
-["selectLeader", {(_this select 0) selectLeader (_this select 1)}] call FUNC(addEventHandler);
-["setVelocity", {(_this select 0) setVelocity (_this select 1)}] call FUNC(addEventHandler);
+[QGVAR(setDir), {(_this select 0) setDir (_this select 1)}] call CBA_fnc_addEventHandler;
+[QGVAR(setFuel), {(_this select 0) setFuel (_this select 1)}] call CBA_fnc_addEventHandler;
+[QGVAR(engineOn), {(_this select 0) engineOn (_this select 1)}] call CBA_fnc_addEventHandler;
+[QGVAR(setSpeaker), {(_this select 0) setSpeaker (_this select 1)}] call CBA_fnc_addEventHandler;
+[QGVAR(selectLeader), {(_this select 0) selectLeader (_this select 1)}] call CBA_fnc_addEventHandler;
+[QGVAR(setVelocity), {(_this select 0) setVelocity (_this select 1)}] call CBA_fnc_addEventHandler;
+[QGVAR(playMove), {(_this select 0) playMove (_this select 1)}] call CBA_fnc_addEventHandler;
+[QGVAR(playMoveNow), {(_this select 0) playMoveNow (_this select 1)}] call CBA_fnc_addEventHandler;
+[QGVAR(switchMove), {(_this select 0) switchMove (_this select 1)}] call CBA_fnc_addEventHandler;
+[QGVAR(setVectorDirAndUp), {(_this select 0) setVectorDirAndUp (_this select 1)}] call CBA_fnc_addEventHandler;
+[QGVAR(setVanillaHitPointDamage), {(_this select 0) setHitPointDamage (_this select 1)}] call CBA_fnc_addEventHandler;
+
+// Request framework
+[QGVAR(requestCallback), FUNC(requestCallback)] call CBA_fnc_addEventHandler;
+[QGVAR(receiveRequest), FUNC(receiveRequest)] call CBA_fnc_addEventHandler;
+
+[QGVAR(systemChatGlobal), {systemChat _this}] call CBA_fnc_addEventHandler;
if (isServer) then {
- ["hideObjectGlobal", {(_this select 0) hideObjectGlobal (_this select 1)}] call FUNC(addEventHandler);
- ["enableSimulationGlobal", {(_this select 0) enableSimulationGlobal (_this select 1)}] call FUNC(addEventHandler);
+ [QGVAR(hideObjectGlobal), {(_this select 0) hideObjectGlobal (_this select 1)}] call CBA_fnc_addEventHandler;
+ [QGVAR(enableSimulationGlobal), {(_this select 0) enableSimulationGlobal (_this select 1)}] call CBA_fnc_addEventHandler;
+ ["ace_setOwner", {(_this select 0) setOwner (_this select 1)}] call CBA_fnc_addEventHandler;
+ [QGVAR(serverLog), FUNC(serverLog)] call CBA_fnc_addEventHandler;
};
@@ -160,23 +140,19 @@ if (isServer) then {
// Set up remote execution
//////////////////////////////////////////////////
-// ACE events
-"ACEg" addPublicVariableEventHandler {_this call FUNC(_handleNetEvent)};
-"ACEc" addPublicVariableEventHandler {_this call FUNC(_handleNetEvent)};
-
// Synced ACE events
// Handle JIP scenario
if (!isServer) then {
- ["PlayerJip", {
+ ["ace_playerJIP", {
ACE_LOGINFO("JIP event synchronization initialized");
- ["SEH_all", [player]] call FUNC(serverEvent);
- }] call FUNC(addEventHandler);
+ ["ACEa", [player]] call CBA_fnc_serverEvent;
+ }] call CBA_fnc_addEventHandler;
} else {
- ["SEH_all", FUNC(_handleRequestAllSyncedEvents)] call FUNC(addEventHandler);
+ ["ACEa", FUNC(_handleRequestAllSyncedEvents)] call CBA_fnc_addEventHandler;
};
-["SEH", FUNC(_handleSyncedEvent)] call FUNC(addEventHandler);
-["SEH_s", FUNC(_handleRequestSyncedEvent)] call FUNC(addEventHandler);
+["ACEe", FUNC(_handleSyncedEvent)] call CBA_fnc_addEventHandler;
+["ACEs", FUNC(_handleRequestSyncedEvent)] call CBA_fnc_addEventHandler;
if (isServer) then {
[FUNC(syncedEventPFH), 0.5, []] call CBA_fnc_addPerFrameHandler;
@@ -209,16 +185,16 @@ call FUNC(checkFiles);
//////////////////////////////////////////////////
-// Set up SettingsInitialized eventhandler
+// Set up ace_settingsInitialized eventhandler
//////////////////////////////////////////////////
-["SettingsInitialized", {
+["ace_settingsInitialized", {
[
GVAR(checkPBOsAction),
GVAR(checkPBOsCheckAll),
GVAR(checkPBOsWhitelist)
] call FUNC(checkPBOs)
-}] call FUNC(addEventHandler);
+}] call CBA_fnc_addEventHandler;
// Create a pfh to wait until all postinits are ready and settings are initialized
[{
@@ -245,13 +221,13 @@ call FUNC(checkFiles);
[] call FUNC(readSettingsFromParamsArray);
};
// Event so that ACE_Modules have their settings loaded:
- ["InitSettingsFromModules", []] call FUNC(localEvent);
+ [QGVAR(initSettingsFromModules), []] call CBA_fnc_localEvent;
if (isServer) then {
// Publish all settings data after all configs and modules are read
publicVariable QGVAR(settings);
};
-
+
// Load user settings from profile
if (hasInterface) then {
call FUNC(loadSettingsFromProfile);
@@ -261,7 +237,7 @@ call FUNC(checkFiles);
ACE_LOGINFO("Settings initialized.");
//Event that settings are safe to use:
- ["SettingsInitialized", []] call FUNC(localEvent);
+ ["ace_settingsInitialized", []] call CBA_fnc_localEvent;
//Set init finished and run all delayed functions:
GVAR(settingsInitFinished) = true;
@@ -290,41 +266,25 @@ if (!hasInterface) exitWith {};
call FUNC(assignedItemFix);
-GVAR(ScrollWheelFrame) = diag_frameno;
-
-["mainDisplayLoaded", {
- [{
- call FUNC(handleScrollWheelInit);
- call FUNC(handleModifierKeyInit);
- }, [], 0.1] call FUNC(waitAndExecute); // needs delay, otherwise doesn't work without pressing "RESTART" in editor once. Tested in 1.52RC
-}] call FUNC(addEventHandler);
-
-// add PFH to execute event that fires when the main display (46) is created
-private _fnc_initMainDisplayCheck = {
- [{
- if !(isNull findDisplay 46) then {
- // Raise ACE event locally
- ["mainDisplayLoaded", [findDisplay 46]] call FUNC(localEvent);
- [_this select 1] call CBA_fnc_removePerFrameHandler;
- };
- }, 0, []] call CBA_fnc_addPerFrameHandler;
-};
-
-call _fnc_initMainDisplayCheck;
-
-// repeat this every time a savegame is loaded
-addMissionEventHandler ["Loaded", _fnc_initMainDisplayCheck];
-
// @todo remove?
enableCamShake true;
+//FUNC(showHud) needs to be refreshed if it was set during mission init
+["ace_infoDisplayChanged", {
+ GVAR(showHudHash) params ["", "_masks"];
+ if (!(_masks isEqualTo [])) then {
+ [] call FUNC(showHud);
+ };
+}] call CBA_fnc_addEventHandler;
+
+
//////////////////////////////////////////////////
// Eventhandler to set player names
//////////////////////////////////////////////////
// Set the name for the current player
-["playerChanged", {
+["ace_playerChanged", {
params ["_newPlayer","_oldPlayer"];
if (alive _newPlayer) then {
@@ -334,41 +294,25 @@ enableCamShake true;
if (alive _oldPlayer) then {
[_oldPlayer] call FUNC(setName);
};
-}] call FUNC(addEventhandler);
+}] call CBA_fnc_addEventHandler;
//////////////////////////////////////////////////
// Set up numerous eventhanders for player controlled units
//////////////////////////////////////////////////
-//CBA has events for zeus's display onLoad and onUnload (Need to delay a frame for display to be ready)
-private _zeusDisplayChangedFNC = {
- [{
- private _data = !(isNull findDisplay 312);
- ["zeusDisplayChanged", [ACE_player, _data]] call FUNC(localEvent);
- }, []] call FUNC(execNextFrame);
-};
-["CBA_curatorOpened", _zeusDisplayChangedFNC] call CBA_fnc_addEventHandler;
-["CBA_curatorClosed", _zeusDisplayChangedFNC] call CBA_fnc_addEventHandler;
-
-
// default variables
GVAR(OldPlayerVehicle) = vehicle objNull;
GVAR(OldPlayerTurret) = [objNull] call FUNC(getTurretIndex);
GVAR(OldPlayerWeapon) = currentWeapon objNull;
-GVAR(OldPlayerInventory) = [objNull] call FUNC(getAllGear);
+GVAR(OldPlayerInventory) = [];
+GVAR(OldPlayerInventoryNoAmmo) = [];
GVAR(OldPlayerVisionMode) = currentVisionMode objNull;
GVAR(OldCameraView) = "";
GVAR(OldVisibleMap) = false;
GVAR(OldInventoryDisplayIsOpen) = nil; //@todo check this
GVAR(OldIsCamera) = false;
-// clean up playerChanged eventhandler from preinit and put it in the same PFH as the other events to reduce overhead and guarantee advantageous execution order
-if (!isNil QGVAR(PreInit_playerChanged_PFHID)) then {
- [GVAR(PreInit_playerChanged_PFHID)] call CBA_fnc_removePerFrameHandler;
- GVAR(PreInit_playerChanged_PFHID) = nil;
-};
-
// PFH to raise varios events
[{
BEGIN_COUNTER(stateChecker);
@@ -382,7 +326,7 @@ if (!isNil QGVAR(PreInit_playerChanged_PFHID)) then {
uiNamespace setVariable ["ACE_player", _data];
// Raise ACE event locally
- ["playerChanged", [ACE_player, _oldPlayer]] call FUNC(localEvent);
+ ["ace_playerChanged", [ACE_player, _oldPlayer]] call CBA_fnc_localEvent;
};
// "playerVehicleChanged" event
@@ -390,7 +334,7 @@ if (!isNil QGVAR(PreInit_playerChanged_PFHID)) then {
if !(_data isEqualTo GVAR(OldPlayerVehicle)) then {
// Raise ACE event locally
GVAR(OldPlayerVehicle) = _data;
- ["playerVehicleChanged", [ACE_player, _data]] call FUNC(localEvent);
+ ["ace_playerVehicleChanged", [ACE_player, _data]] call CBA_fnc_localEvent;
};
// "playerTurretChanged" event
@@ -398,7 +342,7 @@ if (!isNil QGVAR(PreInit_playerChanged_PFHID)) then {
if !(_data isEqualTo GVAR(OldPlayerTurret)) then {
// Raise ACE event locally
GVAR(OldPlayerTurret) = _data;
- ["playerTurretChanged", [ACE_player, _data]] call FUNC(localEvent);
+ ["ace_playerTurretChanged", [ACE_player, _data]] call CBA_fnc_localEvent;
};
// "playerWeaponChanged" event
@@ -406,15 +350,40 @@ if (!isNil QGVAR(PreInit_playerChanged_PFHID)) then {
if (_data != GVAR(OldPlayerWeapon)) then {
// Raise ACE event locally
GVAR(OldPlayerWeapon) = _data;
- ["playerWeaponChanged", [ACE_player, _data]] call FUNC(localEvent);
+ ["ace_playerWeaponChanged", [ACE_player, _data]] call CBA_fnc_localEvent;
};
// "playerInventoryChanged" event
- _data = [ACE_player] call FUNC(getAllGear);
+ _data = getUnitLoadout ACE_player;
if !(_data isEqualTo GVAR(OldPlayerInventory)) then {
// Raise ACE event locally
GVAR(OldPlayerInventory) = _data;
- ["playerInventoryChanged", [ACE_player, _data]] call FUNC(localEvent);
+
+ // we don't want to trigger this just because your ammo counter decreased.
+ _data = + GVAR(OldPlayerInventory);
+
+ private _weaponInfo = _data param [0, []];
+ if !(_weaponInfo isEqualTo []) then {
+ _weaponInfo set [4, primaryWeaponMagazine ACE_player];
+ _weaponInfo deleteAt 5;
+ };
+
+ _weaponInfo = _data param [1, []];
+ if !(_weaponInfo isEqualTo []) then {
+ _weaponInfo set [4, secondaryWeaponMagazine ACE_player];
+ _weaponInfo deleteAt 5;
+ };
+
+ _weaponInfo = _data param [2, []];
+ if !(_weaponInfo isEqualTo []) then {
+ _weaponInfo set [4, handgunMagazine ACE_player];
+ _weaponInfo deleteAt 5;
+ };
+
+ if !(_data isEqualTo GVAR(OldPlayerInventoryNoAmmo)) then {
+ GVAR(OldPlayerInventoryNoAmmo) = _data;
+ ["ace_playerInventoryChanged", [ACE_player, [ACE_player, false] call FUNC(getAllGear)]] call CBA_fnc_localEvent;
+ };
};
// "playerVisionModeChanged" event
@@ -422,7 +391,7 @@ if (!isNil QGVAR(PreInit_playerChanged_PFHID)) then {
if !(_data isEqualTo GVAR(OldPlayerVisionMode)) then {
// Raise ACE event locally
GVAR(OldPlayerVisionMode) = _data;
- ["playerVisionModeChanged", [ACE_player, _data]] call FUNC(localEvent);
+ ["ace_playerVisionModeChanged", [ACE_player, _data]] call CBA_fnc_localEvent;
};
// "cameraViewChanged" event
@@ -430,7 +399,7 @@ if (!isNil QGVAR(PreInit_playerChanged_PFHID)) then {
if !(_data isEqualTo GVAR(OldCameraView)) then {
// Raise ACE event locally
GVAR(OldCameraView) = _data;
- ["cameraViewChanged", [ACE_player, _data]] call FUNC(localEvent);
+ ["ace_cameraViewChanged", [ACE_player, _data]] call CBA_fnc_localEvent;
};
// "visibleMapChanged" event
@@ -438,15 +407,7 @@ if (!isNil QGVAR(PreInit_playerChanged_PFHID)) then {
if (!_data isEqualTo GVAR(OldVisibleMap)) then {
// Raise ACE event locally
GVAR(OldVisibleMap) = _data;
- ["visibleMapChanged", [ACE_player, _data]] call FUNC(localEvent);
- };
-
- // "inventoryDisplayChanged" event
- _data = !(isNull findDisplay 602);
- if !(_data isEqualTo GVAR(OldInventoryDisplayIsOpen)) then {
- // Raise ACE event locally
- GVAR(OldInventoryDisplayIsOpen) = _data;
- ["inventoryDisplayChanged", [ACE_player, _data]] call FUNC(localEvent);
+ ["ace_visibleMapChanged", [ACE_player, _data]] call CBA_fnc_localEvent;
};
// "activeCameraChanged" event
@@ -454,7 +415,7 @@ if (!isNil QGVAR(PreInit_playerChanged_PFHID)) then {
if !(_data isEqualTo GVAR(OldIsCamera)) then {
// Raise ACE event locally
GVAR(OldIsCamera) = _data;
- ["activeCameraChanged", [ACE_player, _data]] call FUNC(localEvent);
+ ["ace_activeCameraChanged", [ACE_player, _data]] call CBA_fnc_localEvent;
};
END_COUNTER(stateChecker);
@@ -465,22 +426,29 @@ if (!isNil QGVAR(PreInit_playerChanged_PFHID)) then {
// Eventhandlers for player controlled machines
//////////////////////////////////////////////////
-["displayTextStructured", {_this call FUNC(displayTextStructured)}] call FUNC(addEventhandler);
-["displayTextPicture", {_this call FUNC(displayTextPicture)}] call FUNC(addEventhandler);
+[QGVAR(displayTextStructured), {_this call FUNC(displayTextStructured)}] call CBA_fnc_addEventHandler;
+[QGVAR(displayTextPicture), {_this call FUNC(displayTextPicture)}] call CBA_fnc_addEventHandler;
-["medical_onUnconscious", {
+["ace_unconscious", {
params ["_unit", "_isUnconscious"];
if (local _unit && {!_isUnconscious}) then {
[_unit, false, QFUNC(loadPerson), west /* dummy side */] call FUNC(switchToGroupSide);
};
-}] call FUNC(addEventhandler);
+}] call CBA_fnc_addEventHandler;
+
+["ace_useItem", DFUNC(useItem)] call CBA_fnc_addEventHandler;
//////////////////////////////////////////////////
// Add various canInteractWith conditions
//////////////////////////////////////////////////
+["isNotDead", {
+ params ["_unit", "_target"];
+ alive _unit
+}] call FUNC(addCanInteractWithCondition);
+
["notOnMap", {!visibleMap}] call FUNC(addCanInteractWithCondition);
["isNotInside", {
@@ -507,7 +475,7 @@ if (didJip) then {
// We are jipping! Get ready and wait, and throw the event
[{
if(!isNull player && GVAR(settingsInitFinished)) then {
- ["PlayerJip", [player]] call FUNC(localEvent);
+ ["ace_playerJIP", [player]] call CBA_fnc_localEvent;
[_this select 1] call CBA_fnc_removePerFrameHandler;
};
}, 0, []] call CBA_fnc_addPerFrameHandler;
diff --git a/addons/common/XEH_preInit.sqf b/addons/common/XEH_preInit.sqf
index 8d671aa754..0f0657c4ab 100644
--- a/addons/common/XEH_preInit.sqf
+++ b/addons/common/XEH_preInit.sqf
@@ -3,316 +3,22 @@
ADDON = false;
-PREP(addCanInteractWithCondition);
-PREP(addLineToDebugDraw);
-PREP(addSetting);
-PREP(addToInventory);
-PREP(assignedItemFix);
-PREP(assignObjectsInList);
-PREP(ambientBrightness);
-PREP(ASLToPosition);
-PREP(binarizeNumber);
-PREP(blurScreen);
-PREP(cachedCall);
-PREP(canGetInPosition);
-PREP(canInteractWith);
-PREP(canUseWeapon);
-PREP(changeProjectileDirection);
-PREP(checkFiles);
-PREP(checkPBOs);
-PREP(claim);
-PREP(codeToLetter);
-PREP(codeToString);
-PREP(createOrthonormalReference);
-PREP(currentChannel);
-PREP(debug);
-PREP(debugModule);
-PREP(defineVariable);
-PREP(deviceKeyFindValidIndex);
-PREP(deviceKeyRegisterNew);
-PREP(disableAI);
-PREP(disableUserInput);
-PREP(displayIcon);
-PREP(displayText);
-PREP(displayTextPicture);
-PREP(displayTextStructured);
-PREP(doAnimation);
-PREP(dropBackpack);
-PREP(endRadioTransmission);
-PREP(eraseCache);
-PREP(errorMessage);
-PREP(execNextFrame);
-PREP(execPersistentFnc);
-PREP(execRemoteFnc);
-PREP(executePersistent);
-PREP(filter);
-PREP(findUnloadPosition);
-PREP(firedEH);
-PREP(fixCollision);
-PREP(fixFloating);
-PREP(fixLoweredRifleAnimation);
-PREP(fixPosition);
-PREP(getAllDefinedSetVariables);
-PREP(getAllGear);
-PREP(getDeathAnim);
-PREP(getCaptivityStatus);
-PREP(getDefaultAnim);
-PREP(getDefinedVariable);
-PREP(getDefinedVariableDefault);
-PREP(getDefinedVariableInfo);
-PREP(getFirstObjectIntersection);
-PREP(getFirstTerrainIntersection);
-PREP(getForceWalkStatus);
-PREP(getGunner);
-PREP(getInPosition);
-PREP(getMapGridData);
-PREP(getMapGridFromPos);
-PREP(getMapPosFromGrid);
-PREP(getMarkerType);
-PREP(getMGRSdata);
-PREP(getName);
-PREP(getNumberFromMissionSQM);
-PREP(getNumberMagazinesIn);
-PREP(getPitchBankYaw);
-PREP(getSettingData);
-PREP(getStaminaBarControl);
-PREP(getStringFromMissionSQM);
-PREP(getTargetAzimuthAndInclination);
-PREP(getTargetDistance);
-PREP(getTargetObject);
-PREP(getTurnedOnLights);
-PREP(getTurretDirection);
-PREP(getUavControlPosition);
-PREP(getVehicleCargo);
-PREP(getVehicleCodriver);
-PREP(getVersion);
-PREP(getWeaponAzimuthAndInclination);
-PREP(getWeaponIndex);
-PREP(getWeaponState);
-PREP(getWindDirection);
-PREP(getZoom);
-PREP(goKneeling);
-PREP(hadamardProduct);
-PREP(handleModifierKey);
-PREP(handleModifierKeyUp);
-PREP(handleModifierKeyInit);
-PREP(handleScrollWheel);
-PREP(handleScrollWheelInit);
-PREP(hasItem);
-PREP(hasMagazine);
-PREP(headBugFix);
-PREP(hideUnit);
-PREP(inheritsFrom);
-PREP(insertionSort);
-PREP(interpolateFromArray);
-PREP(inTransitionAnim);
-PREP(inWater);
-PREP(isAlive);
-PREP(isAutoWind);
-PREP(isAwake);
-PREP(isEngineer);
-PREP(isEOD);
-PREP(isFeatureCameraActive);
-PREP(isInBuilding);
-PREP(isModLoaded);
-PREP(isPlayer);
-PREP(isTurnedOut);
-PREP(isUnderwater);
-PREP(letterToCode);
-PREP(lightIntensityFromObject);
-PREP(loadPerson);
-PREP(loadPersonLocal);
-PREP(loadSettingsFromProfile);
-PREP(loadSettingsOnServer);
-PREP(loadSettingsLocalizedText);
-PREP(map);
-PREP(moduleCheckPBOs);
-PREP(moduleLSDVehicles);
-PREP(muteUnit);
-PREP(muteUnitHandleInitPost);
-PREP(muteUnitHandleRespawn);
-PREP(numberToDigits);
-PREP(numberToDigitsString);
-PREP(numberToString);
-PREP(onAnswerRequest);
-PREP(owned);
-PREP(parseList);
-PREP(player);
-PREP(playerSide);
-PREP(positionToASL);
-PREP(progressBar);
-PREP(readSettingFromModule);
-PREP(readSettingsFromParamsArray);
-PREP(receiveRequest);
-PREP(removeCanInteractWithCondition);
-PREP(removeSpecificMagazine);
-PREP(requestCallback);
-PREP(resetAllDefaults);
-PREP(restoreVariablesJIP);
-PREP(runAfterSettingsInit);
-PREP(sanitizeString);
-PREP(selectWeaponMode);
-PREP(sendRequest);
-PREP(serverLog);
-PREP(setAllGear);
-PREP(setApproximateVariablePublic);
-PREP(setCaptivityStatus);
-PREP(setDefinedVariable);
-PREP(setDisableUserInputStatus);
-PREP(setForceWalkStatus);
-PREP(setHearingCapability);
-PREP(setName);
-PREP(setParameter);
-PREP(setPitchBankYaw);
-PREP(setProne);
-PREP(setSetting);
-PREP(setSettingFromConfig);
-PREP(setVariableJIP);
-PREP(setVariablePublic);
-PREP(setVolume);
-PREP(sortAlphabeticallyBy);
-PREP(showHud);
-PREP(statusEffect_addType);
-PREP(statusEffect_get);
-PREP(statusEffect_localEH);
-PREP(statusEffect_resetVariables);
-PREP(statusEffect_respawnEH);
-PREP(statusEffect_sendEffects);
-PREP(statusEffect_set);
-PREP(stringCompare);
-PREP(stringToColoredText);
-PREP(stringRemoveWhiteSpace);
-PREP(switchToGroupSide);
-PREP(throttledPublicVariable);
-PREP(toBin);
-PREP(toBitmask);
-PREP(toHex);
-PREP(toNumber);
-PREP(unhideUnit);
-PREP(uniqueElements);
-PREP(uniqueElementsOnly);
-PREP(unloadPerson);
-PREP(unloadPersonLocal);
-PREP(unmuteUnit);
-PREP(useItem);
-PREP(useMagazine);
-PREP(waitAndExecute);
-PREP(waitUntilAndExecute);
-PREP(waveHeightAt);
+#include "XEH_PREP.hpp"
-PREP(translateToWeaponSpace);
-PREP(translateToModelSpace);
+// backwards comp
+DFUNC(canUseWeapon) = {
+ ACE_DEPRECATED("ace_common_fnc_canUseWeapon","3.7.0","CBA_fnc_canUseWeapon");
+ _this call CBA_fnc_canUseWeapon;
+};
-// Model and drawing helpers
-PREP(worldToScreenBounds);
-
-// config items
-PREP(getConfigType);
-PREP(getItemType);
-PREP(getWeaponType);
-PREP(getWeaponModes);
-PREP(getWeaponMuzzles);
-
-// config objects
-PREP(getConfigTypeObject);
-PREP(getConfigGunner);
-PREP(getConfigCommander);
-PREP(getHitPoints);
-PREP(getHitPointsWithSelections);
-PREP(getSelectionsWithoutHitPoints);
-PREP(getReflectorsWithSelections);
-PREP(getLightProperties);
-PREP(getLightPropertiesWeapon);
-PREP(getVehicleCrew);
-PREP(getVehicleUAVCrew);
-
-// turrets
-PREP(getTurrets);
-PREP(getTurretIndex);
-PREP(getTurretConfigPath);
-PREP(getTurretGunner);
-PREP(getTurretCommander);
-PREP(getTurretCopilot);
-PREP(getDoorTurrets);
-PREP(getTurretsFFV);
-PREP(getTurretsOther);
-PREP(hasHatch);
-
-// missing inventory commands
-PREP(binocularMagazine);
-PREP(removeBinocularMagazine);
-
-// ACE_Debug
-PREP(exportConfig);
-PREP(getChildren);
-PREP(getDisplayConfigName);
-PREP(monitor);
-PREP(showUser);
-
-PREP(dumpPerformanceCounters);
-PREP(dumpArray);
-
-// ACE_CuratorFix
-PREP(addCuratorUnloadEventhandler);
-PREP(fixCrateContent);
-
-//ACE events global variables
-GVAR(eventsLocation) = createLocation ["ACE_HashLocation", [-10000,-10000,-10000], 0, 0];
-GVAR(eventsLocation) setText QGVAR(eventsLocation);
-
-PREP(globalEvent);
-PREP(_handleNetEvent);
-PREP(addEventHandler);
-PREP(targetEvent);
-PREP(serverEvent);
-PREP(localEvent);
-PREP(removeEventHandler);
-PREP(removeAlLEventHandlers);
-
-// Synchronized Events
-PREP(syncedEventPFH);
-PREP(addSyncedEventHandler);
-PREP(removeSyncedEventHandler);
-PREP(requestSyncedEvent);
-PREP(syncedEvent);
-
-PREP(_handleSyncedEvent);
-PREP(_handleRequestSyncedEvent);
-PREP(_handleRequestAllSyncedEvents);
-
-// other eventhandlers
-PREP(addActionEventHandler);
-PREP(addActionMenuEventHandler);
-PREP(addScrollWheelEventHandler);
-PREP(addMapMarkerCreatedEventHandler);
-
-PREP(removeActionEventHandler);
-PREP(removeActionMenuEventHandler);
-PREP(removeScrollWheelEventHandler);
-PREP(removeMapMarkerCreatedEventHandler);
-
-// hashes
-PREP(hashCreate);
-PREP(hashSet);
-PREP(hashGet);
-PREP(hashHasKey);
-PREP(hashRem);
-PREP(hashListCreateList);
-PREP(hashListCreateHash);
-PREP(hashListSelect);
-PREP(hashListSet);
-PREP(hashListPush);
+DFUNC(selectWeaponMode) = {
+ ACE_DEPRECATED("ace_common_fnc_selectWeaponMode","3.7.0","CBA_fnc_selectWeapon");
+ _this call CBA_fnc_selectWeapon;
+};
GVAR(syncedEvents) = HASH_CREATE;
GVAR(showHudHash) = [] call FUNC(hashCreate);
-//GVARS for execNextFrame and waitAndExec and waitUntilAndExecute
-GVAR(waitAndExecArray) = [];
-GVAR(nextFrameNo) = diag_frameno;
-GVAR(nextFrameBufferA) = [];
-GVAR(nextFrameBufferB) = [];
-GVAR(waitUntilAndExecArray) = [];
-
GVAR(settingsInitFinished) = false;
GVAR(runAtSettingsInitialized) = [];
@@ -329,45 +35,15 @@ if (isServer) then {
GVAR(statusEffect_Names) = [];
GVAR(statusEffect_isGlobal) = [];
+GVAR(setHearingCapabilityMap) = [];
+
//////////////////////////////////////////////////
-// Set up PlayerChanged eventhandler for pre init
+// Set up PlayerChanged eventhandler for pre init (EH is installed in postInit)
//////////////////////////////////////////////////
ACE_player = objNull;
uiNamespace setVariable ["ACE_player", objNull];
-// @todo check if this can be removed
-if (hasInterface) then {
- // PFH to update the ACE_player variable
- GVAR(PreInit_playerChanged_PFHID) = [{
- if !(ACE_player isEqualTo (call FUNC(player))) then {
- private _oldPlayer = ACE_player;
-
- ACE_player = call FUNC(player);
- uiNamespace setVariable ["ACE_player", ACE_player];
-
- // Raise ACE event
- ["playerChanged", [ACE_player, _oldPlayer]] call FUNC(localEvent);
- };
- }, 0, []] call CBA_fnc_addPerFrameHandler;
-};
-
-
-//////////////////////////////////////////////////
-// Time handling
-//////////////////////////////////////////////////
-
-ACE_time = diag_tickTime;
-ACE_realTime = diag_tickTime;
-ACE_virtualTime = diag_tickTime;
-ACE_diagTime = diag_tickTime;
-ACE_gameTime = time;
-ACE_pausedTime = 0;
-ACE_virtualPausedTime = 0;
-
-PREP(timePFH);
-[FUNC(timePFH), 0, []] call CBA_fnc_addPerFrameHandler;
-
// Init toHex
[0] call FUNC(toHex);
diff --git a/addons/common/XEH_preStart.sqf b/addons/common/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/common/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/common/config.cpp b/addons/common/config.cpp
index f78e19d063..0210634ee8 100644
--- a/addons/common/config.cpp
+++ b/addons/common/config.cpp
@@ -6,12 +6,77 @@ class CfgPatches {
weapons[] = {"ACE_ItemCore","ACE_FakePrimaryWeapon", "ACE_Banana"};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_main","ace_modules"};
- author[] = {"KoffeinFlummi"};
- authorUrl = "https://github.com/KoffeinFlummi/";
- VERSION_CONFIG;
+ author = CSTRING(ACETeam);
+ authors[] = {"KoffeinFlummi"};
+ url = ECSTRING(main,URL);
+ VERSION_CONFIG_COMMON;
};
};
+// This class will be deprecated in version 3.8.0
+class ACE_newEvents {
+ // Status effect events
+ forceWalk = QGVAR(forceWalk);
+ blockSprint = QGVAR(blockSprint);
+ setCaptive = QGVAR(setCaptive);
+ blockDamage = QGVAR(blockDamage);
+ blockEngine = QGVAR(blockEngine);
+
+ // Public listenable events
+ PlayerJip = "ace_playerJIP";
+ activeCameraChanged = "ace_activeCameraChanged";
+ visibleMapChanged = "ace_visibleMapChanged";
+ cameraViewChanged = "ace_cameraViewChanged";
+ playerVisionModeChanged = "ace_playerVisionModeChanged";
+ playerInventoryChanged = "ace_playerInventoryChanged";
+ playerWeaponChanged = "ace_playerWeaponChanged";
+ playerTurretChanged = "ace_playerTurretChanged";
+ playerVehicleChanged = "ace_playerVehicleChanged";
+ playerChanged = "ace_playerChanged";
+ SettingsInitialized = "ace_settingsInitialized";
+ SettingChanged = "ace_settingChanged";
+ firedNonPlayerVehicle = "ace_firedNonPlayerVehicle";
+ firedPlayerVehicleNonLocal = "ace_firedPlayerVehicleNonLocal";
+ firedPlayerVehicle = "ace_firedPlayerVehicle";
+ firedNonPlayer = "ace_firedNonPlayer";
+ firedPlayerNonLocal = "ace_firedPlayerNonLocal";
+ firedPlayer = "ace_firedPlayer";
+ unloadPersonEvent = "ace_unloadPersonEvent";
+ loadPersonEvent = "ace_loadPersonEvent";
+ useItem = "ace_useItem";
+ infoDisplayChanged = "ace_infoDisplayChanged";
+
+ // Internal callable events
+ setStatusEffect = QGVAR(setStatusEffect);
+ HeadbugFixUsed = QGVAR(headbugFixUsed);
+ InitSettingsFromModules = QGVAR(initSettingsFromModules);
+ enableSimulationGlobal = QGVAR(enableSimulationGlobal);
+ hideObjectGlobal = QGVAR(hideObjectGlobal);
+ fixPosition = QGVAR(fixPosition);
+ fixFloating = QGVAR(fixFloating);
+ fixCollision = QGVAR(fixCollision);
+ unlockVehicle = QGVAR(unlockVehicle);
+ lockVehicle = QGVAR(lockVehicle);
+ displayTextPicture = QGVAR(displayTextPicture);
+ displayTextStructured = QGVAR(displayTextStructured);
+ setVanillaHitPointDamage = QGVAR(setVanillaHitPointDamage);
+ setVectorDirAndUp = QGVAR(setVectorDirAndUp);
+ switchMove = QGVAR(switchMove);
+ playMoveNow = QGVAR(playMoveNow);
+ playMove = QGVAR(playMove);
+ setVelocity = QGVAR(setVelocity);
+ selectLeader = QGVAR(selectLeader);
+ setSpeaker = QGVAR(setSpeaker);
+ engineOn = QGVAR(engineOn);
+ setFuel = QGVAR(setFuel);
+ setDir = QGVAR(setDir);
+
+ // Events framework
+ SEH_s = "ACEs";
+ SEH = "ACEe";
+ SEH_all = "ACEa";
+};
+
#include "CfgEventHandlers.hpp"
#include "CfgLocationTypes.hpp"
@@ -24,6 +89,7 @@ class CfgPatches {
#include "CfgMoves.hpp"
#include "CfgVoice.hpp"
#include "CfgUnitInsignia.hpp"
+#include "CfgEden.hpp"
class ACE_Rsc_Display_Base {
idd = -1;
@@ -79,20 +145,12 @@ class CfgUIGrids {
displayName = "ACE Hint";
description = "Textual in game feedback to the player.";
preview = "\a3\Ui_f\data\GUI\Cfg\UIGrids\grid_hint_ca.paa";
- saveToProfile[] = {0,1};
+ saveToProfile[] = {0,1};
};
};
};
};
-/*
-// check dll
-class RscStandardDisplay;
-class RscDisplayMain: RscStandardDisplay {
- onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDisplayMain"",'GUI')] call (uinamespace getVariable 'BIS_fnc_initDisplay'); [ARR_5('header','tail',{0},{},_this select 0)] call COMPILE_FILE(functions\fnc_errorMessage));
-};
-*/
-
class ACE_Extensions {
extensions[] = {};
};
diff --git a/addons/common/define.hpp b/addons/common/define.hpp
index 98367e72ae..6c7a90fea9 100644
--- a/addons/common/define.hpp
+++ b/addons/common/define.hpp
@@ -80,7 +80,7 @@
// Listbox styles
#define LB_TEXTURES 0x10
#define LB_MULTI 0x20
-#define FontCSE "PuristaMedium"
+#define FONT_ACE "RobotoCondensed"
class ACE_gui_backgroundBase {
type = CT_STATIC;
@@ -88,7 +88,7 @@ class ACE_gui_backgroundBase {
style = ST_PICTURE;
colorBackground[] = {0,0,0,0};
colorText[] = {1, 1, 1, 1};
- font = FontCSE;
+ font = FONT_ACE;
text = "";
sizeEx = 0.032;
};
@@ -125,7 +125,7 @@ class ACE_gui_editBase
text = "";
size = 0.2;
style = "0x00 + 0x40";
- font = "PuristaMedium";
+ font = "RobotoCondensed";
shadow = 2;
sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
colorDisabled[] =
@@ -189,19 +189,19 @@ class ACE_gui_buttonBase {
animTexturePressed = "#(argb,8,8,3)color(1,1,1,1)";
animTextureDefault = "#(argb,8,8,3)color(1,1,1,1)";
period = 0.5;
- font = FontCSE;
+ font = FONT_ACE;
soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1};
soundPush[] = {"\A3\ui_f\data\sound\RscButton\soundPush",0.0,0};
soundEnter[] = {"\A3\ui_f\data\sound\RscButton\soundEnter",0.07,1};
soundEscape[] = {"\A3\ui_f\data\sound\RscButton\soundEscape",0.09,1};
class Attributes {
- font = FontCSE;
+ font = FONT_ACE;
color = "#E5E5E5";
align = "center";
shadow = "true";
};
class AttributesImage {
- font = FontCSE;
+ font = FONT_ACE;
color = "#E5E5E5";
align = "left";
shadow = "true";
@@ -229,7 +229,7 @@ class ACE_gui_staticBase {
w = 0.183825;
h = 0.104575;
style = ST_LEFT;
- font = FontCSE;
+ font = FONT_ACE;
sizeEx = 0.03921;
colorText[] = {0.95, 0.95, 0.95, 1.0};
colorBackground[] = {0, 0, 0, 0};
@@ -240,7 +240,7 @@ class RscListBox;
class ACE_gui_listBoxBase : RscListBox{
type = CT_LISTBOX;
style = ST_MULTI;
- font = FontCSE;
+ font = FONT_ACE;
sizeEx = 0.03921;
color[] = {1, 1, 1, 1};
colorText[] = {0.543, 0.5742, 0.4102, 1.0};
@@ -295,7 +295,7 @@ class ACE_gui_listNBox {
style =ST_MULTI;
w = 0.4;
h = 0.4;
- font = FontCSE;
+ font = FONT_ACE;
sizeEx = 0.031;
autoScrollSpeed = -1;
@@ -375,7 +375,7 @@ class ACE_gui_comboBoxBase: RscCombo {
arrowEmpty = "";
arrowFull = "";
wholeHeight = 0.45;
- font = FontCSE;
+ font = FONT_ACE;
sizeEx = 0.031;
soundSelect[] = {"\A3\ui_f\data\sound\RscCombo\soundSelect",0.1,1};
soundExpand[] = {"\A3\ui_f\data\sound\RscCombo\soundExpand",0.1,1};
@@ -463,22 +463,22 @@ class ACE_gui_mapBase {
colorGrid[] = {0.1,0.1,0.1,0.6};
colorGridMap[] = {0.1,0.1,0.1,0.6};
colorText[] = {1, 1, 1, 0.85};
-font = "PuristaMedium";
+font = "RobotoCondensed";
sizeEx = 0.0270000;
stickX[] = {0.20, {"Gamma", 1.00, 1.50} };
stickY[] = {0.20, {"Gamma", 1.00, 1.50} };
onMouseButtonClick = "";
onMouseButtonDblClick = "";
- fontLabel = "PuristaMedium";
+ fontLabel = "RobotoCondensed";
sizeExLabel = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)";
fontGrid = "TahomaB";
sizeExGrid = 0.02;
fontUnits = "TahomaB";
sizeExUnits = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)";
- fontNames = "PuristaMedium";
+ fontNames = "RobotoCondensed";
sizeExNames = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8) * 2";
- fontInfo = "PuristaMedium";
+ fontInfo = "RobotoCondensed";
sizeExInfo = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)";
fontLevel = "TahomaB";
sizeExLevel = 0.02;
@@ -493,7 +493,7 @@ onMouseButtonDblClick = "";
y = "SafeZoneY + safezoneH - 4.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
w = "10 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
h = "3.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
- font = "PuristaMedium";
+ font = "RobotoCondensed";
sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)";
colorBackground[] = {1,1,1,0.5};
color[] = {0,0,0,1};
@@ -787,4 +787,4 @@ onMouseButtonDblClick = "";
};
};
-#endif
\ No newline at end of file
+#endif
diff --git a/addons/common/functions/fnc__handleNetEvent.sqf b/addons/common/functions/fnc__handleNetEvent.sqf
deleted file mode 100644
index 54cef66228..0000000000
--- a/addons/common/functions/fnc__handleNetEvent.sqf
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Author: jaynus
- * Internal net event handler.
- *
- * Arguments:
- * None
- *
- * Return Value:
- * None
- *
- * Public: No
- */
-#include "script_component.hpp"
-
-params ["_eventType", "_event"];
-
-if (_eventType == "ACEg") then {
- _event params ["_eventName", "_eventArgs"];
-
- private _eventFunctions = GVAR(eventsLocation) getVariable _eventName;
- if (!isNil "_eventFunctions") then {
-
- #ifdef DEBUG_EVENTS
- ACE_LOGINFO_1("* Net Event %1",_eventName);
- ACE_LOGINFO_1(" args=%1",_eventArgs);
- #endif
-
- {
- if (!isNil "_x") then {
- _eventArgs call CALLSTACK_NAMED(_x, FORMAT_2("Net Event %1 ID: %2",_eventName,_forEachIndex));
- #ifdef DEBUG_EVENTS_CALLSTACK
- ACE_LOGINFO_1(" ID: %1",_forEachIndex);
- #endif
- };
- } forEach _eventFunctions;
- };
-};
-
-if (_eventType == "ACEc") then {
- if (isServer) then {
- _event params ["_eventName", "_eventTargets", "_eventArgs"];
-
- private _sentEvents = [];
-
- if (!IS_ARRAY(_eventTargets)) then {
- _eventTargets = [_eventTargets];
- };
-
- //If not multiplayer, and there are targets, then just run localy
- if (!isMultiplayer && {count _eventTargets > 0}) exitWith {
- ACEg = [_eventName, _eventArgs];
- ["ACEg", ACEg] call FUNC(_handleNetEvent);
- };
-
- private _serverFlagged = false;
-
- {
- private _owner = _x;
-
- if (IS_OBJECT(_x)) then {
- _owner = owner _x;
- };
- if !(_owner in _sentEvents) then {
- _sentEvents pushBack _owner;
- ACEg = [_eventName, _eventArgs];
-
- if (isDedicated || {_x != ACE_player}) then {
- if (isDedicated && {local _x} && {!_serverFlagged}) then {
- _serverFlagged = true;
- ["ACEg", ACEg] call FUNC(_handleNetEvent);
- } else {
- _owner publicVariableClient "ACEg";
- };
- } else {
- ["ACEg", ACEg] call FUNC(_handleNetEvent);
- };
- };
- false
- } count _eventTargets;
- };
-};
diff --git a/addons/common/functions/fnc__handleRequestAllSyncedEvents.sqf b/addons/common/functions/fnc__handleRequestAllSyncedEvents.sqf
index 8c8cbd1486..14d17ae118 100644
--- a/addons/common/functions/fnc__handleRequestAllSyncedEvents.sqf
+++ b/addons/common/functions/fnc__handleRequestAllSyncedEvents.sqf
@@ -1,25 +1,25 @@
-/*
- * Author: jaynus
- * Handles a server-side request for synchronization ALL events on JIP to a client.
- *
- * Arguments:
- * 0: client
- *
- * Return Value:
- * Event is successed
- *
- * Public: No
- */
-#include "script_component.hpp"
-
-params ["_client"];
-
-{
- private _eventEntry = HASH_GET(GVAR(syncedEvents),_x);
- _eventEntry params ["", "_eventLog"];
-
- ["SEH_s", _client, [_x, _eventLog]] call FUNC(targetEvent);
- false
-} count (GVAR(syncedEvents) select 0);
-
-true
+/*
+ * Author: jaynus
+ * Handles a server-side request for synchronization ALL events on JIP to a client.
+ *
+ * Arguments:
+ * 0: client
+ *
+ * Return Value:
+ * Event is successed
+ *
+ * Public: No
+ */
+#include "script_component.hpp"
+
+params ["_client"];
+
+{
+ private _eventEntry = HASH_GET(GVAR(syncedEvents),_x);
+ _eventEntry params ["", "_eventLog"];
+
+ ["ACEs", [_x, _eventLog], _client] call CBA_fnc_targetEvent;
+ false
+} count (GVAR(syncedEvents) select 0);
+
+true
diff --git a/addons/common/functions/fnc__handleRequestSyncedEvent.sqf b/addons/common/functions/fnc__handleRequestSyncedEvent.sqf
index 605af2fa85..2b239ea056 100644
--- a/addons/common/functions/fnc__handleRequestSyncedEvent.sqf
+++ b/addons/common/functions/fnc__handleRequestSyncedEvent.sqf
@@ -1,48 +1,48 @@
-/*
- * Author: jaynus
- * Receives either requests for synchronization from clients, or the synchronization data from the server.
- *
- * Arguments [Client] :
- * 0: eventName
- * 1: eventLog
- *
- * Arguments [Server] :
- * 0: eventName
- * 1: client
- *
- * Return Value:
- * Event is successed
- *
- * Public: No
- */
-#include "script_component.hpp"
-
-//SEH_s
-if (isServer) then {
- // Find the event name, and shovel out the events to the client
- params ["_eventName", "_client"];
-
- if (!HASH_HASKEY(GVAR(syncedEvents),_eventName)) exitWith {
- ACE_LOGERROR("Request for synced event - key not found.");
- false
- };
-
- private _eventEntry = HASH_GET(GVAR(syncedEvents),_eventName);
- _eventEntry params ["", "_eventLog"];
-
- ["SEH_s", _client, [_eventName, _eventLog]] call FUNC(targetEvent);
-} else {
- params ["_eventName", "_eventLog"];
-
- // This is the client handling the response from the server
- // Start running the events
- {
- _x params ["", "_eventArgs","_ttl"];
- [_eventName, _eventArgs, _ttl] call FUNC(_handleSyncedEvent);
- false
- } count _eventLog;
-
- ACE_LOGINFO_1("[%1] synchronized",_eventName);
-};
-
-true
+/*
+ * Author: jaynus
+ * Receives either requests for synchronization from clients, or the synchronization data from the server.
+ *
+ * Arguments [Client] :
+ * 0: eventName
+ * 1: eventLog
+ *
+ * Arguments [Server] :
+ * 0: eventName
+ * 1: client
+ *
+ * Return Value:
+ * Event is successed
+ *
+ * Public: No
+ */
+#include "script_component.hpp"
+
+//SEH_s
+if (isServer) then {
+ // Find the event name, and shovel out the events to the client
+ params ["_eventName", "_client"];
+
+ if (!HASH_HASKEY(GVAR(syncedEvents),_eventName)) exitWith {
+ ACE_LOGERROR_1("Request for synced event - key [%1] not found.", _eventName);
+ false
+ };
+
+ private _eventEntry = HASH_GET(GVAR(syncedEvents),_eventName);
+ _eventEntry params ["", "_eventLog"];
+
+ ["ACEs", [_eventName, _eventLog], _client] call CBA_fnc_targetEvent;
+} else {
+ params ["_eventName", "_eventLog"];
+
+ // This is the client handling the response from the server
+ // Start running the events
+ {
+ _x params ["", "_eventArgs","_ttl"];
+ [_eventName, _eventArgs, _ttl] call FUNC(_handleSyncedEvent);
+ false
+ } count _eventLog;
+
+ ACE_LOGINFO_1("[%1] synchronized",_eventName);
+};
+
+true
diff --git a/addons/common/functions/fnc__handleSyncedEvent.sqf b/addons/common/functions/fnc__handleSyncedEvent.sqf
index f8fe21d760..d708178c4f 100644
--- a/addons/common/functions/fnc__handleSyncedEvent.sqf
+++ b/addons/common/functions/fnc__handleSyncedEvent.sqf
@@ -1,37 +1,37 @@
-/*
- * Author: jaynus
- * Handles synced events being received. Server will log them, and server/client will execute them.
- *
- * Arguments [Client] :
- * 0: eventName
- * 1: arguments
- * 2: ttl
- *
- * Return Value:
- * Boolean of success
- *
- * Public: No
- */
-#include "script_component.hpp"
-
-params ["_name", "_args", "_ttl"];
-
-if (!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
- ACE_LOGERROR("Synced event key not found.");
- false
-};
-
-private _internalData = HASH_GET(GVAR(syncedEvents),_name);
-
-if (isServer) then {
- // Server needs to internally log it for synchronization
- if (_ttl > -1) then {
- _internalData = HASH_GET(GVAR(syncedEvents),_name);
-
- _internalData params ["", "_eventLog"];
- _eventLog pushBack [ACE_diagTime, _args, _ttl];
- };
-};
-
-_internalData params ["_eventCode"];
-_args call _eventCode;
+/*
+ * Author: jaynus
+ * Handles synced events being received. Server will log them, and server/client will execute them.
+ *
+ * Arguments [Client] :
+ * 0: eventName
+ * 1: arguments
+ * 2: ttl
+ *
+ * Return Value:
+ * Boolean of success
+ *
+ * Public: No
+ */
+#include "script_component.hpp"
+
+params ["_name", "_args", "_ttl"];
+
+if (!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
+ ACE_LOGERROR_1("Synced event key [%1] not found (_handleSyncedEvent).", _name);
+ false
+};
+
+private _internalData = HASH_GET(GVAR(syncedEvents),_name);
+
+if (isServer) then {
+ // Server needs to internally log it for synchronization
+ if (_ttl > -1) then {
+ _internalData = HASH_GET(GVAR(syncedEvents),_name);
+
+ _internalData params ["", "_eventLog"];
+ _eventLog pushBack [diag_tickTime, _args, _ttl];
+ };
+};
+
+_internalData params ["_eventCode"];
+_args call _eventCode;
diff --git a/addons/common/functions/fnc_addActionEventHandler.sqf b/addons/common/functions/fnc_addActionEventHandler.sqf
index fe641010e4..56d2de16db 100644
--- a/addons/common/functions/fnc_addActionEventHandler.sqf
+++ b/addons/common/functions/fnc_addActionEventHandler.sqf
@@ -45,7 +45,7 @@ if (_actionID == -1) then {
private _addAction = call compile format [
"[
'',
- {if (inputAction '%1' == 0) exitWith {}; {if (_this call (_x select 0)) then {_this call (_x select 1)}} forEach (((_this select 0) getVariable '%2') select 1 select 2)},
+ {[{if (inputAction '%1' == 0) exitWith {}; {if (_this call (_x select 0)) then {_this call (_x select 1)}} forEach (((_this select 0) getVariable '%2') select 1 select 2)}, _this] call CBA_fnc_directCall},
nil,
-1,
false,
diff --git a/addons/common/functions/fnc_addActionMenuEventHandler.sqf b/addons/common/functions/fnc_addActionMenuEventHandler.sqf
index e68507ae7b..c86cf45f17 100644
--- a/addons/common/functions/fnc_addActionMenuEventHandler.sqf
+++ b/addons/common/functions/fnc_addActionMenuEventHandler.sqf
@@ -52,7 +52,7 @@ _actionIDs pushBack _id;
private _addAction = call compile format [
"[
'%2',
- {if (inputAction '%1' == 0) then {if (_this call (%3 select 2)) then {_this call (%3 select 3)}} else {_this call (%3 select 1)}},
+ {[{if (inputAction '%1' == 0) then {if (_this call (%3 select 2)) then {_this call (%3 select 3)}} else {_this call (%3 select 1)}}, _this] call CBA_fnc_directCall},
nil,
%4,
false,
diff --git a/addons/common/functions/fnc_addCuratorUnloadEventhandler.sqf b/addons/common/functions/fnc_addCuratorUnloadEventhandler.sqf
deleted file mode 100644
index 1bb92130bc..0000000000
--- a/addons/common/functions/fnc_addCuratorUnloadEventhandler.sqf
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Author: commy2
- *
- * Arguments:
- * Display where the Unload event was added
- *
- * Return Value:
- * None
- *
- * Public: No
- */
-#include "script_component.hpp"
-
-disableSerialization;
-
-private _dlg = ctrlParent _this;
-
-_dlg displayAddEventHandler ["unload", {
- if (_this select 1 == 1) then {
- [missionnamespace getVariable ["BIS_fnc_initCuratorAttributes_target", objNull]] call FUNC(fixCrateContent);
- };
-}];
diff --git a/addons/common/functions/fnc_addEventHandler.sqf b/addons/common/functions/fnc_addEventHandler.sqf
index e7df00f5ff..6ded410c87 100644
--- a/addons/common/functions/fnc_addEventHandler.sqf
+++ b/addons/common/functions/fnc_addEventHandler.sqf
@@ -1,25 +1,14 @@
-/*
- * Author: Nou
- * Add an event handler.
- *
- * Arguments:
- * 0: Event name
- * 1: Event code
- *
- * Return Value:
- * Event handler ID number (for use with fnc_removeEventHandler)
- *
- * Public: Yes
- */
-#include "script_component.hpp"
-
-params ["_eventName", "_eventCode"];
-
-private _eventFunctions = GVAR(eventsLocation) getVariable _eventName;
-
-if (isNil "_eventFunctions") then {
- _eventFunctions = [];
- GVAR(eventsLocation) setVariable [_eventName, _eventFunctions];
-};
-
-_eventFunctions pushBack _eventCode // Return event function count
+#define DEBUG_MODE_FULL
+#include "script_component.hpp"
+
+params ["_eventName", "_eventCode"];
+
+private _newName = getText (configFile >> "ACE_newEvents" >> _eventName);
+if (_newName != "") then {
+ TRACE_2("Switching Names",_eventName,_newName);
+ _eventName = _newName;
+};
+
+[_eventName, _eventCode] call CBA_fnc_addEventHandler;
+
+ACE_DEPRECATED("ace_common_fnc_addEventHandler","3.8.0","CBA_fnc_addEventHandler");
diff --git a/addons/common/functions/fnc_addScrollWheelEventHandler.sqf b/addons/common/functions/fnc_addScrollWheelEventHandler.sqf
index aef88543be..2a9b26e71c 100644
--- a/addons/common/functions/fnc_addScrollWheelEventHandler.sqf
+++ b/addons/common/functions/fnc_addScrollWheelEventHandler.sqf
@@ -15,6 +15,8 @@
params ["_statement"];
+ACE_DEPRECATED("ace_common_fnc_addScrollWheelEventHandler", "3.8.0", "'MouseZChanged' Display EventHandler");
+
if (_statement isEqualType "") then {
_statement = compile _statement;
};
diff --git a/addons/common/functions/fnc_addSetting.sqf b/addons/common/functions/fnc_addSetting.sqf
index 0cf25b860a..c4b97ddcce 100644
--- a/addons/common/functions/fnc_addSetting.sqf
+++ b/addons/common/functions/fnc_addSetting.sqf
@@ -37,4 +37,4 @@ missionNamespace setVariable [_name, _value];
GVAR(settings) pushBack _this;
// Raise event locally
-["SettingChanged", [_name, _value]] call FUNC(localEvent);
+["ace_settingChanged", [_name, _value]] call CBA_fnc_localEvent;
diff --git a/addons/common/functions/fnc_addSyncedEventHandler.sqf b/addons/common/functions/fnc_addSyncedEventHandler.sqf
index 0964e419bc..0481f7d11f 100644
--- a/addons/common/functions/fnc_addSyncedEventHandler.sqf
+++ b/addons/common/functions/fnc_addSyncedEventHandler.sqf
@@ -1,27 +1,30 @@
-/*
- * Author: jaynus
- * Register an event handler for an ACE synced event
- *
- * Arguments:
- * 0: Name
- * 1: Handler
- * 2: TTL (optional: 0)
- *
- * Return Value:
- * Boolean of success
- *
- * Public: Yes
- */
-#include "script_component.hpp"
-
-params ["_name", "_handler", ["_ttl", 0]];
-
-if (HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
- ACE_LOGERROR("Duplicate synced event creation.");
- false
-};
-
-private _eventId = [_name, FUNC(_handleSyncedEvent)] call FUNC(addEventHandler);
-private _data = [_handler, [], _ttl, _eventId];
-
-HASH_SET(GVAR(syncedEvents),_name,_data);
+/*
+ * Author: jaynus
+ * Register an event handler for an ACE synced event
+ *
+ * Arguments:
+ * 0: Name
+ * 1: Handler
+ * 2: TTL (optional: 0)
+ *
+ * Return Value:
+ * Boolean of success
+ *
+ * Example:
+ * ["myEvent", {_this call x}, 0] call ace_common_fnc_addSyncedEventHandler
+ *
+ * Public: Yes
+ */
+#include "script_component.hpp"
+
+params ["_name", "_handler", ["_ttl", 0]];
+
+if (HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
+ ACE_LOGERROR_1("Duplicate synced event [%1] creation.",_name);
+ false
+};
+
+private _eventId = [_name, FUNC(_handleSyncedEvent)] call CBA_fnc_addEventHandler;
+private _data = [_handler, [], _ttl, _eventId];
+
+HASH_SET(GVAR(syncedEvents),_name,_data);
diff --git a/addons/common/functions/fnc_assignedItemFix.sqf b/addons/common/functions/fnc_assignedItemFix.sqf
index d93409ce7c..4604e1b987 100644
--- a/addons/common/functions/fnc_assignedItemFix.sqf
+++ b/addons/common/functions/fnc_assignedItemFix.sqf
@@ -28,40 +28,18 @@ GVAR(AssignedItemsShownItems) = [
ACE_isGPSEnabled
];
-["playerInventoryChanged", {
- params ["_unit", "_assignedItems"];
+["ace_playerInventoryChanged", {
+ params ["_unit"];
- _assignedItems = _assignedItems select 17;
+ private _assignedItems = getUnitLoadout _unit param [9, ["","","","","",""]]; // ["ItemMap","ItemGPS","ItemRadio","ItemCompass","ItemWatch","NVGoggles"]
- GVAR(AssignedItemsShownItems) = [true, true, true, true, true];
-
- {
- if !(_x in GVAR(AssignedItems)) then {
- GVAR(AssignedItems) pushBack _x;
- GVAR(AssignedItemsInfo) pushBack toLower getText (configFile >> "CfgWeapons" >> _x >> "ACE_hideItemType");
- };
-
- switch (GVAR(AssignedItemsInfo) select (GVAR(AssignedItems) find _x)) do {
- case ("map"): {
- GVAR(AssignedItemsShownItems) set [0, false];
- };
- case ("compass"): {
- GVAR(AssignedItemsShownItems) set [1, false];
- };
- case ("watch"): {
- GVAR(AssignedItemsShownItems) set [2, false];
- };
- case ("radio"): {
- GVAR(AssignedItemsShownItems) set [3, false];
- };
- case ("gps"): {
- GVAR(AssignedItemsShownItems) set [4, false];
- };
- };
- false
- } count _assignedItems;
-
- //systemChat str GVAR(AssignedItemsShownItems);
+ GVAR(AssignedItemsShownItems) = [
+ !((_assignedItems select 0) isEqualTo "") && {getText (configFile >> "CfgWeapons" >> _assignedItems select 0 >> "ACE_hideItemType") != "map"},
+ !((_assignedItems select 3) isEqualTo "") && {getText (configFile >> "CfgWeapons" >> _assignedItems select 3 >> "ACE_hideItemType") != "compass"},
+ !((_assignedItems select 4) isEqualTo "") && {getText (configFile >> "CfgWeapons" >> _assignedItems select 4 >> "ACE_hideItemType") != "watch"},
+ !((_assignedItems select 2) isEqualTo "") && {getText (configFile >> "CfgWeapons" >> _assignedItems select 2 >> "ACE_hideItemType") != "radio"},
+ !((_assignedItems select 1) isEqualTo "") && {getText (configFile >> "CfgWeapons" >> _assignedItems select 1 >> "ACE_hideItemType") != "gps"}
+ ];
GVAR(AssignedItemsShownItems) params ["_showMap", "_showCompass", "_showWatch", "_showRadio", "_showGPS"];
@@ -70,4 +48,4 @@ GVAR(AssignedItemsShownItems) = [
showWatch _showWatch;
showRadio _showRadio;
showGPS (_showGPS || {cameraOn == getConnectedUAV _unit}); //If player is activly controling a UAV, showGPS controls showing the map (m key)
-}] call FUNC(addEventHandler);
+}] call CBA_fnc_addEventHandler;
diff --git a/addons/common/functions/fnc_binocularMagazine.sqf b/addons/common/functions/fnc_binocularMagazine.sqf
index b5f4f0558e..aacac7c142 100644
--- a/addons/common/functions/fnc_binocularMagazine.sqf
+++ b/addons/common/functions/fnc_binocularMagazine.sqf
@@ -15,18 +15,6 @@
*/
#include "script_component.hpp"
-params [["_unit", objNull, [objNull]]];
+ACE_DEPRECATED("ace_common_fnc_binocularMagazine","3.8.0","CBA_fnc_binocularMagazine");
-private _binocular = binocular _unit;
-
-scopeName "main";
-
-{
- if ((_x select 0) isEqualTo _binocular) then {
- // note: if there is no magazine, _x(4,0) will be nil, which skips the breakOut.
- (_x select 4 select 0) breakOut "main";
- };
- false
-} count weaponsitems _unit;
-
-""
+_this call CBA_fnc_binocularMagazine
diff --git a/addons/common/functions/fnc_cachedCall.sqf b/addons/common/functions/fnc_cachedCall.sqf
index 2c7cdd4b27..8ff6744a54 100644
--- a/addons/common/functions/fnc_cachedCall.sqf
+++ b/addons/common/functions/fnc_cachedCall.sqf
@@ -19,8 +19,8 @@
params ["_params", "_function", "_namespace", "_uid", "_duration", "_event"];
-if ((_namespace getVariable [_uid, [-99999]]) select 0 < ACE_diagTime) then {
- _namespace setVariable [_uid, [ACE_diagTime + _duration, _params call _function]];
+if ((_namespace getVariable [_uid, [-99999]]) select 0 < diag_tickTime) then {
+ _namespace setVariable [_uid, [diag_tickTime + _duration, _params call _function]];
// Does the cache needs to be cleared on an event?
if (!isNil "_event") then {
@@ -46,7 +46,7 @@ if ((_namespace getVariable [_uid, [-99999]]) select 0 < ACE_diagTime) then {
} forEach _cacheList;
// Empty the list
missionNamespace setVariable [_varName, []];
- }] call FUNC(addEventhandler);
+ }] call CBA_fnc_addEventHandler;
};
// Add this cache to the list of the event
diff --git a/addons/common/functions/fnc_canUseWeapon.sqf b/addons/common/functions/fnc_canUseWeapon.sqf
deleted file mode 100644
index a92d0a2b97..0000000000
--- a/addons/common/functions/fnc_canUseWeapon.sqf
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Author: commy2
- * Check if the unit can use a Weapon.
- * Returns true if the unit is on foot or in a FFV position.
- *
- * Arguments:
- * 0: The Unit
- *
- * Return Value:
- * Can the Unit use Weapons
- *
- * Public: Yes
- */
-#include "script_component.hpp"
-
-params [["_unit", objNull, [objNull]]];
-
-if (_unit == vehicle _unit) exitWith {true};
-
-private _config = configFile >> "CfgMovesMaleSdr" >> "States" >> animationState _unit;
-
-isClass _config
-&& {getNumber (_config >> "canPullTrigger") == 1}
diff --git a/addons/common/functions/fnc_checkFiles.sqf b/addons/common/functions/fnc_checkFiles.sqf
index 19a4c6f72a..1f3a26db7d 100644
--- a/addons/common/functions/fnc_checkFiles.sqf
+++ b/addons/common/functions/fnc_checkFiles.sqf
@@ -19,6 +19,18 @@ private _version = getText (configFile >> "CfgPatches" >> "ace_main" >> "version
ACE_LOGINFO_1("ACE is version %1.",_version);
+//CBA Versioning check - close main display if using incompatible version
+private _cbaVersionAr = getArray (configFile >> "CfgPatches" >> "cba_main" >> "versionAr");
+private _cbaRequiredAr = (getArray (configFile >> "CfgSettings" >> "CBA" >> "Versioning" >> "ACE" >> "dependencies" >> "CBA")) select 1;
+ACE_LOGINFO_2("CBA is version %1 [min required %2]",_cbaVersionAr,_cbaRequiredAr);
+if ([_cbaRequiredAr, _cbaVersionAr] call cba_versioning_fnc_version_compare) then {
+ private _errorMsg = format ["CBA Version [%1] is outdated [required %2]", _cbaVersionAr, _cbaRequiredAr];
+ ACE_LOGERROR(_errorMsg);
+ if (hasInterface) then {
+ ["[ACE] ERROR", _errorMsg, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage);
+ };
+};
+
//private _addons = activatedAddons; // broken with High-Command module, see #2134
private _addons = "true" configClasses (configFile >> "CfgPatches");//
_addons = _addons apply {toLower configName _x};//
diff --git a/addons/common/functions/fnc_checkPBOs.sqf b/addons/common/functions/fnc_checkPBOs.sqf
index f447d126af..1328624a0c 100644
--- a/addons/common/functions/fnc_checkPBOs.sqf
+++ b/addons/common/functions/fnc_checkPBOs.sqf
@@ -61,7 +61,8 @@ if (!isServer) then {
_error = _error + "Newer version; ";
};
- //[_error, "{systemChat _this}"] call FUNC(execRemoteFnc);
+ //[QGVAR(systemChatGlobal), _error] call CBA_fnc_globalEvent;
+
ACE_LOGERROR(_error);
if (_mode < 2) then {
@@ -79,7 +80,7 @@ if (!isServer) then {
params ["_rscLayer"];
TRACE_2("Hiding Error message after 10 seconds",time,_rscLayer);
_rscLayer cutFadeOut 0.2;
- }, [_rscLayer], 10] call FUNC(waitAndExecute);
+ }, [_rscLayer], 10] call CBA_fnc_waitAndExecute;
};
};
@@ -89,7 +90,7 @@ if (!isServer) then {
TRACE_2("Player is alive, showing msg and exiting",time,_text);
_text = composeText [parseText format ["%1 ", _text]];
["[ACE] ERROR", _text, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage);
- }, [_text]] call FUNC(waitUntilAndExecute);
+ }, [_text]] call CBA_fnc_waitUntilAndExecute;
};
};
diff --git a/addons/common/functions/fnc_claim.sqf b/addons/common/functions/fnc_claim.sqf
index cc514a2a6f..214de6052b 100644
--- a/addons/common/functions/fnc_claim.sqf
+++ b/addons/common/functions/fnc_claim.sqf
@@ -28,9 +28,9 @@ _target setVariable [QGVAR(owner), _unit, true];
// lock target object
if (_lockTarget) then {
if (!isNull _unit) then {
- ["lockVehicle", _target, _target] call FUNC(targetEvent);
+ [QGVAR(lockVehicle), _target, _target] call CBA_fnc_targetEvent;
} else {
- ["unlockVehicle", _target, _target] call FUNC(targetEvent);
+ [QGVAR(unlockVehicle), _target, _target] call CBA_fnc_targetEvent;
};
};
diff --git a/addons/common/functions/fnc_codeToLetter.sqf b/addons/common/functions/fnc_codeToLetter.sqf
deleted file mode 100644
index 80f6291d0f..0000000000
--- a/addons/common/functions/fnc_codeToLetter.sqf
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Author: commy2
- * Converts some keys to an Arma Dik Code.
- *
- * Arguments:
- * 0: Key
- *
- * Return Value:
- * Dik Code
- *
- * Public: Yes
- *
- * Deprecated
- */
-#include "script_component.hpp"
-
-ACE_DEPRECATED("ace_common_fnc_codeToLetter","3.5.0","-");
-
-["", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"] select ([2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 30, 48, 46, 32, 18, 33, 34, 35, 23, 36, 37, 38, 50, 49, 24, 25, 16, 19, 31, 20, 22, 47, 17, 45, 44, 21] find (_this select 0)) + 1
diff --git a/addons/common/functions/fnc_codeToString.sqf b/addons/common/functions/fnc_codeToString.sqf
index b2817cd2b8..b4fe37db35 100644
--- a/addons/common/functions/fnc_codeToString.sqf
+++ b/addons/common/functions/fnc_codeToString.sqf
@@ -12,12 +12,11 @@
*/
#include "script_component.hpp"
-params ["_function"];
+params ["_code"];
+if (_code isEqualType "") exitWith {_code};
-if (_function isEqualType "") exitWith {_function};
+_code = str(_code);
+_code = _code select [1, count _code - 2];
-_function = toArray str _function;
-_function deleteAt 0;
-_function deleteAt (count _function - 1);
+_code
-toString _function // return
diff --git a/addons/common/functions/fnc_deprecateComponent.sqf b/addons/common/functions/fnc_deprecateComponent.sqf
new file mode 100644
index 0000000000..21905e8e4e
--- /dev/null
+++ b/addons/common/functions/fnc_deprecateComponent.sqf
@@ -0,0 +1,63 @@
+/*
+ * Author: Glowbal
+ * Mark a component as deprecated and switches it to a new component if that is available
+ *
+ * Arguments:
+ * 0: Component
+ * 1: New component
+ * 2: Version when the compent will be removed
+ *
+ * Return Value:
+ * Replaced by new component
+ *
+ * Public: No
+ *
+ * Example:
+ * [["ace_sitting", "ace_sitting_enabled"], ["acex_sitting", "acex_sitting_enabled"], "3.7.0"] call ace_common_fnc_deprecateComponent;
+ */
+#include "script_component.hpp"
+
+params ["_oldComponent", "_newComponent", "_version"];
+
+_oldComponent params ["_oldComponentName", "_oldSettingName"];
+_newComponent params ["_newComponentName", "_newSettingName"];
+
+private _isReplacementAvailable = isClass (configFile >> "CfgPatches" >> _newComponentName);
+private _isDeprecatedLoaded = missionNamespace getvariable [_oldSettingName, false];
+private _isReplacementLoaded = missionNamespace getvariable [_newSettingName, false];
+
+if (_isDeprecatedLoaded && {_isReplacementAvailable} && {!_isReplacementLoaded}) then {
+ [_newSettingName, true, true, true] call FUNC(setSetting);
+};
+
+if (_isDeprecatedLoaded && {!_isReplacementLoaded}) then {
+ private _componentVersion = getText (configFile >> "CfgPatches" >> _oldComponentName >> "version");
+ ((_componentVersion splitString ".") apply {parseNumber _x}) params ["_componentMajor", "_componentMinor", "_componentPatch"];
+ ((_version splitString ".") apply {parseNumber _x}) params ["_major", "_minor", "_patch"];
+
+ switch (true) do {
+ case (_componentMajor >= _major && {_componentMinor >= _minor} && {_componentPatch >= _patch}): { // Removed from this version
+ private _message = format[
+ "Component %1 is deprecated. It has been replaced by %2. The component %1 is no longer usable on this version. ", _oldComponentName, _newComponentName, _version];
+ systemChat format["ACE [ERROR] - %1", _message];
+ ACE_LOGERROR(_message);
+ };
+ case (_componentMajor >= _major && {_componentMinor >= _minor-1}): { // Removed the next this version
+ private _message = format[
+ "Component %1 is deprecated. It is replaced by %2. Please disable %1 and make use of %2. "
+ + "The component (%1) will no longer be available from version %3 and later.", _oldComponentName, _newComponentName, _version];
+ systemChat format["ACE [WARNING] - %1", _message];
+ ACE_LOGWARNING(_message);
+ };
+ case (_componentMajor == _major && {_componentMinor >= _minor - 2}): { // we are in a version leading up to removal
+ private _message = format[
+ "Component %1 is deprecated. It is replaced by %2. Please disable %1 and make use of %2. "
+ + "The component (%1) will no longer be available from version %3 and later.", _oldComponentName, _newComponentName, _version];
+ ACE_LOGWARNING(_message);
+ };
+ default {
+ };
+ };
+};
+
+_isReplacementAvailable;
diff --git a/addons/common/functions/fnc_deviceKeyRegisterNew.sqf b/addons/common/functions/fnc_deviceKeyRegisterNew.sqf
index 416eef2c77..ce012fc3aa 100644
--- a/addons/common/functions/fnc_deviceKeyRegisterNew.sqf
+++ b/addons/common/functions/fnc_deviceKeyRegisterNew.sqf
@@ -13,7 +13,7 @@
* None
*
* Example:
- * [(localize "STR_ACE_microdagr_itemName"), QUOTE(PATHTOF(images\microDAGR_item.paa)), _conditionCode, _toggleCode, _closeCode] call ace_common_fnc_deviceKeyRegisterNew
+ * [(localize "STR_ACE_microdagr_itemName"), QPATHTOF(images\microDAGR_item.paa), _conditionCode, _toggleCode, _closeCode] call ace_common_fnc_deviceKeyRegisterNew
*
* Public: No
*/
diff --git a/addons/common/functions/fnc_displayIcon.sqf b/addons/common/functions/fnc_displayIcon.sqf
index c51b3bd454..e4f824791a 100644
--- a/addons/common/functions/fnc_displayIcon.sqf
+++ b/addons/common/functions/fnc_displayIcon.sqf
@@ -14,7 +14,7 @@
* None
*
* Example:
- * ["myID", true, QUOTE(PATHTOF(data\icon_group.paa)), [1,1,1,1], 0] call ace_gui_fnc_displayIcon;
+ * ["myID", true, QPATHTOF(data\icon_group.paa), [1,1,1,1], 0] call ace_gui_fnc_displayIcon;
*
* Public: Yes
*/
@@ -89,11 +89,11 @@ private _refresh = {
if (_show) then {
if ({_x select 0 == _iconId} count _list == 0) then {
- _list pushBack [_iconId, _icon, _color, ACE_time];
+ _list pushBack [_iconId, _icon, _color, CBA_missionTime];
} else {
{
if (_x select 0 == _iconId) exitWith {
- _list set [_forEachIndex, [_iconId, _icon, _color, ACE_time]];
+ _list set [_forEachIndex, [_iconId, _icon, _color, CBA_missionTime]];
};
} forEach _list;
};
@@ -104,7 +104,7 @@ if (_show) then {
if (_timeAlive >= 0) then {
[{
[_this select 0, false, "", [0,0,0], 0] call FUNC(displayIcon);
- }, [_iconId], _timeAlive, _timeAlive] call FUNC(waitAndExecute);
+ }, [_iconId], _timeAlive, _timeAlive] call CBA_fnc_waitAndExecute;
};
} else {
diff --git a/addons/common/functions/fnc_displayText.sqf b/addons/common/functions/fnc_displayText.sqf
index 3c68327535..ee22f6949a 100644
--- a/addons/common/functions/fnc_displayText.sqf
+++ b/addons/common/functions/fnc_displayText.sqf
@@ -25,7 +25,7 @@ if !(typeName _text in ["STRING", "TEXT"]) then {_text = str _text};
GVAR(lastHint) params ["_lastHintTime", "_lastHintPriority"];
-private _time = ACE_time;
+private _time = CBA_missionTime;
if (_time > _lastHintTime + _delay || {_priority >= _lastHintPriority}) then {
hintSilent _text;
@@ -33,5 +33,5 @@ if (_time > _lastHintTime + _delay || {_priority >= _lastHintPriority}) then {
GVAR(lastHint) set [0, _time];
GVAR(lastHint) set [1, _priority];
- [{if ((_this select 0) == GVAR(lastHint) select 0) then {hintSilent ""};}, [_time], _delay, 0] call FUNC(waitAndExecute);
+ [{if ((_this select 0) == GVAR(lastHint) select 0) then {hintSilent ""};}, [_time], _delay, 0] call CBA_fnc_waitAndExecute;
};
diff --git a/addons/common/functions/fnc_displayTextPicture.sqf b/addons/common/functions/fnc_displayTextPicture.sqf
index a0bcb47e11..b0c42824be 100644
--- a/addons/common/functions/fnc_displayTextPicture.sqf
+++ b/addons/common/functions/fnc_displayTextPicture.sqf
@@ -5,17 +5,22 @@
* Arguments:
* 0: Text
* 1: Image
- * 2: Image color (default: [0, 0, 0, 0])
- * 3: Target Unit. Will only display if target is the player controlled object (default: ACE_player)
+ * 2: Image color (default: [1, 1, 1])
+ * 3: Target Unit. Will only display if target is the player controlled object (default: ACE_player)
+ * 4: Size (default: 2)
*
* Return Value:
* None
*
+ * Example:
+ * ["text", "image", [1, 1, 1], ACE_player, 2] call ace_common_fnc_displayTextPicture
+ * ["text", "image", nil, nil, 3] call ace_common_fnc_displayTextPicture
+ *
* Public: Yes
*/
#include "script_component.hpp"
-params ["_text", "_image", ["_imageColor", [1,1,1]], ["_target", ACE_player]];
+params [["_text", ""], ["_image", "", [""]], ["_imageColor", [1,1,1], [[]]], ["_target", ACE_player, [objNull]], ["_size", 2, [0]]];
if (_target != ACE_player) exitWith {};
@@ -41,4 +46,4 @@ if (typeName _text != "TEXT") then {
_text = composeText [parseText format [" ", _image, _imageColor call BIS_fnc_colorRGBtoHTML], lineBreak, _text];
-[_text, 2] call FUNC(displayTextStructured);
+[_text, _size] call FUNC(displayTextStructured);
diff --git a/addons/common/functions/fnc_displayTextStructured.sqf b/addons/common/functions/fnc_displayTextStructured.sqf
index 9fff7bb056..e952fce9a4 100644
--- a/addons/common/functions/fnc_displayTextStructured.sqf
+++ b/addons/common/functions/fnc_displayTextStructured.sqf
@@ -4,17 +4,20 @@
*
* Arguments:
* 0: Text
- * 1: Size of the textbox (default: 1.5)
- * 2: Target Unit. Will only display if target is the player controlled object (default: ACE_player)
+ * 1: Size of the textbox (default: 1.5)
+ * 2: Target Unit. Will only display if target is the player controlled object (default: ACE_player)
*
* Return Value:
* None
*
+ * Example:
+ *
+ *
* Public: Yes
*/
#include "script_component.hpp"
-params ["_text", ["_size", 1.5], ["_target", ACE_player]];
+params [["_text", ""], ["_size", 1.5, [0]], ["_target", ACE_player, [objNull]]];
if (_target != ACE_player) exitWith {};
diff --git a/addons/common/functions/fnc_doAnimation.sqf b/addons/common/functions/fnc_doAnimation.sqf
index 42d59f0b72..720518d003 100644
--- a/addons/common/functions/fnc_doAnimation.sqf
+++ b/addons/common/functions/fnc_doAnimation.sqf
@@ -1,6 +1,5 @@
/*
* Author: commy2
- *
* Execute an animation. This is used to not break things like the unconsciousness animation.
*
* Arguments:
@@ -10,15 +9,20 @@
* 0 = PlayMove
* 1 = PlayMoveNow
* 2 = SwitchMove (no transitional animation, doesn't overwrite priority 1)
+ * 3: Force overwritting unconscious (default: false)
*
* Return Value:
* None
*
+ * Example:
+ * [player, "AmovPercMstpSnonWnonDnon_exerciseKata", 1] call ace_common_fnc_doAnimation
+ *
* Public: Yes
*/
#include "script_component.hpp"
params ["_unit", "_animation", ["_priority", 0], ["_force", false]];
+TRACE_4("params",_unit,_animation,_priority,_force);
// don't overwrite more important animations
if (_unit getVariable ["ACE_isUnconscious", false] && {(_animation != "Unconscious")} && {!_force}) exitWith {};
@@ -33,36 +37,38 @@ if (_animation == "") then {
//if (_animation == animationState _unit) exitWith {};
+TRACE_2("",local _unit,vehicle _unit);
switch (_priority) do {
case 0: {
if (_unit == vehicle _unit) then {
- [_unit, format ["{_this playMove '%1'}", _animation], _unit] call FUNC(execRemoteFnc);
+ [QGVAR(playMove), [_unit, _animation], _unit] call CBA_fnc_targetEvent;
} else {
// Execute on all machines. PlayMove and PlayMoveNow are bugged: They have no global effects when executed on remote machines inside vehicles.
- [_unit, format ["{_this playMove '%1'}", _animation]] call FUNC(execRemoteFnc);
+ [QGVAR(playMove), [_unit, _animation]] call CBA_fnc_globalEvent;
};
};
case 1: {
if (_unit == vehicle _unit) then {
- [_unit, format ["{_this playMoveNow '%1'}", _animation], _unit] call FUNC(execRemoteFnc);
+ [QGVAR(playMoveNow), [_unit, _animation], _unit] call CBA_fnc_targetEvent;
} else {
- // Execute on all machines. PlayMove and PlayMoveNow are bugged: They have no global effects when executed on remote machines inside vehicles.
- [_unit, format ["{_this playMoveNow '%1'}", _animation]] call FUNC(execRemoteFnc);
+ // Execute on all machines. PlayMove and PlayMoveNow are bugged: They have no global effects when executed on remote machines inside vehicles.
+ [QGVAR(playMoveNow), [_unit, _animation]] call CBA_fnc_globalEvent;
};
};
case 2: {
// try playMoveNow first
if (_unit == vehicle _unit) then {
- [_unit, format ["{_this playMoveNow '%1'}", _animation], _unit] call FUNC(execRemoteFnc);
+ [QGVAR(playMoveNow), [_unit, _animation], _unit] call CBA_fnc_targetEvent;
} else {
- // Execute on all machines. PlayMove and PlayMoveNow are bugged: They have no global effects when executed on remote machines inside vehicles.
- [_unit, format ["{_this playMoveNow '%1'}", _animation]] call FUNC(execRemoteFnc);
+ // Execute on all machines. PlayMove and PlayMoveNow are bugged: They have no global effects when executed on remote machines inside vehicles.
+ [QGVAR(playMoveNow), [_unit, _animation]] call CBA_fnc_globalEvent;
};
// if animation doesn't respond, do switchMove
if (animationState _unit != _animation) then {
+ TRACE_1("did not respond to playMoveNow",animationState _unit);
// Execute on all machines. SwitchMove has local effects.
- [_unit, format ["{_this switchMove '%1'}", _animation]] call FUNC(execRemoteFnc);
+ [QGVAR(switchMove), [_unit, _animation]] call CBA_fnc_globalEvent;
};
};
default {};
diff --git a/addons/common/functions/fnc_dumpArray.sqf b/addons/common/functions/fnc_dumpArray.sqf
index 026b08501e..b274f1119e 100644
--- a/addons/common/functions/fnc_dumpArray.sqf
+++ b/addons/common/functions/fnc_dumpArray.sqf
@@ -1,44 +1,44 @@
-/*
- * Author: ?
- * Dumps an array to the RPT, showing the depth of each element.
- *
- * Arguments:
- * 0: Array to be dumped
- * 1: Depth
- *
- * Return Value:
- * None
- *
- * Example:
- * [[0, [1,2], [[3]]]] call ace_common_fnc_dumpArray
- *
- * Public: No
- */
-#include "script_component.hpp"
-
-params ["_var", ["_depth", 0, [0]]];
-
-private _pad = "";
-
-for "_i" from 0 to _depth do {
- _pad = _pad + toString [9];
-};
-
-_depth = _depth + 1;
-
-if (IS_ARRAY(_var)) then {
- if (_var isEqualTo []) then {
- diag_log text format ["%1[],", _pad];
- } else {
- diag_log text format ["%1[", _pad];
-
- {
- [_x, _depth] call FUNC(dumpArray);
- false
- } count _var;
-
- diag_log text format ["%1],", _pad];
- };
-} else {
- diag_log text format ["%1%2", _pad, _var];
-};
+/*
+ * Author: ?
+ * Dumps an array to the RPT, showing the depth of each element.
+ *
+ * Arguments:
+ * 0: Array to be dumped
+ * 1: Depth
+ *
+ * Return Value:
+ * None
+ *
+ * Example:
+ * [[0, [1,2], [[3]]]] call ace_common_fnc_dumpArray
+ *
+ * Public: No
+ */
+#include "script_component.hpp"
+
+params ["_var", ["_depth", 0, [0]]];
+
+private _pad = "";
+
+for "_i" from 0 to _depth do {
+ _pad = _pad + toString [9];
+};
+
+_depth = _depth + 1;
+
+if (IS_ARRAY(_var)) then {
+ if (_var isEqualTo []) then {
+ diag_log text format ["%1[],", _pad];
+ } else {
+ diag_log text format ["%1[", _pad];
+
+ {
+ [_x, _depth] call FUNC(dumpArray);
+ false
+ } count _var;
+
+ diag_log text format ["%1],", _pad];
+ };
+} else {
+ diag_log text format ["%1%2", _pad, _var];
+};
diff --git a/addons/common/functions/fnc_dumpPerformanceCounters.sqf b/addons/common/functions/fnc_dumpPerformanceCounters.sqf
index bdc4588b05..ec6f225ce4 100644
--- a/addons/common/functions/fnc_dumpPerformanceCounters.sqf
+++ b/addons/common/functions/fnc_dumpPerformanceCounters.sqf
@@ -1,88 +1,88 @@
-/*
- * Author: ?
- * Dumps performance counter statistics into Logs.
- *
- * Arguments:
- * None
- *
- * Return Value:
- * None
- *
- * Public: No
- */
-#include "script_component.hpp"
-
-diag_log text format ["REGISTERED ACE PFH HANDLERS"];
-diag_log text format ["-------------------------------------------"];
-
-if (!isNil "ACE_PFH_COUNTER") then {
- {
- _x params ["_pfh", "_parameters"];
-
- private _isActive = ["ACTIVE", "REMOVED"] select isNil {CBA_common_PFHhandles select (_pfh select 0)};
-
- diag_log text format ["Registered PFH: id=%1 [%2, delay %3], %4:%5", _pfh select 0, _isActive, _parameters select 1, _pfh select 1, _pfh select 2];
- false
- } count ACE_PFH_COUNTER;
-};
-
-diag_log text format ["ACE COUNTER RESULTS"];
-diag_log text format ["-------------------------------------------"];
-
-{
- private _counterEntry = _x;
- private _iter = 0;
- private _total = 0;
- private _count = 0;
- private _averageResult = 0;
-
- if (count _counterEntry > 3) then {
- // calc
- {
- if (_iter > 2) then {
- _count = _count + 1;
- private _delta = (_x select 1) - (_x select 0);
-
- _total = _total + _delta;
- };
-
- _iter = _iter + 1;
- false
- } count _counterEntry;
-
- // results
- _averageResult = (_total / _count) * 1000;
-
- // dump results
- diag_log text format ["%1: Average: %2s / %3 = %4ms", _counterEntry select 0, _total, _count, _averageResult];
- } else {
- diag_log text format ["%1: No results", _counterEntry select 0];
- };
- false
-} count ACE_COUNTERS;
-
-/*
-// Dump PFH Trackers
-diag_log text format["ACE_PERFORMANCE_EXCESSIVE_STEP_TRACKER"];
-diag_log text format["-------------------------------------------"];
-{
- private _delay = _x select 2;
- //if(_delay > 0) then { _delay = _delay / 1000; };
-
- diag_log text format["%1: %2s, delay=%3, handle=%4",(_x select 0), _delay, (_x select 3), (_x select 4)];
-} forEach ACE_PERFORMANCE_EXCESSIVE_STEP_TRACKER;
-
-// Dump PFH Trackers
-diag_log text format["ACE_PERFORMANCE_EXCESSIVE_FRAME_TRACKER"];
-diag_log text format["-------------------------------------------"];
-{
- private _delta = _x select 1;
- //if(_delta > 0) then { _delta = _delta / 1000; };
- diag_log text format[" DELTA: %1s", _delta];
-} forEach ACE_PERFORMANCE_EXCESSIVE_FRAME_TRACKER;
-
-//{
-//
-//} forEach ACRE_EXCESSIVE_FRAME_TRACKER;
-
-*/
+/*
+ * Author: ?
+ * Dumps performance counter statistics into Logs.
+ *
+ * Arguments:
+ * None
+ *
+ * Return Value:
+ * None
+ *
+ * Public: No
+ */
+#include "script_component.hpp"
+
+diag_log text format ["REGISTERED ACE PFH HANDLERS"];
+diag_log text format ["-------------------------------------------"];
+
+if (!isNil "ACE_PFH_COUNTER") then {
+ {
+ _x params ["_pfh", "_parameters"];
+
+ private _isActive = ["ACTIVE", "REMOVED"] select isNil {CBA_common_PFHhandles select (_pfh select 0)};
+
+ diag_log text format ["Registered PFH: id=%1 [%2, delay %3], %4:%5", _pfh select 0, _isActive, _parameters select 1, _pfh select 1, _pfh select 2];
+ false
+ } count ACE_PFH_COUNTER;
+};
+
+diag_log text format ["ACE COUNTER RESULTS"];
+diag_log text format ["-------------------------------------------"];
+
+{
+ private _counterEntry = _x;
+ private _iter = 0;
+ private _total = 0;
+ private _count = 0;
+ private _averageResult = 0;
+
+ if (count _counterEntry > 3) then {
+ // calc
+ {
+ if (_iter > 2) then {
+ _count = _count + 1;
+ private _delta = (_x select 1) - (_x select 0);
+
+ _total = _total + _delta;
+ };
+
+ _iter = _iter + 1;
+ false
+ } count _counterEntry;
+
+ // results
+ _averageResult = (_total / _count) * 1000;
+
+ // dump results
+ diag_log text format ["%1: Average: %2s / %3 = %4ms", _counterEntry select 0, _total, _count, _averageResult];
+ } else {
+ diag_log text format ["%1: No results", _counterEntry select 0];
+ };
+ false
+} count ACE_COUNTERS;
+
+/*
+// Dump PFH Trackers
+diag_log text format["ACE_PERFORMANCE_EXCESSIVE_STEP_TRACKER"];
+diag_log text format["-------------------------------------------"];
+{
+ private _delay = _x select 2;
+ //if(_delay > 0) then { _delay = _delay / 1000; };
+
+ diag_log text format["%1: %2s, delay=%3, handle=%4",(_x select 0), _delay, (_x select 3), (_x select 4)];
+} forEach ACE_PERFORMANCE_EXCESSIVE_STEP_TRACKER;
+
+// Dump PFH Trackers
+diag_log text format["ACE_PERFORMANCE_EXCESSIVE_FRAME_TRACKER"];
+diag_log text format["-------------------------------------------"];
+{
+ private _delta = _x select 1;
+ //if(_delta > 0) then { _delta = _delta / 1000; };
+ diag_log text format[" DELTA: %1s", _delta];
+} forEach ACE_PERFORMANCE_EXCESSIVE_FRAME_TRACKER;
+
+//{
+//
+//} forEach ACRE_EXCESSIVE_FRAME_TRACKER;
+
+*/
diff --git a/addons/common/functions/fnc_execNextFrame.sqf b/addons/common/functions/fnc_execNextFrame.sqf
index 7b3f034c6d..c1c4b81592 100644
--- a/addons/common/functions/fnc_execNextFrame.sqf
+++ b/addons/common/functions/fnc_execNextFrame.sqf
@@ -13,10 +13,6 @@
*/
#include "script_component.hpp"
-params ["_func", "_params"];
+ACE_DEPRECATED("ace_common_fnc_execNextFrame","3.8.0","CBA_fnc_execNextFrame");
-if (diag_frameno != GVAR(nextFrameNo)) then {
- GVAR(nextFrameBufferA) pushBack [_params, _func];
-} else {
- GVAR(nextFrameBufferB) pushBack [_params, _func];
-};
+_this call CBA_fnc_execNextFrame;
diff --git a/addons/common/functions/fnc_execPersistentFnc.sqf b/addons/common/functions/fnc_execPersistentFnc.sqf
index 06e1397f01..af015cf55d 100644
--- a/addons/common/functions/fnc_execPersistentFnc.sqf
+++ b/addons/common/functions/fnc_execPersistentFnc.sqf
@@ -17,6 +17,8 @@
*/
#include "script_component.hpp"
+ACE_DEPRECATED("ace_common_fnc_execPersistentFnc","3.7.0","ace_common_fnc_globalEvent");
+
GVAR(remoteFnc) = _this;
params ["_arguments", "_function", "_unit", "_name"];
diff --git a/addons/common/functions/fnc_execRemoteFnc.sqf b/addons/common/functions/fnc_execRemoteFnc.sqf
index 02f957b501..945d181e4e 100644
--- a/addons/common/functions/fnc_execRemoteFnc.sqf
+++ b/addons/common/functions/fnc_execRemoteFnc.sqf
@@ -20,6 +20,8 @@
*/
#include "script_component.hpp"
+ACE_DEPRECATED("ace_common_fnc_execRemoteFnc","3.7.0","ace_common_fnc_globalEvent");
+
GVAR(remoteFnc) = _this;
params ["_arguments", "_function", ["_unit", 2]];
diff --git a/addons/common/functions/fnc_exportConfig.sqf b/addons/common/functions/fnc_exportConfig.sqf
deleted file mode 100644
index c175254e5a..0000000000
--- a/addons/common/functions/fnc_exportConfig.sqf
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Author: commy2
- * Export Config Entrys to RPT logs
- *
- * Arguments:
- * Config Path
- *
- * Return Value:
- * None
- *
- * Example:
- * [configFile >> "CfgAmmo"] call ace_common_fnc_exportConfig;
- *
- * Public: No
- */
-#include "script_component.hpp"
-
-private _fnc_logEntries = {
- params ["_c", "_d"];
-
- private _p = inheritsFrom _c;
-
- private _t = format [["class %1: %2 {", "class %1 {"] select (configName _p == ""), configName _c, configName _p];
- for "_a" from 1 to _d do {
- _t = " " + _t;
- };
- diag_log text _t;
-
- private _e = [];
- for "_i" from 0 to (count _c - 1) do {
- private _e1 = _c select _i;
-
- private _e2 = switch (true) do {
- case (isNumber _e1): {getNumber _e1};
- case (isText _e1): {getText _e1};
- case (isArray _e1): {getArray _e1};
- case (isClass _e1): {[_e1, _d + 1] call _fnc_logEntries; false};
- };
-
- if (!(_e2 isEqualType false)) then {
- if (_e2 isEqualType []) then {
- _e2 = toArray str _e2;
- {
- if (_x == toArray "[" select 0) then {
- _e2 set [_forEachIndex, toArray "{" select 0];
- };
- if (_x == toArray "]" select 0) then {
- _e2 set [_forEachIndex, toArray "}" select 0];
- };
- } forEach _e2;
- _e2 = toString _e2;
- _t = format ["%1[] = %2;", configName _e1, _e2];
- } else {
- _t = format ["%1 = %2;", configName _e1, str _e2];
- };
- for "_a" from 0 to _d do {
- _t = " " + _t;
- };
- diag_log text _t;
- };
- };
-
- _t = "};";
- for "_a" from 1 to _d do {
- _t = " " + _t;
- };
- diag_log text _t;
- diag_log text "";
-};
-
-[_this, 0] call _fnc_logEntries;
diff --git a/addons/common/functions/fnc_findUnloadPosition.sqf b/addons/common/functions/fnc_findUnloadPosition.sqf
index f7155fd87b..c3b0dc3f34 100644
--- a/addons/common/functions/fnc_findUnloadPosition.sqf
+++ b/addons/common/functions/fnc_findUnloadPosition.sqf
@@ -92,6 +92,15 @@ while {_rangeToCheck < _maxDistance} do {
private _point1ASL = (AGLtoASL _roundAGL) vectorAdd [_radiusOfItem * cos _angle, _radiusOfItem * sin _angle, 0.1];
private _point2ASL = (AGLtoASL _roundAGL) vectorAdd [-_radiusOfItem * cos _angle, -_radiusOfItem * sin _angle, (_radiusOfItem + 0.5)];
private _testIntersections = lineIntersectsSurfaces [_point1ASL, _point2ASL];
+ if (((count _testIntersections) == 1) && {isNull ((_testIntersections select 0) select 2)}) then {
+ private _hitGroundASL = (_testIntersections select 0) select 0;
+ private _hitHeightOffset = ((AGLtoASL _roundAGL) select 2) - (_hitGroundASL select 2);
+ private _hit2dOffset = _roundAGL distance2D _hitGroundASL;
+ private _slope = _hitHeightOffset atan2 _hit2dOffset;
+ if (_slope < 25) then { //Ignore ground hit if slope is reasonable
+ _testIntersections = [];
+ };
+ };
if (!(_testIntersections isEqualTo [])) exitWith {
TRACE_2("collision low/high",_roundAGL,_testIntersections);
_roundPointIsValid = false;
diff --git a/addons/common/functions/fnc_firedEH.sqf b/addons/common/functions/fnc_firedEH.sqf
index d70f0a8650..488766faff 100644
--- a/addons/common/functions/fnc_firedEH.sqf
+++ b/addons/common/functions/fnc_firedEH.sqf
@@ -26,12 +26,12 @@ TRACE_7("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile
if (_unit isKindOf "CAManBase") then {
// The unit it on foot
if (_unit == ACE_player) then {
- ["firedPlayer", _this] call FUNC(localEvent);
+ ["ace_firedPlayer", _this] call CBA_fnc_localEvent;
} else {
if ([_unit] call EFUNC(common,isPlayer)) then {
- ["firedPlayerNonLocal", _this] call FUNC(localEvent);
+ ["ace_firedPlayerNonLocal", _this] call CBA_fnc_localEvent;
} else {
- ["firedNonPlayer", _this] call FUNC(localEvent);
+ ["ace_firedNonPlayer", _this] call CBA_fnc_localEvent;
};
};
} else {
@@ -55,12 +55,12 @@ if (_unit isKindOf "CAManBase") then {
};
if (_gunner == ACE_player) then {
- ["firedPlayerVehicle", _this] call FUNC(localEvent);
+ ["ace_firedPlayerVehicle", _this] call CBA_fnc_localEvent;
} else {
if ([_gunner] call EFUNC(common,isPlayer)) then {
- ["firedPlayerVehicleNonLocal", _this] call FUNC(localEvent);
+ ["ace_firedPlayerVehicleNonLocal", _this] call CBA_fnc_localEvent;
} else {
- ["firedNonPlayerVehicle", _this] call FUNC(localEvent);
+ ["ace_firedNonPlayerVehicle", _this] call CBA_fnc_localEvent;
};
};
};
diff --git a/addons/common/functions/fnc_fixCollision.sqf b/addons/common/functions/fnc_fixCollision.sqf
index c0cf7b93e7..3b3b16a9f9 100644
--- a/addons/common/functions/fnc_fixCollision.sqf
+++ b/addons/common/functions/fnc_fixCollision.sqf
@@ -19,4 +19,4 @@ if (!local _this) exitWith {};
[_this, "blockDamage", "fixCollision", true] call FUNC(statusEffect_set);
// re-allow damage after 2 seconds
-[{[_this, "blockDamage", "fixCollision", false] call FUNC(statusEffect_set);}, _this, 2] call EFUNC(common,waitAndExecute);
+[{[_this, "blockDamage", "fixCollision", false] call FUNC(statusEffect_set);}, _this, 2] call CBA_fnc_waitAndExecute;
diff --git a/addons/common/functions/fnc_fixCrateContent.sqf b/addons/common/functions/fnc_fixCrateContent.sqf
deleted file mode 100644
index 06d73c39b1..0000000000
--- a/addons/common/functions/fnc_fixCrateContent.sqf
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Author: commy2
- * Fixes zeus placed crates containing buged mine detectors and ace items.
- *
- * Arguments:
- * 0: Crate
- *
- * Return Value:
- * None
- *
- * Public: No
- */
-#include "script_component.hpp"
-
-params ["_crate"];
-
-// get all weapons inside the crate
-private _weapons = weaponCargo _crate;
-private _items = [];
-
-// if the "weapon" is supposed to be an item, move those from the weapon array to the item array
-{
- if (getText (configFile >> "CfgWeapons" >> _x >> "simulation") == "ItemMineDetector") then {
- _weapons set [_forEachIndex, ""];
- _items pushBack _x;
- };
-} forEach _weapons;
-
-_weapons = _weapons - [""];
-
-// exit now if everything is fine
-if (count _items == 0) exitWith {};
-
-// otherwise clear weapon cargo and re-add items and weapons
-clearWeaponCargoGlobal _crate;
-
-{
- _crate addWeaponCargoGlobal [_x, 1];
-} forEach _weapons;
-
-{
- _crate addItemCargoGlobal [_x, 1];
-} forEach _items;
diff --git a/addons/common/functions/fnc_fixFloating.sqf b/addons/common/functions/fnc_fixFloating.sqf
index 1d8da1c8a4..5a00aa3863 100644
--- a/addons/common/functions/fnc_fixFloating.sqf
+++ b/addons/common/functions/fnc_fixFloating.sqf
@@ -21,7 +21,7 @@ if (!local _object) exitWith {};
if (_object isKindOf "CAManBase") exitWith {};
//We need to manually set allowDamage to true for setHitIndex to function
-["blockDamage", [_object, 0]] call FUNC(localEvent);
+[QGVAR(blockDamage), [_object, 0]] call CBA_fnc_localEvent;
// save and restore hitpoints, see below why
private _hitPointDamages = getAllHitPointsDamage _object;
@@ -41,4 +41,4 @@ _object setDamage damage _object;
//manually re-enable allowDamage to previous setting (ref statusEffect_funcs)
private _effectVarName = format [QGVAR(effect_%1), "blockDamage"];
private _effectNumber = _object getVariable [_effectVarName, 0];
-["blockDamage", [_object, _effectNumber]] call FUNC(localEvent);
+[QGVAR(blockDamage), [_object, _effectNumber]] call CBA_fnc_localEvent;
diff --git a/addons/common/functions/fnc_fixPosition.sqf b/addons/common/functions/fnc_fixPosition.sqf
index e2e2d71059..689512d925 100644
--- a/addons/common/functions/fnc_fixPosition.sqf
+++ b/addons/common/functions/fnc_fixPosition.sqf
@@ -16,6 +16,16 @@
// setVectorUp requires local object
if (!local _this) exitWith {};
+if ((getText (configFile >> "CfgVehicles" >> (typeOf _this) >> "simulation")) == "house") then {
+ //Houses don't have gravity/physics, so make sure they are not floating
+ private _posAbove = (getPos _this) select 2;
+ TRACE_2("house",_this,_posAbove);
+ if (_posAbove > 0.1) then {
+ private _newPosASL = (getPosASL _this) vectorDiff [0,0,_posAbove];
+ _this setPosASL _newPosASL;
+ };
+};
+
private _position = getPos _this;
// don't place the object below the ground
diff --git a/addons/common/functions/fnc_getAllGear.sqf b/addons/common/functions/fnc_getAllGear.sqf
index 715966b176..de6ea62dff 100644
--- a/addons/common/functions/fnc_getAllGear.sqf
+++ b/addons/common/functions/fnc_getAllGear.sqf
@@ -33,7 +33,11 @@
*/
#include "script_component.hpp"
-params ["_unit"];
+params ["_unit", ["_showDeprecated", true]];
+
+if (_showDeprecated) then {
+ ACE_DEPRECATED("ace_common_fnc_getAllGear","3.7.0","getUnitLoadout");
+};
if (isNull _unit) exitWith {[
"",
@@ -60,5 +64,5 @@ if (isNull _unit) exitWith {[
handgunWeapon _unit, handgunItems _unit, handgunMagazine _unit,
assignedItems _unit,
binocular _unit,
- [_unit] call FUNC(binocularMagazine)
+ [_unit] call CBA_fnc_binocularMagazine
]
diff --git a/addons/common/functions/fnc_getConfigType.sqf b/addons/common/functions/fnc_getConfigType.sqf
index 1496cfa2b9..34aaa03172 100644
--- a/addons/common/functions/fnc_getConfigType.sqf
+++ b/addons/common/functions/fnc_getConfigType.sqf
@@ -12,12 +12,6 @@
*/
#include "script_component.hpp"
-params ["_item"];
+ACE_DEPRECATED("ace_common_fnc_getConfigType","3.8.0","CBA_fnc_getItemConfig");
-if (isClass (configFile >> "CfgWeapons" >> _item)) exitWith {"CfgWeapons"};
-
-if (isClass (configFile >> "CfgMagazines" >> _item)) exitWith {"CfgMagazines"};
-
-if (isClass (configFile >> "CfgGlasses" >> _item)) exitWith {"CfgGlasses"};
-
-""
+configName (configHierarchy (_item call CBA_fnc_getItemConfig) param [1, configNull])
diff --git a/addons/common/functions/fnc_getConfigTypeObject.sqf b/addons/common/functions/fnc_getConfigTypeObject.sqf
index 6186ad6bff..92a6d43a42 100644
--- a/addons/common/functions/fnc_getConfigTypeObject.sqf
+++ b/addons/common/functions/fnc_getConfigTypeObject.sqf
@@ -12,10 +12,6 @@
*/
#include "script_component.hpp"
-params ["_object"];
+ACE_DEPRECATED("ace_common_fnc_getConfigTypeObject","3.8.0","CBA_fnc_getObjectConfig");
-if (isClass (configFile >> "CfgVehicles" >> _object)) exitWith {"CfgVehicles"};
-
-if (isClass (configFile >> "CfgAmmo" >> _object)) exitWith {"CfgAmmo"};
-
-""
+configName (configHierarchy (_item call CBA_fnc_getObjectConfig) param [1, configNull])
diff --git a/addons/common/functions/fnc_getHitPoints.sqf b/addons/common/functions/fnc_getHitPoints.sqf
deleted file mode 100644
index 9fb69dd50c..0000000000
--- a/addons/common/functions/fnc_getHitPoints.sqf
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Author: commy2
- * Returns all hitpoints and their selections of any vehicle. Might contain duplicates if the turrets contain non unique hitpoints with different selection names.
- *
- * Arguments:
- * 0: Vehicle
- *
- * Return Value:
- * Hitpoints
- *
- * Public: Yes
- *
- * Deprecated
- */
-#include "script_component.hpp"
-
-ACE_DEPRECATED("ace_common_fnc_getHitPoints","3.5.0","getAllHitPointsDamage");
-
-params ["_vehicle"];
-
-private _hitPointsWithSelections = getAllHitPointsDamage _vehicle;
-
-// get correct format on vehicles without any hitpoints
-if (_hitPointsWithSelections isEqualTo []) then {
- _hitPointsWithSelections = [[],[],[]];
-};
-
-(_hitPointsWithSelections select 0) - [""]
diff --git a/addons/common/functions/fnc_getHitPointsWithSelections.sqf b/addons/common/functions/fnc_getHitPointsWithSelections.sqf
deleted file mode 100644
index d1c81ad3a6..0000000000
--- a/addons/common/functions/fnc_getHitPointsWithSelections.sqf
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Author: commy2
- * Returns all hitpoints and their respective selections of any vehicle. Might contain duplicates for non unique hitpoints in turrets.
- *
- * Arguments:
- * 0: Vehicle
- *
- * Return Value:
- * 0: Hitpoints
- * 1: Selections
- *
- * Public: Yes
- *
- * Deprecated
- */
-#include "script_component.hpp"
-
-ACE_DEPRECATED("ace_common_fnc_getHitPointsWithSelections","3.5.0","getAllHitPointsDamage");
-
-params ["_vehicle"];
-
-private _hitPointsWithSelections = getAllHitPointsDamage _vehicle;
-
-// get correct format on vehicles without any hitpoints
-if (_hitPointsWithSelections isEqualTo []) then {
- _hitPointsWithSelections = [[],[],[]];
-};
-
-_hitPointsWithSelections resize 2;
-
-_hitPointsWithSelections
diff --git a/addons/common/functions/fnc_getItemType.sqf b/addons/common/functions/fnc_getItemType.sqf
index d3eb511949..eb5015e20a 100644
--- a/addons/common/functions/fnc_getItemType.sqf
+++ b/addons/common/functions/fnc_getItemType.sqf
@@ -15,9 +15,11 @@
params ["_item"];
-private _cfgType = [_item] call FUNC(getConfigType);
+private _config = _item call CBA_fnc_getItemConfig;
-if (_cfgType == "") exitWith {["", ""]};
+if (isNull _config) exitWith {["", ""]};
+
+private _cfgType = configName ((configHierarchy _config) param [1, configNull]);
if (_cfgType == "CfgGlasses") exitWith {["item", "glasses"]};
diff --git a/addons/common/functions/fnc_getMGRSdata.sqf b/addons/common/functions/fnc_getMGRSdata.sqf
index ee6d1e11dc..a2a9756e23 100644
--- a/addons/common/functions/fnc_getMGRSdata.sqf
+++ b/addons/common/functions/fnc_getMGRSdata.sqf
@@ -22,29 +22,14 @@ private _long = getNumber (configFile >> "CfgWorlds" >> _map >> "longitude");
private _lat = getNumber (configFile >> "CfgWorlds" >> _map >> "latitude");
private _altitude = getNumber (configFile >> "CfgWorlds" >> _map >> "elevationOffset");
-if (_map in ["Chernarus", "Bootcamp_ACR", "Woodland_ACR", "utes"]) then { _lat = 50; _altitude = 0; };
-if (_map in ["Altis", "Stratis"]) then { _lat = 40; _altitude = 0; };
-if (_map in ["Takistan", "Zargabad", "Mountains_ACR"]) then { _lat = 35; _altitude = 2000; };
-if (_map in ["Shapur_BAF", "ProvingGrounds_PMC"]) then { _lat = 35; _altitude = 100; };
-if (_map in ["fallujah"]) then { _lat = 33; _altitude = 0; };
-if (_map in ["fata", "Abbottabad"]) then { _lat = 30; _altitude = 1000; };
-if (_map in ["sfp_wamako"]) then { _lat = 14; _altitude = 0; };
-if (_map in ["sfp_sturko"]) then { _lat = 56; _altitude = 0; };
-if (_map in ["Bornholm"]) then { _lat = 55; _altitude = 0; };
-if (_map in ["Imrali"]) then { _lat = 40; _altitude = 0; };
-if (_map in ["Caribou"]) then { _lat = 68; _altitude = 0; };
-if (_map in ["Namalsk"]) then { _lat = 65; _altitude = 0; };
-if (_map in ["MCN_Aliabad"]) then { _lat = 36; _altitude = 0; };
-if (_map in ["Clafghan"]) then { _lat = 34; _altitude = 640; };
-if (_map in ["Sangin", "hellskitchen"]) then { _lat = 32; _altitude = 0; };
-if (_map in ["Sara"]) then { _lat = 40; _altitude = 0; };
-if (_map in ["reshmaan"]) then { _lat = 35; _altitude = 2000; };
-if (_map in ["Thirsk"]) then { _lat = 65; _altitude = 0; };
-if (_map in ["lingor"]) then { _lat = -4; _altitude = 0; };
-if (_map in ["Panthera3"]) then { _lat = 46; _altitude = 0; };
-if (_map in ["Kunduz"]) then { _lat = 37; _altitude = 400; };
+private _mapData = _map call FUNC(getMapData);
+if (!(_mapData isEqualTo [])) then {
+ _lat = _mapData select 0;
+ _alt = _mapData select 1;
+};
+TRACE_2("Latitude and Altitude",_lat,_alt);
-private _UTM = [_long,_lat] call BIS_fnc_posDegToUTM;
+private _UTM = [_long, _lat] call BIS_fnc_posDegToUTM;
private _easting = _UTM select 0;
private _northing = _UTM select 1;
//private _zone = _UTM select 2;
diff --git a/addons/common/functions/fnc_getMapData.sqf b/addons/common/functions/fnc_getMapData.sqf
new file mode 100644
index 0000000000..5a621a8dfc
--- /dev/null
+++ b/addons/common/functions/fnc_getMapData.sqf
@@ -0,0 +1,98 @@
+/*
+ * Author: VKing, bux
+ * Gets the current latitude and altitude offset for the map.
+ *
+ * Argument:
+ * 0: Map name (default: worldName)
+ *
+ * Return Value:
+ * 0: Latitude
+ * 1: Altitude
+ *
+ * Public: No
+ */
+
+params ["_map"];
+_map = toLower _map;
+
+// [latitude, altitude]
+
+// the more important ones
+if (_map in ["tanoa"]) exitWith { [-18, 0] };
+if (_map in ["altis"]) exitWith { [40, 0] };
+if (_map in ["stratis"]) exitWith { [40, 0] };
+
+if (_map in ["abbottabad"]) exitWith { [34, 1256] }; //Abbottabad elevation 1256m (Wikipedia)
+if (_map in ["abramia"]) exitWith { [60, 0] };
+if (_map in ["af_kandahar_province"]) exitWith { [42, 0] };
+if (_map in ["angel"]) exitWith { [38, 0] };
+if (_map in ["anim_helvantis_v2"]) exitWith { [50, 0] };
+if (_map in ["australia"]) exitWith { [-25, 0] };
+if (_map in ["bootcamp_acr"]) exitWith { [50, 0] };
+if (_map in ["bornholm"]) exitWith { [55, 0] };
+if (_map in ["bozcaada"]) exitWith { [40, 0] };
+if (_map in ["caribou"]) exitWith { [68, 0] };
+if (_map in ["catalina"]) exitWith { [33, 0] };
+if (_map in ["chernarus", "chernarus_summer", "chernarus_winter"]) exitWith { [50, 0] };
+if (_map in ["chernobylzone", "chernobylzonea2"]) exitWith { [51, 0] };
+if (_map in ["clafghan"]) exitWith { [34, 640] };
+if (_map in ["dakrong"]) exitWith { [17, 0] }; //Unsung Mod
+if (_map in ["desert_e"]) exitWith { [40, 800] };
+if (_map in ["dya"]) exitWith { [34, 110] }; //Diyala Iraq - default elevationOffset
+if (_map in ["esseker"]) exitWith { [43, 2000] };
+if (_map in ["evergreen"]) exitWith { [41, 0] }; //Burgazada, Turkey - default elevationOffset
+if (_map in ["fallujah"]) exitWith { [33, 0] };
+if (_map in ["fata"]) exitWith { [33, 1347] };
+if (_map in ["gorgona"]) exitWith { [43, 0] };
+if (_map in ["hellskitchen", "hellskitchens"]) exitWith { [32, 900] }; //Sangin summer, Sangin winter - Sangin elevation 888m (Wikipedia)
+if (_map in ["hindukush"]) exitWith { [36, 0] };
+if (_map in ["imrali", "imralispring"]) exitWith { [40, 0] };
+if (_map in ["intro"]) exitWith { [40, 0] };
+if (_map in ["isladuala3"]) exitWith { [-19, 0] };
+if (_map in ["jacobi"]) exitWith { [34, 2000] }; //default elevationOffset
+if (_map in ["kapaulio"]) exitWith { [0, 0] };
+if (_map in ["kerama"]) exitWith { [26, 0] }; //Kerama Islands, Japan - default elevationOffset
+if (_map in ["kholm"]) exitWith { [36, 0] };
+if (_map in ["koplic"]) exitWith { [42, 0] };
+if (_map in ["kunduz"]) exitWith { [37, 0] };
+if (_map in ["lingor", "lingor3"]) exitWith { [-4, 0] };
+if (_map in ["lost", "lostw"]) exitWith { [60, 0] };
+if (_map in ["mcn_aliabad"]) exitWith { [36, 0] };
+if (_map in ["malvinas"]) exitWith { [-52, 0] };
+if (_map in ["namalsk"]) exitWith { [65, 0] };
+if (_map in ["mef_alaska"]) exitWith { [60, 5] };
+if (_map in ["mountains_acr"]) exitWith { [35, 2000] };
+if (_map in ["napf", "napfwinter"]) exitWith { [47, 0] };
+if (_map in ["panthera3"]) exitWith { [46, 0] };
+if (_map in ["pianosa_aut"]) exitWith { [43, 0] }; //Pianosa, Italy - default elevationOffset
+if (_map in ["pja305"]) exitWith { [0, 0] }; //G.O.S N'Ziwasogo
+if (_map in ["pja306"]) exitWith { [35, 0] }; //G.O.S Kalu Khan
+if (_map in ["pja307"]) exitWith { [17, 0] }; //F.S.F Daryah
+if (_map in ["pja308"]) exitWith { [36, 0] }; //G.O.S Gunkizli
+if (_map in ["pja310"]) exitWith { [36, 0] }; //G.O.S Al Rayak
+if (_map in ["pja312"]) exitWith { [16, 0] }; //G.O.S Song Bin Tanh
+if (_map in ["porquerolles"]) exitWith { [43, 0] };
+if (_map in ["porto"]) exitWith { [40, 0] };
+if (_map in ["provinggrounds_pmc"]) exitWith { [35, 100] };
+if (_map in ["reshmaan"]) exitWith { [35, 2000] };
+if (_map in ["sara", "sara_dbe1"]) exitWith { [40, 0] };
+if (_map in ["saralite"]) exitWith { [40, 0] };
+if (_map in ["sb3"]) exitWith { [53, 25] }; //TrpUebPl Einfelde Nord (Munster North Training Area, Germany) - default elevationOffset
+if (_map in ["shapur_baf"]) exitWith { [35, 100] };
+if (_map in ["sfp_sturko"]) exitWith { [56, 0] };
+if (_map in ["sfp_wamako"]) exitWith { [14, 0] };
+if (_map in ["sugarlake"]) exitWith { [29, 0] };
+if (_map in ["takistan"]) exitWith { [35, 2000] };
+if (_map in ["thirsk"]) exitWith { [65, 0] };
+if (_map in ["tilos"]) exitWith { [36, 0] };
+if (_map in ["utes"]) exitWith { [50, 0] };
+if (_map in ["vt5"]) exitWith { [61, 100] }; //Vt5, Suomi Finland - default elevationOffset
+if (_map in ["wake"]) exitWith { [19, 0] };
+if (_map in ["waziristan"]) exitWith { [33, 0] };
+if (_map in ["wintermap"]) exitWith { [61, 0] }; //Nordkvingo - default elevationOffset
+if (_map in ["wintertown", "wintertowna3"]) exitWith { [39, 600] }; //U.S. state Kansas mean elevation 610m (Wikipedia)
+if (_map in ["woodland_acr"]) exitWith { [50, 0] };
+if (_map in ["xcam_prototype"]) exitWith { [35, 0] };
+if (_map in ["zargabad"]) exitWith { [35, 2000] };
+
+[] //Return empty array if we have no specific data for the map
diff --git a/addons/common/functions/fnc_getTurretCommander.sqf b/addons/common/functions/fnc_getTurretCommander.sqf
index e73795e148..3e7f09215f 100644
--- a/addons/common/functions/fnc_getTurretCommander.sqf
+++ b/addons/common/functions/fnc_getTurretCommander.sqf
@@ -14,19 +14,4 @@
params [["_vehicle", objNull, [objNull]]];
-private _turrets = allTurrets [_vehicle, true];
-
-private _turret = [];
-
-{
- private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
-
- _config = [_config, _x] call FUNC(getTurretConfigPath);
-
- if (getNumber (_config >> "primaryObserver") == 1) exitWith {
- _turret = _x;
- };
- false
-} count _turrets;
-
-_turret
+fullCrew [_vehicle, "commander", true] apply {_x select 3} param [0, []] // return
diff --git a/addons/common/functions/fnc_getTurretCopilot.sqf b/addons/common/functions/fnc_getTurretCopilot.sqf
index 6161f5c4cc..49002cc40e 100644
--- a/addons/common/functions/fnc_getTurretCopilot.sqf
+++ b/addons/common/functions/fnc_getTurretCopilot.sqf
@@ -14,19 +14,6 @@
params [["_vehicle", objNull, [objNull]]];
-private _turrets = allTurrets [_vehicle, true];
-
-private _turret = [];
-
-{
- private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
-
- _config = [_config, _x] call FUNC(getTurretConfigPath);
-
- if (getNumber (_config >> "isCopilot") == 1 && {getNumber (_config >> "primaryGunner") != 1} && {getNumber (_config >> "primaryObserver") != 1}) exitWith {
- _turret = _x;
- };
- false
-} count _turrets;
-
-_turret
+fullCrew [_vehicle, "turret", true] apply {_x select 3} select {
+ getNumber ([_vehicle, _x] call CBA_fnc_getTurret >> "isCopilot") == 1
+} param [0, []] // return
diff --git a/addons/common/functions/fnc_getTurretDirection.sqf b/addons/common/functions/fnc_getTurretDirection.sqf
index 92c84cdca9..1de8af459e 100644
--- a/addons/common/functions/fnc_getTurretDirection.sqf
+++ b/addons/common/functions/fnc_getTurretDirection.sqf
@@ -1,42 +1,42 @@
-/*
- * Author: jaynus
- * Get the absolute turret direction for FOV/PIP turret.
- *
- * Arguments:
- * 0: Vehicle
- * 1: Turret Position
- *
- * Return Value:
- * 0: Position ASL
- * 1: Direction
- *
- * Public: Yes
- */
-#include "script_component.hpp"
-
-params ["_vehicle", "_position"];
-
-private _turret = [_vehicle, _position] call CBA_fnc_getTurret;
-
-private _pov = getText (_turret >> "memoryPointGunnerOptics");
-private _gunBeg = getText (_turret >> "gunBeg");
-private _gunEnd = getText (_turret >> "gunEnd");
-
-TRACE_3("", _pov, _gunBeg, _gunEnd);
-
-// Pull the PIP pov or barrel direction, depending on how the model is set up
-private _povPos = ATLtoASL (_vehicle modelToWorldVisual (_vehicle selectionPosition _pov)); //@todo AGLToASL ?
-private _povDir = [0,0,0];
-
-if (_pov == "pip0_pos") then {
- private _pipDir = ATLtoASL (_vehicle modelToWorldVisual (_vehicle selectionPosition "pip0_dir"));
-
- _povDir = _pipDir vectorDiff _povPos;
-} else {
- private _gunBeginPos = ATLtoASL (_vehicle modelToWorldVisual (_vehicle selectionPosition _gunBeg));
- private _gunEndPos = ATLtoASL (_vehicle modelToWorldVisual (_vehicle selectionPosition _gunEnd));
-
- _povDir = _gunBeginPos vectorDiff _gunEndPos;
-};
-
-[_povPos, _povDir]
+/*
+ * Author: jaynus
+ * Get the absolute turret direction for FOV/PIP turret.
+ *
+ * Arguments:
+ * 0: Vehicle
+ * 1: Turret Position
+ *
+ * Return Value:
+ * 0: Position ASL
+ * 1: Direction
+ *
+ * Public: Yes
+ */
+#include "script_component.hpp"
+
+params ["_vehicle", "_position"];
+
+private _turret = [_vehicle, _position] call CBA_fnc_getTurret;
+
+private _pov = getText (_turret >> "memoryPointGunnerOptics");
+private _gunBeg = getText (_turret >> "gunBeg");
+private _gunEnd = getText (_turret >> "gunEnd");
+
+TRACE_3("", _pov, _gunBeg, _gunEnd);
+
+// Pull the PIP pov or barrel direction, depending on how the model is set up
+private _povPos = ATLtoASL (_vehicle modelToWorldVisual (_vehicle selectionPosition _pov)); //@todo AGLToASL ?
+private _povDir = [0,0,0];
+
+if (_pov == "pip0_pos") then {
+ private _pipDir = ATLtoASL (_vehicle modelToWorldVisual (_vehicle selectionPosition "pip0_dir"));
+
+ _povDir = _pipDir vectorDiff _povPos;
+} else {
+ private _gunBeginPos = ATLtoASL (_vehicle modelToWorldVisual (_vehicle selectionPosition _gunBeg));
+ private _gunEndPos = ATLtoASL (_vehicle modelToWorldVisual (_vehicle selectionPosition _gunEnd));
+
+ _povDir = _gunBeginPos vectorDiff _gunEndPos;
+};
+
+[_povPos, _povDir]
diff --git a/addons/common/functions/fnc_getTurretGunner.sqf b/addons/common/functions/fnc_getTurretGunner.sqf
index 6f59798cc6..4a26e2c03d 100644
--- a/addons/common/functions/fnc_getTurretGunner.sqf
+++ b/addons/common/functions/fnc_getTurretGunner.sqf
@@ -14,19 +14,4 @@
params [["_vehicle", objNull, [objNull]]];
-private _turrets = allTurrets [_vehicle, true];
-
-private _turret = [];
-
-{
- private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
-
- _config = [_config, _x] call FUNC(getTurretConfigPath);
-
- if (getNumber (_config >> "primaryGunner") == 1) exitWith {
- _turret = _x;
- };
- false
-} count _turrets;
-
-_turret
+fullCrew [_vehicle, "gunner", true] apply {_x select 3} param [0, []] // return
diff --git a/addons/common/functions/fnc_getTurrets.sqf b/addons/common/functions/fnc_getTurrets.sqf
index 229f3ab1f7..0479580764 100644
--- a/addons/common/functions/fnc_getTurrets.sqf
+++ b/addons/common/functions/fnc_getTurrets.sqf
@@ -8,12 +8,14 @@
* Return Value:
* Turret Indecies
*
- * Public: Yes
+ * Public: No
*
* Note: It's advised to use allTurrets [_vehicle, true] instead whenever possible
*/
#include "script_component.hpp"
+ACE_DEPRECATED("ace_common_fnc_getTurrets","3.7.0","allTurrets [_vehicle, true]");
+
params ["_type"];
private _varName = format [QGVAR(CachedTurrets_%1), _type];
diff --git a/addons/common/functions/fnc_getTurretsFFV.sqf b/addons/common/functions/fnc_getTurretsFFV.sqf
index 8c471824cf..5c36e20197 100644
--- a/addons/common/functions/fnc_getTurretsFFV.sqf
+++ b/addons/common/functions/fnc_getTurretsFFV.sqf
@@ -14,19 +14,4 @@
params [["_vehicle", objNull, [objNull]]];
-private _turrets = allTurrets [_vehicle, true];
-
-private _turret = [];
-
-{
- private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
-
- _config = [_config, _x] call FUNC(getTurretConfigPath);
-
- if (getNumber (_config >> "isPersonTurret") == 1) then {
- _turret pushBack _x;
- };
- false
-} count _turrets;
-
-_turret
+fullCrew [_vehicle, "turret", true] select {_x select 4} apply {_x select 3} // return
diff --git a/addons/common/functions/fnc_getTurretsOther.sqf b/addons/common/functions/fnc_getTurretsOther.sqf
index 408a5529d5..ef2a1278dc 100644
--- a/addons/common/functions/fnc_getTurretsOther.sqf
+++ b/addons/common/functions/fnc_getTurretsOther.sqf
@@ -14,24 +14,6 @@
params [["_vehicle", objNull, [objNull]]];
-private _turrets = allTurrets [_vehicle, true];
-
-private _turret = [];
-
-{
- private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
-
- _config = [_config, _x] call FUNC(getTurretConfigPath);
-
- if (
- getNumber (_config >> "isCopilot") != 1
- && {getNumber (_config >> "primaryGunner") != 1}
- && {getNumber (_config >> "primaryObserver") != 1}
- && {getNumber (_config >> "isPersonTurret") != 1}
- ) then {
- _turret pushBack _x;
- };
- false
-} count _turrets;
-
-_turret
+fullCrew [_vehicle, "turret", true] select {!(_x select 4)} apply {_x select 3} select {
+ getNumber ([_vehicle, _x] call CBA_fnc_getTurret >> "isCopilot") != 1
+} // return
diff --git a/addons/common/functions/fnc_getWeaponMuzzles.sqf b/addons/common/functions/fnc_getWeaponMuzzles.sqf
index d75a01f2e3..e252d879f9 100644
--- a/addons/common/functions/fnc_getWeaponMuzzles.sqf
+++ b/addons/common/functions/fnc_getWeaponMuzzles.sqf
@@ -18,7 +18,7 @@ private _muzzles = getArray (configFile >> "CfgWeapons" >> _weapon >> "muzzles")
{
if (_x == "this") then {
- _muzzles set [_forEachIndex, _weapon];
+ _muzzles set [_forEachIndex, configName (configFile >> "CfgWeapons" >> _weapon)];
};
} forEach _muzzles;
diff --git a/addons/common/functions/fnc_getWeaponState.sqf b/addons/common/functions/fnc_getWeaponState.sqf
index e7b7bb80ec..73e5897236 100644
--- a/addons/common/functions/fnc_getWeaponState.sqf
+++ b/addons/common/functions/fnc_getWeaponState.sqf
@@ -4,7 +4,7 @@
*
* Arguments:
* 0: unit
- * 1: weapon
+ * 1: weapon (optional, default: units current weapon)
*
* Return Value:
* 0: Attachements
@@ -16,21 +16,19 @@
*/
#include "script_component.hpp"
-params ["_unit", "_weapon"];
+params [["_unit", objNull, [objNull]], ["_weapon", nil, [""]]];
+
+if (isNil "_weapon") then {
+ _weapon = currentWeapon _unit;
+};
+
+private _attachments = [_unit weaponAccessories _weapon] param [0, ["","","",""]];
private _muzzles = _weapon call FUNC(getWeaponMuzzles);
-private _weaponInfo = [["","","",""], primaryWeaponItems _unit, secondaryWeaponItems _unit, handgunItems _unit] select ((["", primaryWeapon _unit, secondaryWeapon _unit, handgunWeapon _unit] find _weapon) max 0);
-
// get loaded magazines and ammo
-private _magazines = [];
-private _ammo = [];
-
-{
- _magazines pushBack "";
- _ammo pushBack 0;
- false
-} count _muzzles;
+private _magazines = _muzzles apply {""};
+private _ammo = _muzzles apply {0};
{
if (_x select 2) then {
@@ -44,6 +42,4 @@ private _ammo = [];
false
} count magazinesAmmoFull _unit;
-_weaponInfo append [_muzzles, _magazines, _ammo];
-
-_weaponInfo
+[_attachments, _muzzles, _magazines, _ammo];
diff --git a/addons/common/functions/fnc_globalEvent.sqf b/addons/common/functions/fnc_globalEvent.sqf
index 126419b553..b58a0f092c 100644
--- a/addons/common/functions/fnc_globalEvent.sqf
+++ b/addons/common/functions/fnc_globalEvent.sqf
@@ -1,21 +1,14 @@
-/*
- * Author: Nou
- * Execute a global event on all clients, including self.
- *
- * Arguments:
- * 0: Event name
- * 1: Event args
- *
- * Return Value:
- * None
- *
- * Public: Yes
- */
-#include "script_component.hpp"
-
-params ["_eventName", "_eventArgs"];
-
-ACEg = [_eventName, _eventArgs];
-publicVariable "ACEg";
-
-["ACEg", ACEg] call FUNC(_handleNetEvent);
+#define DEBUG_MODE_FULL
+#include "script_component.hpp"
+
+params ["_eventName", "_eventArgs"];
+
+private _newName = getText (configFile >> "ACE_newEvents" >> _eventName);
+if (_newName != "") then {
+ TRACE_2("Switching Names",_eventName,_newName);
+ _eventName = _newName;
+};
+
+[_eventName, _eventArgs] call CBA_fnc_globalEvent;
+
+ACE_DEPRECATED("ace_common_fnc_globalEvent","3.8.0","CBA_fnc_globalEvent");
diff --git a/addons/common/functions/fnc_goKneeling.sqf b/addons/common/functions/fnc_goKneeling.sqf
index 4ee502f929..9e7aed708a 100644
--- a/addons/common/functions/fnc_goKneeling.sqf
+++ b/addons/common/functions/fnc_goKneeling.sqf
@@ -1,6 +1,6 @@
/*
* Author: commy2
- * Move unit to kneeling position.
+ * Move unit to kneeling position (only if not yet prone).
*
* Arguments:
* 0: Unit
@@ -14,7 +14,8 @@
params ["_unit"];
-if (stance _unit == "PRONE") exitWith {};
+// Animation changes even inside vehicle post-1.60
+if (stance _unit == "PRONE" || {vehicle ACE_player != ACE_player}) exitWith {};
[
_unit,
diff --git a/addons/common/functions/fnc_handleEngine.sqf b/addons/common/functions/fnc_handleEngine.sqf
new file mode 100644
index 0000000000..829ad5bb49
--- /dev/null
+++ b/addons/common/functions/fnc_handleEngine.sqf
@@ -0,0 +1,19 @@
+/*
+ * Author: BaerMitUmlaut
+ * Blocks turning on the vehicles engine if set by the status effect handler.
+ *
+ * Arguments:
+ * 0: Vehicle
+ * 1: Engine state
+ *
+ * Return Value:
+ * None
+ *
+ * Public: No
+ */
+#include "script_component.hpp"
+params ["_vehicle", "_engineOn"];
+
+if (local _vehicle && {_engineOn} && {_vehicle getVariable [QGVAR(blockEngine), false]}) then {
+ _vehicle engineOn false;
+};
diff --git a/addons/common/functions/fnc_handleModifierKeyInit.sqf b/addons/common/functions/fnc_handleModifierKeyInit.sqf
deleted file mode 100644
index a945f5eba1..0000000000
--- a/addons/common/functions/fnc_handleModifierKeyInit.sqf
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * Author: commy2
- * Initializes the modifier key handler.
- *
- * Arguments:
- * None
- *
- * Return Value:
- * None
- *
- * Public : No
- */
-#include "script_component.hpp"
-
-(findDisplay 46) displayAddEventHandler ["KeyDown", FUNC(handleModifierKey)];
-(findDisplay 46) displayAddEventHandler ["KeyUp", FUNC(handleModifierKeyUp)];
diff --git a/addons/common/functions/fnc_handleScrollWheel.sqf b/addons/common/functions/fnc_handleScrollWheel.sqf
index c0b88f9ed7..037b7b640b 100644
--- a/addons/common/functions/fnc_handleScrollWheel.sqf
+++ b/addons/common/functions/fnc_handleScrollWheel.sqf
@@ -12,11 +12,6 @@
*/
#include "script_component.hpp"
-// prevents a bug that causes the MouseZChanged to trigger N-times, where N is the number of times you consecutively pressed "Restart" instead of "Preview" in the editor
-if (GVAR(ScrollWheelFrame) == diag_frameno) exitWith {};
-
-GVAR(ScrollWheelFrame) = diag_frameno;
-
{
[_this select 1] call _x;
false
diff --git a/addons/common/functions/fnc_hashHasKey.sqf b/addons/common/functions/fnc_hashHasKey.sqf
index b2978f9cc4..97998c1298 100644
--- a/addons/common/functions/fnc_hashHasKey.sqf
+++ b/addons/common/functions/fnc_hashHasKey.sqf
@@ -12,7 +12,7 @@
*/
#include "script_component.hpp"
-// diag_log text format["%1 HASH HAS KEY: %2", ACE_diagTime, _this];
+// diag_log text format["%1 HASH HAS KEY: %2", diag_tickTime, _this];
params ["_hash", "_key"];
diff --git a/addons/common/functions/fnc_hashSet.sqf b/addons/common/functions/fnc_hashSet.sqf
index 10e2881c10..0890578857 100644
--- a/addons/common/functions/fnc_hashSet.sqf
+++ b/addons/common/functions/fnc_hashSet.sqf
@@ -12,7 +12,7 @@
*/
#include "script_component.hpp"
-// diag_log text format["%1 HASH SET: %2", ACE_diagTime, _this];
+// diag_log text format["%1 HASH SET: %2", diag_tickTime, _this];
params ["_hash", "_key", "_val"];
diff --git a/addons/common/functions/fnc_headBugFix.sqf b/addons/common/functions/fnc_headBugFix.sqf
index dffb28ff4b..07a1652b1b 100644
--- a/addons/common/functions/fnc_headBugFix.sqf
+++ b/addons/common/functions/fnc_headBugFix.sqf
@@ -17,8 +17,8 @@
private _unit = ACE_player;
private _anim = animationState _unit;
-["HeadbugFixUsed", [profileName, _anim]] call FUNC(serverEvent);
-["HeadbugFixUsed", [profileName, _anim]] call FUNC(localEvent);
+[QGVAR(headbugFixUsed), [profileName, _anim]] call CBA_fnc_serverEvent;
+[QGVAR(headbugFixUsed), [profileName, _anim]] call CBA_fnc_localEvent;
if (_unit != vehicle _unit || {!([_unit, objNull, ["isNotSitting"]] call FUNC(canInteractWith))}) exitWith {false};
diff --git a/addons/common/functions/fnc_hideUnit.sqf b/addons/common/functions/fnc_hideUnit.sqf
index 85636a08f7..e0adb201c3 100644
--- a/addons/common/functions/fnc_hideUnit.sqf
+++ b/addons/common/functions/fnc_hideUnit.sqf
@@ -28,5 +28,5 @@ if !(_reason in _setHiddenReasons) then {
};
if !(isObjectHidden _unit) then {
- ["hideObjectGlobal", [_unit, true]] call FUNC(serverEvent);
+ [QGVAR(hideObjectGlobal), [_unit, true]] call CBA_fnc_serverEvent;
};
diff --git a/addons/common/functions/fnc_inWater.sqf b/addons/common/functions/fnc_inWater.sqf
deleted file mode 100644
index 3b323469fc..0000000000
--- a/addons/common/functions/fnc_inWater.sqf
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Author: Glowbal
- * Check if unit's head is underwater
- *
- * Arguments:
- * 0: Unit
- *
- * Return Value:
- * If unit's head is underwater
- *
- * Public: Yes
- *
- * Deprecated
- */
-#include "script_component.hpp"
-
-ACE_DEPRECATED("ace_common_fnc_inWater","3.5.0","ace_common_fnc_isUnderwater");
-
-_this call FUNC(isUnderwater)
diff --git a/addons/common/functions/fnc_inheritsFrom.sqf b/addons/common/functions/fnc_inheritsFrom.sqf
deleted file mode 100644
index 4ec39d8cc3..0000000000
--- a/addons/common/functions/fnc_inheritsFrom.sqf
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Author: Ruthberg
- * Checks whether a given configuration name appears in the inheritance tree of a specific configuration entry.
- *
- * Arguments:
- * 0: configEntry (CONFIG)
- * 1: configname (STING)
- *
- * Return Value:
- * BOOLEAN
- *
- * Public: Yes
- *
- * Note: Not to be confused with the inheritsFrom scripting command.
- *
- * Deprecated
- */
-#include "script_component.hpp"
-
-ACE_DEPRECATED("ace_common_fnc_inheritsFrom","3.5.0","inheritsFrom ARRAY");
-
-params ["_configEntry", "_configMatch"];
-
-if (configName _configEntry == _configMatch) exitWith {true};
-if (configName _configEntry == ",") exitWith {false};
-
-private _match = false;
-
-while {configName _configEntry != ""} do {
- if (configName _configEntry == _configMatch) exitWith {
- _match = true;
- };
-
- _configEntry = inheritsFrom _configEntry;
-};
-
-_match
diff --git a/addons/common/functions/fnc_isAlive.sqf b/addons/common/functions/fnc_isAlive.sqf
deleted file mode 100644
index b9d94eed5d..0000000000
--- a/addons/common/functions/fnc_isAlive.sqf
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Author: commy2
- * Check if the object still exists and is alive. This function exists because 'alive objNull' actually returns true.
- *
- * Argument:
- * 0: Any object
- *
- * Return value:
- * The object exists and is alive .
- *
- * Public: Yes
- *
- * Deprecated
- */
-#include "script_component.hpp"
-
-ACE_DEPRECATED("ace_common_fnc_isAlive","3.5.0","alive");
-
-params ["_unit"];
-
-!isNull _unit && {alive _unit} // return
diff --git a/addons/common/functions/fnc_isTurnedOut.sqf b/addons/common/functions/fnc_isTurnedOut.sqf
deleted file mode 100644
index 39eb460cc4..0000000000
--- a/addons/common/functions/fnc_isTurnedOut.sqf
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Author: commy2
- * Check if the unit is in a vehicle and turned out.
- *
- * Arguments:
- * 0: Unit, not the vehicle
- *
- * Return Value:
- * Is the unit turned out or not? Will return false if there is no option to turn out in the first place.
- *
- * Public: Yes
- *
- * Deprecated
- */
-#include "script_component.hpp"
-
-ACE_DEPRECATED("ace_common_fnc_isTurnedOut","3.5.0","isTurnedOut");
-
-params ["_unit"];
-
-isTurnedOut _unit // return
diff --git a/addons/common/functions/fnc_letterToCode.sqf b/addons/common/functions/fnc_letterToCode.sqf
deleted file mode 100644
index 7bbbcf4f3d..0000000000
--- a/addons/common/functions/fnc_letterToCode.sqf
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Author: commy2
- * Converts some Arma Dik Codes to a key.
- *
- * Arguments:
- * 0: Dik Code
- *
- * Return Value:
- * Key
- *
- * Public: Yes
- *
- * Deprecated
- */
-#include "script_component.hpp"
-
-ACE_DEPRECATED("ace_common_fnc_letterToCode","3.5.0","-");
-
-[-1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 30, 48, 46, 32, 18, 33, 34, 35, 23, 36, 37, 38, 50, 49, 24, 25, 16, 19, 31, 20, 22, 47, 17, 45, 44, 21] select (["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"] find toUpper (_this select 0)) + 1
diff --git a/addons/common/functions/fnc_loadPerson.sqf b/addons/common/functions/fnc_loadPerson.sqf
index 3071ffbd47..f8a4456b96 100644
--- a/addons/common/functions/fnc_loadPerson.sqf
+++ b/addons/common/functions/fnc_loadPerson.sqf
@@ -21,33 +21,18 @@ private _vehicle = objNull;
if (!([_caller, _unit, ["isNotDragging", "isNotCarrying"]] call FUNC(canInteractWith)) || {_caller == _unit}) exitWith {_vehicle};
-private _loadcar = nearestObject [_unit, "Car"];
+private _nearVehicles = nearestObjects [_unit, ["Car", "Air", "Tank", "Ship_F"], 10];
-if (_unit distance _loadcar <= 10) then {
- _vehicle = _loadcar;
-} else {
- private _loadair = nearestObject [_unit, "Air"];
-
- if (_unit distance _loadair <= 10) then {
- _vehicle = _loadair;
- } else {
- private _loadtank = nearestObject [_unit, "Tank"];
-
- if (_unit distance _loadtank <= 10) then {
- _vehicle = _loadtank;
- } else {
- private _loadboat = nearestObject [_unit, "Ship_F"];
-
- if (_unit distance _loadboat <= 10) then {
- _vehicle = _loadboat;
- };
- };
+{
+ TRACE_1("",_x);
+ if ((_x emptyPositions "cargo" > 0) || {_x emptyPositions "gunner" > 0}) exitWith {
+ _vehicle = _x;
};
-};
+} forEach _nearVehicles;
if (!isNull _vehicle) then {
[_unit, true, GROUP_SWITCH_ID, side group _caller] call FUNC(switchToGroupSide);
- [[_unit, _vehicle, _caller], QFUNC(loadPersonLocal), _unit, false] call FUNC(execRemoteFnc);
+ ["ace_loadPersonEvent", [_unit, _vehicle, _caller], _unit] call CBA_fnc_targetEvent;
};
_vehicle
diff --git a/addons/common/functions/fnc_loadSettingsLocalizedText.sqf b/addons/common/functions/fnc_loadSettingsLocalizedText.sqf
index f846fa9354..6a2711c2a7 100644
--- a/addons/common/functions/fnc_loadSettingsLocalizedText.sqf
+++ b/addons/common/functions/fnc_loadSettingsLocalizedText.sqf
@@ -39,7 +39,7 @@ private _fnc_parseConfigForDisplayNames = {
} else {
private _value = missionNamespace getVariable [_name, -1];
if ((_value < 0) || {_value >= (count _values)}) then {
- ACE_LOGWARNING_3("Setting [%1] out of bounds %2 (values[] count is %3)(", _name, _value, count _values);
+ ACE_LOGWARNING_3("Setting [%1] out of bounds %2 (values[] count is %3)", _name, _value, count _values);
};
};
};
diff --git a/addons/common/functions/fnc_localEvent.sqf b/addons/common/functions/fnc_localEvent.sqf
index bf17cc0d0e..fb473b75b8 100644
--- a/addons/common/functions/fnc_localEvent.sqf
+++ b/addons/common/functions/fnc_localEvent.sqf
@@ -1,36 +1,13 @@
-/*
- * Author: Nou
- * Execute a local event on this client only.
- *
- * Arguments:
- * 0: Event name (string)
- * 1: Event args (any)
- *
- * Return Value:
- * None
- *
- * Public: No
- */
-#include "script_component.hpp"
-
-params ["_eventName", "_eventArgs"];
-
-private _eventFunctions = GVAR(eventsLocation) getVariable _eventName;
-
-if (!isNil "_eventFunctions") then {
-
- #ifdef DEBUG_EVENTS
- ACE_LOGINFO_1("* Local Event: %1",_eventName);
- ACE_LOGINFO_1(" args=%1",_eventArgs);
- #endif
-
- {
- if (!isNil "_x") then {
- _eventArgs call CALLSTACK_NAMED(_x,FORMAT_2("Local Event %1 ID: %2",_eventName,_forEachIndex));
-
- #ifdef DEBUG_EVENTS_CALLSTACK
- ACE_LOGINFO_1(" ID: %1",_forEachIndex);
- #endif
- };
- } forEach _eventFunctions;
-};
+#include "script_component.hpp"
+
+params ["_eventName", "_eventArgs"];
+
+private _newName = getText (configFile >> "ACE_newEvents" >> _eventName);
+if (_newName != "") then {
+ TRACE_2("Switching Names",_eventName,_newName);
+ _eventName = _newName;
+};
+
+[_eventName, _eventArgs] call CBA_fnc_localEvent;
+
+ACE_DEPRECATED("ace_common_fnc_localEvent","3.8.0","CBA_fnc_localEvent");
diff --git a/addons/common/functions/fnc_muteUnit.sqf b/addons/common/functions/fnc_muteUnit.sqf
index d4648155b6..11c18aedd7 100644
--- a/addons/common/functions/fnc_muteUnit.sqf
+++ b/addons/common/functions/fnc_muteUnit.sqf
@@ -29,6 +29,6 @@ private _speaker = speaker _unit;
if (_speaker == "ACE_NoVoice") exitWith {};
-["setSpeaker", [_unit, "ACE_NoVoice"]] call FUNC(globalEvent);
+[QGVAR(setSpeaker), [_unit, "ACE_NoVoice"]] call CBA_fnc_globalEvent;
_unit setVariable ["ACE_OriginalSpeaker", _speaker, true];
diff --git a/addons/common/functions/fnc_muteUnitHandleInitPost.sqf b/addons/common/functions/fnc_muteUnitHandleInitPost.sqf
index 8c5967b0d3..53e8d4d5b7 100644
--- a/addons/common/functions/fnc_muteUnitHandleInitPost.sqf
+++ b/addons/common/functions/fnc_muteUnitHandleInitPost.sqf
@@ -16,5 +16,5 @@ params ["_unit"];
// setSpeaker gets overwritten after init on remote units; if unit is muted, setSpeaker again
if (count (_unit getVariable [QGVAR(muteUnitReasons), []]) > 0) then {
- ["setSpeaker", [_unit, "ACE_NoVoice"]] call FUNC(localEvent);
+ [QGVAR(setSpeaker), [_unit, "ACE_NoVoice"]] call CBA_fnc_localEvent;
};
diff --git a/addons/common/functions/fnc_muteUnitHandleRespawn.sqf b/addons/common/functions/fnc_muteUnitHandleRespawn.sqf
index a1a64eada3..ceb0614116 100644
--- a/addons/common/functions/fnc_muteUnitHandleRespawn.sqf
+++ b/addons/common/functions/fnc_muteUnitHandleRespawn.sqf
@@ -18,4 +18,4 @@ params ["_unit"];
_unit setVariable [QGVAR(muteUnitReasons), _unit getVariable [QGVAR(muteUnitReasons), []], true];
// fix mp issues with respawning and the speaker
-["setSpeaker", [_unit, speaker _unit]] call FUNC(globalEvent);
+[QGVAR(setSpeaker), [_unit, speaker _unit]] call CBA_fnc_globalEvent;
diff --git a/addons/common/functions/fnc_objectEvent.sqf b/addons/common/functions/fnc_objectEvent.sqf
new file mode 100644
index 0000000000..21ba60b802
--- /dev/null
+++ b/addons/common/functions/fnc_objectEvent.sqf
@@ -0,0 +1,13 @@
+#include "script_component.hpp"
+
+params ["_eventName", "_eventTarget", "_eventArgs"];
+
+private _newName = getText (configFile >> "ACE_newEvents" >> _eventName);
+if (_newName != "") then {
+ TRACE_2("Switching Names",_eventName,_newName);
+ _eventName = _newName;
+};
+
+[_eventName, _eventArgs, _eventTargets] call CBA_fnc_targetEvent;
+
+ACE_DEPRECATED("ace_common_fnc_objectEvent","3.8.0","CBA_fnc_targetEvent");
diff --git a/addons/common/functions/fnc_onAnswerRequest.sqf b/addons/common/functions/fnc_onAnswerRequest.sqf
index d88969b059..8c77719256 100644
--- a/addons/common/functions/fnc_onAnswerRequest.sqf
+++ b/addons/common/functions/fnc_onAnswerRequest.sqf
@@ -20,7 +20,7 @@ if (!isNil "_info") then {
_info params ["_caller", "_target", "_requestID", "_requestMessage", "_callBack"];
private _replyParams = [_info, _accepted];
- [_replyParams, QFUNC(requestCallback), _caller, false] call FUNC(execRemoteFnc);
+ [QGVAR(requestCallback), _replyParams, _caller] call CBA_fnc_targetEvent;
_unit setVariable [_id, nil];
};
diff --git a/addons/common/functions/fnc_progressBar.sqf b/addons/common/functions/fnc_progressBar.sqf
index e842590f35..7103dd08e4 100644
--- a/addons/common/functions/fnc_progressBar.sqf
+++ b/addons/common/functions/fnc_progressBar.sqf
@@ -34,7 +34,7 @@ createDialog QGVAR(ProgressBar_Dialog);
//Adjust position based on user setting:
private _ctrlPos = ctrlPosition (uiNamespace getVariable QGVAR(ctrlProgressBarTitle));
-_ctrlPos set [1, ((0 + 29 * GVAR(SettingProgressBarLocation)) * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2))];
+_ctrlPos set [1, ((0 + 29 * GVAR(settingProgressBarLocation)) * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2))];
(uiNamespace getVariable QGVAR(ctrlProgressBG)) ctrlSetPosition _ctrlPos;
(uiNamespace getVariable QGVAR(ctrlProgressBG)) ctrlCommit 0;
@@ -46,7 +46,7 @@ _ctrlPos set [1, ((0 + 29 * GVAR(SettingProgressBarLocation)) * ((((safezoneW /
[{
(_this select 0) params ["_args", "_onFinish", "_onFail", "_condition", "_player", "_startTime", "_totalTime", "_exceptions"];
- private _elapsedTime = ACE_time - _startTime;
+ private _elapsedTime = CBA_missionTime - _startTime;
private _errorCode = -1;
// this does not check: target fell unconscious, target died, target moved inside vehicle / left vehicle, target moved outside of players range, target moves at all.
@@ -82,13 +82,13 @@ _ctrlPos set [1, ((0 + 29 * GVAR(SettingProgressBarLocation)) * ((((safezoneW /
if (_errorCode == 0) then {
if (_onFinish isEqualType "") then {
- [_onFinish, [_args, _elapsedTime, _totalTime, _errorCode]] call FUNC(localEvent);
+ [_onFinish, [_args, _elapsedTime, _totalTime, _errorCode]] call CBA_fnc_localEvent;
} else {
[_args, _elapsedTime, _totalTime, _errorCode] call _onFinish;
};
} else {
if (_onFail isEqualType "") then {
- [_onFail, [_args, _elapsedTime, _totalTime, _errorCode]] call FUNC(localEvent);
+ [_onFail, [_args, _elapsedTime, _totalTime, _errorCode]] call CBA_fnc_localEvent;
} else {
[_args, _elapsedTime, _totalTime, _errorCode] call _onFail;
};
@@ -97,4 +97,4 @@ _ctrlPos set [1, ((0 + 29 * GVAR(SettingProgressBarLocation)) * ((((safezoneW /
//Update Progress Bar (ratio of elepased:total)
(uiNamespace getVariable QGVAR(ctrlProgressBar)) progressSetPosition (_elapsedTime / _totalTime);
};
-}, 0, [_args, _onFinish, _onFail, _condition, _player, ACE_time, _totalTime, _exceptions]] call CBA_fnc_addPerFrameHandler;
+}, 0, [_args, _onFinish, _onFail, _condition, _player, CBA_missionTime, _totalTime, _exceptions]] call CBA_fnc_addPerFrameHandler;
diff --git a/addons/common/functions/fnc_readSettingFromModule.sqf b/addons/common/functions/fnc_readSettingFromModule.sqf
index f7cb361c1b..3e2a5d862e 100644
--- a/addons/common/functions/fnc_readSettingFromModule.sqf
+++ b/addons/common/functions/fnc_readSettingFromModule.sqf
@@ -24,5 +24,15 @@ if (isNil {_logic getVariable _moduleVariable}) exitWith {
ACE_LOGWARNING_2("Warning in %1 module: %2 setting is missing. Probably an obsolete version of the module is used in the mission.",typeOf _logic,_moduleVariable);
};
+private _value = _logic getVariable _moduleVariable;
+if (_value isEqualTo -1) then {
+ //3den missions will save modules with value = 0 as -1
+ //If the setting has a "values" array, we should be able to assume that -1 is not a valid number as it would not be a valid index for the array
+ if (isArray (configFile >> "ACE_Settings" >> _settingName >> "values")) then {
+ ACE_LOGWARNING_2("Module For Setting [%1] is saved as (-1), switching to (0) - missionVersion [%2]",_settingName,missionVersion);
+ _value = 0;
+ };
+};
+
// Set the setting globally and force it
-[_settingName, _logic getVariable _moduleVariable, true, true] call FUNC(setSetting);
+[_settingName, _value, true, true] call FUNC(setSetting);
diff --git a/addons/common/functions/fnc_receiveRequest.sqf b/addons/common/functions/fnc_receiveRequest.sqf
index 75f684f5dd..1bb48428df 100644
--- a/addons/common/functions/fnc_receiveRequest.sqf
+++ b/addons/common/functions/fnc_receiveRequest.sqf
@@ -45,7 +45,7 @@ GVAR(RECIEVE_REQUEST_ADD_ACTION_DECLINE) = _target addAction ["Decline", compile
GVAR(RECIEVE_REQUEST_ID_KEY_BINDING) = _requestID;
-GVAR(RECIEVE_REQUEST_TIME_OUT_SCRIPT) = [ACE_time, _target, _requestID] spawn { // @todo
+GVAR(RECIEVE_REQUEST_TIME_OUT_SCRIPT) = [CBA_missionTime, _target, _requestID] spawn { // @todo
params ["_time", "_target", "_requestID"];
_time = _time + 40;
@@ -55,7 +55,7 @@ GVAR(RECIEVE_REQUEST_TIME_OUT_SCRIPT) = [ACE_time, _target, _requestID] spawn {
waitUntil {
_id = _target getVariable _requestID;
- (ACE_time > _time || isNil "_id")
+ (CBA_missionTime > _time || isNil "_id")
};
_target setVariable [_requestID, nil];
diff --git a/addons/common/functions/fnc_removeAllEventHandlers.sqf b/addons/common/functions/fnc_removeAllEventHandlers.sqf
index ed1cce278c..958923f808 100644
--- a/addons/common/functions/fnc_removeAllEventHandlers.sqf
+++ b/addons/common/functions/fnc_removeAllEventHandlers.sqf
@@ -1,17 +1,14 @@
-/*
- * Author: Nou
- * Remove all events of a certain event type.
- *
- * Argument:
- * 0: Event name
- *
- * Return Value:
- * None
- *
- * Public: Yes
- */
-#include "script_component.hpp"
-
-params ["_eventName"];
-
-GVAR(eventsLocation) setVariable [_eventName, nil];
+#include "script_component.hpp"
+
+params ["_eventName"];
+
+private _newName = getText (configFile >> "ACE_newEvents" >> _eventName);
+if (_newName != "") then {
+ TRACE_2("Switching Names",_eventName,_newName);
+ _eventName = _newName;
+};
+
+CBA_events_eventNamespace setVariable [_eventName,nil];
+CBA_events_eventHashes setVariable [_eventName,nil];
+
+ACE_DEPRECATED("ace_common_fnc_removeAllEventHandlers","3.8.0","N/A (remove events individually w/ CBA_fnc_removeEventHandler)");
diff --git a/addons/common/functions/fnc_removeBinocularMagazine.sqf b/addons/common/functions/fnc_removeBinocularMagazine.sqf
index 487295ccc3..4f1e0fcdd6 100644
--- a/addons/common/functions/fnc_removeBinocularMagazine.sqf
+++ b/addons/common/functions/fnc_removeBinocularMagazine.sqf
@@ -15,13 +15,6 @@
*/
#include "script_component.hpp"
-params [["_unit", objNull, [objNull]]];
+ACE_DEPRECATED("ace_common_fnc_removeBinocularMagazine","3.8.0","CBA_fnc_removeBinocularMagazine");
-private _binocular = binocular _unit;
-private _selectBinocular = currentWeapon _unit == _binocular;
-
-_unit addWeapon _binocular;
-
-if (_selectBinocular) then {
- _unit selectWeapon _binocular;
-};
+_this call CBA_fnc_removeBinocularMagazine
diff --git a/addons/common/functions/fnc_removeEventHandler.sqf b/addons/common/functions/fnc_removeEventHandler.sqf
index a0b5ed5333..ff89571a6e 100644
--- a/addons/common/functions/fnc_removeEventHandler.sqf
+++ b/addons/common/functions/fnc_removeEventHandler.sqf
@@ -1,23 +1,13 @@
-/*
- * Author: Nou
- * Remove an event handler.
- *
- * Argument:
- * 0: Event name
- * 1: Event code
- *
- * Return Value:
- * None
- *
- * Public: Yes
- */
-#include "script_component.hpp"
-
-params ["_eventName", "_eventCodeIndex"];
-
-private _eventFunctions = GVAR(eventsLocation) getVariable _eventName;
-
-if (isNil "_eventFunctions") exitWith {TRACE_1("eventName not found",_eventName);};
-if ((_eventCodeIndex < 0) || {(count _eventFunctions) <= _eventCodeIndex}) exitWith {TRACE_2("index out of bounds",_eventName,_eventCodeIndex);};
-
-_eventFunctions set [_eventCodeIndex, nil];
+#include "script_component.hpp"
+
+params ["_eventName", "_eventCode"];
+
+private _newName = getText (configFile >> "ACE_newEvents" >> _eventName);
+if (_newName != "") then {
+ TRACE_2("Switching Names",_eventName,_newName);
+ _eventName = _newName;
+};
+
+[_eventName, _eventCode] call CBA_fnc_removeEventHandler;
+
+ACE_DEPRECATED("ace_common_fnc_removeEventHandler","3.8.0","CBA_fnc_removeEventHandler");
diff --git a/addons/common/functions/fnc_removeSyncedEventHandler.sqf b/addons/common/functions/fnc_removeSyncedEventHandler.sqf
index 126bf0b70f..d3d94aa421 100644
--- a/addons/common/functions/fnc_removeSyncedEventHandler.sqf
+++ b/addons/common/functions/fnc_removeSyncedEventHandler.sqf
@@ -1,26 +1,26 @@
-/*
- * Author: jaynus
- * Remove a synced event handler
- *
- * Arguments:
- * 0: Name
- *
- * Return Value:
- * Boolean of success
- *
- * Public: No
- */
-#include "script_component.hpp"
-
-params ["_name"];
-
-if (!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
- ACE_LOGERROR("Synced event key not found.");
- false
-};
-
-private _data = HASH_GET(GVAR(syncedEvents),_name);
-_data params ["", "", "", "_eventId"];
-
-[_eventId] call FUNC(removeEventHandler);
-HASH_REM(GVAR(syncedEvents),_name);
+/*
+ * Author: jaynus
+ * Remove a synced event handler
+ *
+ * Arguments:
+ * 0: Name
+ *
+ * Return Value:
+ * Boolean of success
+ *
+ * Public: No
+ */
+#include "script_component.hpp"
+
+params ["_name"];
+
+if (!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
+ ACE_LOGERROR_1("Synced event key [%1] not found (removeSyncedEventHandler).", _name);
+ false
+};
+
+private _data = HASH_GET(GVAR(syncedEvents),_name);
+_data params ["", "", "", "_eventId"];
+
+[_eventId] call CBA_fnc_removeEventHandler;
+HASH_REM(GVAR(syncedEvents),_name);
diff --git a/addons/common/functions/fnc_requestSyncedEvent.sqf b/addons/common/functions/fnc_requestSyncedEvent.sqf
index 7cbc8f6c8d..e35c1e3645 100644
--- a/addons/common/functions/fnc_requestSyncedEvent.sqf
+++ b/addons/common/functions/fnc_requestSyncedEvent.sqf
@@ -1,20 +1,20 @@
-/*
- * Author: jaynus
- * Send a request to synchronize an event name from the client->server. Execute on client only.
- *
- * Arguments:
- * 0: eventName
- *
- * Return Value:
- * Boolean of success
- *
- * Public: No
- */
-#include "script_component.hpp"
-
-params ["_eventName"];
-
-// Only JIP machines on initialization send this off, requesting sync on events with the serverCommand
-if (isServer) exitWith {false};
-
-["SEH_s", [_eventName, ACE_player] ] call FUNC(serverEvent);
+/*
+ * Author: jaynus
+ * Send a request to synchronize an event name from the client->server. Execute on client only.
+ *
+ * Arguments:
+ * 0: eventName
+ *
+ * Return Value:
+ * Boolean of success
+ *
+ * Public: No
+ */
+#include "script_component.hpp"
+
+params ["_eventName"];
+
+// Only JIP machines on initialization send this off, requesting sync on events with the serverCommand
+if (isServer) exitWith {false};
+
+["ACEs", [_eventName, ACE_player]] call CBA_fnc_serverEvent;
diff --git a/addons/common/functions/fnc_selectWeaponMode.sqf b/addons/common/functions/fnc_selectWeaponMode.sqf
deleted file mode 100644
index 582f6fd4b2..0000000000
--- a/addons/common/functions/fnc_selectWeaponMode.sqf
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Author: commy2
- * Unit selects given muzzle and weapon mode.
- *
- * Arguments:
- * 0: unit
- * 1: weapon or Muzzle
- * 2: weapon Mode
- *
- * Return Value:
- * Successful?
- *
- * Example:
- * [player, primaryWeapon player, "FullAuto"] call ace_common_fnc_selectWeaponMode
- *
- * Public: Yes
- */
-#include "script_component.hpp"
-
-params ["_unit", "_muzzle", "_mode"];
-
-private _index = 0;
-
-while {
- _index < 100 && {currentMuzzle _unit != _muzzle || {currentWeaponMode _unit != _mode}}
-} do {
- _unit action ["SwitchWeapon", _unit, _unit, _index];
- _index = _index + 1;
-};
-
-_index < 100 // return
diff --git a/addons/common/functions/fnc_sendRequest.sqf b/addons/common/functions/fnc_sendRequest.sqf
index c8d2ef7e2b..a0c505c575 100644
--- a/addons/common/functions/fnc_sendRequest.sqf
+++ b/addons/common/functions/fnc_sendRequest.sqf
@@ -20,7 +20,7 @@ params ["_caller", "_target", "_requestID", "_requestMessage", "_callBack"];
if (isPlayer _target) then {
// Pass request on to target locality for player accept/decline.
- [[_caller, _target, _requestID, _requestMessage, _callBack], QFUNC(receiveRequest), _target, false] call FUNC(execRemoteFnc);
+ [QGVAR(receiveRequest), [_caller, _target, _requestID, _requestMessage, _callBack], _target] call CBA_fnc_targetEvent;
} else {
// accept it, since it's an AI.
[_caller, _target, true] call compile _callBack;
diff --git a/addons/common/functions/fnc_serverEvent.sqf b/addons/common/functions/fnc_serverEvent.sqf
index 65ab0da2a7..5b116e9661 100644
--- a/addons/common/functions/fnc_serverEvent.sqf
+++ b/addons/common/functions/fnc_serverEvent.sqf
@@ -1,29 +1,13 @@
-/*
- * Author: Nou
- * Execute a event only on the server.
- *
- * Argument:
- * 0: Event name
- * 1: Event args
- *
- * Return Value:
- * None
- *
- * Public: Yes
- */
-#include "script_component.hpp"
-
-params ["_eventName", "_eventArgs"];
-
-#ifdef DEBUG_EVENTS
- ACE_LOGINFO_1("* Server Event: %1",_eventName);
- ACE_LOGINFO_1(" args=%1",_eventArgs);
-#endif
-
-ACEg = [_eventName, _eventArgs];
-
-if (!isServer) then {
- publicVariableServer "ACEg";
-} else {
- ["ACEg", ACEg] call FUNC(_handleNetEvent);
-};
+#include "script_component.hpp"
+
+params ["_eventName", "_eventArgs"];
+
+private _newName = getText (configFile >> "ACE_newEvents" >> _eventName);
+if (_newName != "") then {
+ TRACE_2("Switching Names",_eventName,_newName);
+ _eventName = _newName;
+};
+
+[_eventName, _eventArgs] call CBA_fnc_serverEvent;
+
+ACE_DEPRECATED("ace_common_fnc_serverEvent","3.8.0","CBA_fnc_serverEvent");
diff --git a/addons/common/functions/fnc_serverLog.sqf b/addons/common/functions/fnc_serverLog.sqf
index 2525f81c95..af7485c494 100644
--- a/addons/common/functions/fnc_serverLog.sqf
+++ b/addons/common/functions/fnc_serverLog.sqf
@@ -20,5 +20,5 @@ params [["_msg", "", [""]]];
if (isServer) then {
diag_log text _msg;
} else {
- [_this, QFUNC(serverLog), 1] call FUNC(execRemoteFnc);
+ [QGVAR(serverLog), _this] call CBA_fnc_serverEvent;
};
diff --git a/addons/common/functions/fnc_setAllGear.sqf b/addons/common/functions/fnc_setAllGear.sqf
index 152eb4fd60..6334991796 100644
--- a/addons/common/functions/fnc_setAllGear.sqf
+++ b/addons/common/functions/fnc_setAllGear.sqf
@@ -18,6 +18,8 @@
*/
#include "script_component.hpp"
+ACE_DEPRECATED("ace_common_fnc_setAllGear","3.7.0","setUnitLoadout");
+
params ["_unit", "_allGear", ["_clearAttachments", false], ["_clearBackpack", false]];
if (!local _unit) exitWith {
diff --git a/addons/common/functions/fnc_setHearingCapability.sqf b/addons/common/functions/fnc_setHearingCapability.sqf
index 7bd375a58b..5b1e7a5a3a 100644
--- a/addons/common/functions/fnc_setHearingCapability.sqf
+++ b/addons/common/functions/fnc_setHearingCapability.sqf
@@ -5,48 +5,44 @@
* Arguments:
* 0: id
* 1: settings
- * 2: add (default: true)
+ * 2: add [true] OR remove [false] (default: true)
*
* Return Value:
* None
*
- * Public: Yes
+ * Example:
+ * ["earwax", 0.5, true] call ace_common_fnc_setHearingCapability
*
- * Note: uses player
+ * Public: Yes
*/
#include "script_component.hpp"
-params ["_id", "_settings", ["_add", true]];
-
-private _map = missionNamespace getVariable [QGVAR(setHearingCapabilityMap),[]];
+params ["_id", "_setting", ["_add", true]];
private _exists = false;
-
-{
- if (_id == _x select 0) exitWith {
- _exists = true;
- if (_add) then {
- _x set [1, _settings];
- } else {
- _map set [_forEachIndex, 0];
- _map = _map - [0];
- };
- };
-} forEach _map;
-
-if (!_exists && _add) then {
- _map pushBack [_id, _settings];
-};
-
-missionNamespace setVariable [QGVAR(setHearingCapabilityMap), _map];
-
-// find lowest volume
private _lowestVolume = 1;
-{
- _lowestVolume = (_x select 1) min _lowestVolume;
- false
-} count _map;
+GVAR(setHearingCapabilityMap) = GVAR(setHearingCapabilityMap) select {
+ _x params ["_xID", "_xSetting"];
+ if (_id == _xID) then {
+ _exists = true;
+ if (_add) then {
+ _x set [1, _setting];
+ _lowestVolume = _lowestVolume min _setting;
+ true
+ } else {
+ false
+ };
+ } else {
+ _lowestVolume = _lowestVolume min _xSetting;
+ true
+ };
+};
+
+if (!_exists && _add) then {
+ _lowestVolume = _lowestVolume min _setting;
+ GVAR(setHearingCapabilityMap) pushBack [_id, _setting];
+};
// in game sounds
0 fadeSound _lowestVolume;
@@ -54,5 +50,5 @@ private _lowestVolume = 1;
0 fadeMusic _lowestVolume;
// Set Radio mod variables.
-player setVariable ["tf_globalVolume", _lowestVolume];
+ACE_player setVariable ["tf_globalVolume", _lowestVolume];
if (!isNil "acre_api_fnc_setGlobalVolume") then { [_lowestVolume^0.33] call acre_api_fnc_setGlobalVolume; };
diff --git a/addons/common/functions/fnc_setName.sqf b/addons/common/functions/fnc_setName.sqf
index b9ecbdc3a6..1b2b515ec2 100644
--- a/addons/common/functions/fnc_setName.sqf
+++ b/addons/common/functions/fnc_setName.sqf
@@ -19,13 +19,7 @@ if (isNull _unit || {!alive _unit}) exitWith {};
if (_unit isKindOf "CAManBase") then {
private _sanitizedName = [name _unit, true] call FUNC(sanitizeString);
private _rawName = [name _unit, false] call FUNC(sanitizeString);
-
- //Debug Testing Code (with html tags):
- // private _sanitizedName = ["Name", true] call FUNC(sanitizeString);
- // private _rawName = ["Name", false] call FUNC(sanitizeString);
-
- //if (_name != _unit getVariable ["ACE_Name", ""]) then {
+
_unit setVariable ["ACE_Name", _sanitizedName, true];
_unit setVariable ["ACE_NameRaw", _rawName, true];
- //};
};
diff --git a/addons/common/functions/fnc_setSetting.sqf b/addons/common/functions/fnc_setSetting.sqf
index a2bd9e700e..5a56b385a7 100644
--- a/addons/common/functions/fnc_setSetting.sqf
+++ b/addons/common/functions/fnc_setSetting.sqf
@@ -78,8 +78,8 @@ if (isServer && {_broadcastChanges}) then {
publicVariable _name;
// Raise event globally, this publicizes eventual changes in _force status so clients can update it locally
- ["SettingChanged", [_name, _value, _force]] call FUNC(globalEvent);
+ ["ace_settingChanged", [_name, _value, _force]] call CBA_fnc_globalEvent;
} else {
// Raise event locally
- ["SettingChanged", [_name, _value, _force]] call FUNC(localEvent);
+ ["ace_settingChanged", [_name, _value, _force]] call CBA_fnc_localEvent;
};
diff --git a/addons/common/functions/fnc_setVariablePublic.sqf b/addons/common/functions/fnc_setVariablePublic.sqf
index bf6b35a862..1cfba0a422 100644
--- a/addons/common/functions/fnc_setVariablePublic.sqf
+++ b/addons/common/functions/fnc_setVariablePublic.sqf
@@ -50,4 +50,4 @@ TRACE_2("Starting Embargo", _varName, _delay);
if (!(_value isEqualTo _curValue)) then {
_this call FUNC(setVariablePublic);
};
-}, _this, _delay] call FUNC(waitAndExecute);
+}, _this, _delay] call CBA_fnc_waitAndExecute;
diff --git a/addons/common/functions/fnc_sortAlphabeticallyBy.sqf b/addons/common/functions/fnc_sortAlphabeticallyBy.sqf
deleted file mode 100644
index 0bf0c6432f..0000000000
--- a/addons/common/functions/fnc_sortAlphabeticallyBy.sqf
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Author: Glowbal
- * ?
- *
- * Arguments:
- * ?
- *
- * Return Value:
- * ?
- *
- * Public: Yes
- *
- * Deprecated
- */
-#include "script_component.hpp"
-
-ACE_DEPRECATED("ace_common_fnc_sortAlphabeticallyBy","3.5.0","sort");
-
-params ["_array", "_elementN"];
-
-private _indices = [];
-private _elements = [];
-
-{
- private _theElement = toArray (_x select _elementN);
- _indices pushBack _forEachIndex;
- _elements pushBack _theElement;
-} forEach _array;
-
-for "_i" from 1 to (count _elements) - 1 do {
- private _tmp = _elements select _i;
- private _tempIndex = _indices select _i;
- _j = _i;
- while {_j >= 1 && {_tmp < _elements select (_j - 1)}} do {
- _elements set [_j, _elements select (_j - 1)];
- _indices set [_j, _indices select (_j - 1)];
- _j = _j - 1;
- };
- _elements set[_j, _tmp];
- _indices set [_j, _tempIndex];
-};
-
-private _returnArray = [];
-
-{
- _returnArray pushBack (_array select _x);
-} forEach _indices;
-
-_returnArray
diff --git a/addons/common/functions/fnc_statusEffect_addType.sqf b/addons/common/functions/fnc_statusEffect_addType.sqf
index afd7ff7be7..b5d6c1e879 100644
--- a/addons/common/functions/fnc_statusEffect_addType.sqf
+++ b/addons/common/functions/fnc_statusEffect_addType.sqf
@@ -3,7 +3,7 @@
* Adds a status effect that will be handled.
*
* Arguments:
- * 0: Status Effect Name, this should match a corisponding event name
+ * 0: Status Effect Name, this should match a corresponding event name
* 1: Send event globaly
* 2: Common Effect Reaons to pre-seed durring init
*
@@ -30,8 +30,6 @@ GVAR(statusEffect_isGlobal) pushBack _isGlobal;
//We add reasons at any time, but more efficenet to add all common ones at one time during init
if (isServer && {!(_commonReasonsArray isEqualTo [])}) then {
//Switch case to lower:
- {
- _commonReasonsArray set [_forEachIndex, toLower _x];
- } forEach _commonReasonsArray;
+ _commonReasonsArray = _commonReasonsArray apply { toLower _x };
missionNamespace setVariable [(format [QGVAR(statusEffects_%1), _name]), _commonReasonsArray, true];
};
diff --git a/addons/common/functions/fnc_statusEffect_sendEffects.sqf b/addons/common/functions/fnc_statusEffect_sendEffects.sqf
index 4291de1ad8..f82ab10427 100644
--- a/addons/common/functions/fnc_statusEffect_sendEffects.sqf
+++ b/addons/common/functions/fnc_statusEffect_sendEffects.sqf
@@ -4,7 +4,7 @@
*
* Arguments:
* 0: Object
- * 1: Effect name (or "" or send all)
+ * 1: Effect name (or "" to send all)
*
* Return Value:
* Nothing
@@ -30,18 +30,13 @@ if (isNull _object) exitWith {};
//We only do anything if the effect has been defined at some point in the game for this unit
TRACE_2("checking if event is nil",_x,_effectNumber);
if (_effectNumber != -1) then {
+ private _eventName = format [QGVAR(%1), _x];
if (GVAR(statusEffect_isGlobal) select _forEachIndex) then {
TRACE_2("Sending Global Event", _object, _effectNumber);
- [_x, [_object, _effectNumber]] call FUNC(globalEvent);
+ [_eventName, [_object, _effectNumber]] call CBA_fnc_globalEvent;
} else {
- if (local _object) then {
- //If local, send directly to bypass network delay of targetEvent call
- TRACE_2("Sending Target Local Event", _object, _effectNumber);
- [_x, [_object, _effectNumber]] call FUNC(localEvent);
- } else {
- TRACE_2("Sending Target Non-Local Event", _object, _effectNumber);
- [_x, [_object], [_object, _effectNumber]] call FUNC(targetEvent);
- };
+ TRACE_2("Sending Target Event", _object, _effectNumber);
+ [_eventName, [_object, _effectNumber], _object] call CBA_fnc_targetEvent;
};
};
};
diff --git a/addons/common/functions/fnc_syncedEvent.sqf b/addons/common/functions/fnc_syncedEvent.sqf
index 4ed8107330..e6c7b43361 100644
--- a/addons/common/functions/fnc_syncedEvent.sqf
+++ b/addons/common/functions/fnc_syncedEvent.sqf
@@ -1,26 +1,26 @@
-/*
- * Author: jaynus
- * Call and propegate a synced event
- *
- * Arguments:
- * 0: Name
- * 1: Arguments
- * 2: TTL [Optional] for this specific event call
- *
- * Return Value:
- * Boolean of success
- *
- * Public: No
- */
-#include "script_component.hpp"
-
-params ["_name", "_args", ["_ttl", 0]];
-
-if (!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
- ACE_LOGERROR("Synced event key not found.");
- false
-};
-
-private _eventData = [_name, _args, _ttl];
-
-["SEH", _eventData] call FUNC(globalEvent);
+/*
+ * Author: jaynus
+ * Call and propegate a synced event
+ *
+ * Arguments:
+ * 0: Name
+ * 1: Arguments
+ * 2: TTL [Optional] for this specific event call
+ *
+ * Return Value:
+ * Boolean of success
+ *
+ * Public: No
+ */
+#include "script_component.hpp"
+
+params ["_name", "_args", ["_ttl", 0]];
+
+if (!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
+ ACE_LOGERROR_1("Synced event key [%1] not found (syncedEvent).", _name);
+ false
+};
+
+private _eventData = [_name, _args, _ttl];
+
+["ACEe", _eventData] call CBA_fnc_globalEvent;
diff --git a/addons/common/functions/fnc_syncedEventPFH.sqf b/addons/common/functions/fnc_syncedEventPFH.sqf
index 62df8f10a7..c0c840c894 100644
--- a/addons/common/functions/fnc_syncedEventPFH.sqf
+++ b/addons/common/functions/fnc_syncedEventPFH.sqf
@@ -1,62 +1,62 @@
-/*
- * Author: ?
- *
- * ?
- *
- * Arguments:
- * ?
- *
- * Return Value:
- * ?
- *
- * Public: ?
- */
-#include "script_component.hpp"
-
-if (!isServer) exitWith {false};
-
-// Walk through the local synced events and clean up anything thats already EOL
-// @TODO: This should be iteration limited to prevent FPS lag
-
-{
- private _name = _x;
-
- private _data = HASH_GET(GVAR(syncedEvents),_name);
- _data params ["_eventTime", "_eventLog", "_globalEventTTL"];
-
- private _newEventLog = [];
-
- // @TODO: This should be iteration limited to prevent FPS lag
- {
- private _eventEntry = _x;
- private _ttlReturn = true;
-
- if (_globalEventTTL isEqualType {}) then {
- _ttlReturn = [_eventTime, _eventEntry] call _globalEventTTL;
- } else {
- _ttlReturn = call {_globalEventTTL < 1 || {ACE_diagTime < (_eventEntry select 0) + _globalEventTTL}};
- };
-
- if (_ttlReturn) then {
- // Do event based TTL check
- _eventEntry params ["_time", "", "_eventTTL"];
-
- if (_eventTTL isEqualType {}) then {
- _ttlReturn = [_eventTime, _eventEntry] call _eventTTL;
- } else {
- _ttlReturn = call {_eventTTL < 1 || {ACE_diagTime < _time + _eventTTL}};
- };
- };
-
- // Finally drop it if the TTL check fails
- if (_ttlReturn) then {
- _newEventLog pushBack _x;
- };
- false
- } count _eventLog;
-
- _data set [1, _newEventLog];
- false
-} count (GVAR(syncedEvents) select 0);
-
-// @TODO: Next, detect if we had a new request from a JIP player, and we need to continue syncing events
+/*
+ * Author: ?
+ *
+ * ?
+ *
+ * Arguments:
+ * ?
+ *
+ * Return Value:
+ * ?
+ *
+ * Public: ?
+ */
+#include "script_component.hpp"
+
+if (!isServer) exitWith {false};
+
+// Walk through the local synced events and clean up anything thats already EOL
+// @TODO: This should be iteration limited to prevent FPS lag
+
+{
+ private _name = _x;
+
+ private _data = HASH_GET(GVAR(syncedEvents),_name);
+ _data params ["_eventTime", "_eventLog", "_globalEventTTL"];
+
+ private _newEventLog = [];
+
+ // @TODO: This should be iteration limited to prevent FPS lag
+ {
+ private _eventEntry = _x;
+ private _ttlReturn = true;
+
+ if (_globalEventTTL isEqualType {}) then {
+ _ttlReturn = [_eventTime, _eventEntry] call _globalEventTTL;
+ } else {
+ _ttlReturn = call {_globalEventTTL < 1 || {diag_tickTime < (_eventEntry select 0) + _globalEventTTL}};
+ };
+
+ if (_ttlReturn) then {
+ // Do event based TTL check
+ _eventEntry params ["_time", "", "_eventTTL"];
+
+ if (_eventTTL isEqualType {}) then {
+ _ttlReturn = [_eventTime, _eventEntry] call _eventTTL;
+ } else {
+ _ttlReturn = call {_eventTTL < 1 || {diag_tickTime < _time + _eventTTL}};
+ };
+ };
+
+ // Finally drop it if the TTL check fails
+ if (_ttlReturn) then {
+ _newEventLog pushBack _x;
+ };
+ false
+ } count _eventLog;
+
+ _data set [1, _newEventLog];
+ false
+} count (GVAR(syncedEvents) select 0);
+
+// @TODO: Next, detect if we had a new request from a JIP player, and we need to continue syncing events
diff --git a/addons/common/functions/fnc_targetEvent.sqf b/addons/common/functions/fnc_targetEvent.sqf
index b9802f0835..8cce931547 100644
--- a/addons/common/functions/fnc_targetEvent.sqf
+++ b/addons/common/functions/fnc_targetEvent.sqf
@@ -1,33 +1,13 @@
-/*
- * Author: Nou
- * Execute a event only on specific clients.
- *
- * Arguments:
- * 0: Event name (STRING)
- * 1: Event targets
- * 2: Event args
- *
- * Note: If local executor is in list of targets, event will execute with
- * network delay, and not immediatly.
- *
- * Return Value:
- * None
- *
- * Public: Yes
- */
-#include "script_component.hpp"
-
-params ["_eventName", "_eventTargets", "_eventArgs"];
-
-#ifdef DEBUG_EVENTS
- ACE_LOGINFO_2("* Target Event: %1 - %2",_eventName,_eventTargets);
- ACE_LOGINFO_1(" args=%1",_eventArgs);
-#endif
-
-ACEc = [_eventName, _eventTargets, _eventArgs];
-
-if (!isServer) then {
- publicVariableServer "ACEc";
-} else {
- ["ACEc", ACEc] call FUNC(_handleNetEvent);
-};
+#include "script_component.hpp"
+
+params ["_eventName", "_eventTargets", "_eventArgs"];
+
+private _newName = getText (configFile >> "ACE_newEvents" >> _eventName);
+if (_newName != "") then {
+ TRACE_2("Switching Names",_eventName,_newName);
+ _eventName = _newName;
+};
+
+[_eventName,_eventArgs,_eventTargets] call CBA_fnc_targetEvent;
+
+ACE_DEPRECATED("ace_common_fnc_targetEvent","3.8.0","CBA_fnc_targetEvent");
diff --git a/addons/common/functions/fnc_throttledPublicVariable.sqf b/addons/common/functions/fnc_throttledPublicVariable.sqf
index 67cfc50f9a..3aaa3c8f47 100644
--- a/addons/common/functions/fnc_throttledPublicVariable.sqf
+++ b/addons/common/functions/fnc_throttledPublicVariable.sqf
@@ -25,7 +25,7 @@ if (isNil QGVAR(publishSchedId)) then {
GVAR(publishNextTime) = 1e7;
GVAR(publishSchedId) = [{
- if (ACE_diagTime > GVAR(publishNextTime)) then {
+ if (diag_tickTime > GVAR(publishNextTime)) then {
{
_x params [_unit, _varName];
_unit setVariable [_varName, _unit getVariable _varName, true];
@@ -41,8 +41,8 @@ if (isNil QGVAR(publishSchedId)) then {
// If the variable is not on the list
if (GVAR(publishVarNames) find [_unit, _varName] == -1) exitWith {
GVAR(publishVarNames) pushBack [_unit, _varName];
- GVAR(publishNextTime) = GVAR(publishNextTime) min (ACE_diagTime + _maxDelay);
+ GVAR(publishNextTime) = GVAR(publishNextTime) min (diag_tickTime + _maxDelay);
};
// If the variable is on the list
-GVAR(publishNextTime) = GVAR(publishNextTime) min (ACE_diagTime + _maxDelay);
+GVAR(publishNextTime) = GVAR(publishNextTime) min (diag_tickTime + _maxDelay);
diff --git a/addons/common/functions/fnc_timePFH.sqf b/addons/common/functions/fnc_timePFH.sqf
deleted file mode 100644
index e5366d331e..0000000000
--- a/addons/common/functions/fnc_timePFH.sqf
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Author: jaynus
- * PFEH to set all Ace Time Variables
- *
- * Arguments:
- * None
- *
- * Return Value:
- * None
- *
- * Public: No
- */
-#include "script_component.hpp"
-
-BEGIN_COUNTER(timePFH);
-
-private _lastTickTime = ACE_diagTime;
-private _lastGameTime = ACE_gameTime;
-
-ACE_gameTime = time;
-ACE_diagTime = diag_tickTime;
-
-private _delta = ACE_diagTime - _lastTickTime;
-
-if (ACE_gameTime <= _lastGameTime) then {
- TRACE_1("paused",_delta);
- ACE_paused = true;
- // Game is paused or not running
- ACE_pausedTime = ACE_pausedTime + _delta;
- ACE_virtualPausedTime = ACE_pausedTime + (_delta * accTime);
-} else {
- TRACE_1("live",_delta);
- ACE_paused = false;
- // Time is updating
- ACE_realTime = ACE_realTime + _delta;
- ACE_virtualTime = ACE_virtualTime + (_delta * accTime);
- ACE_time = ACE_virtualTime;
-};
-
-END_COUNTER(timePFH);
diff --git a/addons/common/functions/fnc_translateToModelSpace.sqf b/addons/common/functions/fnc_translateToModelSpace.sqf
index b9fa35243a..309387086f 100644
--- a/addons/common/functions/fnc_translateToModelSpace.sqf
+++ b/addons/common/functions/fnc_translateToModelSpace.sqf
@@ -1,23 +1,23 @@
-/*
- * Author: ?
- * ?
- *
- * Arguments:
- * ?
- *
- * Return Value:
- * ?
- *
- * Public: ?
- */
-#include "script_component.hpp"
-
-params ["_object", "_matrix", "_offset"];
-
-private _origin = getPosASL _object;
-
-_matrix params ["_xVec", "_yVec", "_zVec"];
-
-_offset params ["_x", "_y", "_z"];
-
-(_xVec vectorMultiply _x) vectorAdd (_yVec vectorMultiply _y) vectorAdd (_zVec vectorMultiply _z) vectorAdd _origin // return
+/*
+ * Author: ?
+ * ?
+ *
+ * Arguments:
+ * ?
+ *
+ * Return Value:
+ * ?
+ *
+ * Public: ?
+ */
+#include "script_component.hpp"
+
+params ["_object", "_matrix", "_offset"];
+
+private _origin = getPosASL _object;
+
+_matrix params ["_xVec", "_yVec", "_zVec"];
+
+_offset params ["_x", "_y", "_z"];
+
+(_xVec vectorMultiply _x) vectorAdd (_yVec vectorMultiply _y) vectorAdd (_zVec vectorMultiply _z) vectorAdd _origin // return
diff --git a/addons/common/functions/fnc_translateToWeaponSpace.sqf b/addons/common/functions/fnc_translateToWeaponSpace.sqf
index cd360bd874..fab3fe6a3c 100644
--- a/addons/common/functions/fnc_translateToWeaponSpace.sqf
+++ b/addons/common/functions/fnc_translateToWeaponSpace.sqf
@@ -1,29 +1,29 @@
-/*
- * Author: ?
- * ?
- *
- * Arguments:
- * ?
- *
- * Return Value:
- * ?
- *
- * Public: ?
- */
-#include "script_component.hpp"
-
-params ["_object", "_matrix", "_offset"];
-
-private _origin = getPosASL _object;
-
-_matrix params ["_xVec", "_yVec", "_zVec"];
-
-_offset = _offset vectorDiff _origin;
-
-_offset params ["_x", "_y", "_z"];
-
-[
- ((_xVec select 0) * _x) + ((_xVec select 1) * _y) + ((_xVec select 2) * _z),
- ((_yVec select 0) * _x) + ((_yVec select 1) * _y) + ((_yVec select 2) * _z),
- ((_zVec select 0) * _x) + ((_zVec select 1) * _y) + ((_zVec select 2) * _z)
-] // return
+/*
+ * Author: ?
+ * ?
+ *
+ * Arguments:
+ * ?
+ *
+ * Return Value:
+ * ?
+ *
+ * Public: ?
+ */
+#include "script_component.hpp"
+
+params ["_object", "_matrix", "_offset"];
+
+private _origin = getPosASL _object;
+
+_matrix params ["_xVec", "_yVec", "_zVec"];
+
+_offset = _offset vectorDiff _origin;
+
+_offset params ["_x", "_y", "_z"];
+
+[
+ ((_xVec select 0) * _x) + ((_xVec select 1) * _y) + ((_xVec select 2) * _z),
+ ((_yVec select 0) * _x) + ((_yVec select 1) * _y) + ((_yVec select 2) * _z),
+ ((_zVec select 0) * _x) + ((_zVec select 1) * _y) + ((_zVec select 2) * _z)
+] // return
diff --git a/addons/common/functions/fnc_unhideUnit.sqf b/addons/common/functions/fnc_unhideUnit.sqf
index 908dbf3dc8..cb988cde1b 100644
--- a/addons/common/functions/fnc_unhideUnit.sqf
+++ b/addons/common/functions/fnc_unhideUnit.sqf
@@ -28,5 +28,5 @@ if (_reason in _setHiddenReasons) then {
};
if (_setHiddenReasons isEqualTo []) then {
- ["hideObjectGlobal",[_unit,false]] call FUNC(serverEvent);
+ [QGVAR(hideObjectGlobal), [_unit,false]] call CBA_fnc_serverEvent;
};
diff --git a/addons/common/functions/fnc_uniqueElementsOnly.sqf b/addons/common/functions/fnc_uniqueElementsOnly.sqf
deleted file mode 100644
index 9bdb6ff647..0000000000
--- a/addons/common/functions/fnc_uniqueElementsOnly.sqf
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Author: Glowbal
- * Make a copy of an array with only the unique elements.
- *
- * Arguments:
- * 0: array
- *
- * Return Value:
- * Copy of original array
- *
- * Public: Yes
- *
- * Deprecated
- */
-#include "script_component.hpp"
-
-ACE_DEPRECATED("ace_common_fnc_uniqueElementsOnly","3.5.0","ace_common_fnc_uniqueElements");
-
-_this call FUNC(uniqueElements)
diff --git a/addons/common/functions/fnc_unloadPerson.sqf b/addons/common/functions/fnc_unloadPerson.sqf
index 72816f2c3f..716f46dc8e 100644
--- a/addons/common/functions/fnc_unloadPerson.sqf
+++ b/addons/common/functions/fnc_unloadPerson.sqf
@@ -15,7 +15,7 @@
*/
#include "script_component.hpp"
-#define GROUP_SWITCH_ID QUOTE(FUNC(loadPerson))
+#define GROUP_SWITCH_ID QFUNC(loadPerson)
params ["_unit"];
@@ -26,7 +26,7 @@ if (_vehicle == _unit) exitWith {false};
if (speed _vehicle > 1 || {((getPos _vehicle) select 2) > 2}) exitWith {false};
if (!isNull _vehicle) then {
- ["unloadPersonEvent", [_unit], [_unit, _vehicle]] call EFUNC(common,targetEvent);
+ ["ace_unloadPersonEvent", [_unit, _vehicle], [_unit]] call CBA_fnc_targetEvent;
};
true
diff --git a/addons/common/functions/fnc_unloadPersonLocal.sqf b/addons/common/functions/fnc_unloadPersonLocal.sqf
index ff5813434a..517e0aa2ad 100644
--- a/addons/common/functions/fnc_unloadPersonLocal.sqf
+++ b/addons/common/functions/fnc_unloadPersonLocal.sqf
@@ -14,7 +14,7 @@
*/
#include "script_component.hpp"
-#define GROUP_SWITCH_ID QUOTE(FUNC(loadPerson))
+#define GROUP_SWITCH_ID QFUNC(loadPerson)
params ["_unit", "_vehicle", ["_unloader", objNull]];
TRACE_3("params",_unit,_vehicle,_unloader);
@@ -27,7 +27,7 @@ if (count _emptyPos != 3) exitwith {
ACE_LOGWARNING_4("Could not find unload pos %1-ASL: %2 isTouchingGround: %3 Speed: %4",_vehicle, getPosASL _vehicle, isTouchingGround _vehicle, speed _vehicle);
if ((!isNull _unloader) && {[_unloader] call FUNC(isPlayer)}) then {
//display text saying there are no safe places to exit the vehicle
- ["displayTextStructured", [_unloader], [localize LSTRING(NoRoomToUnload)]] call FUNC(targetEvent);
+ [QGVAR(displayTextStructured), [localize LSTRING(NoRoomToUnload)], [_unloader]] call CBA_fnc_targetEvent;
};
false
};
@@ -58,10 +58,10 @@ _unit action ["Eject", vehicle _unit];
if ((_unit getVariable "ACE_isUnconscious") and (animationState _unit != _anim)) then {
[_unit, _anim, 2, true] call FUNC(doAnimation);
};
- }, [_unit, _anim], 0.5] call FUNC(waitAndExecute);
+ }, [_unit, _anim], 0.5] call CBA_fnc_waitAndExecute;
};
};
-}, [_unit, _emptyPos], 0.5] call FUNC(waitAndExecute);
+}, [_unit, _emptyPos], 0.5] call CBA_fnc_waitAndExecute;
[_unit, false, GROUP_SWITCH_ID, side group _unit] call FUNC(switchToGroupSide);
diff --git a/addons/common/functions/fnc_unmuteUnit.sqf b/addons/common/functions/fnc_unmuteUnit.sqf
index a995eed244..b6d673cfd5 100644
--- a/addons/common/functions/fnc_unmuteUnit.sqf
+++ b/addons/common/functions/fnc_unmuteUnit.sqf
@@ -32,4 +32,4 @@ private _speaker = _unit getVariable ["ACE_OriginalSpeaker", ""];
if (_speaker == "") exitWith {};
-["setSpeaker", _unit, [_unit, _speaker]] call FUNC(targetEvent);
+[QGVAR(setSpeaker), [_unit, _speaker], _unit] call CBA_fnc_targetEvent;
diff --git a/addons/common/functions/fnc_waitAndExecute.sqf b/addons/common/functions/fnc_waitAndExecute.sqf
index 6f282ba656..1ac0d3f54d 100644
--- a/addons/common/functions/fnc_waitAndExecute.sqf
+++ b/addons/common/functions/fnc_waitAndExecute.sqf
@@ -17,7 +17,6 @@
*/
#include "script_component.hpp"
-params ["_func", "_params", "_delay"];
+ACE_DEPRECATED("ace_common_fnc_waitAndExecute","3.8.0","CBA_fnc_waitAndExecute");
-GVAR(waitAndExecArray) pushBack [ACE_time + _delay, _func, _params];
-GVAR(waitAndExecArray) sort true;
+_this call CBA_fnc_waitAndExecute;
diff --git a/addons/common/functions/fnc_waitUntilAndExecute.sqf b/addons/common/functions/fnc_waitUntilAndExecute.sqf
index bbc6c540fe..76f3d22ce1 100644
--- a/addons/common/functions/fnc_waitUntilAndExecute.sqf
+++ b/addons/common/functions/fnc_waitUntilAndExecute.sqf
@@ -17,7 +17,8 @@
*/
#include "script_component.hpp"
-TRACE_1("Adding",_this);
+ACE_DEPRECATED("ace_common_fnc_waitUntilAndExecute","3.8.0","CBA_fnc_waitUntilAndExecute");
+
+_this call CBA_fnc_waitUntilAndExecute;
-GVAR(waitUntilAndExecArray) pushBack _this;
nil
diff --git a/addons/common/functions/fnc_waveHeightAt.sqf b/addons/common/functions/fnc_waveHeightAt.sqf
index bc278a9b70..c140b1ce94 100644
--- a/addons/common/functions/fnc_waveHeightAt.sqf
+++ b/addons/common/functions/fnc_waveHeightAt.sqf
@@ -1,24 +1,24 @@
-/*
- * Author: jaynus
- * Gets the wave height at a specific location. Uses a logic, so may be performance iffy
- *
- * Arguments:
- * 0: Position ASL to get height at
- *
- * Return Value:
- * Wave height in meters
- *
- *
- * Public: No
- */
-#include "script_component.hpp"
-
-params ["_position"];
-
-if (isNil QGVAR(waveHeightLogic)) then {
- GVAR(waveHeightLogic) = "Logic" createVehicleLocal [0,0,0];
-};
-
-GVAR(waveHeightLogic) setPosASL _position;
-
-(getPosASLW GVAR(waveHeightLogic) select 2) - (getPosASL GVAR(waveHeightLogic) select 2)
+/*
+ * Author: jaynus
+ * Gets the wave height at a specific location. Uses a logic, so may be performance iffy
+ *
+ * Arguments:
+ * 0: Position ASL to get height at
+ *
+ * Return Value:
+ * Wave height in meters
+ *
+ *
+ * Public: No
+ */
+#include "script_component.hpp"
+
+params ["_position"];
+
+if (isNil QGVAR(waveHeightLogic)) then {
+ GVAR(waveHeightLogic) = "Logic" createVehicleLocal [0,0,0];
+};
+
+GVAR(waveHeightLogic) setPosASL _position;
+
+(getPosASLW GVAR(waveHeightLogic) select 2) - (getPosASL GVAR(waveHeightLogic) select 2)
diff --git a/addons/common/functions/fnc_worldToScreenBounds.sqf b/addons/common/functions/fnc_worldToScreenBounds.sqf
index c9e5551d19..65b0164ca0 100644
--- a/addons/common/functions/fnc_worldToScreenBounds.sqf
+++ b/addons/common/functions/fnc_worldToScreenBounds.sqf
@@ -1,74 +1,74 @@
-/*
- * Author: zGuba 2011
- * Function helper for framing objects on screen.
- *
- * Arguments:
- * 0: object
- * 1: margins 3D
- * 0: X
- * 1: Y
- * 2: Z
- * 2: offset 3D
- * 0: X
- * 1: Y
- * 2: Z
- *
- * Return Value:
- * 0: Minimal X
- * 1: Minimal Y
- * 2: Maximal X
- * 3: Maximal Y
- *
- * Public: No
- */
-#include "script_component.hpp"
-
-params ["_object", "_margins", "_offsets"];
-
-private _minX = 10;
-private _minY = 10;
-private _maxX = -10;
-private _maxY = -10;
-
-private _bounds = boundingBox _object;
-_margins params ["_marginsX", "_marginsY", "_marginsZ"];
-_offsets params ["_offsetsX", "_offsetsY", "_offsetsZ"];
-
-_bounds params ["_boundsMin", "_boundsMax"];
-_boundsMin params ["_boundsMinX", "_boundsMinY", "_boundsMinZ"];
-_boundsMax params ["_boundsMaxX", "_boundsMaxY", "_boundsMaxZ"];
-
-_boundsMinX = _boundsMinX - _marginsX + _offsetsX;
-_boundsMinY = _boundsMinY - _marginsY + _offsetsY;
-_boundsMinZ = _boundsMinZ - _marginsZ + _offsetsZ;
-
-_boundsMaxX = _boundsMaxX + _marginsX + _offsetsX;
-_boundsMaxY = _boundsMaxY + _marginsY + _offsetsY;
-_boundsMaxZ = _boundsMaxZ + _marginsZ + _offsetsZ;
-
-private _boundsCorners = [
- [_boundsMinX, _boundsMinY, _boundsMinZ],
- [_boundsMinX, _boundsMinY, _boundsMaxZ],
- [_boundsMinX, _boundsMaxY, _boundsMinZ],
- [_boundsMinX, _boundsMaxY, _boundsMaxZ],
- [_boundsMaxX, _boundsMinY, _boundsMinZ],
- [_boundsMaxX, _boundsMinY, _boundsMaxZ],
- [_boundsMaxX, _boundsMaxY, _boundsMinZ],
- [_boundsMaxX, _boundsMaxY, _boundsMaxZ]
-];
-
-{
- private _ppos = worldToScreen (_object modelToWorld _x);
-
- if (count _ppos >= 2) then {
- _ppos params ["_pposX", "_pposY"];
-
- if (_pposX < _minX) then {_minX = _pposX};
- if (_pposX > _maxX) then {_maxX = _pposX};
- if (_pposY < _minY) then {_minY = _pposY};
- if (_pposY > _maxY) then {_maxY = _pposY};
- }; //else - what to do if it is offscreen?
- false
-} count _boundsCorners;
-
-[_minX, _minY, _maxX, _maxY]
+/*
+ * Author: zGuba 2011
+ * Function helper for framing objects on screen.
+ *
+ * Arguments:
+ * 0: object
+ * 1: margins 3D
+ * 0: X
+ * 1: Y
+ * 2: Z
+ * 2: offset 3D
+ * 0: X
+ * 1: Y
+ * 2: Z
+ *
+ * Return Value:
+ * 0: Minimal X
+ * 1: Minimal Y
+ * 2: Maximal X
+ * 3: Maximal Y
+ *
+ * Public: No
+ */
+#include "script_component.hpp"
+
+params ["_object", "_margins", "_offsets"];
+
+private _minX = 10;
+private _minY = 10;
+private _maxX = -10;
+private _maxY = -10;
+
+private _bounds = boundingBox _object;
+_margins params ["_marginsX", "_marginsY", "_marginsZ"];
+_offsets params ["_offsetsX", "_offsetsY", "_offsetsZ"];
+
+_bounds params ["_boundsMin", "_boundsMax"];
+_boundsMin params ["_boundsMinX", "_boundsMinY", "_boundsMinZ"];
+_boundsMax params ["_boundsMaxX", "_boundsMaxY", "_boundsMaxZ"];
+
+_boundsMinX = _boundsMinX - _marginsX + _offsetsX;
+_boundsMinY = _boundsMinY - _marginsY + _offsetsY;
+_boundsMinZ = _boundsMinZ - _marginsZ + _offsetsZ;
+
+_boundsMaxX = _boundsMaxX + _marginsX + _offsetsX;
+_boundsMaxY = _boundsMaxY + _marginsY + _offsetsY;
+_boundsMaxZ = _boundsMaxZ + _marginsZ + _offsetsZ;
+
+private _boundsCorners = [
+ [_boundsMinX, _boundsMinY, _boundsMinZ],
+ [_boundsMinX, _boundsMinY, _boundsMaxZ],
+ [_boundsMinX, _boundsMaxY, _boundsMinZ],
+ [_boundsMinX, _boundsMaxY, _boundsMaxZ],
+ [_boundsMaxX, _boundsMinY, _boundsMinZ],
+ [_boundsMaxX, _boundsMinY, _boundsMaxZ],
+ [_boundsMaxX, _boundsMaxY, _boundsMinZ],
+ [_boundsMaxX, _boundsMaxY, _boundsMaxZ]
+];
+
+{
+ private _ppos = worldToScreen (_object modelToWorld _x);
+
+ if (count _ppos >= 2) then {
+ _ppos params ["_pposX", "_pposY"];
+
+ if (_pposX < _minX) then {_minX = _pposX};
+ if (_pposX > _maxX) then {_maxX = _pposX};
+ if (_pposY < _minY) then {_minY = _pposY};
+ if (_pposY > _maxY) then {_maxY = _pposY};
+ }; //else - what to do if it is offscreen?
+ false
+} count _boundsCorners;
+
+[_minX, _minY, _maxX, _maxY]
diff --git a/addons/common/functions/script_component.hpp b/addons/common/functions/script_component.hpp
index c213544655..bb0d2d5dff 100644
--- a/addons/common/functions/script_component.hpp
+++ b/addons/common/functions/script_component.hpp
@@ -1,13 +1,13 @@
-#include "\z\ace\addons\common\script_component.hpp"
-
-#define VALIDHASH(hash) (IS_ARRAY(hash) && {(count hash) >= 2} && {IS_ARRAY(hash select 0)} && {IS_ARRAY(hash select 1)})
-#define ERROR(msg) throw msg + format[" @ %1:%2", _callFrom, _lineNo]
-#define HANDLECATCH diag_log text _exception; assert(exception=="")
-
-#define ERRORDATA(c) private ["_callFrom", "_lineNo"];\
- _callFrom = "";\
- _lineNo = -1;\
- if((count _this) > c) then {\
- _callFrom = _this select c;\
- _lineNo = _this select c+1;\
- };
+#include "\z\ace\addons\common\script_component.hpp"
+
+#define VALIDHASH(hash) (IS_ARRAY(hash) && {(count hash) >= 2} && {IS_ARRAY(hash select 0)} && {IS_ARRAY(hash select 1)})
+#define ERROR(msg) throw msg + format[" @ %1:%2", _callFrom, _lineNo]
+#define HANDLECATCH diag_log text _exception; assert(exception=="")
+
+#define ERRORDATA(c) private ["_callFrom", "_lineNo"];\
+ _callFrom = "";\
+ _lineNo = -1;\
+ if((count _this) > c) then {\
+ _callFrom = _this select c;\
+ _lineNo = _this select c+1;\
+ };
diff --git a/addons/common/init_handleModifierKey.sqf b/addons/common/init_handleModifierKey.sqf
new file mode 100644
index 0000000000..7fe2be6476
--- /dev/null
+++ b/addons/common/init_handleModifierKey.sqf
@@ -0,0 +1,28 @@
+/*
+ * Author: commy2
+ * Initializes the modifier key handler.
+ *
+ * Arguments:
+ * None
+ *
+ * Return Value:
+ * None
+ *
+ * Public : No
+ */
+#include "script_component.hpp"
+
+_this spawn {//
+ waitUntil {!isNull findDisplay 46};//
+ sleep 2;//
+
+ disableSerialization;
+
+ params ["_display"];
+
+ _display displayAddEventHandler ["KeyDown", {_this call FUNC(handleModifierKey)}];
+ _display displayAddEventHandler ["KeyUp", {_this call FUNC(handleModifierKeyUp)}];
+};//
+
+//@todo, remove all lines with comments after CBA update, events rewrite branch
+// note 2, will break in save games after ~ 10 seconds thanks to CBA, fixed with above
diff --git a/addons/common/functions/fnc_handleScrollWheelInit.sqf b/addons/common/init_handleScrollWheel.sqf
similarity index 55%
rename from addons/common/functions/fnc_handleScrollWheelInit.sqf
rename to addons/common/init_handleScrollWheel.sqf
index 12f8b5f337..0acb84a5f2 100644
--- a/addons/common/functions/fnc_handleScrollWheelInit.sqf
+++ b/addons/common/init_handleScrollWheel.sqf
@@ -12,4 +12,8 @@
*/
#include "script_component.hpp"
-(findDisplay 46) displayAddEventHandler ["MouseZChanged", QUOTE(_this call FUNC(handleScrollWheel))];
+disableSerialization;
+
+params ["_display"];
+
+_display displayAddEventHandler ["MouseZChanged", QUOTE(_this call FUNC(handleScrollWheel))];
diff --git a/addons/common/init_versionTooltip.sqf b/addons/common/init_versionTooltip.sqf
new file mode 100644
index 0000000000..ce0d005a14
--- /dev/null
+++ b/addons/common/init_versionTooltip.sqf
@@ -0,0 +1,59 @@
+#include "script_component.hpp"
+
+#define MAX_COUNT 30
+#define ANIM_TIME 10
+
+private _display = findDisplay 0;
+
+if (!scriptDone (_display getVariable [QGVAR(versionTooltip), scriptNull])) exitWith {};
+
+_display setVariable [QGVAR(versionTooltip), [_display] spawn {
+ disableSerialization;
+
+ params ["_display"];
+
+ private _allControls = [];
+
+ private _fnc_create = {
+ private _ctrl = _display ctrlCreate ["RscPicture", -1];
+
+ // randomize size
+ private _size = selectRandom [safezoneW / 30, safezoneW / 20, safezoneW / 15];
+ private _position = [
+ random safezoneW + safezoneX - _size / 2,
+ - random (safezoneH / 5) + safezoneY - _size,
+ _size,
+ _size
+ ];
+
+ _ctrl ctrlSetPosition _position;
+ _ctrl ctrlCommit 0;
+
+ // pls ignore
+ _ctrl ctrlSetText QPATHTOF(data\icon_banana_ca.paa);
+
+ // animate with random speed
+ _position set [1, 1 - safezoneY];
+ _ctrl ctrlSetPosition _position;
+ _ctrl ctrlCommit (ANIM_TIME * random [0.5, 1, 1.5]);
+
+ _allControls pushBack _ctrl;
+ };
+
+ while {!isNull _display} do {
+ _allControls = _allControls select {
+ if (ctrlCommitted _x) then {
+ ctrlDelete _x;
+ false
+ } else {
+ true
+ };
+ };
+
+ while {count _allControls < MAX_COUNT} do {
+ call _fnc_create;
+ };
+
+ uiSleep 3;
+ };
+}];
diff --git a/addons/common/script_component.hpp b/addons/common/script_component.hpp
index aa023e7c9f..4e941943fa 100644
--- a/addons/common/script_component.hpp
+++ b/addons/common/script_component.hpp
@@ -14,4 +14,8 @@
#define DEBUG_SETTINGS DEBUG_SETTINGS_COMMON
#endif
-#include "\z\ace\addons\main\script_macros.hpp"
\ No newline at end of file
+#include "\z\ace\addons\main\script_macros.hpp"
+
+#define VERSION_CONFIG_COMMON VERSION_CONFIG;\
+ versionDesc = "ACE 3";\
+ versionAct = QUOTE(call COMPILE_FILE(init_versionTooltip))
diff --git a/addons/common/scripts/checkVersionNumber.sqf b/addons/common/scripts/checkVersionNumber.sqf
index 07bd443a06..402e5d9f56 100644
--- a/addons/common/scripts/checkVersionNumber.sqf
+++ b/addons/common/scripts/checkVersionNumber.sqf
@@ -100,7 +100,7 @@ if (!isServer) then {
_error = _error call _fnc_cutComma;
diag_log text _error;
- [_error, "{systemChat _this}"] call FUNC(execRemoteFnc);
+ [QGVAR(systemChatGlobal), _error] call CBA_fnc_globalEvent;
};
_missingAddonServer = false;
@@ -117,7 +117,7 @@ if (!isServer) then {
_error = _error call _fnc_cutComma;
diag_log text _error;
- [_error, "{systemChat _this}"] call FUNC(execRemoteFnc);
+ [QGVAR(systemChatGlobal), _error] call CBA_fnc_globalEvent;
};
_oldVersionClient = false;
@@ -134,7 +134,7 @@ if (!isServer) then {
_error = _error call _fnc_cutComma;
diag_log text _error;
- [_error, "{systemChat _this}"] call FUNC(execRemoteFnc);
+ [QGVAR(systemChatGlobal), _error] call CBA_fnc_globalEvent;
};
_oldVersionServer = false;
@@ -151,7 +151,7 @@ if (!isServer) then {
_error = _error call _fnc_cutComma;
diag_log text _error;
- [_error, "{systemChat _this}"] call FUNC(execRemoteFnc);
+ [QGVAR(systemChatGlobal), _error] call CBA_fnc_globalEvent;
};
ACE_Version_ClientErrors = [_missingAddon, _missingAddonServer, _oldVersionClient, _oldVersionServer];
diff --git a/addons/common/stringtable.xml b/addons/common/stringtable.xml
index 17f9e6a918..7521b65982 100644
--- a/addons/common/stringtable.xml
+++ b/addons/common/stringtable.xml
@@ -480,6 +480,7 @@
Vérifier les PBOs
PBO-k ellenőrzése
Проверка аддонов
+ Controlla PBO
Check addon integrity with server and do selected action if an addon is missing.
@@ -490,6 +491,7 @@
Este módulo verifica a integridade dos addons quando iniciamos a simulação
Выполняет проверку версий аддонов ACE у подключаемых игроков
Ce module contrôle si les PBOs de chaque joueur sont corrects
+ Controlla l'integrità degli addon con il server ed esegui l'azione selezionata se un addon è mancante
Action
@@ -501,6 +503,7 @@
Action
Cselekvés
Действие
+ Azione
What to do with people who do not have the right PBOs?
@@ -509,9 +512,10 @@
Was soll mit Leuten geschehen, die nicht die richtigen PBO-Dateien geladen haben?
Co udělat s lidmi, co nemají správné addony?
O que fazer com pessoas que não tem os PBOs corretos?
- Que faire avec les personnes n'ayant pas les bon PBOs
+ Que faire avec les personnes n'ayant pas les bons PBO ?
Mi legyen azokkal a személyekkel, akiknek nincsenek meg a helyes PBO-k?
Что делать с игроками с неправильными аддонами?
+ Cosa fare con giocatori che non hanno i PBO corretti?
Warn once
@@ -523,6 +527,7 @@
Avertir une fois
Egyszeri figyelmeztetés
Предупредить один раз
+ Avverti una volta
Warn (permanent)
@@ -534,6 +539,7 @@
Avertir (permanent)
Figyelmeztetés (tartós)
Предупреждать (постоянно)
+ Avverti (permanente)
Kick
@@ -545,6 +551,7 @@
Ejecter
Kirúgás
Кикнуть
+ Kick
Check all addons
@@ -556,6 +563,7 @@
Vérifier tous les addons
Összes bővítmény ellenőrzése
Проверять все аддоны
+ Controlla tutti gli addon
Check all addons instead of only those of ACE?
@@ -567,6 +575,7 @@
Vérifie tous les addons, même ceux qui ne sont pas liés à ACE
Az összes bővítmény ellenőrzése, csak az ACE helyett?
Проверять все аддоны, а не только ACE?
+ Controlla tutti gli addon invece dei soli addon ACE?
Whitelist
@@ -578,6 +587,7 @@
Liste blanche
Fehérlista
Вайтлист доп. аддонов
+ Lista Bianca
What addons are allowed regardless?
@@ -586,9 +596,10 @@
Welche Addons werden dennoch erlaubt?
Jaké addony jsou povoleny?
Quais addons são permitidos de qualquer maneira?
- Quels addons sont tolérés
+ Quels addons sont tolérés ?
Milyen bővítmények vannak feltétlenül engedélyezve?
Какие аддоны дополнительно разрешены?
+ Quali addon sono permessi in ogni caso?
LSD Vehicles
@@ -600,6 +611,7 @@
LSD - Véhicules
LSD járművek
Транспорт под LSD
+ Veicoli LSD
Adds LSD effect to synchronized vehicle
@@ -611,6 +623,7 @@
Ajoute l'effet LSD aux véhicules synchronisés
LSD-effekt hozzáadása a szinkronizált járművekhez
Добавляет эффект LSD (мигание всеми цветами радуги) синхронизированным транспортным средствам
+ Aggiunge effetti LSD ai veicoli sincronizzati
Toggle Handheld Device
@@ -622,6 +635,7 @@
Allumer l'ordinateur de poche
Kézi eszköz kapcsolása
Включить портативное устройство
+ Apri dispositivo palmare
Close Handheld Device
@@ -633,6 +647,7 @@
Fermer l'ordinateur de poche
Kézi eszköz bezárása
Закрыть портативное устройство
+ Chiudi dispositivo palmare
Cycle Handheld Devices
@@ -644,11 +659,12 @@
Changer (cycle) d'ordinateur de poche
Kézi eszköz váltása
Следующее портативное устройство
+ Cicla tra dispositivi palmari
Disabled
Zakázáno
- Non
+ Désactiver
Deaktiviert
Disattivato
Wyłączone
@@ -659,7 +675,7 @@
Enabled
Povoleno
- Oui
+ Activer
Aktiviert
Attivato
Włączone
@@ -699,6 +715,8 @@
Только в транспорте
Pouze vozidla
Solo vehículos
+ Solo veicoli
+ Vehicules seulement
Do Not Force
@@ -708,14 +726,19 @@
Nevynucovat
Não forçar
Не обязывать
+ Non forzare
+ Ne pas forcer
ACE3 Equipment
+ ACE-Ausrüstung
ACE3 Wyposażenie
Equipamentos ACE3
ACE3 Снаряжение
ACE3 Vybavení
ACE3 Equipo
+ Equipaggiamento ACE3
+ Equipement ACE3
ACE3 Common
@@ -725,6 +748,8 @@
ACE3 Общие
ACE3 Común
ACE3 Obecné
+ Comune ACE3
+ Commun ACE3
ACE3 Weapons
@@ -734,6 +759,8 @@
ACE3 Оружие
ACE3 Zbraně
ACE3 Armas
+ Armi ACE3
+ Armes ACE3
ACE3 Movement
@@ -743,6 +770,8 @@
ACE3 Перемещение
ACE3 Movimiento
ACE3 Pohyb
+ Movimento ACE3
+ Mouvement ACE3
ACE3 Scope Adjustment
@@ -752,6 +781,8 @@
ACE3 Прицелы
ACE3 Nastavení optiky
ACE3 Ajuste de miras
+ Regolazione Ottiche ACE3
+ Ajustement de la lunette ACE3
ACE3 Vehicles
@@ -761,9 +792,18 @@
ACE3 Транспорт
ACE3 Vozidla
ACE3 Vehículos
+ Veicoli ACE3
+ Vehicules ACE3
No Room to unload
+ Kein Platz zum Entladen
+ Brak miejsca na rozładunek
+ Non c'è spazio per scaricare
+ No hay espacio para descargar.
+ Pas de place pour décharger
+ Nedostatek místa k vyložení
+ Sem espaço para descarregar
\ No newline at end of file
diff --git a/addons/common/tests/script_component.hpp b/addons/common/tests/script_component.hpp
deleted file mode 100644
index 6a1bf9154d..0000000000
--- a/addons/common/tests/script_component.hpp
+++ /dev/null
@@ -1 +0,0 @@
-#include "\z\ace\addons\common\script_component.hpp"
diff --git a/addons/common/tests/test_eventHandlers.sqf b/addons/common/tests/test_eventHandlers.sqf
deleted file mode 100644
index 5a75cb0a06..0000000000
--- a/addons/common/tests/test_eventHandlers.sqf
+++ /dev/null
@@ -1,78 +0,0 @@
-// ----------------------------------------------------------------------------
-#define DEBUG_MODE_FULL
-#include "script_component.hpp"
-
-#ifndef TEST_DEFINED_AND_OP
-if (true) exitWith {};
-#endif
-
-// ----------------------------------------------------------------------------
-
-LOG('Testing EventHandlers');
-
-TEST_DEFINED(QFUNC(_handleNetEvent),"");
-TEST_DEFINED(QFUNC(addEventHandler),"");
-TEST_DEFINED(QFUNC(localEvent),"");
-TEST_DEFINED(QFUNC(targetEvent),"");
-TEST_DEFINED(QFUNC(globalEvent),"");
-TEST_DEFINED(QFUNC(serverEvent),"");
-TEST_DEFINED(QFUNC(removeAllEventHandlers),"");
-TEST_DEFINED(QFUNC(removeEventHandler),"");
-
-private _result = ["A", {}] call ace_common_fnc_addEventHandler;
-private _expected = 0;
-TEST_DEFINED_AND_OP(_result,==,_expected,"Adding first A EH");
-
-_result = ["A", {GVAR(test_A2) = _this}] call ace_common_fnc_addEventHandler;
-_expected = 1;
-TEST_DEFINED_AND_OP(_result,==,_expected,"Adding second A EH");
-
-_result = ["A", {GVAR(test_A3) = _this}] call ace_common_fnc_addEventHandler;
-_expected = 2;
-TEST_DEFINED_AND_OP(_result,==,_expected,"Adding third A EH");
-
-GVAR(test_A2) = -1;
-["A", 11] call FUNC(localEvent);
-_expected = 11;
-_result = GVAR(test_A2);
-TEST_DEFINED_AND_OP(_result,==,_expected,"Test Local Event");
-
-//Remove 2nd EH
-["A", 1] call FUNC(removeEventHandler);
-
-GVAR(test_A2) = -1;
-GVAR(test_A3) = -1;
-["A", 22] call FUNC(localEvent);
-_expected = -1;
-_result = GVAR(test_A2);
-TEST_DEFINED_AND_OP(_result,==,_expected,"Test 2nd (removed) EH");
-_expected = 22;
-_result = GVAR(test_A3);
-TEST_DEFINED_AND_OP(_result,==,_expected,"Test 3rd Event");
-
-//Remove All EH:
-["A"] call FUNC(removeAllEventHandlers);
-
-GVAR(test_A3) = -1;
-["A", 77] call FUNC(localEvent);
-_expected = -1;
-_result = GVAR(test_A3);
-TEST_DEFINED_AND_OP(_result,==,_expected,"Test 3rd is removed after removeAll");
-
-//Much harder to test network events
-TRACE_2("testing network events",isServer,isDedicated);
-
-["B", {GVAR(test_B) = _this}] call ace_common_fnc_addEventHandler;
-
-GVAR(test_B) = -1;
-["B", 33] call FUNC(globalEvent);
-_expected = 33;
-_result = GVAR(test_B);
-TEST_DEFINED_AND_OP(_result,==,_expected,"Test globalEvent");
-
-GVAR(test_B) = -1;
-["B", 44] call FUNC(serverEvent);
-_expected = if (isServer) then {44} else {-1};
-_result = GVAR(test_B);
-TEST_DEFINED_AND_OP(_result,==,_expected,"Test serverEvent");
-
diff --git a/addons/concertina_wire/CfgEventHandlers.hpp b/addons/concertina_wire/CfgEventHandlers.hpp
index 026afb4e2d..80711b5390 100644
--- a/addons/concertina_wire/CfgEventHandlers.hpp
+++ b/addons/concertina_wire/CfgEventHandlers.hpp
@@ -1,3 +1,10 @@
+
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE( call COMPILE_FILE(XEH_preInit) );
diff --git a/addons/concertina_wire/CfgVehicles.hpp b/addons/concertina_wire/CfgVehicles.hpp
index 2a0b8cead2..d7f5d0d82a 100644
--- a/addons/concertina_wire/CfgVehicles.hpp
+++ b/addons/concertina_wire/CfgVehicles.hpp
@@ -1,14 +1,16 @@
+class CBA_Extended_EventHandlers;
+
class CfgVehicles {
class Fence;
- class ThingX;
- class NonStrategic;
-
class ACE_ConcertinaWireNoGeo: Fence {
- XEH_ENABLED;
+ class EventHandlers {
+ class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
+ };
+
scope = 1;
displayName = "";
- model = PATHTOF(data\ACE_ConcertinaWireNoGeo.p3d);
+ model = QPATHTOF(data\ACE_ConcertinaWireNoGeo.p3d);
destrType = "DestructTent";
accuracy = 0.3;
mapSize = 2.8;
@@ -73,7 +75,7 @@ class CfgVehicles {
class ACE_ConcertinaWire: ACE_ConcertinaWireNoGeo {
scope = 2;
displayName = $STR_ACE_CONCERTINA_WIRE;
- model = PATHTOF(data\ACE_ConcertinaWire.p3d);
+ model = QPATHTOF(data\ACE_ConcertinaWire.p3d);
EGVAR(logistics_wirecutter,isFence) = 1;
class ACE_Actions {
class ACE_MainActions {
@@ -84,21 +86,26 @@ class CfgVehicles {
selection = "";
displayName = "$STR_ACE_UNROLLWIRE";
distance = 5;
- condition = "true";
+ condition = "alive _target";
statement = QUOTE([ARR_2(_target,_player)] call FUNC(dismount));
showDisabled = 0;
exceptions[] = {};
priority = 5;
- icon = PATHTOF(UI\icon_sandbag_ca.paa);
+ icon = QPATHTOF(UI\icon_sandbag_ca.paa);
};
};
};
};
+
+ class ThingX;
class ACE_ConcertinaWireCoil: ThingX {
- XEH_ENABLED;
+ class EventHandlers {
+ class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
+ };
+
scope = 2;
displayName = $STR_ACE_CONCERTINA_WIRECOIL;
- model = PATHTOF(data\ACE_ConcertinaWireCoil.p3d);
+ model = QPATHTOF(data\ACE_ConcertinaWireCoil.p3d);
mapsize = 0.5;
animated = 0;
nameSound = "fence";
@@ -112,7 +119,7 @@ class CfgVehicles {
accuracy = 1000;
autocenter = 0;
EGVAR(dragging,canDrag) = 1;
- EGVAR(dragging,dragPosition[]) = {0,0.5,0.5};
+ EGVAR(dragging,dragPosition)[] = {0,0.5,0.5};
EGVAR(dragging,dragDirection) = 0;
EGVAR(cargo,size) = 1;
EGVAR(cargo,canLoad) = 1;
@@ -127,17 +134,20 @@ class CfgVehicles {
distance = 4;
condition = "true";
//wait a frame to handle "Do When releasing action menu key" option:
- statement = QUOTE([ARR_2({_this call FUNC(deploy)}, [ARR_2(_target,_player)])] call EFUNC(common,execNextFrame));
+ statement = QUOTE([ARR_2({_this call FUNC(deploy)}, [ARR_2(_target,_player)])] call CBA_fnc_execNextFrame);
showDisabled = 0;
exceptions[] = {};
priority = 5;
- icon = PATHTOF(UI\icon_sandbag_ca.paa);
+ icon = QPATHTOF(UI\icon_sandbag_ca.paa);
};
};
};
};
+ class NonStrategic;
class Land_Razorwire_F: NonStrategic {
- XEH_ENABLED;
+ class EventHandlers {
+ class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
+ };
};
};
diff --git a/addons/concertina_wire/XEH_PREP.hpp b/addons/concertina_wire/XEH_PREP.hpp
new file mode 100644
index 0000000000..34a666a6b9
--- /dev/null
+++ b/addons/concertina_wire/XEH_PREP.hpp
@@ -0,0 +1,7 @@
+
+PREP(deploy);
+PREP(dismount);
+PREP(dismountSuccess);
+PREP(handleDamage);
+PREP(handleKilled);
+PREP(vehicleDamage);
diff --git a/addons/concertina_wire/XEH_postInit.sqf b/addons/concertina_wire/XEH_postInit.sqf
index 58bd1f63c7..7cb8909c81 100644
--- a/addons/concertina_wire/XEH_postInit.sqf
+++ b/addons/concertina_wire/XEH_postInit.sqf
@@ -4,10 +4,10 @@ GVAR(placer) = objNull;
GVAR(deployPFH) = -1;
// Deploy concertina wire if interact menu is opened
-["interactMenuOpened", {
+["ace_interactMenuOpened", {
if (GVAR(deployPFH) != -1) then {
GVAR(placer) setVariable [QGVAR(wireDeployed), true];
};
-}] call EFUNC(common,addEventHandler);
+}] call CBA_fnc_addEventHandler;
-[QGVAR(vehicleDamage), {_this call FUNC(vehicleDamage)}] call EFUNC(common,addEventHandler);
+[QGVAR(vehicleDamage), {_this call FUNC(vehicleDamage)}] call CBA_fnc_addEventHandler;
diff --git a/addons/concertina_wire/XEH_preInit.sqf b/addons/concertina_wire/XEH_preInit.sqf
index 582d642484..a7feade1c3 100644
--- a/addons/concertina_wire/XEH_preInit.sqf
+++ b/addons/concertina_wire/XEH_preInit.sqf
@@ -2,11 +2,6 @@
ADDON = false;
-PREP(deploy);
-PREP(dismount);
-PREP(dismountSuccess);
-PREP(handleDamage);
-PREP(handleKilled);
-PREP(vehicleDamage);
+#include "XEH_PREP.hpp"
ADDON = true;
diff --git a/addons/concertina_wire/XEH_preStart.sqf b/addons/concertina_wire/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/concertina_wire/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/concertina_wire/config.cpp b/addons/concertina_wire/config.cpp
index 06b7bf5d86..2091a5ffc6 100644
--- a/addons/concertina_wire/config.cpp
+++ b/addons/concertina_wire/config.cpp
@@ -6,10 +6,16 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_apl", "ace_interaction"};
- author[] = {"Rocko", "Ruthberg"};
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"Rocko", "Ruthberg"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
#include "CfgEventHandlers.hpp"
-#include "CfgVehicles.hpp"
\ No newline at end of file
+#include "CfgVehicles.hpp"
+
+class ACE_newEvents {
+ interactMenuOpened = "ace_interactMenuOpened";
+};
diff --git a/addons/concertina_wire/functions/fnc_dismount.sqf b/addons/concertina_wire/functions/fnc_dismount.sqf
index 6e8ae8f4f5..50429c054b 100644
--- a/addons/concertina_wire/functions/fnc_dismount.sqf
+++ b/addons/concertina_wire/functions/fnc_dismount.sqf
@@ -18,7 +18,7 @@
if (uiNamespace getVariable [QEGVAR(interact_menu,cursorMenuOpened),false]) exitWith {
[{
_this call FUNC(dismount);
- }, _this] call EFUNC(common,execNextFrame);
+ }, _this] call CBA_fnc_execNextFrame;
};
params ["_wire", "_unit"];
diff --git a/addons/concertina_wire/functions/fnc_handleKilled.sqf b/addons/concertina_wire/functions/fnc_handleKilled.sqf
index ac59798d10..fa03b58972 100644
--- a/addons/concertina_wire/functions/fnc_handleKilled.sqf
+++ b/addons/concertina_wire/functions/fnc_handleKilled.sqf
@@ -14,13 +14,17 @@
*/
#include "script_component.hpp"
params ["_wire", "_killer"];
+TRACE_2("params",_wire,_killer);
private ["_distance", "_vehicle"];
if (isNull _killer) then {
_killer = _wire getVariable ["ace_concertina_wire_lastDamager", objNull];
if (isNull _killer) then {
- _killer = nearestObject [_wire, "car"];
+ private _midPoint = ((_wire selectionPosition "start") vectorAdd (_wire selectionPosition "deploy")) vectorMultiply 0.5;
+ {
+ if ((vectorMagnitude velocity _x) > 0) exitWith {_killer = _x};
+ } forEach (nearestObjects [(_wire modelToWorld _midPoint), ["Car"], 8]);
};
};
if (isNull _killer || {_killer == _wire} || {_killer == gunner (vehicle _killer)}) exitWith {};
@@ -30,4 +34,4 @@ if (_distance > 14 || {_distance < 2}) exitWith {}; // Fix if shooting wire
_vehicle = vehicle _killer;
-[QGVAR(vehicleDamage), [_vehicle], [_wire, _vehicle]] call EFUNC(common,targetEvent);
+[QGVAR(vehicleDamage), [_wire, _vehicle], [_vehicle]] call CBA_fnc_targetEvent;
diff --git a/addons/concertina_wire/functions/fnc_vehicleDamage.sqf b/addons/concertina_wire/functions/fnc_vehicleDamage.sqf
index dffa15b609..0bca28c3cf 100644
--- a/addons/concertina_wire/functions/fnc_vehicleDamage.sqf
+++ b/addons/concertina_wire/functions/fnc_vehicleDamage.sqf
@@ -114,7 +114,7 @@ if (_mode == 1) then {
_vDir = getDir _vehicle;
_vehicle setPosASL (_vPos vectorAdd [-0.35 * sin(_vDir), -0.35 * cos(_vDir), 0]);
// TODO: Needs to be placed in safe distance to wire, so we do not constantly re-spawn new wires
- }, [_vehicle, _wire], 0.1] call EFUNC(common,waitAndExecute);
+ }, [_vehicle, _wire], 0.1] call CBA_fnc_waitAndExecute;
};
//TODO: Create broken geoless wire (two version)
diff --git a/addons/concertina_wire/stringtable.xml b/addons/concertina_wire/stringtable.xml
index 9c171b4d02..616879f31e 100644
--- a/addons/concertina_wire/stringtable.xml
+++ b/addons/concertina_wire/stringtable.xml
@@ -9,7 +9,7 @@
Alambre de espino
Fill barbelé
Ostnatý drát
- Concertina wire
+ Filo spinato di concertina
Concertina wire
Arame farpado
@@ -21,7 +21,7 @@
Bobina de alambre de espino
Bobine de fil barbelé
Svitek ostnatého drátu
- Concertina wire coil
+ Bobina di concertina
Concertina wire coil
Bobina de arame farpado
@@ -31,9 +31,9 @@
Демонтировать колючую проволоку
Zwiń koncentrinę
Desmontar alambre de espino
- Descendre le fil barbelé
+ Démonter le fil barbelé
Svinout ostnatý drát
- Dismount Concertina wire
+ Smonta la concertina
Dismount Concertina wire
Desmontar arame farpado
@@ -45,7 +45,7 @@
Desplegar alambre de espino
Mettre en place le fil barbelé
Rozvinout ostnatý drát
- Deploy Concertina wire
+ Posa il filo di concertina
Deploy Concertina wire
Colocar arame farpado
diff --git a/addons/dagr/CfgEventHandlers.hpp b/addons/dagr/CfgEventHandlers.hpp
index 2a05b72298..ccbe4f4abb 100644
--- a/addons/dagr/CfgEventHandlers.hpp
+++ b/addons/dagr/CfgEventHandlers.hpp
@@ -1,3 +1,10 @@
+
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE( call COMPILE_FILE(XEH_preInit) );
diff --git a/addons/dagr/CfgVehicles.hpp b/addons/dagr/CfgVehicles.hpp
index 7f0a7f6cff..89bfd8af4e 100644
--- a/addons/dagr/CfgVehicles.hpp
+++ b/addons/dagr/CfgVehicles.hpp
@@ -9,7 +9,7 @@ class CfgVehicles {
statement = QUOTE(call FUNC(menuInit));
showDisabled = 0;
priority = 0.1;
- icon = QUOTE(PATHTOF(UI\DAGR_Icon.paa));
+ icon = QPATHTOF(UI\DAGR_Icon.paa);
exceptions[] = {"isNotInside", "isNotSitting"};
class GVAR(toggle) {
displayName = CSTRING(ToggleDAGR);
@@ -17,7 +17,7 @@ class CfgVehicles {
statement = QUOTE(call FUNC(toggleOverlay));
showDisabled = 0;
priority = 0.2;
- icon = QUOTE(PATHTOF(UI\DAGR_Icon.paa));
+ icon = QPATHTOF(UI\DAGR_Icon.paa);
exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"};
};
};
diff --git a/addons/dagr/CfgWeapons.hpp b/addons/dagr/CfgWeapons.hpp
index 9fcd903cdd..b6601e094c 100644
--- a/addons/dagr/CfgWeapons.hpp
+++ b/addons/dagr/CfgWeapons.hpp
@@ -7,9 +7,9 @@ class CfgWeapons {
author[] = {$STR_ACE_Common_ACETeam, "Ruthberg"};
scope = 2;
displayName = CSTRING(Name);
- model = QUOTE(PATHTOF(data\DAGR.p3d));
+ model = QPATHTOF(data\DAGR.p3d);
descriptionShort = CSTRING(Description);
- picture = PATHTOF(UI\DAGR_Icon.paa);
+ picture = QPATHTOF(UI\DAGR_Icon.paa);
icon = "iconObject_circle";
mapSize = 0.034;
class ItemInfo: InventoryItem_Base_F {
diff --git a/addons/dagr/Dialog.hpp b/addons/dagr/Dialog.hpp
index 2faeb03879..52e3a8f683 100644
--- a/addons/dagr/Dialog.hpp
+++ b/addons/dagr/Dialog.hpp
@@ -71,354 +71,354 @@
// Listbox styles
#define LB_TEXTURES 0x10
#define LB_MULTI 0x20
-#define FontM "PuristaMedium"
+#define FontM "RobotoCondensed"
class RscText;
class DAGR_Button {
- idc = -1;
- type = CT_BUTTON;
- style = ST_LEFT;
- font = "PuristaMedium";
- sizeEx = 0.02;
- colorText[] = { 0, 1, 0, 1 };
- colorFocused[] = { 0, 0, 0, 0 }; // border color for focused state
- colorDisabled[] = { 0, 0, 0, 0 }; // text color for disabled state
- colorBackground[] = { 0, 0, 0, 0 };
- colorBackgroundDisabled[] = { 0, 0, 0, 0 }; // background color for disabled state
- colorBackgroundActive[] = { 0, 0, 0, 0 }; // background color for active state
- offsetX = 0;
- offsetY = 0;
- offsetPressedX = 0;
- offsetPressedY = 0;
- colorShadow[] = { 0, 0, 0, 0 };
- colorBorder[] = { 0, 0, 0, 0 };
- borderSize = 0;
- soundEnter[] = { "", 0, 1 }; // no sound
- soundPush[] = { "", 0, 1 };
- soundClick[] = { "", 0, 1 }; // no sound
- soundEscape[] = { "", 0, 1 }; // no sound
- x = 0.5;
- y = 0.5;
- w = 0.07;
- h = 0.05;
- text = "";
- action = "";
+ idc = -1;
+ type = CT_BUTTON;
+ style = ST_LEFT;
+ font = "RobotoCondensed";
+ sizeEx = 0.02;
+ colorText[] = { 0, 1, 0, 1 };
+ colorFocused[] = { 0, 0, 0, 0 }; // border color for focused state
+ colorDisabled[] = { 0, 0, 0, 0 }; // text color for disabled state
+ colorBackground[] = { 0, 0, 0, 0 };
+ colorBackgroundDisabled[] = { 0, 0, 0, 0 }; // background color for disabled state
+ colorBackgroundActive[] = { 0, 0, 0, 0 }; // background color for active state
+ offsetX = 0;
+ offsetY = 0;
+ offsetPressedX = 0;
+ offsetPressedY = 0;
+ colorShadow[] = { 0, 0, 0, 0 };
+ colorBorder[] = { 0, 0, 0, 0 };
+ borderSize = 0;
+ soundEnter[] = { "", 0, 1 }; // no sound
+ soundPush[] = { "", 0, 1 };
+ soundClick[] = { "", 0, 1 }; // no sound
+ soundEscape[] = { "", 0, 1 }; // no sound
+ x = 0.5;
+ y = 0.5;
+ w = 0.07;
+ h = 0.05;
+ text = "";
+ action = "";
};
class DAGR_Menu_Pic {
- type = 0;
- idc = -1;
- style = 48;
- x = 0;
- y = 0;
- w = 0.7;
- h = 1.4;
- text = "";
- colorBackground[] = {};
- colorText[] = {};
- font = "PuristaMedium";
- sizeEx = 0.04;
- waitForLoad = 0;
+ type = 0;
+ idc = -1;
+ style = 48;
+ x = 0;
+ y = 0;
+ w = 0.7;
+ h = 1.4;
+ text = "";
+ colorBackground[] = {};
+ colorText[] = {};
+ font = "RobotoCondensed";
+ sizeEx = 0.04;
+ waitForLoad = 0;
};
class DAGR_Menu_Text {
- type = 0;
- idc = -1;
- style = 0x00;
- x = 0.5;
- y = 0.5;
- w = 0.15;
- h = 0.15;
- colorBackground[] = { 0, 0, 0, 0 };
- colorText[] = { 0.239, 0.216, 0.153, 1 };
- font = "PuristaMedium";
- sizeEx = 0.03;
- waitForLoad = 0;
- text = "";
+ type = 0;
+ idc = -1;
+ style = 0x00;
+ x = 0.5;
+ y = 0.5;
+ w = 0.15;
+ h = 0.15;
+ colorBackground[] = { 0, 0, 0, 0 };
+ colorText[] = { 0.239, 0.216, 0.153, 1 };
+ font = "RobotoCondensed";
+ sizeEx = 0.03;
+ waitForLoad = 0;
+ text = "";
};
class DAGR_Menu {
- idd = 266860;
- movingEnable = false;
- duration = 100000;
- fadein = 0;
- fadeout = 0;
- name = "Dagr_Menu";
- onLoad = "uiNamespace setVariable ['DAGR_Menu', _this select 0]";
+ idd = 266860;
+ movingEnable = false;
+ duration = 100000;
+ fadein = 0;
+ fadeout = 0;
+ name = "Dagr_Menu";
+ onLoad = "uiNamespace setVariable ['DAGR_Menu', _this select 0]";
onUnload = QUOTE(GVAR(PWR) = true); // Simulate pressing the power button
- controls[] = {"DAGR_MENU_UI", "DAGR_PWR_Button", "DAGR_UP_Button", "DAGR_DOWN_Button", "DAGR_LEFT_Button", "DAGR_RIGHT_Button", "DAGR_NEXT_Button",
- "DAGR_SEL_Button", "DAGR_MENU_Button", "DAGR_F1_Button", "DAGR_F2_Button", "DAGR_F3_Button", "DAGR_F1_Text", "DAGR_F2_Text", "DAGR_F3_Text", "DAGR_MENU_OPTION0",
- "DAGR_MENU_OPTION1", "DAGR_MENU_OPTION2", "DAGR_MENU_OPTION3", "DAGR_MENU_OPTION4", "DAGR_MENU_SELECTION0", "DAGR_MENU_SELECTION1", "DAGR_MENU_SELECTION2",
- "DAGR_MENU_SELECTION3", "DAGR_MENU_SELECTION4", "DAGR_MENU_Main_Text", "DAGR_MENU_PSELECTION1", "DAGR_MENU_PSELECTION2", "DAGR_MENU_PSELECTION3",
- "DAGR_MENU_PSELECTION4", "DAGR_MENU_PSELECTION5", "DAGR_MENU_PSELECTION6","DAGR_MENU_PSELECTION7", "DAGR_MENU_PSELECTION8"};
+ controls[] = {"DAGR_MENU_UI", "DAGR_PWR_Button", "DAGR_UP_Button", "DAGR_DOWN_Button", "DAGR_LEFT_Button", "DAGR_RIGHT_Button", "DAGR_NEXT_Button",
+ "DAGR_SEL_Button", "DAGR_MENU_Button", "DAGR_F1_Button", "DAGR_F2_Button", "DAGR_F3_Button", "DAGR_F1_Text", "DAGR_F2_Text", "DAGR_F3_Text", "DAGR_MENU_OPTION0",
+ "DAGR_MENU_OPTION1", "DAGR_MENU_OPTION2", "DAGR_MENU_OPTION3", "DAGR_MENU_OPTION4", "DAGR_MENU_SELECTION0", "DAGR_MENU_SELECTION1", "DAGR_MENU_SELECTION2",
+ "DAGR_MENU_SELECTION3", "DAGR_MENU_SELECTION4", "DAGR_MENU_Main_Text", "DAGR_MENU_PSELECTION1", "DAGR_MENU_PSELECTION2", "DAGR_MENU_PSELECTION3",
+ "DAGR_MENU_PSELECTION4", "DAGR_MENU_PSELECTION5", "DAGR_MENU_PSELECTION6","DAGR_MENU_PSELECTION7", "DAGR_MENU_PSELECTION8"};
- class DAGR_MENU_UI : DAGR_Menu_Pic {
- idc = 266861;
- x = 0.175;
- y = -0.173;
- text = QUOTE(PATHTOF(UI\dagr_menu.paa));
- sizeEx = 0.1;
- };
+ class DAGR_MENU_UI : DAGR_Menu_Pic {
+ idc = 266861;
+ x = 0.175;
+ y = -0.173;
+ text = QPATHTOF(UI\dagr_menu.paa);
+ sizeEx = 0.1;
+ };
- class DAGR_PWR_Button : DAGR_Button {
- idc = 266863;
- action = QUOTE(GVAR(PWR) = true);
- x = 0.40;
- y = 0.65;
- };
+ class DAGR_PWR_Button : DAGR_Button {
+ idc = 266863;
+ action = QUOTE(GVAR(PWR) = true);
+ x = 0.40;
+ y = 0.65;
+ };
- class DAGR_UP_Button : DAGR_Button {
- idc = 266864;
- action = QUOTE(GVAR(UP) = true);
- x = 0.50;
- y = 0.675;
- };
+ class DAGR_UP_Button : DAGR_Button {
+ idc = 266864;
+ action = QUOTE(GVAR(UP) = true);
+ x = 0.50;
+ y = 0.675;
+ };
- class DAGR_DOWN_Button : DAGR_Button {
- idc = 266865;
- action = QUOTE(GVAR(DOWN) = true);
- x = 0.50;
- y = 0.81;
- };
+ class DAGR_DOWN_Button : DAGR_Button {
+ idc = 266865;
+ action = QUOTE(GVAR(DOWN) = true);
+ x = 0.50;
+ y = 0.81;
+ };
- class DAGR_LEFT_Button : DAGR_Button {
- idc = 266866;
- action = QUOTE(GVAR(LEFT) = true);
- x = 0.40;
- y = 0.735;
- w = 0.05;
- h = 0.07;
- };
+ class DAGR_LEFT_Button : DAGR_Button {
+ idc = 266866;
+ action = QUOTE(GVAR(LEFT) = true);
+ x = 0.40;
+ y = 0.735;
+ w = 0.05;
+ h = 0.07;
+ };
- class DAGR_RIGHT_Button : DAGR_Button {
- idc = 266867;
- action = QUOTE(GVAR(RIGHT) = true);
- x = 0.62;
- y = 0.735;
- w = 0.05;
- h = 0.07;
- };
+ class DAGR_RIGHT_Button : DAGR_Button {
+ idc = 266867;
+ action = QUOTE(GVAR(RIGHT) = true);
+ x = 0.62;
+ y = 0.735;
+ w = 0.05;
+ h = 0.07;
+ };
- class DAGR_NEXT_Button : DAGR_Button {
- idc = 266868;
- action = QUOTE(DAGR_NEXT = true);
- x = 0.60;
- y = 0.65;
- };
+ class DAGR_NEXT_Button : DAGR_Button {
+ idc = 266868;
+ action = QUOTE(DAGR_NEXT = true);
+ x = 0.60;
+ y = 0.65;
+ };
- class DAGR_SEL_Button : DAGR_Button {
- idc = 266869;
- action = QUOTE(GVAR(SEL) = true);
- x = 0.54;
- y = 0.735;
- w = 0.06;
- h = 0.06;
- };
+ class DAGR_SEL_Button : DAGR_Button {
+ idc = 266869;
+ action = QUOTE(GVAR(SEL) = true);
+ x = 0.54;
+ y = 0.735;
+ w = 0.06;
+ h = 0.06;
+ };
- class DAGR_MENU_Button : DAGR_Button {
- idc = 266870;
- action = QUOTE(GVAR(MENU_B) = true);
- x = 0.46;
- y = 0.735;
- w = 0.06;
- h = 0.06;
- };
+ class DAGR_MENU_Button : DAGR_Button {
+ idc = 266870;
+ action = QUOTE(GVAR(MENU_B) = true);
+ x = 0.46;
+ y = 0.735;
+ w = 0.06;
+ h = 0.06;
+ };
- class DAGR_F1_Button : DAGR_Button {
- idc = 266871;
- action = QUOTE(GVAR(F1) = true);
- x = 0.40;
- y = 0.575;
- };
+ class DAGR_F1_Button : DAGR_Button {
+ idc = 266871;
+ action = QUOTE(GVAR(F1) = true);
+ x = 0.40;
+ y = 0.575;
+ };
- class DAGR_F2_Button : DAGR_Button {
- idc = 266872;
- action = QUOTE(GVAR(F2) = true);
- x = 0.495;
- y = 0.575;
- };
+ class DAGR_F2_Button : DAGR_Button {
+ idc = 266872;
+ action = QUOTE(GVAR(F2) = true);
+ x = 0.495;
+ y = 0.575;
+ };
- class DAGR_F3_Button : DAGR_Button {
- idc = 266873;
- action = QUOTE(GVAR(F3) = true);
- x = 0.59;
- y = 0.575;
- };
+ class DAGR_F3_Button : DAGR_Button {
+ idc = 266873;
+ action = QUOTE(GVAR(F3) = true);
+ x = 0.59;
+ y = 0.575;
+ };
- class DAGR_F1_Text : DAGR_Menu_Text {
- idc = 266874;
- x = 0.388;
- y = 0.38;
- text = "";
- };
+ class DAGR_F1_Text : DAGR_Menu_Text {
+ idc = 266874;
+ x = 0.388;
+ y = 0.38;
+ text = "";
+ };
- class DAGR_F2_Text : DAGR_Menu_Text {
- idc = 266875;
- x = 0.506;
- y = 0.38;
- };
+ class DAGR_F2_Text : DAGR_Menu_Text {
+ idc = 266875;
+ x = 0.506;
+ y = 0.38;
+ };
- class DAGR_F3_Text : DAGR_Menu_Text {
- idc = 266876;
- x = 0.612;
- y = 0.38;
- };
+ class DAGR_F3_Text : DAGR_Menu_Text {
+ idc = 266876;
+ x = 0.612;
+ y = 0.38;
+ };
- class DAGR_MENU_OPTION0 : DAGR_Menu_Text {
- idc = 2668777;
- style = 0x02;
- sizeEx = 0.035;
- x = 0.43;
- y = 0.19;
- };
+ class DAGR_MENU_OPTION0 : DAGR_Menu_Text {
+ idc = 2668777;
+ style = 0x02;
+ sizeEx = 0.035;
+ x = 0.43;
+ y = 0.19;
+ };
- class DAGR_MENU_OPTION1 : DAGR_Menu_Text {
- idc = 2668778;
- style = 0x02;
- sizeEx = 0.035;
- x = 0.43;
- y = 0.225;
- };
+ class DAGR_MENU_OPTION1 : DAGR_Menu_Text {
+ idc = 2668778;
+ style = 0x02;
+ sizeEx = 0.035;
+ x = 0.43;
+ y = 0.225;
+ };
- class DAGR_MENU_OPTION2 : DAGR_Menu_Text {
- idc = 2668779;
- style = 0x02;
- sizeEx = 0.035;
- x = 0.43;
- y = 0.26;
- };
+ class DAGR_MENU_OPTION2 : DAGR_Menu_Text {
+ idc = 2668779;
+ style = 0x02;
+ sizeEx = 0.035;
+ x = 0.43;
+ y = 0.26;
+ };
- class DAGR_MENU_OPTION3 : DAGR_Menu_Text {
- idc = 2668780;
- style = 0x02;
- sizeEx = 0.035;
- x = 0.43;
- y = 0.295;
- };
+ class DAGR_MENU_OPTION3 : DAGR_Menu_Text {
+ idc = 2668780;
+ style = 0x02;
+ sizeEx = 0.035;
+ x = 0.43;
+ y = 0.295;
+ };
- class DAGR_MENU_OPTION4 : DAGR_Menu_Text {
- idc = 2668781;
- style = 0x02;
- sizeEx = 0.035;
- x = 0.43;
- y = 0.33;
- };
- class DAGR_MENU_SELECTION0 : DAGR_Menu_Pic {
- idc = 2668783;
- x = 0.42;
- y = 0.246;
- w = 0.17;
- h = 0.035;
- sizeEx = 0.05;
- };
+ class DAGR_MENU_OPTION4 : DAGR_Menu_Text {
+ idc = 2668781;
+ style = 0x02;
+ sizeEx = 0.035;
+ x = 0.43;
+ y = 0.33;
+ };
+ class DAGR_MENU_SELECTION0 : DAGR_Menu_Pic {
+ idc = 2668783;
+ x = 0.42;
+ y = 0.246;
+ w = 0.17;
+ h = 0.035;
+ sizeEx = 0.05;
+ };
- class DAGR_MENU_SELECTION1 : DAGR_Menu_Pic {
- idc = 2668784;
- x = 0.42;
- y = 0.281;
- w = 0.17;
- h = 0.035;
- sizeEx = 0.05;
- };
+ class DAGR_MENU_SELECTION1 : DAGR_Menu_Pic {
+ idc = 2668784;
+ x = 0.42;
+ y = 0.281;
+ w = 0.17;
+ h = 0.035;
+ sizeEx = 0.05;
+ };
- class DAGR_MENU_SELECTION2 : DAGR_Menu_Pic {
- idc = 2668785;
- x = 0.42;
- y = 0.316;
- w = 0.17;
- h = 0.035;
- sizeEx = 0.05;
- };
+ class DAGR_MENU_SELECTION2 : DAGR_Menu_Pic {
+ idc = 2668785;
+ x = 0.42;
+ y = 0.316;
+ w = 0.17;
+ h = 0.035;
+ sizeEx = 0.05;
+ };
- class DAGR_MENU_SELECTION3 : DAGR_Menu_Pic {
- idc = 2668786;
- x = 0.42;
- y = 0.351;
- w = 0.17;
- h = 0.035;
- sizeEx = 0.05;
- };
+ class DAGR_MENU_SELECTION3 : DAGR_Menu_Pic {
+ idc = 2668786;
+ x = 0.42;
+ y = 0.351;
+ w = 0.17;
+ h = 0.035;
+ sizeEx = 0.05;
+ };
- class DAGR_MENU_SELECTION4 : DAGR_Menu_Pic {
- idc = 2668787;
- x = 0.42;
- y = 0.386;
- w = 0.17;
- h = 0.035;
- sizeEx = 0.05;
- };
+ class DAGR_MENU_SELECTION4 : DAGR_Menu_Pic {
+ idc = 2668787;
+ x = 0.42;
+ y = 0.386;
+ w = 0.17;
+ h = 0.035;
+ sizeEx = 0.05;
+ };
- class DAGR_MENU_Main_Text : DAGR_Menu_Text {
- idc = 2668782;
- style = ST_CENTER;
- x = 0.38;
- y = 0.32;
- w = 0.25;
- h = 0.035;
- sizeEx = 0.04;
- };
+ class DAGR_MENU_Main_Text : DAGR_Menu_Text {
+ idc = 2668782;
+ style = ST_CENTER;
+ x = 0.38;
+ y = 0.32;
+ w = 0.25;
+ h = 0.035;
+ sizeEx = 0.04;
+ };
- class DAGR_MENU_PSELECTION1 : DAGR_Menu_Pic {
- idc = 2668788;
- x = 0.451;
- y = 0.352;
- w = 0.01;
- h = 0.003;
- };
+ class DAGR_MENU_PSELECTION1 : DAGR_Menu_Pic {
+ idc = 2668788;
+ x = 0.451;
+ y = 0.352;
+ w = 0.01;
+ h = 0.003;
+ };
- class DAGR_MENU_PSELECTION2 : DAGR_Menu_Pic {
- idc = 2668789;
- x = 0.465;
- y = 0.352;
- w = 0.01;
- h = 0.003;
- };
+ class DAGR_MENU_PSELECTION2 : DAGR_Menu_Pic {
+ idc = 2668789;
+ x = 0.465;
+ y = 0.352;
+ w = 0.01;
+ h = 0.003;
+ };
- class DAGR_MENU_PSELECTION3 : DAGR_Menu_Pic {
- idc = 2668790;
- x = 0.479;
- y = 0.352;
- w = 0.01;
- h = 0.003;
- };
+ class DAGR_MENU_PSELECTION3 : DAGR_Menu_Pic {
+ idc = 2668790;
+ x = 0.479;
+ y = 0.352;
+ w = 0.01;
+ h = 0.003;
+ };
- class DAGR_MENU_PSELECTION4 : DAGR_Menu_Pic {
- idc = 2668791;
- x = 0.493;
- y = 0.352;
- w = 0.01;
- h = 0.003;
- };
+ class DAGR_MENU_PSELECTION4 : DAGR_Menu_Pic {
+ idc = 2668791;
+ x = 0.493;
+ y = 0.352;
+ w = 0.01;
+ h = 0.003;
+ };
- class DAGR_MENU_PSELECTION5 : DAGR_Menu_Pic {
- idc = 2668792;
- x = 0.507;
- y = 0.352;
- w = 0.01;
- h = 0.003;
- };
+ class DAGR_MENU_PSELECTION5 : DAGR_Menu_Pic {
+ idc = 2668792;
+ x = 0.507;
+ y = 0.352;
+ w = 0.01;
+ h = 0.003;
+ };
- class DAGR_MENU_PSELECTION6 : DAGR_Menu_Pic {
- idc = 2668793;
- x = 0.521;
- y = 0.352;
- w = 0.01;
- h = 0.003;
- };
+ class DAGR_MENU_PSELECTION6 : DAGR_Menu_Pic {
+ idc = 2668793;
+ x = 0.521;
+ y = 0.352;
+ w = 0.01;
+ h = 0.003;
+ };
- class DAGR_MENU_PSELECTION7 : DAGR_Menu_Pic {
- idc = 2668794;
- x = 0.535;
- y = 0.352;
- w = 0.01;
- h = 0.003;
- };
+ class DAGR_MENU_PSELECTION7 : DAGR_Menu_Pic {
+ idc = 2668794;
+ x = 0.535;
+ y = 0.352;
+ w = 0.01;
+ h = 0.003;
+ };
- class DAGR_MENU_PSELECTION8 : DAGR_Menu_Pic {
- idc = 2668795;
- x = 0.549;
- y = 0.352;
- w = 0.01;
- h = 0.003;
- };
+ class DAGR_MENU_PSELECTION8 : DAGR_Menu_Pic {
+ idc = 2668795;
+ x = 0.549;
+ y = 0.352;
+ w = 0.01;
+ h = 0.003;
+ };
};
diff --git a/addons/dagr/RscTitles.hpp b/addons/dagr/RscTitles.hpp
index 8467c70f66..ab70517c9a 100644
--- a/addons/dagr/RscTitles.hpp
+++ b/addons/dagr/RscTitles.hpp
@@ -1,95 +1,95 @@
class RscTitles {
- class DAGR_Text {
- type = 0;
- idc = -1;
- style = 0x01;
- x = 0;
- y = 0;
- w = 0.15;
- h = 0.050;
- text = "";
- colorBackground[] = { 0, 0, 0, 0 };
- colorText[] = { 0.239, 0.216, 0.153, 1 };
- font = "PuristaMedium";
- sizeEx = 0.04;
- waitForLoad = 0;
- };
- class DAGR_Pic {
- type = 0;
- idc = -1;
- style = 48;
- x = 0;
- y = 0;
- w = 0.50;
- h = 0.50;
- text = "";
- colorBackground[] = {};
- colorText[] = {};
- font = "PuristaMedium";
- sizeEx = 0.02;
- waitForLoad = 0;
- };
+ class DAGR_Text {
+ type = 0;
+ idc = -1;
+ style = 0x01;
+ x = 0;
+ y = 0;
+ w = 0.15;
+ h = 0.050;
+ text = "";
+ colorBackground[] = { 0, 0, 0, 0 };
+ colorText[] = { 0.239, 0.216, 0.153, 1 };
+ font = "RobotoCondensed";
+ sizeEx = 0.04;
+ waitForLoad = 0;
+ };
+ class DAGR_Pic {
+ type = 0;
+ idc = -1;
+ style = 48;
+ x = 0;
+ y = 0;
+ w = 0.50;
+ h = 0.50;
+ text = "";
+ colorBackground[] = {};
+ colorText[] = {};
+ font = "RobotoCondensed";
+ sizeEx = 0.02;
+ waitForLoad = 0;
+ };
- class DAGR_Display {
- idd = 266850;
- movingEnable = false;
- duration = 100000;
- fadein = 0;
- fadeout = 0;
- name = "Dagr_Display";
- onLoad="uiNamespace setVariable ['DAGR_Display', _this select 0]";
- controls[] = {"DAGR_UI", "DAGR_Grid", "DAGR_Speed", "DAGR_Elevation", "DAGR_Heading", "DAGR_Time", "DAGR_WP", "DAGR_Bearing", "DAGR_DIST"};
+ class DAGR_Display {
+ idd = 266850;
+ movingEnable = false;
+ duration = 100000;
+ fadein = 0;
+ fadeout = 0;
+ name = "Dagr_Display";
+ onLoad="uiNamespace setVariable ['DAGR_Display', _this select 0]";
+ controls[] = {"DAGR_UI", "DAGR_Grid", "DAGR_Speed", "DAGR_Elevation", "DAGR_Heading", "DAGR_Time", "DAGR_WP", "DAGR_Bearing", "DAGR_DIST"};
- class DAGR_UI : DAGR_Pic {
- idc = 266856;
- x = "(SafeZoneW + SafeZoneX) - 0.45";
- y = "(SafeZoneH + SafeZoneY) - 0.47";
- };
+ class DAGR_UI : DAGR_Pic {
+ idc = 266856;
+ x = "(SafeZoneW + SafeZoneX) - 0.45";
+ y = "(SafeZoneH + SafeZoneY) - 0.47";
+ };
- class DAGR_Grid : DAGR_Text {
- idc = 266851;
- x = "(SafeZoneW + SafeZoneX) - 0.370";// 0.830
- y = "(SafeZoneH + SafeZoneY)- 0.250";// 0.845
- w = 0.25;
- h = 0.06;
- sizeEx = 0.07;
- };
- class DAGR_Speed : DAGR_Text {
- idc = 266852;
- x = "(SafeZoneW + SafeZoneX) - 0.388"; //0.812
- y = "(SafeZoneH + SafeZoneY) - 0.181"; //0.914
- };
- class DAGR_Elevation : DAGR_Text {
- idc = 266853;
- x = "(SafeZoneW + SafeZoneX) - 0.270"; //0.930
- y = "(SafeZoneH + SafeZoneY) - 0.181"; //0.914
- };
- class DAGR_Heading : DAGR_Text {
- idc = 266854;
- x = "(SafeZoneW + SafeZoneX) - 0.413"; //0.787
- y = "(SafeZoneH + SafeZoneY) - 0.1294"; //0.9656
- };
- class DAGR_Time : DAGR_Text {
- idc = 266855;
- x = "(SafeZoneW + SafeZoneX) - 0.275"; //0.925
- y = "(SafeZoneH + SafeZoneY) - 0.129"; //0.965
- };
+ class DAGR_Grid : DAGR_Text {
+ idc = 266851;
+ x = "(SafeZoneW + SafeZoneX) - 0.370";// 0.830
+ y = "(SafeZoneH + SafeZoneY)- 0.250";// 0.845
+ w = 0.25;
+ h = 0.06;
+ sizeEx = 0.07;
+ };
+ class DAGR_Speed : DAGR_Text {
+ idc = 266852;
+ x = "(SafeZoneW + SafeZoneX) - 0.388"; //0.812
+ y = "(SafeZoneH + SafeZoneY) - 0.181"; //0.914
+ };
+ class DAGR_Elevation : DAGR_Text {
+ idc = 266853;
+ x = "(SafeZoneW + SafeZoneX) - 0.270"; //0.930
+ y = "(SafeZoneH + SafeZoneY) - 0.181"; //0.914
+ };
+ class DAGR_Heading : DAGR_Text {
+ idc = 266854;
+ x = "(SafeZoneW + SafeZoneX) - 0.413"; //0.787
+ y = "(SafeZoneH + SafeZoneY) - 0.1294"; //0.9656
+ };
+ class DAGR_Time : DAGR_Text {
+ idc = 266855;
+ x = "(SafeZoneW + SafeZoneX) - 0.275"; //0.925
+ y = "(SafeZoneH + SafeZoneY) - 0.129"; //0.965
+ };
- class DAGR_WP : DAGR_Text {
- idc = 266857;
- x = "(SafeZoneW + SafeZoneX) - 0.235"; //0.965
- y = "(SafeZoneH + SafeZoneY) - 0.181"; //0.914
- };
+ class DAGR_WP : DAGR_Text {
+ idc = 266857;
+ x = "(SafeZoneW + SafeZoneX) - 0.235"; //0.965
+ y = "(SafeZoneH + SafeZoneY) - 0.181"; //0.914
+ };
- class DAGR_Bearing : DAGR_Text {
- idc = 266858;
- x = "(SafeZoneW + SafeZoneX) - 0.413"; //0.787
- y = "(SafeZoneH + SafeZoneY) - 0.181"; //0.914
- };
- class DAGR_DIST : DAGR_Text {
- idc = 266859;
- x = "(SafeZoneW + SafeZoneX) - 0.265"; //0.935
- y = "(SafeZoneH + SafeZoneY) - 0.129"; //0.965
- };
- };
+ class DAGR_Bearing : DAGR_Text {
+ idc = 266858;
+ x = "(SafeZoneW + SafeZoneX) - 0.413"; //0.787
+ y = "(SafeZoneH + SafeZoneY) - 0.181"; //0.914
+ };
+ class DAGR_DIST : DAGR_Text {
+ idc = 266859;
+ x = "(SafeZoneW + SafeZoneX) - 0.265"; //0.935
+ y = "(SafeZoneH + SafeZoneY) - 0.129"; //0.965
+ };
+ };
};
diff --git a/addons/dagr/XEH_PREP.hpp b/addons/dagr/XEH_PREP.hpp
new file mode 100644
index 0000000000..746a36de38
--- /dev/null
+++ b/addons/dagr/XEH_PREP.hpp
@@ -0,0 +1,7 @@
+
+PREP(handleRangeFinderData);
+PREP(menuInit);
+PREP(outputData);
+PREP(outputVector);
+PREP(outputWP);
+PREP(toggleOverlay);
diff --git a/addons/dagr/XEH_postInit.sqf b/addons/dagr/XEH_postInit.sqf
index 883a73d418..4c3fce167d 100644
--- a/addons/dagr/XEH_postInit.sqf
+++ b/addons/dagr/XEH_postInit.sqf
@@ -30,4 +30,4 @@ GVAR(vectorConnected) = false;
GVAR(noVectorData) = true;
GVAR(vectorGrid) = "00000000";
-["RangerfinderData", FUNC(handleRangeFinderData)] call EFUNC(common,addEventHandler);
+[QEGVAR(vector,rangefinderData), FUNC(handleRangeFinderData)] call CBA_fnc_addEventHandler;
diff --git a/addons/dagr/XEH_preInit.sqf b/addons/dagr/XEH_preInit.sqf
index 7c61d71775..a7feade1c3 100644
--- a/addons/dagr/XEH_preInit.sqf
+++ b/addons/dagr/XEH_preInit.sqf
@@ -2,11 +2,6 @@
ADDON = false;
-PREP(handleRangeFinderData);
-PREP(menuInit);
-PREP(outputData);
-PREP(outputVector);
-PREP(outputWP);
-PREP(toggleOverlay);
+#include "XEH_PREP.hpp"
ADDON = true;
diff --git a/addons/dagr/XEH_preStart.sqf b/addons/dagr/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/dagr/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/dagr/config.cpp b/addons/dagr/config.cpp
index 9f46660aaa..97d5300067 100644
--- a/addons/dagr/config.cpp
+++ b/addons/dagr/config.cpp
@@ -6,7 +6,9 @@ class CfgPatches {
weapons[] = {"ACE_DAGR"};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_weather"};
- author[] = {"Rosuto", "Ruthberg"};
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"Rosuto", "Ruthberg"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
@@ -16,3 +18,7 @@ class CfgPatches {
#include "CfgWeapons.hpp"
#include "Dialog.hpp"
#include "RscTitles.hpp"
+
+class ACE_newEvents {
+ RangerfinderData = QEGVAR(vector,rangefinderData);
+};
diff --git a/addons/dagr/functions/fnc_menuInit.sqf b/addons/dagr/functions/fnc_menuInit.sqf
index e4fb341537..9bf36c393c 100644
--- a/addons/dagr/functions/fnc_menuInit.sqf
+++ b/addons/dagr/functions/fnc_menuInit.sqf
@@ -134,19 +134,19 @@ GVAR(menuRun) = true;
GVAR(vectorConnected) = false;
if (!GVAR(busy)) then {
GVAR(busy) = true;
- GVAR(busyTimer) = ACE_time;
+ GVAR(busyTimer) = CBA_missionTime;
};
(__dsp displayCtrl __mainText) ctrlSetText "Acquiring Data.";
- if (ACE_time - GVAR(busyTimer) > 0.5) then {
+ if (CBA_missionTime - GVAR(busyTimer) > 0.5) then {
(__dsp displayCtrl __mainText) ctrlSetText "Acquiring Data..";
};
- if (ACE_time - GVAR(busyTimer) > 1.0) then {
+ if (CBA_missionTime - GVAR(busyTimer) > 1.0) then {
(__dsp displayCtrl __mainText) ctrlSetText "Acquiring Data...";
};
- if (ACE_time - GVAR(busyTimer) > 1.5) then {
+ if (CBA_missionTime - GVAR(busyTimer) > 1.5) then {
(__dsp displayCtrl __mainText) ctrlSetText "Position Acquired";
};
- if (ACE_time - GVAR(busyTimer) > 3.0) then {
+ if (CBA_missionTime - GVAR(busyTimer) > 3.0) then {
GVAR(busy) = false;
};
};
@@ -156,7 +156,7 @@ GVAR(menuRun) = true;
if (!GVAR(busy)) then {
GVAR(showNoWaypointsFound) = true;
GVAR(busy) = true;
- GVAR(busyTimer) = ACE_time;
+ GVAR(busyTimer) = CBA_missionTime;
};
} else {
GVAR(menu) = "goto_wp"; GVAR(numSelections) = GVAR(numWaypoints); GVAR(selection) = 0;
@@ -168,7 +168,7 @@ GVAR(menuRun) = true;
};
};
if (GVAR(busy) && GVAR(showNoWaypointsFound)) then {
- if (ACE_time - GVAR(busyTimer) > 2) then {
+ if (CBA_missionTime - GVAR(busyTimer) > 2) then {
GVAR(showNoWaypointsFound) = false;
GVAR(busy) = false;
};
@@ -179,7 +179,7 @@ GVAR(menuRun) = true;
(__dsp displayCtrl __Option2) ctrlSetText "WP LIST";
(__dsp displayCtrl __Option3) ctrlSetText "CONNECT TO";
(__dsp displayCtrl __Option4) ctrlSetText "OPTIONS";
- (__dsp displayCtrl (__Selection0 + GVAR(selection))) ctrlSetText QUOTE(PATHTOF(UI\DAGR_Selection.paa));
+ (__dsp displayCtrl (__Selection0 + GVAR(selection))) ctrlSetText QPATHTOF(UI\DAGR_Selection.paa);
};
};
case "goto_wp": {
@@ -190,7 +190,7 @@ GVAR(menuRun) = true;
(__dsp displayCtrl __Option3) ctrlSetText GVAR(wpString3);
(__dsp displayCtrl __Option4) ctrlSetText GVAR(wpString4);
if (GVAR(numSelections) > 0) then {
- (__dsp displayCtrl (__Selection0 + GVAR(selection))) ctrlSetText QUOTE(PATHTOF(UI\DAGR_Selection.paa));
+ (__dsp displayCtrl (__Selection0 + GVAR(selection))) ctrlSetText QPATHTOF(UI\DAGR_Selection.paa);
};
};
if (GVAR(SEL)) then {
@@ -206,21 +206,21 @@ GVAR(menuRun) = true;
if (!GVAR(busy)) then {
GVAR(showInfoUpdating) = true;
GVAR(busy) = true;
- GVAR(busyTimer) = ACE_time;
+ GVAR(busyTimer) = CBA_missionTime;
};
};
if (GVAR(busy) && GVAR(showInfoUpdating)) then {
(__dsp displayCtrl __mainText) ctrlSetText "Info Update.";
- if (ACE_time - GVAR(busyTimer) > 1) then {
+ if (CBA_missionTime - GVAR(busyTimer) > 1) then {
(__dsp displayCtrl __mainText) ctrlSetText "Info Update..";
};
- if (ACE_time - GVAR(busyTimer) > 1.2) then {
+ if (CBA_missionTime - GVAR(busyTimer) > 1.2) then {
(__dsp displayCtrl __mainText) ctrlSetText "Info Update...";
};
- if (ACE_time - GVAR(busyTimer) > 1.4) then {
+ if (CBA_missionTime - GVAR(busyTimer) > 1.4) then {
(__dsp displayCtrl __mainText) ctrlSetText "Info Updated";
};
- if (ACE_time - GVAR(busyTimer) > 2.9) then {
+ if (CBA_missionTime - GVAR(busyTimer) > 2.9) then {
GVAR(showInfoUpdating) = false;
GVAR(busy) = false;
};
@@ -238,7 +238,7 @@ GVAR(menuRun) = true;
(__dsp displayCtrl __F2) ctrlSetText "Edit";
(__dsp displayCtrl __F3) ctrlSetText "Delete";
if (GVAR(numSelections) > 0) then {
- (__dsp displayCtrl (__Selection0 + GVAR(selection))) ctrlSetText QUOTE(PATHTOF(UI\DAGR_Selection.paa));
+ (__dsp displayCtrl (__Selection0 + GVAR(selection))) ctrlSetText QPATHTOF(UI\DAGR_Selection.paa);
};
};
if (GVAR(F3) && GVAR(numWaypoints) > 0) then {
@@ -289,21 +289,21 @@ GVAR(menuRun) = true;
GVAR(numSelections) = GVAR(numWaypoints);
GVAR(showDeleting) = true;
GVAR(busy) = true;
- GVAR(busyTimer) = ACE_time;
+ GVAR(busyTimer) = CBA_missionTime;
};
};
if (GVAR(busy) && GVAR(showDeleting)) then {
(__dsp displayCtrl __mainText) ctrlSetText "Deleting.";
- if (ACE_time - GVAR(busyTimer) > 1) then {
+ if (CBA_missionTime - GVAR(busyTimer) > 1) then {
(__dsp displayCtrl __mainText) ctrlSetText "Deleting..";
};
- if (ACE_time - GVAR(busyTimer) > 1.2) then {
+ if (CBA_missionTime - GVAR(busyTimer) > 1.2) then {
(__dsp displayCtrl __mainText) ctrlSetText "Deleting...";
};
- if (ACE_time - GVAR(busyTimer) > 1.4) then {
+ if (CBA_missionTime - GVAR(busyTimer) > 1.4) then {
(__dsp displayCtrl __mainText) ctrlSetText "Waypoint Deleted";
};
- if (ACE_time - GVAR(busyTimer) > 2.9) then {
+ if (CBA_missionTime - GVAR(busyTimer) > 2.9) then {
GVAR(showDeleting) = false;
GVAR(busy) = false;
};
@@ -313,7 +313,7 @@ GVAR(menuRun) = true;
if (!GVAR(busy)) then {
GVAR(showOutOfSpace) = true;
GVAR(busy) = true;
- GVAR(busyTimer) = ACE_time;
+ GVAR(busyTimer) = CBA_missionTime;
};
} else {
GVAR(digit1) = 0;
@@ -330,7 +330,7 @@ GVAR(menuRun) = true;
};
if (GVAR(busy) && GVAR(showOutOfSpace)) then {
(__dsp displayCtrl __mainText) ctrlSetText "Out of Space";
- if (ACE_time - GVAR(busyTimer) > 2.5) then {
+ if (CBA_missionTime - GVAR(busyTimer) > 2.5) then {
GVAR(showOutOfSpace) = false;
GVAR(busy) = false;
};
@@ -399,7 +399,7 @@ GVAR(menuRun) = true;
(__dsp displayCtrl __F3) ctrlSetText "Cancel";
GVAR(output) = str GVAR(digit1) + str GVAR(digit2) + str GVAR(digit3) + str GVAR(digit4) + str GVAR(digit5) + str GVAR(digit6) + str GVAR(digit7) + str GVAR(digit8);
(__dsp displayCtrl __mainText) ctrlSetText GVAR(output);
- (__dsp displayCtrl __PSelection1 + GVAR(pointer)) ctrlSetText QUOTE(PATHTOF(UI\DAGR_PSelection.paa));
+ (__dsp displayCtrl __PSelection1 + GVAR(pointer)) ctrlSetText QPATHTOF(UI\DAGR_PSelection.paa);
};
if (GVAR(F1)) then {
if (!GVAR(busy)) then {
@@ -425,22 +425,22 @@ GVAR(menuRun) = true;
};
};
GVAR(busy) = true;
- GVAR(busyTimer) = ACE_time;
+ GVAR(busyTimer) = CBA_missionTime;
};
(__dsp displayCtrl __F1) ctrlSetText "";
(__dsp displayCtrl __F2) ctrlSetText "";
(__dsp displayCtrl __F3) ctrlSetText "";
(__dsp displayCtrl __mainText) ctrlSetText "Saving.";
- if (ACE_time - GVAR(busyTimer) > 1) then {
+ if (CBA_missionTime - GVAR(busyTimer) > 1) then {
(__dsp displayCtrl __mainText) ctrlSetText "Saving..";
};
- if (ACE_time - GVAR(busyTimer) > 1.2) then {
+ if (CBA_missionTime - GVAR(busyTimer) > 1.2) then {
(__dsp displayCtrl __mainText) ctrlSetText "Saving...";
};
- if (ACE_time - GVAR(busyTimer) > 1.4) then {
+ if (CBA_missionTime - GVAR(busyTimer) > 1.4) then {
(__dsp displayCtrl __mainText) ctrlSetText "Waypoint Saved";
};
- if (ACE_time - GVAR(busyTimer) > 2.9) then {
+ if (CBA_missionTime - GVAR(busyTimer) > 2.9) then {
GVAR(edit) = false;
GVAR(add) = false;
GVAR(busy) = false;
@@ -464,7 +464,7 @@ GVAR(menuRun) = true;
if (GVAR(F3)) then {
if (!GVAR(busy)) then {
GVAR(busy) = true;
- GVAR(busyTimer) = ACE_time;
+ GVAR(busyTimer) = CBA_missionTime;
} else {
(__dsp displayCtrl __F1) ctrlSetText "Save";
(__dsp displayCtrl __F2) ctrlSetText "Vector";
@@ -472,7 +472,7 @@ GVAR(menuRun) = true;
GVAR(output) = str GVAR(digit1) + str GVAR(digit2) + str GVAR(digit3) + str GVAR(digit4) + str GVAR(digit5) + str GVAR(digit6) + str GVAR(digit7) + str GVAR(digit8);
(__dsp displayCtrl __mainText) ctrlSetText GVAR(output);
};
- if (ACE_time - GVAR(busyTimer) > 0.1) then {
+ if (CBA_missionTime - GVAR(busyTimer) > 0.1) then {
GVAR(add) = false;
GVAR(edit) = false;
GVAR(busy) = false;
@@ -507,22 +507,22 @@ GVAR(menuRun) = true;
case "connect": {
if (!GVAR(busy)) then {
(__dsp displayCtrl __Option0) ctrlSetText "Vector 21";
- (__dsp displayCtrl __Selection0) ctrlSetText QUOTE(PATHTOF(UI\DAGR_Selection.paa));
+ (__dsp displayCtrl __Selection0) ctrlSetText QPATHTOF(UI\DAGR_Selection.paa);
};
if (GVAR(SEL)) then {
if (!GVAR(busy)) then {
GVAR(busy) = true;
- GVAR(busyTimer) = ACE_time;
+ GVAR(busyTimer) = CBA_missionTime;
};
(__dsp displayCtrl __mainText) ctrlSetText "Connecting.";
- if (ACE_time - GVAR(busyTimer) > 0.2) then {
+ if (CBA_missionTime - GVAR(busyTimer) > 0.2) then {
(__dsp displayCtrl __mainText) ctrlSetText "Connecting..";
};
- if (ACE_time - GVAR(busyTimer) > 0.4) then {
+ if (CBA_missionTime - GVAR(busyTimer) > 0.4) then {
(__dsp displayCtrl __mainText) ctrlSetText "Connecting...";
};
- if (ACE_time - GVAR(busyTimer) > 0.6) then {
- if (ACE_player hasWeapon "ACE_Vector") then {
+ if (CBA_missionTime - GVAR(busyTimer) > 0.6) then {
+ if (({_x isKindOf ["ACE_Vector", configFile >> "CfgWeapons"]} count (weapons ACE_player)) > 0) then {
GVAR(displaySelection) = "VECTOR";
(__dsp displayCtrl __mainText) ctrlSetText "Vector Connected";
GVAR(vectorConnected) = true;
@@ -531,7 +531,7 @@ GVAR(menuRun) = true;
GVAR(vectorConnected) = false;
};
};
- if (ACE_time - GVAR(busyTimer) > 3.1) then {
+ if (CBA_missionTime - GVAR(busyTimer) > 3.1) then {
GVAR(busy) = false;
if (GVAR(vectorConnected)) then {
GVAR(menu) = "main"; GVAR(numSelections) = 5;
@@ -542,7 +542,7 @@ GVAR(menuRun) = true;
case "options": {
(__dsp displayCtrl __Option0) ctrlSetText "Signal Delay";
(__dsp displayCtrl __Option1) ctrlSetText (if (GVAR(useDegrees)) then { "Direction: Deg" } else { "Direction: MIL" });
- (__dsp displayCtrl (__Selection0 + GVAR(selection))) ctrlSetText QUOTE(PATHTOF(UI\DAGR_Selection.paa));
+ (__dsp displayCtrl (__Selection0 + GVAR(selection))) ctrlSetText QPATHTOF(UI\DAGR_Selection.paa);
if (GVAR(SEL)) then {
GVAR(vectorConnected) = false;
switch (GVAR(selection)) do {
@@ -556,19 +556,19 @@ GVAR(menuRun) = true;
GVAR(updateInterval) = GVAR(tmpUpdateRate);
if (!GVAR(busy)) then {
GVAR(busy) = true;
- GVAR(busyTimer) = ACE_time;
+ GVAR(busyTimer) = CBA_missionTime;
};
(__dsp displayCtrl __mainText) ctrlSetText "Updating.";
- if (ACE_time - GVAR(busyTimer) > 0.2) then {
+ if (CBA_missionTime - GVAR(busyTimer) > 0.2) then {
(__dsp displayCtrl __mainText) ctrlSetText "Updating..";
};
- if (ACE_time - GVAR(busyTimer) > 0.4) then {
+ if (CBA_missionTime - GVAR(busyTimer) > 0.4) then {
(__dsp displayCtrl __mainText) ctrlSetText "Updating...";
};
- if (ACE_time - GVAR(busyTimer) > 0.6) then {
+ if (CBA_missionTime - GVAR(busyTimer) > 0.6) then {
(__dsp displayCtrl __mainText) ctrlSetText "Update Success";
};
- if (ACE_time - GVAR(busyTimer) > 2.1) then {
+ if (CBA_missionTime - GVAR(busyTimer) > 2.1) then {
GVAR(busy) = false;
GVAR(menu) = "options"; GVAR(numSelections) = 2;
};
diff --git a/addons/dagr/functions/fnc_outputData.sqf b/addons/dagr/functions/fnc_outputData.sqf
index 63350c71a3..a981514e54 100644
--- a/addons/dagr/functions/fnc_outputData.sqf
+++ b/addons/dagr/functions/fnc_outputData.sqf
@@ -25,7 +25,7 @@
#define __timeControl (__display displayCtrl 266855)
#define __background (__display displayCtrl 266856)
-__background ctrlSetText QUOTE(PATHTOF(UI\dagr_gps.paa));
+__background ctrlSetText QPATHTOF(UI\dagr_gps.paa);
if (GVAR(outputPFH) != -1) exitWith {};
diff --git a/addons/dagr/functions/fnc_outputVector.sqf b/addons/dagr/functions/fnc_outputVector.sqf
index ef93a53d8a..23996c46b4 100644
--- a/addons/dagr/functions/fnc_outputVector.sqf
+++ b/addons/dagr/functions/fnc_outputVector.sqf
@@ -27,7 +27,7 @@ private ["_xGrid", "_yGrid", "_dagrGrid", "_bearing", "_dagrDist", "_dagrElevati
#define __timeControl (__display displayCtrl 266855)
#define __background (__display displayCtrl 266856)
-__background ctrlSetText QUOTE(PATHTOF(UI\dagr_vector.paa));
+__background ctrlSetText QPATHTOF(UI\dagr_vector.paa);
if (GVAR(noVectorData)) exitWith {};
GVAR(LAZPOS) params ["_lazPosX", "_lazPosY", "_lazPosZ"];
diff --git a/addons/dagr/functions/fnc_outputWP.sqf b/addons/dagr/functions/fnc_outputWP.sqf
index 204a5ef556..2d1aee4d4e 100644
--- a/addons/dagr/functions/fnc_outputWP.sqf
+++ b/addons/dagr/functions/fnc_outputWP.sqf
@@ -25,7 +25,7 @@
#define __timeControl (__display displayCtrl 266859)
#define __background (__display displayCtrl 266856)
-__background ctrlSetText QUOTE(PATHTOF(UI\dagr_wp.paa));
+__background ctrlSetText QPATHTOF(UI\dagr_wp.paa);
if (GVAR(outputPFH) != -1) exitWith {};
diff --git a/addons/dagr/initKeybinds.sqf b/addons/dagr/initKeybinds.sqf
index 66bd08190e..74a522e87f 100644
--- a/addons/dagr/initKeybinds.sqf
+++ b/addons/dagr/initKeybinds.sqf
@@ -37,7 +37,7 @@ _conditonCode = {
_toggleCode = {
// Conditions: canInteract
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {};
-
+
// Statement
[] call FUNC(toggleOverlay);
if (!GVAR(run)) then {
@@ -56,4 +56,4 @@ _closeCode = {
closeDialog 0;
};
};
-["DAGR", QUOTE(PATHTOF(UI\DAGR_Icon.paa)), _conditonCode, _toggleCode, _closeCode] call EFUNC(common,deviceKeyRegisterNew);
+["DAGR", QPATHTOF(UI\DAGR_Icon.paa), _conditonCode, _toggleCode, _closeCode] call EFUNC(common,deviceKeyRegisterNew);
diff --git a/addons/dagr/stringtable.xml b/addons/dagr/stringtable.xml
index 61d226377d..01b43391ab 100644
--- a/addons/dagr/stringtable.xml
+++ b/addons/dagr/stringtable.xml
@@ -9,6 +9,8 @@
DAGR
DAGR
DAGR
+ DAGR
+ DAGR
Configure DAGR
@@ -18,6 +20,8 @@
Настроить DAGR
Configurar DAGR
Konfigurovat DAGR
+ Configura DAGR
+ Configurer le DAGR
Toggle DAGR
@@ -27,6 +31,8 @@
Вкл./выкл. DAGR
Mostrar DAGR
Přepnout DAGR
+ Apri DAGR
+ Activer/Desactiver le DAGR
Defense Advanced GPS Receiver
@@ -36,6 +42,8 @@
Военный многофункциональный GPS-приёмник
Defense Advanced GPS Receiver
Defense Advanced GPS Receiver
+ Defense Advanced GPS Receiver
+ Defense Advanced GPS Receiver
diff --git a/addons/difficulties/$PBOPREFIX$ b/addons/difficulties/$PBOPREFIX$
deleted file mode 100644
index 6280fc4731..0000000000
--- a/addons/difficulties/$PBOPREFIX$
+++ /dev/null
@@ -1 +0,0 @@
-z\ace\addons\difficulties
\ No newline at end of file
diff --git a/addons/difficulties/CfgDifficulties.hpp b/addons/difficulties/CfgDifficulties.hpp
deleted file mode 100644
index a65d31f1a5..0000000000
--- a/addons/difficulties/CfgDifficulties.hpp
+++ /dev/null
@@ -1,33 +0,0 @@
-
-class CfgDifficulties {
- class Mercenary {
- class Flags {
- armor[] = {0,0};
- friendlyTag[] = {0,0};
- enemyTag[] = {0,0};
- mineTag[] = {0,0};
- hud[] = {0,1};//{1,1};
- hudPerm[] = {0,0};
- hudWp[] = {0,0};
- hudWpPerm[] = {0,0};
- autoSpot[] = {0,1};
- map[] = {0,0};
- weaponCursor[] = {0,1};//{1,1};
- autoGuideAT[] = {0,0};
- clockIndicator[] = {0,0};
- 3rdPersonView[] = {0,0};
- autoAim[] = {0,0};
- unlimitedSaves[] = {0,0};
- deathMessages[] = {0,1};//{1,1};
- netStats[] = {0,1};//{1,1};
- vonID[] = {0,1};
- cameraShake[] = {1,0};
- hudGroupInfo[] = {0,0};
- extendetInfoType[] = {0,0};
- roughLanding[] = {0,0};
- windEnabled[] = {1,0};
- autoTrimEnabled[] = {0,0};
- stressDamageEnabled[] = {1,0};
- };
- };
-};
diff --git a/addons/difficulties/config.cpp b/addons/difficulties/config.cpp
deleted file mode 100644
index 34784706a0..0000000000
--- a/addons/difficulties/config.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
-#include "script_component.hpp"
-
-class CfgPatches {
- class ADDON {
- units[] = {};
- weapons[] = {};
- requiredVersion = REQUIRED_VERSION;
- requiredAddons[] = {"ace_common"};
- author[] = {"commy2"};
- authorUrl = "https://github.com/commy2/";
- VERSION_CONFIG;
- };
-};
-
-#include "CfgDifficulties.hpp"
diff --git a/addons/disarming/CfgEventHandlers.hpp b/addons/disarming/CfgEventHandlers.hpp
index e75956f440..becf395052 100644
--- a/addons/disarming/CfgEventHandlers.hpp
+++ b/addons/disarming/CfgEventHandlers.hpp
@@ -1,3 +1,10 @@
+
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
diff --git a/addons/disarming/CfgVehicles.hpp b/addons/disarming/CfgVehicles.hpp
index b4a1a4c7dd..1d04bb157c 100644
--- a/addons/disarming/CfgVehicles.hpp
+++ b/addons/disarming/CfgVehicles.hpp
@@ -8,7 +8,7 @@ class CfgVehicles {
distance = 3.5;
condition = QUOTE([ARR_2(_player,_target)] call FUNC(canPlayerDisarmUnit));
statement = QUOTE([ARR_2(_player,_target)] call FUNC(openDisarmDialog));
- icon = PATHTOF(UI\disarm.paa);
+ icon = QPATHTOF(UI\disarm.paa);
exceptions[] = {};
};
};
diff --git a/addons/disarming/CfgWeapons.hpp b/addons/disarming/CfgWeapons.hpp
index 404ef4aa76..4e7122ba41 100644
--- a/addons/disarming/CfgWeapons.hpp
+++ b/addons/disarming/CfgWeapons.hpp
@@ -5,7 +5,7 @@ class CfgWeapons {
class ACE_DebugPotato: ACE_ItemCore {
displayName = "ACE Potato (debug)";
descriptionShort = "Glorious Potato If you see this in game it means someone fucked up";
- picture = QUOTE(PATHTOF(UI\potato_ca.paa));
+ picture = QPATHTOF(UI\potato_ca.paa);
scope = 1;
class ItemInfo: InventoryItem_Base_F {
mass = 1;
diff --git a/addons/disarming/XEH_PREP.hpp b/addons/disarming/XEH_PREP.hpp
new file mode 100644
index 0000000000..1a0e85f447
--- /dev/null
+++ b/addons/disarming/XEH_PREP.hpp
@@ -0,0 +1,12 @@
+
+PREP(canBeDisarmed);
+PREP(canPlayerDisarmUnit);
+PREP(disarmDropItems);
+PREP(eventCallerFinish);
+PREP(eventTargetFinish);
+PREP(eventTargetStart);
+PREP(getAllGearContainer);
+PREP(getAllGearUnit);
+PREP(openDisarmDialog);
+PREP(showItemsInListbox);
+PREP(verifyMagazinesMoved);
diff --git a/addons/disarming/XEH_postInit.sqf b/addons/disarming/XEH_postInit.sqf
index ef17e6e96a..6944f8b146 100644
--- a/addons/disarming/XEH_postInit.sqf
+++ b/addons/disarming/XEH_postInit.sqf
@@ -1,4 +1,4 @@
#include "script_component.hpp"
-["DisarmDropItems", FUNC(eventTargetStart)] call EFUNC(common,addEventHandler);
-["DisarmDebugCallback", FUNC(eventCallerFinish)] call EFUNC(common,addEventHandler);
+[QGVAR(dropItems), FUNC(eventTargetStart)] call CBA_fnc_addEventHandler;
+[QGVAR(debugCallback), FUNC(eventCallerFinish)] call CBA_fnc_addEventHandler;
diff --git a/addons/disarming/XEH_preInit.sqf b/addons/disarming/XEH_preInit.sqf
index 84534e41b4..a7feade1c3 100644
--- a/addons/disarming/XEH_preInit.sqf
+++ b/addons/disarming/XEH_preInit.sqf
@@ -2,16 +2,6 @@
ADDON = false;
-PREP(canBeDisarmed);
-PREP(canPlayerDisarmUnit);
-PREP(disarmDropItems);
-PREP(eventCallerFinish);
-PREP(eventTargetFinish);
-PREP(eventTargetStart);
-PREP(getAllGearContainer);
-PREP(getAllGearUnit);
-PREP(openDisarmDialog);
-PREP(showItemsInListbox);
-PREP(verifyMagazinesMoved);
+#include "XEH_PREP.hpp"
ADDON = true;
diff --git a/addons/disarming/XEH_preStart.sqf b/addons/disarming/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/disarming/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/disarming/config.cpp b/addons/disarming/config.cpp
index 00f8204b09..8ed2f523cf 100644
--- a/addons/disarming/config.cpp
+++ b/addons/disarming/config.cpp
@@ -6,8 +6,9 @@ class CfgPatches {
weapons[] = {"ACE_DebugPotato"};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ACE_Interaction"};
- author[] = {"PabstMirror"};
- authorUrl = "https://github.com/PabstMirror/";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"PabstMirror"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
@@ -17,3 +18,8 @@ class CfgPatches {
#include "CfgWeapons.hpp"
#include "gui_disarm.hpp"
+
+class ACE_newEvents {
+ DisarmDebugCallback = QGVAR(debugCallback);
+ DisarmDropItems = QGVAR(dropItems);
+};
diff --git a/addons/disarming/functions/fnc_disarmDropItems.sqf b/addons/disarming/functions/fnc_disarmDropItems.sqf
index be2f932028..c9eb920084 100644
--- a/addons/disarming/functions/fnc_disarmDropItems.sqf
+++ b/addons/disarming/functions/fnc_disarmDropItems.sqf
@@ -67,7 +67,7 @@ if (isNull _holder) exitWith {
if (_holder getVariable [QGVAR(holderInUse), false]) exitWith {
[{
_this call FUNC(disarmDropItems);
- }, _this] call EFUNC(common,execNextFrame);
+ }, _this] call CBA_fnc_execNextFrame;
};
_holder setVariable [QGVAR(holderInUse), true];
@@ -177,7 +177,7 @@ if (_holderIsEmpty) then {
_needToRemoveVest = ((vest _target) != "") && {(vest _target) in _listOfItemsToRemove};
_needToRemoveUniform = ((uniform _target) != "") && {(uniform _target) in _listOfItemsToRemove};
- if ((ACE_time < _maxWaitTime) && {[_target] call FUNC(canBeDisarmed)} && {_needToRemoveWeapon || _needToRemoveMagazines || _needToRemoveBackpack}) then {
+ if ((CBA_missionTime < _maxWaitTime) && {[_target] call FUNC(canBeDisarmed)} && {_needToRemoveWeapon || _needToRemoveMagazines || _needToRemoveBackpack}) then {
//action drop weapons (keeps loaded magazine and attachements)
{
if (_x in _listOfItemsToRemove) then {
@@ -233,7 +233,7 @@ if (_holderIsEmpty) then {
clearItemCargoGlobal _holder;
};
//Verify we didn't timeout waiting on drop action
- if (ACE_time >= _maxWaitTime) exitWith {
+ if (CBA_missionTime >= _maxWaitTime) exitWith {
_holder setVariable [QGVAR(holderInUse), false];
[_caller, _target, "Debug: Drop Actions Timeout"] call FUNC(eventTargetFinish);
};
@@ -263,4 +263,4 @@ if (_holderIsEmpty) then {
[_caller, _target, ""] call FUNC(eventTargetFinish);
};
-}, 0.0, [_caller,_target, _listOfItemsToRemove, _holder, _holderIsEmpty, (ACE_time + TIME_MAX_WAIT), _doNotDropAmmo, _targetMagazinesEnd]] call CBA_fnc_addPerFrameHandler;
+}, 0.0, [_caller,_target, _listOfItemsToRemove, _holder, _holderIsEmpty, (CBA_missionTime + TIME_MAX_WAIT), _doNotDropAmmo, _targetMagazinesEnd]] call CBA_fnc_addPerFrameHandler;
diff --git a/addons/disarming/functions/fnc_eventCallerFinish.sqf b/addons/disarming/functions/fnc_eventCallerFinish.sqf
index e1376f4052..bf1daee2f0 100644
--- a/addons/disarming/functions/fnc_eventCallerFinish.sqf
+++ b/addons/disarming/functions/fnc_eventCallerFinish.sqf
@@ -23,4 +23,4 @@ params ["_caller", "_target", "_errorMsg"];
if (_caller != ACE_player) exitWith {};
systemChat format ["Debug-Caller: Disarm finished from [%1] with code [%2]", _target, _errorMsg];
-ACE_LOGINFO_2("%1 - eventCallerFinish: %2",ACE_time,_this);
+ACE_LOGINFO_2("%1 - eventCallerFinish: %2",CBA_missionTime,_this);
diff --git a/addons/disarming/functions/fnc_eventTargetFinish.sqf b/addons/disarming/functions/fnc_eventTargetFinish.sqf
index b7364a8f40..4b7487d47c 100644
--- a/addons/disarming/functions/fnc_eventTargetFinish.sqf
+++ b/addons/disarming/functions/fnc_eventTargetFinish.sqf
@@ -22,6 +22,6 @@
params ["_caller", "_target", "_errorMsg"];
if (_errorMsg != "") then {
- ACE_LOGINFO_2("%1 - eventTargetFinish: %2",ACE_time,_this);
- ["DisarmDebugCallback", [_caller], [_caller, _target, _errorMsg]] call EFUNC(common,targetEvent);
+ ACE_LOGINFO_2("%1 - eventTargetFinish: %2",CBA_missionTime,_this);
+ [QGVAR(debugCallback), [_caller, _target, _errorMsg], [_caller]] call CBA_fnc_targetEvent;
};
diff --git a/addons/disarming/functions/fnc_openDisarmDialog.sqf b/addons/disarming/functions/fnc_openDisarmDialog.sqf
index 92f98a0756..0883fde2dd 100644
--- a/addons/disarming/functions/fnc_openDisarmDialog.sqf
+++ b/addons/disarming/functions/fnc_openDisarmDialog.sqf
@@ -42,7 +42,7 @@ GVAR(disarmTarget) = _target;
if (isNull GVAR(disarmTarget)) exitWith {ERROR("disarmTarget is null");};
TRACE_2("Debug: Droping %1 from %2",_data,GVAR(disarmTarget));
- ["DisarmDropItems", [GVAR(disarmTarget)], [ACE_player, GVAR(disarmTarget), [_data]]] call EFUNC(common,targetEvent);
+ [QGVAR(dropItems), [ACE_player, GVAR(disarmTarget), [_data]], [GVAR(disarmTarget)]] call CBA_fnc_targetEvent;
false //not sure what this does
}];
diff --git a/addons/disarming/stringtable.xml b/addons/disarming/stringtable.xml
index 61eaf9af59..dfa030273a 100644
--- a/addons/disarming/stringtable.xml
+++ b/addons/disarming/stringtable.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/addons/disposable/CfgEventHandlers.hpp b/addons/disposable/CfgEventHandlers.hpp
index c236fb6f57..a7c50f3247 100644
--- a/addons/disposable/CfgEventHandlers.hpp
+++ b/addons/disposable/CfgEventHandlers.hpp
@@ -1,3 +1,10 @@
+
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
@@ -10,6 +17,12 @@ class Extended_PostInit_EventHandlers {
};
};
+class Extended_DisplayLoad_EventHandlers {
+ class RscDisplayInventory {
+ ADDON = QUOTE([ARR_2(ACE_player, _this select 0)] call FUNC(updateInventoryDisplay));
+ };
+};
+
// handle preloaded missile
class Extended_InitPost_EventHandlers {
class CAManBase {
diff --git a/addons/disposable/CfgMagazines.hpp b/addons/disposable/CfgMagazines.hpp
index d26d5ecea2..d9ad0508db 100644
--- a/addons/disposable/CfgMagazines.hpp
+++ b/addons/disposable/CfgMagazines.hpp
@@ -5,7 +5,7 @@ class CfgMagazines {
scope = 1;
scopeArsenal = 1;
displayName = CSTRING(PreloadedMissileDummy);
- picture = PATHTOEF(common,UI\blank_CO.paa);
+ picture = QPATHTOEF(common,UI\blank_CO.paa);
weaponPoolAvailable = 0;
mass = 0;
};
diff --git a/addons/disposable/XEH_PREP.hpp b/addons/disposable/XEH_PREP.hpp
new file mode 100644
index 0000000000..8319e582aa
--- /dev/null
+++ b/addons/disposable/XEH_PREP.hpp
@@ -0,0 +1,4 @@
+
+PREP(replaceATWeapon);
+PREP(takeLoadedATWeapon);
+PREP(updateInventoryDisplay);
diff --git a/addons/disposable/XEH_postInit.sqf b/addons/disposable/XEH_postInit.sqf
index 5c4ddafe95..9c54456620 100644
--- a/addons/disposable/XEH_postInit.sqf
+++ b/addons/disposable/XEH_postInit.sqf
@@ -3,17 +3,13 @@
if (!hasInterface) exitWith {};
-["inventoryDisplayLoaded", {
- [ACE_player, _this select 0] call FUNC(updateInventoryDisplay)
-}] call EFUNC(common,addEventHandler);
-
-["playerInventoryChanged", {
+["ace_playerInventoryChanged", {
params ["_unit"];
[_unit] call FUNC(takeLoadedATWeapon);
[_unit] call FUNC(updateInventoryDisplay);
-}] call EFUNC(common,addEventHandler);
+}] call CBA_fnc_addEventHandler;
// Register fire event handler
// Only for the local player and for AI. Non-local players will handle it themselves
-["firedPlayer", DFUNC(replaceATWeapon)] call EFUNC(common,addEventHandler);
-["firedNonPlayer", DFUNC(replaceATWeapon)] call EFUNC(common,addEventHandler);
+["ace_firedPlayer", DFUNC(replaceATWeapon)] call CBA_fnc_addEventHandler;
+["ace_firedNonPlayer", DFUNC(replaceATWeapon)] call CBA_fnc_addEventHandler;
diff --git a/addons/disposable/XEH_preInit.sqf b/addons/disposable/XEH_preInit.sqf
index 020187b730..a7feade1c3 100644
--- a/addons/disposable/XEH_preInit.sqf
+++ b/addons/disposable/XEH_preInit.sqf
@@ -2,8 +2,6 @@
ADDON = false;
-PREP(replaceATWeapon);
-PREP(takeLoadedATWeapon);
-PREP(updateInventoryDisplay);
+#include "XEH_PREP.hpp"
ADDON = true;
diff --git a/addons/disposable/XEH_preStart.sqf b/addons/disposable/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/disposable/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/disposable/config.cpp b/addons/disposable/config.cpp
index 0f256824d7..e240206938 100644
--- a/addons/disposable/config.cpp
+++ b/addons/disposable/config.cpp
@@ -6,8 +6,9 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
- author[] = {"commy2"};
- authorUrl = "https://github.com/commy2/";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"commy2"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
diff --git a/addons/dragging/CfgEventHandlers.hpp b/addons/dragging/CfgEventHandlers.hpp
index 6a64491e00..226efc5ef7 100644
--- a/addons/dragging/CfgEventHandlers.hpp
+++ b/addons/dragging/CfgEventHandlers.hpp
@@ -1,4 +1,10 @@
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
@@ -27,6 +33,11 @@ class Extended_Init_EventHandlers {
init = QUOTE(_this call DFUNC(initObject));
};
};
+ class Land_PortableLight_single_F {
+ class ADDON {
+ init = QUOTE(_this call DFUNC(initObject));
+ };
+ };
};
class Extended_Killed_EventHandlers {
@@ -44,3 +55,9 @@ class Extended_AnimChanged_EventHandlers {
};
};
};
+
+class Extended_DisplayLoad_EventHandlers {
+ class RscDisplayMission {
+ ADDON = QUOTE(_this call COMPILE_FILE(XEH_missionDisplayLoad));
+ };
+};
diff --git a/addons/dragging/CfgVehicles.hpp b/addons/dragging/CfgVehicles.hpp
index 0a963df433..ba4ff87186 100644
--- a/addons/dragging/CfgVehicles.hpp
+++ b/addons/dragging/CfgVehicles.hpp
@@ -1,19 +1,20 @@
+class CBA_Extended_EventHandlers;
+
class CfgVehicles {
// Static weapons
class LandVehicle;
class StaticWeapon: LandVehicle {
GVAR(canCarry) = 1;
- GVAR(carryPosition[]) = {0,1.2,0};
+ GVAR(carryPosition)[] = {0,1.2,0};
GVAR(carryDirection) = 0;
GVAR(canDrag) = 1;
- GVAR(dragPosition[]) = {0,1.2,0};
+ GVAR(dragPosition)[] = {0,1.2,0};
GVAR(dragDirection) = 0;
};
- //remove actions from Taru Pods
- class Pod_Heli_Transport_04_base_F: StaticWeapon {
+ class StaticCannon: StaticWeapon {
GVAR(canCarry) = 0;
GVAR(canDrag) = 0;
};
@@ -21,23 +22,24 @@ class CfgVehicles {
class StaticMortar;
class Mortar_01_base_F: StaticMortar {
GVAR(canCarry) = 1;
- GVAR(carryPosition[]) = {0,1.2,0};
+ GVAR(carryPosition)[] = {0,1.2,0};
GVAR(carryDirection) = 0;
GVAR(canDrag) = 1;
- GVAR(dragPosition[]) = {0,1.2,0};
+ GVAR(dragPosition)[] = {0,1.2,0};
GVAR(dragDirection) = 0;
};
// ammo boxes
class ThingX;
+ class Items_base_F;
class ReammoBox_F: ThingX {
GVAR(canCarry) = 0;
- GVAR(carryPosition[]) = {0,1,1};
+ GVAR(carryPosition)[] = {0,1,1};
GVAR(carryDirection) = 0;
GVAR(canDrag) = 0;
- GVAR(dragPosition[]) = {0,1.2,0};
+ GVAR(dragPosition)[] = {0,1.2,0};
GVAR(dragDirection) = 0;
};
@@ -45,6 +47,11 @@ class CfgVehicles {
GVAR(canCarry) = 0;
GVAR(canDrag) = 0;
};
+ //remove actions from Taru Pods
+ class Pod_Heli_Transport_04_base_F: Slingload_base_F {
+ GVAR(canCarry) = 0;
+ GVAR(canDrag) = 0;
+ };
class EAST_Box_Base: ReammoBox_F {
GVAR(canCarry) = 1;
@@ -83,33 +90,73 @@ class CfgVehicles {
GVAR(canDrag) = 0;
};
- // Barrier
- class RoadCone_F: ThingX {
- XEH_ENABLED;
+ //Plastic and metal case
+ class PlasticCase_01_base_F: Items_base_F {
+ class EventHandlers {
+ class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
+ };
GVAR(canCarry) = 1;
GVAR(carryPosition[]) = {0,1,1};
- GVAR(carryDirection) = 0;
+ GVAR(carryDirection) = 270;
+
+ GVAR(canDrag) = 1;
+ GVAR(dragPosition[]) = {0,1.2,0};
+ GVAR(dragDirection) = 0;
+ };
+ class MetalCase_01_base_F: Items_base_F {
+ class EventHandlers {
+ class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
+ };
+ GVAR(canCarry) = 1;
+ GVAR(carryPosition[]) = {0,1,1};
+ GVAR(carryDirection) = 270;
GVAR(canDrag) = 1;
GVAR(dragPosition[]) = {0,1.2,0};
GVAR(dragDirection) = 0;
};
+ // Barrier
+ class RoadCone_F: ThingX {
+ class EventHandlers {
+ class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
+ };
+
+ GVAR(canCarry) = 1;
+ GVAR(carryPosition)[] = {0,1,1};
+ GVAR(carryDirection) = 0;
+
+ GVAR(canDrag) = 1;
+ GVAR(dragPosition)[] = {0,1.2,0};
+ GVAR(dragDirection) = 0;
+ };
+
class RoadBarrier_F: RoadCone_F {
- GVAR(carryPosition[]) = {0,1,0.300671};
+ GVAR(carryPosition)[] = {0,1,0.300671};
};
class ACE_RepairItem_Base: ThingX {};
class ACE_Track: ACE_RepairItem_Base {
GVAR(canCarry) = 1;
- GVAR(carryPosition[]) = {0,1,1};
+ GVAR(carryPosition)[] = {0,1,1};
GVAR(carryDirection) = 0;
};
class ACE_Wheel: ACE_RepairItem_Base {
GVAR(canCarry) = 1;
- GVAR(carryPosition[]) = {0,1,1};
+ GVAR(carryPosition)[] = {0,1,1};
GVAR(carryDirection) = 0;
};
+
+ class Lamps_base_F;
+ class Land_PortableLight_single_F: Lamps_base_F {
+ GVAR(canCarry) = 1;
+ GVAR(carryPosition)[] = {0,1.2,0};
+ GVAR(carryDirection) = 180;
+
+ GVAR(canDrag) = 1;
+ GVAR(dragPosition)[] = {0,1.2,0};
+ GVAR(dragDirection) = 180;
+ };
};
diff --git a/addons/dragging/UI/icons/box_carry.paa b/addons/dragging/UI/icons/box_carry.paa
new file mode 100644
index 0000000000..5e9c83057c
Binary files /dev/null and b/addons/dragging/UI/icons/box_carry.paa differ
diff --git a/addons/dragging/UI/icons/box_drag.paa b/addons/dragging/UI/icons/box_drag.paa
new file mode 100644
index 0000000000..56ae3af83b
Binary files /dev/null and b/addons/dragging/UI/icons/box_drag.paa differ
diff --git a/addons/dragging/UI/icons/person_carry.paa b/addons/dragging/UI/icons/person_carry.paa
new file mode 100644
index 0000000000..30e8da32a9
Binary files /dev/null and b/addons/dragging/UI/icons/person_carry.paa differ
diff --git a/addons/dragging/UI/icons/person_drag.paa b/addons/dragging/UI/icons/person_drag.paa
new file mode 100644
index 0000000000..39dfac3546
Binary files /dev/null and b/addons/dragging/UI/icons/person_drag.paa differ
diff --git a/addons/dragging/XEH_PREP.hpp b/addons/dragging/XEH_PREP.hpp
new file mode 100644
index 0000000000..b04c15e7ec
--- /dev/null
+++ b/addons/dragging/XEH_PREP.hpp
@@ -0,0 +1,27 @@
+
+PREP(canCarry);
+PREP(canDrag);
+PREP(canDrop);
+PREP(canDrop_carry);
+PREP(carryObject);
+PREP(carryObjectPFH);
+PREP(dragObject);
+PREP(dragObjectPFH);
+PREP(dropObject);
+PREP(dropObject_carry);
+PREP(getWeight);
+PREP(handleAnimChanged);
+PREP(handleKilled);
+PREP(handlePlayerChanged);
+PREP(handlePlayerWeaponChanged);
+PREP(handleScrollWheel);
+PREP(handleUnconscious);
+PREP(initObject);
+PREP(initPerson);
+PREP(isObjectOnObject);
+PREP(setCarryable);
+PREP(setDraggable);
+PREP(startCarry);
+PREP(startCarryPFH);
+PREP(startDrag);
+PREP(startDragPFH);
diff --git a/addons/dragging/XEH_missionDisplayLoad.sqf b/addons/dragging/XEH_missionDisplayLoad.sqf
new file mode 100644
index 0000000000..289d2f067a
--- /dev/null
+++ b/addons/dragging/XEH_missionDisplayLoad.sqf
@@ -0,0 +1,5 @@
+#include "script_component.hpp"
+
+params ["_display"];
+
+_display displayAddEventHandler ["MouseZChanged", {(_this select 1) call FUNC(handleScrollWheel)}];
diff --git a/addons/dragging/XEH_postInit.sqf b/addons/dragging/XEH_postInit.sqf
index 5a54f8c8a2..c9a1fbea1b 100644
--- a/addons/dragging/XEH_postInit.sqf
+++ b/addons/dragging/XEH_postInit.sqf
@@ -8,8 +8,6 @@ if (isServer) then {
if (!hasInterface) exitWith {};
-[{_this call FUNC(handleScrollWheel)}] call EFUNC(common,addScrollWheelEventHandler);
-
if (isNil "ACE_maxWeightDrag") then {
ACE_maxWeightDrag = 800;
};
@@ -22,11 +20,11 @@ if (isNil "ACE_maxWeightCarry") then {
["isNotCarrying", {!((_this select 0) getVariable [QGVAR(isCarrying), false])}] call EFUNC(common,addCanInteractWithCondition);
// release object on player change. This does work when returning to lobby, but not when hard disconnecting.
-["playerChanged", {_this call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler);
-["playerVehicleChanged", {[ACE_player, objNull] call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler);
-["playerWeaponChanged", {_this call FUNC(handlePlayerWeaponChanged)}] call EFUNC(common,addEventhandler);
+["ace_playerChanged", {_this call FUNC(handlePlayerChanged)}] call CBA_fnc_addEventHandler;
+["ace_playerVehicleChanged", {[ACE_player, objNull] call FUNC(handlePlayerChanged)}] call CBA_fnc_addEventHandler;
+["ace_playerWeaponChanged", {_this call FUNC(handlePlayerWeaponChanged)}] call CBA_fnc_addEventHandler;
// handle waking up dragged unit and falling unconscious while dragging
-["medical_onUnconscious", {_this call FUNC(handleUnconscious)}] call EFUNC(common,addEventhandler);
+["ace_unconscious", {_this call FUNC(handleUnconscious)}] call CBA_fnc_addEventHandler;
//@todo Captivity?
diff --git a/addons/dragging/XEH_preInit.sqf b/addons/dragging/XEH_preInit.sqf
index f596a89493..a7feade1c3 100644
--- a/addons/dragging/XEH_preInit.sqf
+++ b/addons/dragging/XEH_preInit.sqf
@@ -2,31 +2,6 @@
ADDON = false;
-PREP(canCarry);
-PREP(canDrag);
-PREP(canDrop);
-PREP(canDrop_carry);
-PREP(carryObject);
-PREP(carryObjectPFH);
-PREP(dragObject);
-PREP(dragObjectPFH);
-PREP(dropObject);
-PREP(dropObject_carry);
-PREP(getWeight);
-PREP(handleAnimChanged);
-PREP(handleKilled);
-PREP(handlePlayerChanged);
-PREP(handlePlayerWeaponChanged);
-PREP(handleScrollWheel);
-PREP(handleUnconscious);
-PREP(initObject);
-PREP(initPerson);
-PREP(isObjectOnObject);
-PREP(setCarryable);
-PREP(setDraggable);
-PREP(startCarry);
-PREP(startCarryPFH);
-PREP(startDrag);
-PREP(startDragPFH);
+#include "XEH_PREP.hpp"
ADDON = true;
diff --git a/addons/dragging/XEH_preStart.sqf b/addons/dragging/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/dragging/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/dragging/config.cpp b/addons/dragging/config.cpp
index 0c9cfb3c43..a3e87c5824 100644
--- a/addons/dragging/config.cpp
+++ b/addons/dragging/config.cpp
@@ -6,8 +6,9 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_interaction"};
- author[] = {"Garth 'L-H' de Wet", "commy2"};
- authorUrl = "https://github.com/commy2/";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"Garth 'L-H' de Wet", "commy2"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
diff --git a/addons/dragging/functions/fnc_carryObject.sqf b/addons/dragging/functions/fnc_carryObject.sqf
index ec00693825..9fb198e02c 100644
--- a/addons/dragging/functions/fnc_carryObject.sqf
+++ b/addons/dragging/functions/fnc_carryObject.sqf
@@ -44,7 +44,7 @@ if (_target isKindOf "CAManBase") then {
_target attachTo [_unit, _position];
};
-["setDir", _target, [_target, _direction]] call EFUNC(common,targetEvent);
+[QEGVAR(common,setDir), [_target, _direction], _target] call CBA_fnc_targetEvent;
_unit setVariable [QGVAR(isCarrying), true, true];
_unit setVariable [QGVAR(carriedObject), _target, true];
@@ -64,7 +64,7 @@ if (_target isKindOf "CAManBase") then {
};
// check everything
-[FUNC(carryObjectPFH), 0.5, [_unit, _target, ACE_time]] call CBA_fnc_addPerFrameHandler;
+[FUNC(carryObjectPFH), 0.5, [_unit, _target, CBA_missionTime]] call CBA_fnc_addPerFrameHandler;
// reset current dragging height.
GVAR(currentHeightChange) = 0;
diff --git a/addons/dragging/functions/fnc_carryObjectPFH.sqf b/addons/dragging/functions/fnc_carryObjectPFH.sqf
index 948af15891..963921efa7 100644
--- a/addons/dragging/functions/fnc_carryObjectPFH.sqf
+++ b/addons/dragging/functions/fnc_carryObjectPFH.sqf
@@ -20,7 +20,7 @@
#include "script_component.hpp"
#ifdef DEBUG_ENABLED_DRAGGING
- systemChat format ["%1 carryObjectPFH running", ACE_time];
+ systemChat format ["%1 carryObjectPFH running", CBA_missionTime];
#endif
params ["_args", "_idPFH"];
@@ -34,10 +34,10 @@ if !(_unit getVariable [QGVAR(isCarrying), false]) exitWith {
// drop if the crate is destroyed OR (target moved away from carrier (weapon disasembled))
if (!alive _target || {_unit distance _target > 10}) then {
TRACE_2("dead/distance",_unit,_target);
- if ((_unit distance _target > 10) && {(ACE_time - _startTime) < 1}) exitWith {
+ if ((_unit distance _target > 10) && {(CBA_missionTime - _startTime) < 1}) exitWith {
//attachTo seems to have some kind of network delay and target can return an odd position durring the first few frames,
//so wait a full second to exit if out of range (this is critical as we would otherwise detach and set it's pos to weird pos)
- TRACE_3("ignoring bad distance at start",_unit distance _target,_startTime,ACE_time);
+ TRACE_3("ignoring bad distance at start",_unit distance _target,_startTime,CBA_missionTime);
};
[_unit, _target] call FUNC(dropObject_carry);
[_idPFH] call CBA_fnc_removePerFrameHandler;
diff --git a/addons/dragging/functions/fnc_dragObject.sqf b/addons/dragging/functions/fnc_dragObject.sqf
index 3237ddbb07..4672aa89c4 100644
--- a/addons/dragging/functions/fnc_dragObject.sqf
+++ b/addons/dragging/functions/fnc_dragObject.sqf
@@ -33,7 +33,7 @@ _position = _position vectorAdd [0, 0, _offset];
// attach object
TRACE_3("attaching",_position,_offset,_direction);
_target attachTo [_unit, _position];
-["setDir", _target, [_target, _direction]] call EFUNC(common,targetEvent);
+[QEGVAR(common,setDir), [_target, _direction], _target] call CBA_fnc_targetEvent;
if (_target isKindOf "CAManBase") then {
[_target, "AinjPpneMrunSnonWnonDb_still", 0, true] call EFUNC(common,doAnimation);
@@ -53,7 +53,7 @@ _unit setVariable [QGVAR(ReleaseActionID), [
[localize LSTRING(Drop), ""] call EFUNC(interaction,showMouseHint);
// check everything
-[FUNC(dragObjectPFH), 0.5, [_unit, _target, ACE_time]] call CBA_fnc_addPerFrameHandler;
+[FUNC(dragObjectPFH), 0.5, [_unit, _target, CBA_missionTime]] call CBA_fnc_addPerFrameHandler;
// reset current dragging height.
GVAR(currentHeightChange) = 0;
diff --git a/addons/dragging/functions/fnc_dragObjectPFH.sqf b/addons/dragging/functions/fnc_dragObjectPFH.sqf
index ab117e90fd..08aeba738b 100644
--- a/addons/dragging/functions/fnc_dragObjectPFH.sqf
+++ b/addons/dragging/functions/fnc_dragObjectPFH.sqf
@@ -20,7 +20,7 @@
#include "script_component.hpp"
#ifdef DEBUG_ENABLED_DRAGGING
- systemChat format ["%1 dragObjectPFH running", ACE_time];
+ systemChat format ["%1 dragObjectPFH running", CBA_missionTime];
#endif
params ["_args", "_idPFH"];
@@ -34,10 +34,10 @@ if !(_unit getVariable [QGVAR(isDragging), false]) exitWith {
// drop if the crate is destroyed OR (target moved away from carrier (weapon disasembled))
if (!alive _target || {_unit distance _target > 10}) then {
TRACE_2("dead/distance",_unit,_target);
- if ((_unit distance _target > 10) && {(ACE_time - _startTime) < 1}) exitWith {
+ if ((_unit distance _target > 10) && {(CBA_missionTime - _startTime) < 1}) exitWith {
//attachTo seems to have some kind of network delay and target can return an odd position durring the first few frames,
//so wait a full second to exit if out of range (this is critical as we would otherwise detach and set it's pos to weird pos)
- TRACE_3("ignoring bad distance at start",_unit distance _target,_startTime,ACE_time);
+ TRACE_3("ignoring bad distance at start",_unit distance _target,_startTime,CBA_missionTime);
};
[_unit, _target] call FUNC(dropObject);
[_idPFH] call CBA_fnc_removePerFrameHandler;
diff --git a/addons/dragging/functions/fnc_dropObject.sqf b/addons/dragging/functions/fnc_dropObject.sqf
index 604f6c25b7..c70bf90c38 100644
--- a/addons/dragging/functions/fnc_dropObject.sqf
+++ b/addons/dragging/functions/fnc_dropObject.sqf
@@ -30,8 +30,8 @@ if !(_unit getVariable ["ACE_isUnconscious", false]) then {
};
// prevent collision damage
-["fixCollision", _unit] call EFUNC(common,localEvent);
-["fixCollision", _target, _target] call EFUNC(common,targetEvent);
+[QEGVAR(common,fixCollision), _unit] call CBA_fnc_localEvent;
+[QEGVAR(common,fixCollision), _target, _target] call CBA_fnc_targetEvent;
// release object
detach _target;
@@ -62,8 +62,8 @@ _unit setVariable [QGVAR(draggedObject), objNull, true];
[objNull, _target, true] call EFUNC(common,claim);
if !(_target isKindOf "CAManBase") then {
- ["fixPosition", _target, _target] call EFUNC(common,targetEvent);
- ["fixFloating", _target, _target] call EFUNC(common,targetEvent);
+ [QEGVAR(common,fixPosition), _target, _target] call CBA_fnc_targetEvent;
+ [QEGVAR(common,fixFloating), _target, _target] call CBA_fnc_targetEvent;
};
if (_unit getVariable ["ACE_isUnconscious", false]) then {
diff --git a/addons/dragging/functions/fnc_dropObject_carry.sqf b/addons/dragging/functions/fnc_dropObject_carry.sqf
index 2002142e2e..c3521bbed0 100644
--- a/addons/dragging/functions/fnc_dropObject_carry.sqf
+++ b/addons/dragging/functions/fnc_dropObject_carry.sqf
@@ -25,8 +25,8 @@ TRACE_2("params",_unit,_target);
private _inBuilding = [_unit] call FUNC(isObjectOnObject);
// prevent collision damage
-["fixCollision", _unit] call EFUNC(common,localEvent);
-["fixCollision", _target, _target] call EFUNC(common,targetEvent);
+[QEGVAR(common,fixCollision), _unit] call CBA_fnc_localEvent;
+[QEGVAR(common,fixCollision), _target, _target] call CBA_fnc_targetEvent;
// release object
detach _target;
@@ -67,8 +67,8 @@ _unit setVariable [QGVAR(carriedObject), objNull, true];
[objNull, _target, true] call EFUNC(common,claim);
if !(_target isKindOf "CAManBase") then {
- ["fixPosition", _target, _target] call EFUNC(common,targetEvent);
- ["fixFloating", _target, _target] call EFUNC(common,targetEvent);
+ [QEGVAR(common,fixPosition), _target, _target] call CBA_fnc_targetEvent;
+ [QEGVAR(common,fixFloating), _target, _target] call CBA_fnc_targetEvent;
};
// recreate UAV crew
diff --git a/addons/dragging/functions/fnc_handleScrollWheel.sqf b/addons/dragging/functions/fnc_handleScrollWheel.sqf
index e3547ca63a..e3a30ea9e0 100644
--- a/addons/dragging/functions/fnc_handleScrollWheel.sqf
+++ b/addons/dragging/functions/fnc_handleScrollWheel.sqf
@@ -40,4 +40,8 @@ detach _carriedItem;
_carriedItem setPosATL _position;
_carriedItem attachTo [_unit];
+//reset the carry direction
+private _direction = _carriedItem getVariable [QGVAR(carryDirection), 0];
+[QEGVAR(common,setDir), [_carriedItem, _direction], _carriedItem] call CBA_fnc_targetEvent;
+
true
diff --git a/addons/dragging/functions/fnc_setCarryable.sqf b/addons/dragging/functions/fnc_setCarryable.sqf
index 9e15e42446..0253c6ed4b 100644
--- a/addons/dragging/functions/fnc_setCarryable.sqf
+++ b/addons/dragging/functions/fnc_setCarryable.sqf
@@ -43,7 +43,9 @@ if (_type in _initializedClasses) exitWith {};
_initializedClasses pushBack _type;
GVAR(initializedClasses_carry) = _initializedClasses;
-private _carryAction = [QGVAR(carry), localize LSTRING(Carry), "", {[_player, _target] call FUNC(startCarry)}, {[_player, _target] call FUNC(canCarry)}] call EFUNC(interact_menu,createAction);
+private _icon = [QUOTE(PATHTOF(UI\icons\box_carry.paa)), QUOTE(PATHTOF(UI\icons\person_carry.paa))] select (_object isKindOf "Man");
+
+private _carryAction = [QGVAR(carry), localize LSTRING(Carry), _icon, {[_player, _target] call FUNC(startCarry)}, {[_player, _target] call FUNC(canCarry)}] call EFUNC(interact_menu,createAction);
private _dropAction = [QGVAR(drop_carry), localize LSTRING(Drop), "", {[_player, _target] call FUNC(dropObject_carry)}, {[_player, _target] call FUNC(canDrop_carry)}] call EFUNC(interact_menu,createAction);
[_type, 0, ["ACE_MainActions"], _carryAction] call EFUNC(interact_menu,addActionToClass);
diff --git a/addons/dragging/functions/fnc_setDraggable.sqf b/addons/dragging/functions/fnc_setDraggable.sqf
index 0adcb624d8..4c4d11ecf6 100644
--- a/addons/dragging/functions/fnc_setDraggable.sqf
+++ b/addons/dragging/functions/fnc_setDraggable.sqf
@@ -44,7 +44,9 @@ if (_type in _initializedClasses) exitWith {};
_initializedClasses pushBack _type;
GVAR(initializedClasses) = _initializedClasses;
-private _dragAction = [QGVAR(drag), localize LSTRING(Drag), "", {[_player, _target] call FUNC(startDrag)}, {[_player, _target] call FUNC(canDrag)}] call EFUNC(interact_menu,createAction);
+private _icon = [QUOTE(PATHTOF(UI\icons\box_drag.paa)), QUOTE(PATHTOF(UI\icons\person_drag.paa))] select (_object isKindOf "Man");
+
+private _dragAction = [QGVAR(drag), localize LSTRING(Drag), _icon, {[_player, _target] call FUNC(startDrag)}, {[_player, _target] call FUNC(canDrag)}] call EFUNC(interact_menu,createAction);
private _dropAction = [QGVAR(drop), localize LSTRING(Drop), "", {[_player, _target] call FUNC(dropObject)}, {[_player, _target] call FUNC(canDrop)}] call EFUNC(interact_menu,createAction);
[_type, 0, ["ACE_MainActions"], _dragAction] call EFUNC(interact_menu,addActionToClass);
diff --git a/addons/dragging/functions/fnc_startCarry.sqf b/addons/dragging/functions/fnc_startCarry.sqf
index fd528b0104..1890dbac1a 100644
--- a/addons/dragging/functions/fnc_startCarry.sqf
+++ b/addons/dragging/functions/fnc_startCarry.sqf
@@ -26,7 +26,7 @@ if (_weight > missionNamespace getVariable ["ACE_maxWeightCarry", 1E11]) exitWit
[localize LSTRING(UnableToDrag)] call EFUNC(common,displayTextStructured);
};
-private _timer = ACE_time + 5;
+private _timer = CBA_missionTime + 5;
// handle objects vs persons
if (_target isKindOf "CAManBase") then {
@@ -46,7 +46,7 @@ if (_target isKindOf "CAManBase") then {
[_unit, "AcinPknlMstpSnonWnonDnon_AcinPercMrunSnonWnonDnon", 2, true] call EFUNC(common,doAnimation);
[_target, "AinjPfalMstpSnonWrflDnon_carried_Up", 2, true] call EFUNC(common,doAnimation);
- _timer = ACE_time + 15;
+ _timer = CBA_missionTime + 15;
} else {
diff --git a/addons/dragging/functions/fnc_startCarryPFH.sqf b/addons/dragging/functions/fnc_startCarryPFH.sqf
index 4d39672a9e..007469d960 100644
--- a/addons/dragging/functions/fnc_startCarryPFH.sqf
+++ b/addons/dragging/functions/fnc_startCarryPFH.sqf
@@ -20,7 +20,7 @@
#include "script_component.hpp"
#ifdef DEBUG_ENABLED_DRAGGING
- systemChat format ["%1 startCarryPFH running", ACE_time];
+ systemChat format ["%1 startCarryPFH running", CBA_missionTime];
#endif
params ["_args", "_idPFH"];
@@ -28,28 +28,28 @@ _args params ["_unit", "_target", "_timeOut"];
// handle aborting carry
if !(_unit getVariable [QGVAR(isCarrying), false]) exitWith {
- TRACE_4("carry false",_unit,_target,_timeOut,ACE_time);
+ TRACE_4("carry false",_unit,_target,_timeOut,CBA_missionTime);
[_idPFH] call CBA_fnc_removePerFrameHandler;
};
// same as dragObjectPFH, checks if object is deleted or dead OR (target moved away from carrier (weapon disasembled))
if (!alive _target || {_unit distance _target > 10}) then {
- TRACE_4("dead/distance",_unit,_target,_timeOut,ACE_time);
+ TRACE_4("dead/distance",_unit,_target,_timeOut,CBA_missionTime);
[_unit, _target] call FUNC(dropObject);
[_idPFH] call CBA_fnc_removePerFrameHandler;
};
// handle persons vs objects
if (_target isKindOf "CAManBase") then {
- if (ACE_time > _timeOut) exitWith {
- TRACE_4("Start carry person",_unit,_target,_timeOut,ACE_time);
+ if (CBA_missionTime > _timeOut) exitWith {
+ TRACE_4("Start carry person",_unit,_target,_timeOut,CBA_missionTime);
[_unit, _target] call FUNC(carryObject);
[_idPFH] call CBA_fnc_removePerFrameHandler;
};
} else {
- if (ACE_time > _timeOut) exitWith {
- TRACE_4("timeout",_unit,_target,_timeOut,ACE_time);
+ if (CBA_missionTime > _timeOut) exitWith {
+ TRACE_4("timeout",_unit,_target,_timeOut,CBA_missionTime);
[_idPFH] call CBA_fnc_removePerFrameHandler;
// drop if in timeout
@@ -59,7 +59,7 @@ if (_target isKindOf "CAManBase") then {
// wait for the unit to stand up
if (stance _unit == "STAND") exitWith {
- TRACE_4("Start carry object",_unit,_target,_timeOut,ACE_time);
+ TRACE_4("Start carry object",_unit,_target,_timeOut,CBA_missionTime);
[_unit, _target] call FUNC(carryObject);
[_idPFH] call CBA_fnc_removePerFrameHandler;
diff --git a/addons/dragging/functions/fnc_startDrag.sqf b/addons/dragging/functions/fnc_startDrag.sqf
index 24a279e7a7..8c46fbe122 100644
--- a/addons/dragging/functions/fnc_startDrag.sqf
+++ b/addons/dragging/functions/fnc_startDrag.sqf
@@ -39,7 +39,7 @@ _unit selectWeapon primaryWeapon _unit;
[_unit, _target, true] call EFUNC(common,claim);
// can't play action that depends on weapon if it was added the same frame
-[{_this playActionNow "grabDrag";}, _unit] call EFUNC(common,execNextFrame);
+[{_this playActionNow "grabDrag";}, _unit] call CBA_fnc_execNextFrame;
// move a bit closer and adjust direction when trying to pick up a person
if (_target isKindOf "CAManBase") then {
@@ -52,4 +52,4 @@ if (_target isKindOf "CAManBase") then {
// prevents draging and carrying at the same time
_unit setVariable [QGVAR(isDragging), true, true];
-[FUNC(startDragPFH), 0.2, [_unit, _target, ACE_time + 5]] call CBA_fnc_addPerFrameHandler;
+[FUNC(startDragPFH), 0.2, [_unit, _target, CBA_missionTime + 5]] call CBA_fnc_addPerFrameHandler;
diff --git a/addons/dragging/functions/fnc_startDragPFH.sqf b/addons/dragging/functions/fnc_startDragPFH.sqf
index cfa84fe279..c7843cfdc9 100644
--- a/addons/dragging/functions/fnc_startDragPFH.sqf
+++ b/addons/dragging/functions/fnc_startDragPFH.sqf
@@ -20,7 +20,7 @@
#include "script_component.hpp"
#ifdef DEBUG_ENABLED_DRAGGING
- systemChat format ["%1 startDragPFH running", ACE_time];
+ systemChat format ["%1 startDragPFH running", CBA_missionTime];
#endif
params ["_args", "_idPFH"];
@@ -28,20 +28,20 @@ _args params ["_unit", "_target", "_timeOut"];
// handle aborting drag
if !(_unit getVariable [QGVAR(isDragging), false]) exitWith {
- TRACE_4("drag false",_unit,_target,_timeOut,ACE_time);
+ TRACE_4("drag false",_unit,_target,_timeOut,CBA_missionTime);
[_idPFH] call CBA_fnc_removePerFrameHandler;
};
// same as dragObjectPFH, checks if object is deleted or dead OR (target moved away from carrier (weapon disasembled))
if (!alive _target || {_unit distance _target > 10}) then {
- TRACE_4("dead/distance",_unit,_target,_timeOut,ACE_time);
+ TRACE_4("dead/distance",_unit,_target,_timeOut,CBA_missionTime);
[_unit, _target] call FUNC(dropObject);
[_idPFH] call CBA_fnc_removePerFrameHandler;
};
-// timeout. Do nothing. Quit. ACE_time, because anim length is linked to ingame time.
-if (ACE_time > _timeOut) exitWith {
- TRACE_4("timeout",_unit,_target,_timeOut,ACE_time);
+// timeout. Do nothing. Quit. CBA_missionTime, because anim length is linked to ingame time.
+if (CBA_missionTime > _timeOut) exitWith {
+ TRACE_4("timeout",_unit,_target,_timeOut,CBA_missionTime);
[_idPFH] call CBA_fnc_removePerFrameHandler;
// drop if in timeout
@@ -51,7 +51,7 @@ if (ACE_time > _timeOut) exitWith {
// unit is ready to start dragging
if (animationState _unit in DRAG_ANIMATIONS) exitWith {
- TRACE_4("Start Dragging",_unit,_target,_timeOut,ACE_time);
+ TRACE_4("Start Dragging",_unit,_target,_timeOut,CBA_missionTime);
[_unit, _target] call FUNC(dragObject);
[_idPFH] call CBA_fnc_removePerFrameHandler;
diff --git a/addons/dragging/stringtable.xml b/addons/dragging/stringtable.xml
index 2d9fd656bf..b0334f3ca2 100644
--- a/addons/dragging/stringtable.xml
+++ b/addons/dragging/stringtable.xml
@@ -56,6 +56,9 @@
Levantar/Abaixar
Поднять/Опустить
Zvýšit/Snížit
+ Alza/Abbassa
+ Subir/Bajar
+ Lever/Baisser
-
\ No newline at end of file
+
diff --git a/addons/explosives/ACE_Settings.hpp b/addons/explosives/ACE_Settings.hpp
index ef6a723d5b..e103b6e018 100644
--- a/addons/explosives/ACE_Settings.hpp
+++ b/addons/explosives/ACE_Settings.hpp
@@ -1,13 +1,17 @@
class ACE_Settings {
- class GVAR(RequireSpecialist) {
+ class GVAR(requireSpecialist) {
+ displayName = CSTRING(RequireSpecialist_DisplayName);
+ description = CSTRING(RequireSpecialist_Description);
value = 0;
typeName = "BOOL";
};
- class GVAR(PunishNonSpecialists) {
+ class GVAR(punishNonSpecialists) {
+ displayName = CSTRING(PunishNonSpecialists_DisplayName);
+ description = CSTRING(PunishNonSpecialists_Description);
value = 1;
typeName = "BOOL";
};
- class GVAR(ExplodeOnDefuse) {
+ class GVAR(explodeOnDefuse) {
displayName = CSTRING(ExplodeOnDefuse_DisplayName);
description = CSTRING(ExplodeOnDefuse_Description);
value = 1;
diff --git a/addons/explosives/ACE_Triggers.hpp b/addons/explosives/ACE_Triggers.hpp
index 280906432f..145ae0804e 100644
--- a/addons/explosives/ACE_Triggers.hpp
+++ b/addons/explosives/ACE_Triggers.hpp
@@ -11,52 +11,52 @@ onSetup parameters:
class Command {
isAttachable = 1;
displayName = CSTRING(clacker_displayName);
- picture = PATHTOF(Data\UI\Clacker.paa);
+ picture = QPATHTOF(Data\UI\Clacker.paa);
onPlace = QUOTE(_this call FUNC(AddClacker);false);
requires[] = {"ACE_Clacker"};
};
class MK16_Transmitter: Command {
isAttachable = 1;
displayName = CSTRING(M152_displayName);
- picture = PATHTOF(Data\UI\MK16_Reciever_ca.paa);
+ picture = QPATHTOF(Data\UI\MK16_Reciever_ca.paa);
requires[] = {"ACE_M26_Clacker"};
};
class DeadManSwitch: Command {
isAttachable = 1;
displayName = CSTRING(DeadManSwitch_displayName);
- picture = PATHTOF(Data\UI\DeadmanSwitch.paa);
+ picture = QPATHTOF(Data\UI\DeadmanSwitch.paa);
requires[] = {"ACE_DeadManSwitch"};
};
class Cellphone: Command {
isAttachable = 1;
displayName = CSTRING(cellphone_displayName);
- picture = PATHTOF(Data\UI\Cellphone_UI.paa);
+ picture = QPATHTOF(Data\UI\Cellphone_UI.paa);
onPlace = QUOTE(_this call FUNC(addCellphoneIED);false);
requires[] = {"ACE_Cellphone"};
};
class PressurePlate {
isAttachable = 0;
displayName = CSTRING(PressurePlate);
- picture = PATHTOF(Data\UI\PressurePlate.paa);
+ picture = QPATHTOF(Data\UI\PressurePlate.paa);
onPlace = QUOTE(false);
};
class IRSensor {
isAttachable = 0;
displayName = CSTRING(IRSensor);
- picture = PATHTOF(Data\UI\PressurePlate.paa);
+ picture = QPATHTOF(Data\UI\PressurePlate.paa);
onPlace = "false";
};
class Timer {
isAttachable = 1;
displayName = CSTRING(timerName);
- picture = PATHTOF(data\UI\Timer.paa);
+ picture = QPATHTOF(data\UI\Timer.paa);
onPlace = QUOTE([ARR_2(_this select 1,(_this select 3) select 0)] call FUNC(startTimer);false);
onSetup = QUOTE(_this call FUNC(openTimerSetUI);true);
};
class Tripwire {
isAttachable = 0;
displayName = CSTRING(TripWire);
- picture = PATHTOF(Data\UI\Tripwire.paa);
+ picture = QPATHTOF(Data\UI\Tripwire.paa);
onPlace = "false";
};
};
diff --git a/addons/explosives/CfgAmmo.hpp b/addons/explosives/CfgAmmo.hpp
index 977e01e3af..8d81a52613 100644
--- a/addons/explosives/CfgAmmo.hpp
+++ b/addons/explosives/CfgAmmo.hpp
@@ -31,14 +31,14 @@ class CfgAmmo {
class ClaymoreDirectionalMine_Remote_Ammo: DirectionalBombBase {
GVAR(magazine) = "ClaymoreDirectionalMine_Remote_Mag";
GVAR(Explosive) = "ClaymoreDirectionalMine_Remote_Ammo_Scripted";
- GVAR(defuseObjectPosition[]) = {0, 0, 0.038};
+ GVAR(defuseObjectPosition)[] = {0, 0, 0.038};
soundActivation[] = {"", 0, 0, 0};
soundDeactivation[] = {"", 0, 0, 0};
};
// class ClaymoreDirectionalMine_Remote_Ammo_Scripted: ClaymoreDirectionalMine_Remote_Ammo {};
class APERSTripMine_Wire_Ammo: DirectionalBombBase {
- GVAR(defuseObjectPosition[]) = {-1.415, 0, 0.12};
+ GVAR(defuseObjectPosition)[] = {-1.415, 0, 0.12};
};
class SLAMDirectionalMine_Wire_Ammo: DirectionalBombBase {
@@ -66,7 +66,7 @@ class CfgAmmo {
class DemoCharge_Remote_Ammo: PipeBombBase {
GVAR(magazine) = "DemoCharge_Remote_Mag";
GVAR(Explosive) = "DemoCharge_Remote_Ammo_Scripted";
- GVAR(defuseObjectPosition[]) = {0.07, 0, 0.055};
+ GVAR(defuseObjectPosition)[] = {0.07, 0, 0.055};
soundActivation[] = {"", 0, 0, 0};
soundDeactivation[] = {"", 0, 0, 0};
hit = 500;
@@ -76,7 +76,7 @@ class CfgAmmo {
class SatchelCharge_Remote_Ammo: PipeBombBase {
GVAR(magazine) = "SatchelCharge_Remote_Mag";
GVAR(Explosive) = "SatchelCharge_Remote_Ammo_Scripted";
- GVAR(defuseObjectPosition[]) = {0.1, 0.1, 0.05};
+ GVAR(defuseObjectPosition)[] = {0.1, 0.1, 0.05};
soundActivation[] = {"", 0, 0, 0};
soundDeactivation[] = {"", 0, 0, 0};
};
diff --git a/addons/explosives/CfgEventHandlers.hpp b/addons/explosives/CfgEventHandlers.hpp
index e7bf74e414..ced23c6b56 100644
--- a/addons/explosives/CfgEventHandlers.hpp
+++ b/addons/explosives/CfgEventHandlers.hpp
@@ -1,3 +1,10 @@
+
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
@@ -25,3 +32,9 @@ class Extended_Put_EventHandlers {
GVAR(takeHandler) = QUOTE([ARR_3(_this select 1, _this select 0, _this select 2)] call FUNC(onInventoryChanged));
};
};
+
+class Extended_DisplayLoad_EventHandlers {
+ class RscDisplayMission {
+ ADDON = QUOTE(_this call COMPILE_FILE(XEH_missionDisplayLoad));
+ };
+};
diff --git a/addons/explosives/CfgModule.hpp b/addons/explosives/CfgModule.hpp
index b651903f59..a4e0d8dbd2 100644
--- a/addons/explosives/CfgModule.hpp
+++ b/addons/explosives/CfgModule.hpp
@@ -3,11 +3,11 @@ class ACE_ModuleExplosive: ACE_Module {
author = ECSTRING(common,ACETeam);
category = "ACE";
displayName = CSTRING(Module_DisplayName);
- function = QUOTE(FUNC(module));
+ function = QFUNC(module);
scope = 2;
isGlobal = 1;
isSingular = 1;
- icon = PATHTOF(UI\Icon_Module_Explosives_ca.paa);
+ icon = QPATHTOF(UI\Icon_Module_Explosives_ca.paa);
class Arguments {
class RequireSpecialist {
displayName = CSTRING(RequireSpecialist_DisplayName);
diff --git a/addons/explosives/CfgVehicles.hpp b/addons/explosives/CfgVehicles.hpp
index 9be3a936e5..dcfb01c489 100644
--- a/addons/explosives/CfgVehicles.hpp
+++ b/addons/explosives/CfgVehicles.hpp
@@ -1,3 +1,6 @@
+
+class CBA_Extended_EventHandlers;
+
class CfgVehicles {
class Man;
class CAManBase: Man {
@@ -9,7 +12,7 @@ class CfgVehicles {
exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting"};
showDisabled = 1;
priority = 4;
- icon = PATHTOF(UI\Explosives_Menu_ca.paa);
+ icon = QPATHTOF(UI\Explosives_Menu_ca.paa);
insertChildren = QUOTE([_player] call FUNC(addTransmitterActions););
//Sub-menu items
class ACE_Place {
@@ -19,7 +22,7 @@ class CfgVehicles {
insertChildren = QUOTE([_player] call FUNC(addExplosiveActions););
exceptions[] = {"isNotSwimming"};
showDisabled = 1;
- icon = PATHTOF(UI\Place_Explosive_ca.paa);
+ icon = QPATHTOF(UI\Place_Explosive_ca.paa);
priority = 1;
};
class ACE_Cellphone {
@@ -28,7 +31,7 @@ class CfgVehicles {
statement = "closeDialog 0;createDialog 'Rsc_ACE_PhoneInterface';";
exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting"};
showDisabled = 0;
- icon = PATHTOF(Data\UI\Cellphone_UI.paa);
+ icon = QPATHTOF(Data\UI\Cellphone_UI.paa);
priority = 0.8;
};
};
@@ -37,66 +40,60 @@ class CfgVehicles {
class Items_base_F;
class ACE_DefuseObject: Items_base_F {
- XEH_ENABLED;
- author = "ACE";
+ class EventHandlers {
+ class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
+ };
+
+ author = ECSTRING(common,Author);
_generalMacro = "ACE_DefuseObject";
displayName = "ACE Defuse Helper";
- mapSize = 0.2;
- icon = "iconObject_1x2";
model = "\A3\Weapons_f\dummyweapon.p3d";
- scope = 2;
- scopeCurator = 1;
- vehicleClass = "Cargo";
+ scope = 1;
+
class ACE_Actions {
- class ACE_MainActions {
- selection = "";
+ class ACE_Defuse {
distance = 1;
- condition = "true";
- class ACE_Defuse {
- displayName = CSTRING(Defuse);
- condition = QUOTE([ARR_2(_player,_target)] call FUNC(canDefuse));
- statement = QUOTE([ARR_2(_player,_target)] call FUNC(startDefuse););
- exceptions[] = {"isNotSwimming"};
- showDisabled = 0;
- icon = PATHTOF(UI\Defuse_ca.paa);
- priority = 0.8;
- distance = 1;
- };
+ displayName = CSTRING(Defuse);
+ condition = QUOTE([ARR_2(_player,_target)] call FUNC(canDefuse));
+ statement = QUOTE([ARR_2(_player,_target)] call FUNC(startDefuse););
+ exceptions[] = {"isNotSwimming"};
+ icon = QPATHTOF(UI\Defuse_ca.paa);
};
};
};
+
class ACE_Explosives_Place: Items_base_F {
- XEH_ENABLED;
+ class EventHandlers {
+ class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
+ };
+
author = "ACE";
_generalMacro = "ACE_Explosives_Place";
displayName = "Multi-meter";
mapSize = 0.2;
icon = "iconObject_1x2";
model = "\A3\Structures_F\Items\Tools\MultiMeter_F.p3d";
- scope = 2;
- scopeCurator = 1;
+ scope = 1;
vehicleClass = "Cargo";
class ACE_Actions {
class ACE_MainActions {
selection = "";
- distance = 1;
+ distance = 1.5;
condition = "true";
class ACE_SetTrigger {
selection = "";
displayName = CSTRING(TriggerMenu);
- distance = 1;
condition = "true";
statement = "";
insertChildren = QUOTE([ARR_3(_target getVariable QUOTE(QGVAR(class)),_target,_player)] call FUNC(addTriggerActions););
showDisabled = 0;
exceptions[] = {"isNotSwimming"};
priority = 5;
- icon = QUOTE(PATHTOF(UI\Explosives_Menu_ca.paa));
+ icon = QPATHTOF(UI\Explosives_Menu_ca.paa);
};
class ACE_PickUp {
selection = "";
displayName = CSTRING(Pickup);
- distance = 1;
condition = "true";
statement = QUOTE([ARR_2(_player,_target getVariable QUOTE(QGVAR(class)))] call EFUNC(common,addToInventory);deleteVehicle _target;);
showDisabled = 0;
diff --git a/addons/explosives/CfgWeapons.hpp b/addons/explosives/CfgWeapons.hpp
index cd900b2da3..a3f3b32d4c 100644
--- a/addons/explosives/CfgWeapons.hpp
+++ b/addons/explosives/CfgWeapons.hpp
@@ -11,8 +11,8 @@ class CfgWeapons {
scope = 2;
displayName = CSTRING(clacker_displayName);
descriptionShort = CSTRING(clacker_description);
- picture = PATHTOF(Data\UI\Clacker.paa);
- model = QUOTE(PATHTOF(data\ace_m57.p3d));
+ picture = QPATHTOF(Data\UI\Clacker.paa);
+ model = QPATHTOF(data\ace_m57.p3d);
GVAR(Range) = 250;
GVAR(Detonator) = 1;
GVAR(triggerType) = "Command";
@@ -24,7 +24,7 @@ class CfgWeapons {
};
class ACE_M26_Clacker: ACE_Clacker {
displayName = CSTRING(M152_Clacker_displayName);
- picture = PATHTOF(Data\UI\MK26_Transmitter_ca.paa);
+ picture = QPATHTOF(Data\UI\MK26_Transmitter_ca.paa);
GVAR(Range) = 5000;
GVAR(triggerType) = "MK16_Transmitter";
};
@@ -32,7 +32,7 @@ class CfgWeapons {
scope = 2;
displayName = CSTRING(DefusalKit_displayName);
descriptionShort = CSTRING(DefusalKit_description);
- picture = PATHTOF(Data\UI\Pliers.paa);
+ picture = QPATHTOF(Data\UI\Pliers.paa);
model = "\A3\Structures_F\Items\Tools\Pliers_F.p3d";
class ItemInfo: ACE_ExplosiveItem {
@@ -44,7 +44,7 @@ class CfgWeapons {
scope = 2;
displayName = CSTRING(DeadManSwitch_displayName);
descriptionShort = CSTRING(DeadManSwitch_description);
- picture = PATHTOF(Data\UI\DeadmanSwitch.paa);
+ picture = QPATHTOF(Data\UI\DeadmanSwitch.paa);
model = "\A3\weapons_F\ammo\mag_univ.p3d";
GVAR(Range) = 100;
GVAR(Detonator) = 1;
@@ -59,7 +59,7 @@ class CfgWeapons {
scope = 2;
displayName = CSTRING(cellphone_displayName);
descriptionShort = CSTRING(cellphone_description);
- picture = PATHTOF(Data\UI\Cellphone_UI.paa);
+ picture = QPATHTOF(Data\UI\Cellphone_UI.paa);
model = "\A3\weapons_F\ammo\mag_univ.p3d";
GVAR(Range) = 15000;
GVAR(Detonator) = 1;
diff --git a/addons/explosives/ExplosivesUI.hpp b/addons/explosives/ExplosivesUI.hpp
index 45582a8564..cf97794d8f 100644
--- a/addons/explosives/ExplosivesUI.hpp
+++ b/addons/explosives/ExplosivesUI.hpp
@@ -113,7 +113,7 @@ class Rsc_ACE_PhoneInterface {
class controls {
class RscPicture_1200: RscPicture {
idc = 1200;
- text = PATHTOF(Data\UI\Cellphone_Background.paa);
+ text = QPATHTOF(Data\UI\Cellphone_Background.paa);
x = 0.231875 * safezoneW + safezoneX;
y = 0.104 * safezoneH + safezoneY;
w = 0.195937 * safezoneW;
diff --git a/addons/explosives/XEH_PREP.hpp b/addons/explosives/XEH_PREP.hpp
new file mode 100644
index 0000000000..0d8a4eeca5
--- /dev/null
+++ b/addons/explosives/XEH_PREP.hpp
@@ -0,0 +1,47 @@
+
+PREP(addCellphoneIED);
+PREP(addClacker);
+PREP(addDetonateActions);
+PREP(addExplosiveActions);
+PREP(addToSpeedDial);
+PREP(addTransmitterActions);
+PREP(addTriggerActions);
+PREP(cancelPlacement);
+PREP(canDefuse);
+PREP(canDetonate);
+PREP(connectExplosive);
+PREP(defuseExplosive);
+PREP(detonateExplosive);
+PREP(detonateExplosiveAll);
+PREP(dialPhone);
+PREP(dialingPhone);
+
+PREP(handleScrollWheel);
+
+PREP(hasExplosives);
+PREP(hasPlacedExplosives);
+
+PREP(interactEH);
+
+PREP(getDetonators);
+PREP(getPlacedExplosives);
+PREP(getSpeedDialExplosive);
+
+PREP(module);
+
+PREP(onIncapacitated);
+PREP(onInventoryChanged);
+
+PREP(openTimerSetUI);
+
+PREP(placeExplosive);
+PREP(removeFromSpeedDial);
+
+PREP(scriptedExplosive);
+PREP(selectTrigger);
+PREP(setupExplosive);
+PREP(setPosition);
+PREP(setSpeedDial);
+PREP(startDefuse);
+PREP(startTimer);
+PREP(triggerType);
diff --git a/addons/explosives/XEH_missionDisplayLoad.sqf b/addons/explosives/XEH_missionDisplayLoad.sqf
new file mode 100644
index 0000000000..1475f774e8
--- /dev/null
+++ b/addons/explosives/XEH_missionDisplayLoad.sqf
@@ -0,0 +1,6 @@
+#include "script_component.hpp"
+
+params ["_display"];
+
+_display displayAddEventHandler ["MouseZChanged", {(_this select 1) call FUNC(handleScrollWheel)}];
+_display displayAddEventHandler ["MouseButtonDown", {[ACE_player, _this select 1] call FUNC(cancelPlacement)}];
diff --git a/addons/explosives/XEH_postInit.sqf b/addons/explosives/XEH_postInit.sqf
index 651f704a6a..365e772023 100644
--- a/addons/explosives/XEH_postInit.sqf
+++ b/addons/explosives/XEH_postInit.sqf
@@ -16,17 +16,30 @@
#include "script_component.hpp"
//Event for setting explosive placement angle/pitch:
-[QGVAR(place), {_this call FUNC(setPosition)}] call EFUNC(common,addEventHandler);
+[QGVAR(place), {_this call FUNC(setPosition)}] call CBA_fnc_addEventHandler;
+[QGVAR(startDefuse), FUNC(startDefuse)] call CBA_fnc_addEventHandler;
//When getting knocked out in medical, trigger deadman explosives:
//Event is global, only run on server (ref: ace_medical_fnc_setUnconscious)
if (isServer) then {
- ["medical_onUnconscious", {
+ ["ace_unconscious", {
params ["_unit", "_isUnconscious"];
if (!_isUnconscious) exitWith {};
TRACE_1("Knocked Out, Doing Deadman", _unit);
[_unit] call FUNC(onIncapacitated);
- }] call EFUNC(common,addEventHandler);
+ }] call CBA_fnc_addEventHandler;
+
+ [QGVAR(clientRequestOrientations), {
+ params ["_logic"];
+ TRACE_1("clientRequestsOrientations received:",_logic);
+ // Filter the array before sending it
+ GVAR(explosivesOrientations) = GVAR(explosivesOrientations) select {
+ _x params ["_explosive"];
+ (!isNull _explosive && {alive _explosive})
+ };
+ TRACE_1("serverSendsOrientations sent:",GVAR(explosivesOrientations));
+ [QGVAR(serverSendOrientations), [GVAR(explosivesOrientations)], _logic] call CBA_fnc_targetEvent;
+ }] call CBA_fnc_addEventHandler;
};
if (!hasInterface) exitWith {};
@@ -36,18 +49,28 @@ GVAR(Setup) = objNull;
GVAR(pfeh_running) = false;
GVAR(CurrentSpeedDial) = 0;
-// Properly angle preplaced bottom-attack SLAMs
-{
- if (local _x) then {
- switch (typeOf _x) do {
- case ("ACE_SLAMDirectionalMine_Magnetic_Ammo"): {
- [_x, getDir _x, 90] call FUNC(setPosition);
- };
- };
- };
-} forEach allMines;
+// In case we are a JIP client, ask the server for orientation of any previously
+// placed mine.
+if (didJIP) then {
+ [QGVAR(serverSendOrientations), {
+ params ["_explosivesOrientations"];
+ TRACE_1("serverSendsOrientations received:",_explosivesOrientations);
+ {
+ _x params ["_explosive","_direction","_pitch"];
+ TRACE_3("orientation set:",_explosive,_direction,_pitch);
+ [_explosive, _direction, _pitch] call FUNC(setPosition);
+ } forEach _explosivesOrientations;
+ deleteVehicle GVAR(localLogic);
+ GVAR(localLogic) = nil;
+ }] call CBA_fnc_addEventHandler;
-["interactMenuOpened", {
+ // Create a logic to get the client ID
+ GVAR(localLogic) = ([sideLogic] call CBA_fnc_getSharedGroup) createUnit ["Logic", [0,0,0], [], 0, "NONE"];
+ TRACE_1("clientRequestsOrientations sent:",GVAR(localLogic));
+ [QGVAR(clientRequestOrientations), [GVAR(localLogic)]] call CBA_fnc_serverEvent;
+};
+
+["ace_interactMenuOpened", {
//Cancel placement if interact menu opened
if (GVAR(pfeh_running)) then {
GVAR(placeAction) = PLACE_CANCEL;
@@ -56,6 +79,4 @@ GVAR(CurrentSpeedDial) = 0;
//Show defuse actions on CfgAmmos (allMines):
_this call FUNC(interactEH);
-}] call EFUNC(common,addEventHandler);
-
-[{(_this select 0) call FUNC(handleScrollWheel);}] call EFUNC(common,addScrollWheelEventHandler);
+}] call CBA_fnc_addEventHandler;
diff --git a/addons/explosives/XEH_preInit.sqf b/addons/explosives/XEH_preInit.sqf
index 1facffccb3..16a9a4124b 100644
--- a/addons/explosives/XEH_preInit.sqf
+++ b/addons/explosives/XEH_preInit.sqf
@@ -17,50 +17,10 @@
ADDON = false;
-PREP(addCellphoneIED);
-PREP(addClacker);
-PREP(addDetonateActions);
-PREP(addExplosiveActions);
-PREP(addToSpeedDial);
-PREP(addTransmitterActions);
-PREP(addTriggerActions);
-PREP(canDefuse);
-PREP(canDetonate);
-PREP(connectExplosive);
-PREP(defuseExplosive);
-PREP(detonateExplosive);
-PREP(detonateExplosiveAll);
-PREP(dialPhone);
-PREP(dialingPhone);
+#include "XEH_PREP.hpp"
-PREP(handleScrollWheel);
-
-PREP(hasExplosives);
-PREP(hasPlacedExplosives);
-
-PREP(interactEH);
-
-PREP(getDetonators);
-PREP(getPlacedExplosives);
-PREP(getSpeedDialExplosive);
-
-PREP(module);
-
-PREP(onIncapacitated);
-PREP(onInventoryChanged);
-
-PREP(openTimerSetUI);
-
-PREP(placeExplosive);
-PREP(removeFromSpeedDial);
-
-PREP(scriptedExplosive);
-PREP(selectTrigger);
-PREP(setupExplosive);
-PREP(setPosition);
-PREP(setSpeedDial);
-PREP(startDefuse);
-PREP(startTimer);
-PREP(triggerType);
+if (isServer) then {
+ GVAR(explosivesOrientations) = []
+};
ADDON = true;
diff --git a/addons/explosives/XEH_preStart.sqf b/addons/explosives/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/explosives/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/explosives/config.cpp b/addons/explosives/config.cpp
index 3fc047fa6a..83033cbddc 100644
--- a/addons/explosives/config.cpp
+++ b/addons/explosives/config.cpp
@@ -6,8 +6,9 @@ class CfgPatches {
weapons[] = {"ACE_Clacker", "ACE_DefusalKit", "ACE_M26_Clacker", "ACE_DeadManSwitch", "ACE_Cellphone"};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_interaction"};
- author[] = {"Garth 'L-H' de Wet"};
- authorUrl = "http://garth.snakebiteink.co.za/";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"Garth 'L-H' de Wet"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
@@ -42,3 +43,8 @@ class CfgMineTriggers {
mineTriggerRange = 1;
};
};
+
+class ACE_newEvents {
+ clientRequestsOrientations = QGVAR(clientRequestOrientations);
+ serverSendsOrientations = QGVAR(serverSendOrientations);
+};
diff --git a/addons/explosives/functions/fnc_addDetonateActions.sqf b/addons/explosives/functions/fnc_addDetonateActions.sqf
index 0d09284d52..f88abc29d3 100644
--- a/addons/explosives/functions/fnc_addDetonateActions.sqf
+++ b/addons/explosives/functions/fnc_addDetonateActions.sqf
@@ -51,22 +51,103 @@ _explosivesList = [];
};
};
} forEach _result;
-
-// Add action to detonate all explosives tied to the detonator
-if (count _explosivesList > 0) then {
- _children pushBack [
+if (_detonator != "ACE_DeadManSwitch") then {
+ // Add action to detonate all explosives tied to the detonator
+ if (count _explosivesList > 0) then {
+ _children pushBack [
[
"Explosive_All",
- localize LSTRING(DetonateAll),
+ localize LSTRING(DetonateAll),
getText(ConfigFile >> "CfgWeapons" >> _detonator >> "picture"),
{(_this select 2) call FUNC(detonateExplosiveAll);},
{true},
{},
[_unit,_range,_explosivesList]
- ] call EFUNC(interact_menu,createAction),
- [],
- _unit
+ ] call EFUNC(interact_menu,createAction),
+ [],
+ _unit
+ ];
+ };
+} else {
+ //Add action to detonate all explosives (including the inventory explosive):
+ _children pushBack [
+ [
+ "Explosive_All_Deadman",
+ localize LSTRING(DetonateAll),
+ getText(ConfigFile >> "CfgWeapons" >> _detonator >> "picture"),
+ {[_player] call FUNC(onIncapacitated)},
+ {true}
+ ] call EFUNC(interact_menu,createAction),
+ [],
+ _unit
];
+
+ //Adds actions for the explosives you can connect to the deadman switch.
+ private _connectedInventoryExplosive = _unit getVariable [QGVAR(deadmanInvExplosive), ""];
+ if ((_connectedInventoryExplosive != "") && {!(_connectedInventoryExplosive in (magazines _unit))}) then {
+ TRACE_1("set, but missing in inventory",_connectedInventoryExplosive);
+ _unit setVariable [QGVAR(deadmanInvExplosive), "", true];
+ };
+
+ _connectedInventoryExplosive = _unit getVariable [QGVAR(deadmanInvExplosive), ""];
+ if (_connectedInventoryExplosive != "") then {
+ //Add the disconect action
+ private _magConfig = configFile >> "CfgMagazines" >> _connectedInventoryExplosive;
+ private _name = if ((getText (_magConfig >> "displayNameShort")) != "") then {
+ getText (_magConfig >> "displayNameShort")
+ } else {
+ getText(_magConfig >> "displayName")
+ };
+ private _picture = getText (_magConfig >> "picture");
+
+ _children pushBack [
+ ([
+ "Deadman_disconnect",
+ format ["%1 %2", localize "str_disp_disconnect", _name],
+ _picture,
+ {
+ params ["_player"];
+ TRACE_1("clear",_player);
+ _player setVariable [QGVAR(deadmanInvExplosive), "", true];
+ },
+ {true}
+ ] call EFUNC(interact_menu,createAction)), [], _unit];
+
+ } else {
+ //Add all magazines that would work with the deadman switch
+ private _procressedMags = [];
+ {
+ private _mag = _x;
+ if (!(_mag in _procressedMags)) then {
+ _procressedMags pushBack _x;
+ private _magConfig = configFile >> "CfgMagazines" >> _mag;
+ private _supportedTriggers = getArray (_magConfig >> "ACE_Triggers" >> "SupportedTriggers");
+ if (({_x == "DeadmanSwitch"} count _supportedTriggers) == 1) then { //case insensitive search
+ private _name = if ((getText (_magConfig >> "displayNameShort")) != "") then {
+ getText (_magConfig >> "displayNameShort")
+ } else {
+ getText(_magConfig >> "displayName")
+ };
+ private _picture = getText (_magConfig >> "picture");
+
+ _children pushBack [
+ ([
+ format ["Deadman_exp_%1", _mag],
+ format [localize LSTRING(connectInventoryExplosiveToDeadman), _name],
+ _picture,
+ {
+ params ["_player", "", "_mag"];
+ TRACE_2("set new",_player,_mag);
+ _player setVariable [QGVAR(deadmanInvExplosive), _mag, true];
+ },
+ {(_this select 2) in (magazines _player)},
+ {},
+ (_mag)
+ ] call EFUNC(interact_menu,createAction)), [], _unit];
+ };
+ };
+ } forEach (magazines _unit);
+ };
};
_children
diff --git a/addons/explosives/functions/fnc_addExplosiveActions.sqf b/addons/explosives/functions/fnc_addExplosiveActions.sqf
index e744af6bce..fc494a5fad 100644
--- a/addons/explosives/functions/fnc_addExplosiveActions.sqf
+++ b/addons/explosives/functions/fnc_addExplosiveActions.sqf
@@ -45,7 +45,7 @@ _children = [];
format ["Explosive_%1", _forEachIndex],
format [_name + " (%1)", _itemCount select _forEachIndex],
getText(_x >> "picture"),
- {[{_this call FUNC(setupExplosive)}, _this] call EFUNC(common,execNextFrame)},
+ {[{_this call FUNC(setupExplosive)}, _this] call CBA_fnc_execNextFrame},
{true},
{},
(configName _x)
diff --git a/addons/explosives/functions/fnc_cancelPlacement.sqf b/addons/explosives/functions/fnc_cancelPlacement.sqf
new file mode 100644
index 0000000000..e6bd60f637
--- /dev/null
+++ b/addons/explosives/functions/fnc_cancelPlacement.sqf
@@ -0,0 +1,23 @@
+/*
+ * Author: Garth 'L-H' de Wet
+ * Cancels explosives placement.
+ *
+ * Arguments:
+ * 0: Unit
+ * 1: Key
+ *
+ * Return Value:
+ * None
+ *
+ * Example:
+ * [unit, 1] call ace_explosives_fnc_cancelPlacement
+ *
+ * Public: No
+ */
+#include "script_component.hpp"
+
+params ["_unit", "_key"];
+
+if (_key != 1 || {!GVAR(pfeh_running)}) exitWith {};
+
+GVAR(placeAction) = PLACE_CANCEL;
diff --git a/addons/explosives/functions/fnc_defuseExplosive.sqf b/addons/explosives/functions/fnc_defuseExplosive.sqf
index 147d722987..b98b992f8e 100644
--- a/addons/explosives/functions/fnc_defuseExplosive.sqf
+++ b/addons/explosives/functions/fnc_defuseExplosive.sqf
@@ -22,8 +22,8 @@ TRACE_2("params",_unit,_explosive);
if (GVAR(ExplodeOnDefuse) && {(random 1.0) < (getNumber (ConfigFile >> "CfgAmmo" >> typeOf _explosive >> QGVAR(explodeOnDefuseChance)))}) exitWith {
TRACE_1("exploding on defuse",_explosive);
[_unit, -1, [_explosive, 1], true] call FUNC(detonateExplosive);
- [QGVAR(explodeOnDefuse), [_explosive, _unit]] call EFUNC(common,globalEvent);
+ [QGVAR(explodeOnDefuse), [_explosive, _unit]] call CBA_fnc_globalEvent;
};
_unit action ["Deactivate", _unit, _explosive];
-[QGVAR(defuse), [_explosive, _unit]] call EFUNC(common,globalEvent);
+[QGVAR(defuse), [_explosive, _unit]] call CBA_fnc_globalEvent;
diff --git a/addons/explosives/functions/fnc_detonateExplosive.sqf b/addons/explosives/functions/fnc_detonateExplosive.sqf
index a01f181635..b7f4893e52 100644
--- a/addons/explosives/functions/fnc_detonateExplosive.sqf
+++ b/addons/explosives/functions/fnc_detonateExplosive.sqf
@@ -49,6 +49,6 @@ if (getNumber (ConfigFile >> "CfgAmmo" >> typeOf (_item select 0) >> "TriggerWhe
if (!isNull _explosive) then {
_explosive setDamage 1;
};
-}, [_item select 0], (_item select 1)] call EFUNC(common,waitAndExecute);
+}, [_item select 0], (_item select 1)] call CBA_fnc_waitAndExecute;
_result
diff --git a/addons/explosives/functions/fnc_dialPhone.sqf b/addons/explosives/functions/fnc_dialPhone.sqf
index 44addcda9f..6bfeac8595 100644
--- a/addons/explosives/functions/fnc_dialPhone.sqf
+++ b/addons/explosives/functions/fnc_dialPhone.sqf
@@ -40,7 +40,7 @@ if (_unit == ace_player) then {
[{
playSound3D [QUOTE(PATHTO_R(Data\Audio\Cellphone_Ring.wss)),objNull, false, getPosASL (_this select 1),3.16228,1,75];
(_this select 0) setVariable [QGVAR(Dialing), false, true];
- }, [_unit,_explosive select 0], 0.25 * (count _arr - 4)] call EFUNC(common,waitAndExecute);
+ }, [_unit,_explosive select 0], 0.25 * (count _arr - 4)] call CBA_fnc_waitAndExecute;
[_explosive select 0,(0.25 * (count _arr - 1)) + (_explosive select 2)] call FUNC(startTimer);
};
};
diff --git a/addons/explosives/functions/fnc_handleScrollWheel.sqf b/addons/explosives/functions/fnc_handleScrollWheel.sqf
index 0d5fdd2aba..36530afb08 100644
--- a/addons/explosives/functions/fnc_handleScrollWheel.sqf
+++ b/addons/explosives/functions/fnc_handleScrollWheel.sqf
@@ -15,7 +15,7 @@
*/
#include "script_component.hpp"
-if ((!GVAR(pfeh_running)) || {ACE_Modifier == 0}) exitWith {false};
+if (!GVAR(pfeh_running)) exitWith {false};
GVAR(TweakedAngle) = ((GVAR(TweakedAngle) + 7.2 * _this) + 360) % 360;
diff --git a/addons/explosives/functions/fnc_onIncapacitated.sqf b/addons/explosives/functions/fnc_onIncapacitated.sqf
index 963f106979..6bbf6152d3 100644
--- a/addons/explosives/functions/fnc_onIncapacitated.sqf
+++ b/addons/explosives/functions/fnc_onIncapacitated.sqf
@@ -25,3 +25,24 @@ _deadman = [_unit, "DeadManSwitch"] call FUNC(getPlacedExplosives);
{
[_unit, -1, _x, true] call FUNC(detonateExplosive);
} forEach _deadman;
+
+//Handle deadman connected to explosive in inventory
+private _connectedInventoryExplosive = _unit getVariable [QGVAR(deadmanInvExplosive), ""];
+if (_connectedInventoryExplosive != "") then {
+ if (!(_connectedInventoryExplosive in (magazines _unit))) exitWith {};
+
+ //Remove mag and reset variable
+ _unit removeMagazine _connectedInventoryExplosive;
+ _unit setVariable [QGVAR(deadmanInvExplosive), "", true];
+
+ private _ammo = getText (configFile >> "CfgMagazines" >> _connectedInventoryExplosive >> "ammo");
+ TRACE_2("deadman inventory",_connectedInventoryExplosive,_ammo);
+ private _magazineTrigger = configFile >> "CfgMagazines" >> _connectedInventoryExplosive >> "ACE_Triggers" >> "DeadmanSwitch";
+ if (isText (_magazineTrigger >> "ammo")) then {
+ _ammo = getText (_magazineTrigger >> "ammo");
+ };
+
+ private _explosive = createVehicle [_ammo, (getPos _unit), [], 0, "NONE"];
+ _explosive setPosASL (getPosASL _unit);
+ [_unit, -1, [_explosive, -1]] call FUNC(detonateExplosive); //Explode, ignoring range, with a random 0-1 second delay
+};
diff --git a/addons/explosives/functions/fnc_placeExplosive.sqf b/addons/explosives/functions/fnc_placeExplosive.sqf
index 83cdb2fef8..455b768b97 100644
--- a/addons/explosives/functions/fnc_placeExplosive.sqf
+++ b/addons/explosives/functions/fnc_placeExplosive.sqf
@@ -95,6 +95,6 @@ if (isText(_triggerConfig >> "onPlace") && {[_unit,_explosive,_magazineClass,_tr
_pitch = getNumber (_magazineTrigger >> "pitch");
//Globaly set the position and angle:
-[QGVAR(place), [_explosive, _dir, _pitch, _unit]] call EFUNC(common,globalEvent);
+[QGVAR(place), [_explosive, _dir, _pitch, _unit]] call CBA_fnc_globalEvent;
_explosive
diff --git a/addons/explosives/functions/fnc_scriptedExplosive.sqf b/addons/explosives/functions/fnc_scriptedExplosive.sqf
index b4abb204b3..6a554ac09c 100644
--- a/addons/explosives/functions/fnc_scriptedExplosive.sqf
+++ b/addons/explosives/functions/fnc_scriptedExplosive.sqf
@@ -4,7 +4,7 @@
* detonate editor-placed explosives.
*
* Arguments:
- * 0: Explosives objects to detonate
+ * 0: Explosives objects to detonate
* 1: Fuze delay (for each explosive; use negative number for random time up to value)
*
* Return Value:
@@ -18,10 +18,13 @@
*/
#include "script_component.hpp"
-params ["_explosiveArr",["_fuzeTime",0]];
+params [["_explosiveArr", [], [[], objNull]], ["_fuzeTime", 0, [0]]];
+
+if (_explosiveArr isEqualType objNull) then {
+ _explosiveArr = [_explosiveArr];
+};
-private _detTime;
{
- _detTime = if (_fuzeTime < 0) then {random abs _fuzeTime} else {_fuzeTime};
+ private _detTime = if (_fuzeTime < 0) then {random abs _fuzeTime} else {_fuzeTime};
[objNull, -1, [_x, _detTime]] call FUNC(detonateExplosive);
} forEach _explosiveArr;
diff --git a/addons/explosives/functions/fnc_setPosition.sqf b/addons/explosives/functions/fnc_setPosition.sqf
index b19e63ff5a..430f926138 100644
--- a/addons/explosives/functions/fnc_setPosition.sqf
+++ b/addons/explosives/functions/fnc_setPosition.sqf
@@ -29,3 +29,15 @@ if (isNull (attachedTo _explosive)) then {
//Attaching to a vehicle (dirAndUp based on vehicle)
_explosive setVectorDirAndUp [[0,0,1],[(sin _direction),(cos _direction),0]];
};
+
+if (isServer) then {
+ // Store the orientation to broadcast it later to JIP players
+ GVAR(explosivesOrientations) pushBack [_explosive, _direction, _pitch];
+
+ // This is a good time to filter the array and remove explosives that no longer exist
+ GVAR(explosivesOrientations) = GVAR(explosivesOrientations) select {
+ _x params ["_explosive"];
+ (!isNull _explosive && {alive _explosive})
+ };
+ TRACE_1("setPosition",GVAR(explosivesOrientations));
+};
diff --git a/addons/explosives/functions/fnc_setSpeedDial.sqf b/addons/explosives/functions/fnc_setSpeedDial.sqf
index 9013c812cc..7e68c9016f 100644
--- a/addons/explosives/functions/fnc_setSpeedDial.sqf
+++ b/addons/explosives/functions/fnc_setSpeedDial.sqf
@@ -14,8 +14,7 @@
*
* Public: No
*/
- #include "script_component.hpp"
-
+#include "script_component.hpp"
private ["_speedDial", "_amount"];
_speedDial = ace_player getVariable [QGVAR(SpeedDial), []];
diff --git a/addons/explosives/functions/fnc_setupExplosive.sqf b/addons/explosives/functions/fnc_setupExplosive.sqf
index b1fdf7216b..6dd1094c6a 100644
--- a/addons/explosives/functions/fnc_setupExplosive.sqf
+++ b/addons/explosives/functions/fnc_setupExplosive.sqf
@@ -141,10 +141,10 @@ GVAR(TweakedAngle) = 0;
//Don't allow placing in a bad position:
if (_badPosition && {GVAR(placeAction) == PLACE_APPROVE}) then {GVAR(placeAction) = PLACE_WAITING;};
- if (((inputAction "zoomTemp") > 0) || //Cancel on RMB, For some reason this works (when held) but AddActionEventHandler doesn't
- {_unit != ACE_player} ||
- {!([_unit, objNull, ["isNotSwimming"]] call EFUNC(common,canInteractWith))} ||
- {!(_magClassname in (magazines _unit))}) then {
+ if (_unit != ACE_player ||
+ {!([_unit, objNull, ["isNotSwimming"]] call EFUNC(common,canInteractWith))} ||
+ {!(_magClassname in (magazines _unit))}
+ ) then {
GVAR(placeAction) = PLACE_CANCEL;
};
@@ -187,7 +187,7 @@ GVAR(TweakedAngle) = 0;
_unit removeMagazine _magClassname;
_unit playActionNow "PutDown";
_unit setVariable [QGVAR(PlantingExplosive), true];
- [{_this setVariable [QGVAR(PlantingExplosive), false]}, _unit, 1.5] call EFUNC(common,waitAndExecute);
+ [{_this setVariable [QGVAR(PlantingExplosive), false]}, _unit, 1.5] call CBA_fnc_waitAndExecute;
};
} else {
diff --git a/addons/explosives/functions/fnc_startDefuse.sqf b/addons/explosives/functions/fnc_startDefuse.sqf
index 84d7274069..8e3f071661 100644
--- a/addons/explosives/functions/fnc_startDefuse.sqf
+++ b/addons/explosives/functions/fnc_startDefuse.sqf
@@ -44,7 +44,7 @@ if (STANCE _unit == "Prone") then {
if (ACE_player != _unit) then {
// If the unit is a player, call the function on the player.
if (isPlayer _unit) then {
- [[_unit, _target], QFUNC(startDefuse), _unit] call EFUNC(common,execRemoteFnc);
+ [QGVAR(startDefuse), [_unit, _target], _unit] call CBA_fnc_targetEvent;
} else {
_unit playActionNow _actionToPlay;
_unit disableAI "MOVE";
@@ -56,7 +56,7 @@ if (ACE_player != _unit) then {
[_unit, _target] call FUNC(defuseExplosive);
_unit enableAI "MOVE";
_unit enableAI "TARGET";
- }, [_unit, _target], _defuseTime] call EFUNC(common,waitAndExecute);
+ }, [_unit, _target], _defuseTime] call CBA_fnc_waitAndExecute;
};
} else {
_unit playActionNow _actionToPlay;
diff --git a/addons/explosives/functions/fnc_startTimer.sqf b/addons/explosives/functions/fnc_startTimer.sqf
index ca219ed13c..1f529d9765 100644
--- a/addons/explosives/functions/fnc_startTimer.sqf
+++ b/addons/explosives/functions/fnc_startTimer.sqf
@@ -25,4 +25,4 @@ TRACE_2("params",_explosive,_delay);
if (!isNull _explosive) then {
[_explosive, -1, [_explosive, 0]] call FUNC(detonateExplosive);
};
-}, [_explosive], _delay] call EFUNC(common,waitAndExecute);
+}, [_explosive], _delay] call CBA_fnc_waitAndExecute;
diff --git a/addons/explosives/stringtable.xml b/addons/explosives/stringtable.xml
index 83af057d7c..65d19364de 100644
--- a/addons/explosives/stringtable.xml
+++ b/addons/explosives/stringtable.xml
@@ -39,10 +39,14 @@
Detonate All
- Zünden Alles
+ Alle Zünden
Detonar Todo
Подрыв всех
Odpálit VŠE
+ Detonuj wszystkie
+ Detona Tutti
+ Tout mettre à feu
+ Detonar Tudo
Explosive code: %1
@@ -87,6 +91,9 @@
Заблокировано
Blokováno
Zablokowany
+ Bloccato
+ Blockiert
+ Bloqué
Cancel
@@ -101,16 +108,16 @@
Отмена
- +Ctrl rotate
- +Strg drehen
- +Ctrl girar
- +Ctrl tourner
- +Ctrl rotazione
- +Ctrl otočit
- +Ctrl forgatás
- +Ctrl obrót
- +Ctrl rotaciona
- +Ctrl Bращать
+ Rotate
+ Drehen
+ Girar
+ Tourner
+ Rotazione
+ Otočit
+ Forgatás
+ Obrót
+ Rotaciona
+ Bращать
Turn On Thor III
@@ -309,7 +316,7 @@
"Zünden"-Menü
Menú de detonación
Menu detonacji
- Menu de mise à feux
+ Menu de mise à feu
Menu detonace
Menù di detonazione
Robbantási menü
@@ -381,7 +388,7 @@
Zeit einstellen
Configurar tiempo
Ustaw czas
- Régler minuteur
+ Régler le minuteur
Nastavit čas
Modifica il conto alla rovescia
Idő beállítása
@@ -452,7 +459,7 @@
No triggers available for %1
Brak dostępnych zapalników dla %1
No hay detonadores disponibles para %1
- Keine Auslöser vorhanden für %1
+ Keine Auslöser für %1 vorhanden
Pas de mise à feu disponible pour %1
Žádný detonátor k dispozici pro %1
Nessun attivatore disponibile per %1
@@ -488,7 +495,7 @@
No explosives on trigger.
Keine Sprengladungen auf diesem Auslöser.
Ningún explosivo en el detonador.
- Pas d'explosif à mettre à feu.
+ Pas d'explosif à déclencher.
Nessun esplosivo
Žádná výbušnina k odpálení.
Nincs robbanóanyag a gyújtóeszközhöz kötve.
@@ -511,7 +518,7 @@
Used to remotely trigger explosives when released.
Zündet Sprengladungen wenn losgelassen.
- Déclenche la mise à feu d'un explosif lorsqu'il est libéré.
+ Déclenche la mise à feu d'un explosif lorsqu'il est relaché.
Používaný k vzdálenému odpálení, při uvolnění odpálí výbušniny
Używany w celu zdalnej detonacji ładunków, kiedy jego operator zostanie zabity.
Utilizado para detonar explosivos remotamente al soltarlo.
@@ -542,6 +549,7 @@
Module explosifs
Robbanóanyag-rendszer
Взрывные устройства
+ Sistema Esplosivi
Require specialists?
@@ -550,9 +558,10 @@
Benötigt Sprengstoffexperten?
Vyžadovat specialistu?
Requer especialista?
- Requiert un spécialiste?
+ Requiert un spécialiste ?
Specialisták igénylése?
Требуется специалист?
+ Richiedi specialisti?
Require explosive specialists to disable explosives? Default: No
@@ -561,9 +570,10 @@
Benötige Sprengstoffexperte um Sprengladungen zu entschärfen? Standard: Nein
Vyžadovat specialistu na zneškodnění výbušniny? Výchozí: Ne
Requer especialista em explosivos para desativar explosivos? Padrão: Não
- Le désarmoçage d'explosif requiert un spécialiste? Défaut: non
+ Le désarmoçage d'explosif requiert un spécialiste ? Défaut : non
Szükséges-e egy specialista a robbanóanyagok hatástalanításához? Alapértelmezett: Nem
Требуется ли специалист по минному делу для обезвреживания взрывчатки? По-умолчанию: Нет
+ Richiedi specialisti esplosivi per disabilitare esplosivi? Default: No
Punish non-specialists?
@@ -572,9 +582,10 @@
Bestrafe Nicht-Sprengstoffexperten?
Potrestat, pokud není specialista?
Punir não especialistas?
- Punir les non-spécialistes?
+ Punir les non-spécialistes ?
Nem-specialisták büntetése?
Штраф не-специалистам?
+ Punisci non-specialisti?
Increase the time it takes to complete actions for non-specialists? Default: Yes
@@ -583,9 +594,10 @@
Entschärfungszeit für Nicht-Sprengstoffexperten erhöhen? Standard: Ja
Zvýšit čas potřebný k dokončení akce pokud není specialista? Výchozí: Ano
Aumentar o tempo necessário para completar ações por não especialistas? Padrão: Sim
- Augmenter le temps nécessaire au désarmoçage pour les non-spécialistes? Défaut: oui
+ Augmenter le temps nécessaire au désarmoçage pour les non-spécialistes ? Défaut : oui
Nem-specialisták esetén több ideig tartson a cselekvés befejezése? Alapértelmezett: Igen
Увеличивать время завершения действий для не-специалистов? По-умолчанию: Нет
+ Aumenta il tempo richiesto per completare azioni per non-specialisti? Default: Si
Explode on defusal?
@@ -594,9 +606,10 @@
Eksplozja przy rozbrajaniu?
Explodovat při zneškodňování?
Explotar al desactivar?
- Explosion si désamorçage?
+ Explosion au désamorçage ?
Robbanás hatástalanításkor?
Взрыв при разминир.?
+ Fai esplodere quando disarmato?
Enable certain explosives to explode on defusal? Default: Yes
@@ -605,9 +618,10 @@
Spraw, aby niektóre ładunki wybuchowe eksplodowały przy próbie ich rozbrojenia? Domyślnie:Tak
Umožnit u některých výbušnin explozi při pokusu je zneškodnit? Výchozí: Ano
¿Habilitar ciertos explosivos para estallar al desactivar? Por defecto: Sí
- Permet à certains explosifs d'exploser au désamorçage? Défaut: oui
+ Permet à certains explosifs d'exploser au désamorçage ? Défaut : oui
Meghatározott robbanóanyagok felrobbanjanak-e hatástalanításkor? Alapértelmezett: Igen
Разрешить определенным взрывным устройствам взрываться при разминировании? По-умолчанию: Да
+ Abilita alcuni esplosivi per esplosione al disarmo? Default: Si
This module adjusts the settings related to explosives.
@@ -615,76 +629,125 @@
Dieses Modul erlaubt die Einstellungen für Sprengstoffe zu verändern.
Tento modul umoňuje přizpůsobit nastavení týkajících se výbušnin.
Este módulo permite personalizar as definições relacionadas a explosivos.
- Ce module ajuste les options relative aux explosifs
+ Ce module ajuste les paramètres liés aux explosifs.
Ez a modul a robbanóanyagokhoz kötött beállításokat szabályozza.
Этот модуль управляет настройками, связанными со взрывными устройствами
Este módulo ajusta las configuraciones relacionadas con explosivos.
+ Questo modulo cambia le impostazioni relative agli esplosivi
- M6 SLAM Mine (Bottom Attack)
-
-
-
-
-
-
-
-
+ M6 SLAM Mine (Bottom Attack)
+
+
+ M6-SLAM-Mine (Bodenangriff)
+
+
+
+
+
+ Mina M6 SLAM (atak od dołu)
+ Mina M6 SLAM (Ataque Inferior)
+ Mine M6 SLAM (par le bas)
+ Mina M6 SLAM (base)
+ M6 SLAM (Útok zespoda)
+ Mina M6 SLAM (Ataque Inferior)
- M6 SLAM Mine (Side Attack)
-
-
-
-
-
-
-
-
+ M6 SLAM Mine (Side Attack)
+
+
+ M6-SLAM-Mine (Seitenangriff)
+
+
+
+
+
+ Mina M6 SLAM (atak od boku)
+ Mina M6 SLAM (Ataque Lateral)
+ Mine M6 SLAM (de flanc)
+ STR_ACE_Explosives_Module_SLAMBottomAttack_DisplayName M6 SLAM Mine (Bottom Attack) Mine M6 SLAM (par le bas) M6-SLAM-Mine (Bodenangriff) Mina M6 SLAM (base) Mina M6 SLAM (atak od dołu) Mina M6 SLAM (Laterale)
+ M6 SLAM (Útok do strany)
+ Mina M6 SLAM (Ataque Lateral)
Large IED (Urban, Pressure Plate)
-
+ Große USBV (Stadt, Druckplatte)
+ Duży IED (miejski, płyta naciskowa)
+ IED Grande (Urbano, Placa de presión)
+ Grand EEI (Urbain, plaque de pression)
+ IED grande (urbano, a pressione)
+ IED, Velké (Městské, Nášlapné)
+ IED Grande (Urbano, Placa de pressão)
Large IED (Dug-in, Pressure Plate)
-
+ Große USBV (Eingegraben, Druckplatte)
+ Duży IED (zakopany, płyta naciskowa)
+ IED Grande (Enterrado, Placa de presión)
+ Grand EEI (Enterré, plaque de pression)
+ IED grande (interrato, a pressione)
+ IED, Velké (Zakopané, Nášlapné)
+ IED Grande (Enterrado, Placa de pressão)
Small IED (Urban, Pressure Plate)
-
+ Kleine USBV (Stadt, Druckplatte)
+ Mały IED (miejski, płyta naciskowa)
+ IED Pequeño (Urbano, Placa de presión)
+ Petit EEI (Urbain, plaque de pression)
+ IED piccolo (urbano, a pressione)
+ IED, Malé (Městské, Nášlapné)
+ IED Pequeno(Urbano, Placa de pressão)
Small IED (Dug-in, Pressure Plate)
-
+ Kleine USBV (Eingegraben, Druckplatte)
+ Mały IED (zakopany, płyta naciskowa)
+ IED Pequeño (Enterrado, Placa de presión)
+ Petit EEI (Enterré, plaque de pression)
+ IED piccolo (interrato, a pressione)
+ IED, Malé (Zakopané, Nášlapné)
+ IED Pequeno (Enterrado, Placa de pressão)
+
+
+ Connect to %1
+ Conectar a %1
+ Подключиться к %1
+ Verbinde mit %1
+ Připojit k %1
+ Podłącz do %1
+ Connecter %1
+ Csatlakozás %1
+ Collega a %1
+ Conectar à %1
\ No newline at end of file
diff --git a/addons/fastroping/$PBOPREFIX$ b/addons/fastroping/$PBOPREFIX$
new file mode 100644
index 0000000000..c2389fdaf5
--- /dev/null
+++ b/addons/fastroping/$PBOPREFIX$
@@ -0,0 +1 @@
+z\ace\addons\fastroping
diff --git a/addons/fastroping/CfgEventHandlers.hpp b/addons/fastroping/CfgEventHandlers.hpp
new file mode 100644
index 0000000000..0d3301d6e0
--- /dev/null
+++ b/addons/fastroping/CfgEventHandlers.hpp
@@ -0,0 +1,17 @@
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
+class Extended_PreInit_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preInit));
+ };
+};
+
+class Extended_PostInit_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_postInit));
+ };
+};
diff --git a/addons/fastroping/CfgMoves.hpp b/addons/fastroping/CfgMoves.hpp
new file mode 100644
index 0000000000..b978539432
--- /dev/null
+++ b/addons/fastroping/CfgMoves.hpp
@@ -0,0 +1,19 @@
+class CfgMovesBasic {
+ class DefaultDie;
+ class ManActions {
+ ACE_FastRoping = "ACE_FastRoping";
+ };
+};
+
+class CfgMovesMaleSdr: CfgMovesBasic {
+ class States {
+ class Crew;
+ class ACE_FastRoping: Crew {
+ file = QPATHTOF(anim\fastroping.rtm);
+ interpolateTo[] = {"Unconscious", 1};
+ disableWeapons = 1;
+ disableWeaponsLong = 1;
+ canReload = 0;
+ };
+ };
+};
diff --git a/addons/fastroping/CfgSounds.hpp b/addons/fastroping/CfgSounds.hpp
new file mode 100644
index 0000000000..97479ecafb
--- /dev/null
+++ b/addons/fastroping/CfgSounds.hpp
@@ -0,0 +1,12 @@
+class CfgSounds {
+ class GVAR(Rope) {
+ name = "ACE_Fastroping_Rope";
+ sound[] = {QUOTE(PATHTOF(data\sounds\fastroping_rope.ogg)), 10, 1.0};
+ titles[] = {};
+ };
+ class GVAR(Thud) {
+ name = "ACE_Fastroping_Thud";
+ sound[] = {QUOTE(PATHTOF(data\sounds\fastroping_thud.ogg)), 10, 1.0};
+ titles[] = {};
+ };
+};
\ No newline at end of file
diff --git a/addons/fastroping/CfgVehicles.hpp b/addons/fastroping/CfgVehicles.hpp
new file mode 100644
index 0000000000..5ade667c12
--- /dev/null
+++ b/addons/fastroping/CfgVehicles.hpp
@@ -0,0 +1,243 @@
+#define EQUIP_FRIES_ATTRIBUTE class Attributes { \
+ class GVAR(equipFRIES) { \
+ property = QGVAR(equipFRIES); \
+ control = "Checkbox"; \
+ displayName = CSTRING(Eden_equipFRIES); \
+ tooltip = CSTRING(Eden_equipFRIES_Tooltip); \
+ expression = QUOTE([_this] call FUNC(equipFRIES)); \
+ typeName = "BOOL"; \
+ condition = "objectVehicle"; \
+ defaultValue = false; \
+ }; \
+}
+
+class CfgVehicles {
+ class Logic;
+ class Module_F: Logic {
+ class ModuleDescription;
+ };
+ class ACE_Module: Module_F {};
+ class ACE_moduleEquipFRIES: ACE_Module {
+ scope = 2;
+ displayName = CSTRING(Module_FRIES_DisplayName);
+ icon = QPATHTOF(UI\Icon_Module_FRIES_ca.paa);
+ category = "ACE";
+ function = QFUNC(moduleEquipFRIES);
+ functionPriority = 10;
+ isGlobal = 0;
+ isTriggerActivated = 0;
+ isDisposable = 0;
+ author = "BaerMitUmlaut";
+
+ class ModuleDescription: ModuleDescription {
+ description = CSTRING(Module_FRIES_Description);
+ sync[] = {"AnyVehicle"};
+ };
+ };
+
+ class Air;
+ class Helicopter: Air {
+ class ACE_SelfActions {
+ class ACE_prepareFRIES {
+ displayName = CSTRING(Interaction_prepareFRIES);
+ condition = QUOTE([vehicle _player] call FUNC(canPrepareFRIES));
+ statement = QUOTE([vehicle _player] call FUNC(prepareFRIES));
+ showDisabled = 0;
+ priority = 1;
+ };
+ class ACE_deployRopes {
+ displayName = CSTRING(Interaction_deployRopes);
+ condition = QUOTE([ARR_2(_player, vehicle _player)] call FUNC(canDeployRopes));
+ statement = QUOTE([ARR_2(QUOTE(QGVAR(deployRopes)), [vehicle _player])] call CBA_fnc_serverEvent);
+ showDisabled = 0;
+ priority = 1;
+ };
+ class ACE_cutRopes {
+ displayName = CSTRING(Interaction_cutRopes);
+ condition = [vehicle _player] call FUNC(canCutRopes);
+ statement = [vehicle _player] call FUNC(cutRopes);
+ showDisabled = 0;
+ priority = 1;
+ };
+ class ACE_fastRope {
+ displayName = CSTRING(Interaction_fastRope);
+ condition = [_player, vehicle _player] call FUNC(canFastRope);
+ statement = [_player, vehicle _player] call FUNC(fastRope);
+ showDisabled = 0;
+ priority = 1;
+ };
+ };
+ };
+
+ class Helicopter_Base_F;
+ class ACE_friesBase: Helicopter_Base_F {
+ destrType = "";
+ class Turrets {};
+ class ACE_Actions {};
+ class ACE_SelfActions {};
+ EGVAR(cargo,hasCargo) = 0;
+ EGVAR(cargo,space) = 0;
+ };
+ class ACE_friesAnchorBar: ACE_friesBase {
+ author = "jokoho48";
+ scope = 1;
+ model = QPATHTOF(data\friesAnchorBar.p3d);
+ animated = 1;
+ class AnimationSources {
+ class extendHookRight {
+ source = "user";
+ initPhase = 0;
+ animPeriod = 1.5;
+ };
+ class extendHookLeft {
+ source = "user";
+ initPhase = 0;
+ animPeriod = 1.5;
+ };
+ };
+ };
+ class ACE_friesGantry: ACE_friesBase {
+ author = "jokoho48";
+ scope = 1;
+ model = QPATHTOF(data\friesGantry.p3d);
+ animated = 1;
+ class AnimationSources {
+ class adjustWidth {
+ source = "user";
+ initPhase = 0.211;
+ animPeriod = 0;
+ };
+ class rotateGantryLeft {
+ source = "user";
+ initPhase = 0;
+ animPeriod = 0;
+ };
+ class rotateGantryRight {
+ source = "user";
+ initPhase = 0;
+ animPeriod = 0;
+ };
+ class hideGantryLeft {
+ source = "user";
+ initPhase = 0;
+ animPeriod = 0;
+ };
+ class hideGantryRight {
+ source = "user";
+ initPhase = 0;
+ animPeriod = 0;
+ };
+ };
+ };
+ class ACE_friesGantryReverse: ACE_friesGantry {
+ class AnimationSources: AnimationSources {
+ class adjustWidth {
+ source = "user";
+ initPhase = 0.213;
+ animPeriod = 0;
+ };
+ class rotateGantryLeft {
+ source = "user";
+ initPhase = 0.5;
+ animPeriod = 0;
+ };
+ class rotateGantryRight {
+ source = "user";
+ initPhase = 0.5;
+ animPeriod = 0;
+ };
+ };
+ };
+
+ class GVAR(helper): Helicopter_Base_F {
+ author = "KoffeinFlummi";
+ scope = 1;
+ model = QPATHTOF(data\helper.p3d);
+ class ACE_Actions {};
+ class Turrets {};
+ class TransportItems {};
+ };
+
+ class Helicopter_Base_H;
+ class Heli_Light_02_base_F: Helicopter_Base_H {
+ GVAR(enabled) = 1;
+ GVAR(ropeOrigins)[] = {{1.41, 1.38, 0}, {-1.41, 1.38, 0}};
+ GVAR(onPrepare) = QFUNC(onPrepareCommon);
+ GVAR(onCut) = QFUNC(onCutCommon);
+ };
+ class Heli_Attack_02_base_F: Helicopter_Base_F {
+ GVAR(enabled) = 1;
+ GVAR(ropeOrigins)[] = {{1.25, 1.5, -0.6}, {-1.1, 1.5, -0.6}};
+ GVAR(onPrepare) = QFUNC(onPrepareCommon);
+ GVAR(onCut) = QFUNC(onCutCommon);
+ };
+ class Heli_Transport_01_base_F: Helicopter_Base_H {
+ GVAR(enabled) = 2;
+ GVAR(ropeOrigins)[] = {"ropeOriginRight", "ropeOriginLeft"};
+ GVAR(friesType) = "ACE_friesAnchorBar";
+ GVAR(friesAttachmentPoint)[] = {0.065, 2.2, -0.15};
+ GVAR(onPrepare) = QFUNC(onPrepareCommon);
+ GVAR(onCut) = QFUNC(onCutCommon);
+ EQUIP_FRIES_ATTRIBUTE;
+ };
+ class Heli_Transport_02_base_F: Helicopter_Base_H {
+ GVAR(enabled) = 1;
+ GVAR(ropeOrigins)[] = {{0.94, -4.82, -1.16}, {-0.94, -4.82, -1.16}};
+ GVAR(onPrepare) = QFUNC(onPrepareCommon);
+ GVAR(onCut) = QFUNC(onCutCommon);
+
+ class UserActions {
+ class Ramp_Open;
+ class Ramp_Close: Ramp_Open {
+ condition = QUOTE([ARR_5(this,'CargoRamp_Open',[[0],[1],[2]])] call FUNC(canCloseRamp));
+ };
+ };
+ };
+ class Heli_Transport_03_base_F: Helicopter_Base_H {
+ GVAR(enabled) = 1;
+ GVAR(ropeOrigins)[] = {{0.75, -5.29, -0.11}, {-0.87, -5.29, -0.11}};
+ GVAR(onPrepare) = QFUNC(onPrepareCommon);
+ GVAR(onCut) = QFUNC(onCutCommon);
+
+ class UserActions {
+ class Ramp_Open;
+ class Ramp_Close: Ramp_Open {
+ condition = QUOTE([ARR_5(this,'Door_rear_source',[[0],[3],[4]])] call FUNC(canCloseRamp));
+ };
+ };
+ };
+ class Heli_light_03_base_F: Helicopter_Base_F {
+ GVAR(enabled) = 2;
+ GVAR(ropeOrigins)[] = {"ropeOriginRight", "ropeOriginLeft"};
+ GVAR(friesType) = "ACE_friesGantryReverse";
+ GVAR(friesAttachmentPoint)[] = {-1.04, 2.5, -0.34};
+ EQUIP_FRIES_ATTRIBUTE;
+ };
+ class Heli_light_03_unarmed_base_F: Heli_light_03_base_F {
+ GVAR(enabled) = 2;
+ GVAR(ropeOrigins)[] = {"ropeOriginRight", "ropeOriginLeft"};
+ GVAR(friesType) = "ACE_friesGantry";
+ GVAR(friesAttachmentPoint)[] = {-1.07, 3.26, -0.5};
+ EQUIP_FRIES_ATTRIBUTE;
+ };
+ class Heli_Transport_04_base_F: Helicopter_Base_H {
+ class UserActions;
+ };
+ class O_Heli_Transport_04_bench_F: Heli_Transport_04_base_F {
+ GVAR(enabled) = 1;
+ GVAR(ropeOrigins)[] = {{1.03, 1.6, -0.23}, {1.03, -1.36, -0.23}, {-1.23, 1.6, -0.23}, {-1.23, -1.36, -0.23}};
+ };
+ class O_Heli_Transport_04_covered_F: Heli_Transport_04_base_F {
+ GVAR(enabled) = 1;
+ GVAR(ropeOrigins)[] = {{0.83, -4.7, -0.03}, {-1.02, -4.7, -0.03}};
+ GVAR(onPrepare) = QFUNC(onPrepareCommon);
+ GVAR(onCut) = QFUNC(onCutCommon);
+
+ class UserActions: UserActions {
+ class CloseDoor_6;
+ class Ramp_Close: CloseDoor_6 {
+ condition = QUOTE([ARR_6(this,'Door_6_source',[[0],[1],[2],[3]])] call FUNC(canCloseRamp));
+ };
+ };
+ };
+};
diff --git a/addons/fastroping/CfgWaypoints.hpp b/addons/fastroping/CfgWaypoints.hpp
new file mode 100644
index 0000000000..f3303c28ff
--- /dev/null
+++ b/addons/fastroping/CfgWaypoints.hpp
@@ -0,0 +1,11 @@
+class CfgWaypoints {
+ class ACE {
+ displayName = "ACE";
+ class Fastrope {
+ displayName = CSTRING(Waypoint_Fastrope);
+ displayNameDebug = "Fastrope";
+ file = QPATHTOF(functions\fnc_deployAIWaypoint.sqf);
+ icon = QPATHTOF(UI\Icon_Waypoint.paa);
+ };
+ };
+};
diff --git a/addons/difficulties/README.md b/addons/fastroping/README.md
similarity index 53%
rename from addons/difficulties/README.md
rename to addons/fastroping/README.md
index 4aefb4570a..49fcf00960 100644
--- a/addons/difficulties/README.md
+++ b/addons/fastroping/README.md
@@ -1,12 +1,11 @@
-ace_difficulties
-================
-
-Changes the elite difficulty setting to more closely resemble Arma 2.
+ace_fastroping
+==========
+Introducing the ability to fastrope out of heliocopters.
## Maintainers
The people responsible for merging changes to this component or answering potential questions.
+- [BaerMitUmlaut](https://github.com/BaerMitUmlaut)
- [KoffeinFlummi](https://github.com/KoffeinFlummi)
-- [commy2](https://github.com/commy2)
diff --git a/addons/fastroping/UI/Icon_Module_FRIES_ca.paa b/addons/fastroping/UI/Icon_Module_FRIES_ca.paa
new file mode 100644
index 0000000000..9af930e35e
Binary files /dev/null and b/addons/fastroping/UI/Icon_Module_FRIES_ca.paa differ
diff --git a/addons/fastroping/UI/Icon_Waypoint.paa b/addons/fastroping/UI/Icon_Waypoint.paa
new file mode 100644
index 0000000000..4f7d9086ae
Binary files /dev/null and b/addons/fastroping/UI/Icon_Waypoint.paa differ
diff --git a/addons/fastroping/XEH_PREP.hpp b/addons/fastroping/XEH_PREP.hpp
new file mode 100644
index 0000000000..99e1c8b817
--- /dev/null
+++ b/addons/fastroping/XEH_PREP.hpp
@@ -0,0 +1,18 @@
+PREP(canCloseRamp);
+PREP(canCutRopes);
+PREP(canDeployRopes);
+PREP(canFastRope);
+PREP(canPrepareFRIES);
+PREP(checkVehicleThread);
+PREP(cutRopes);
+PREP(deployAI);
+PREP(deployRopes);
+PREP(equipFRIES);
+PREP(fastRope);
+PREP(fastRopeLocalPFH);
+PREP(fastRopeServerPFH);
+PREP(moduleEquipFRIES);
+PREP(onCutCommon);
+PREP(onPrepareCommon);
+PREP(onRopeBreak);
+PREP(prepareFRIES);
diff --git a/addons/fastroping/XEH_postInit.sqf b/addons/fastroping/XEH_postInit.sqf
new file mode 100644
index 0000000000..752ac2f756
--- /dev/null
+++ b/addons/fastroping/XEH_postInit.sqf
@@ -0,0 +1,9 @@
+#include "script_component.hpp"
+
+[QGVAR(deployRopes), {
+ _this call FUNC(deployRopes);
+}] call CBA_fnc_addEventHandler;
+
+[QGVAR(startFastRope), {
+ [FUNC(fastRopeServerPFH), 0, _this] call CBA_fnc_addPerFrameHandler;
+}] call CBA_fnc_addEventHandler;
diff --git a/addons/apl/XEH_preInit.sqf b/addons/fastroping/XEH_preInit.sqf
similarity index 71%
rename from addons/apl/XEH_preInit.sqf
rename to addons/fastroping/XEH_preInit.sqf
index 6899f59bd9..a7feade1c3 100644
--- a/addons/apl/XEH_preInit.sqf
+++ b/addons/fastroping/XEH_preInit.sqf
@@ -2,4 +2,6 @@
ADDON = false;
+#include "XEH_PREP.hpp"
+
ADDON = true;
diff --git a/addons/fastroping/XEH_preStart.sqf b/addons/fastroping/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/fastroping/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/fastroping/anim/fastroping.rtm b/addons/fastroping/anim/fastroping.rtm
new file mode 100644
index 0000000000..9742732a56
Binary files /dev/null and b/addons/fastroping/anim/fastroping.rtm differ
diff --git a/addons/fastroping/config.cpp b/addons/fastroping/config.cpp
new file mode 100644
index 0000000000..c451a1b0dd
--- /dev/null
+++ b/addons/fastroping/config.cpp
@@ -0,0 +1,20 @@
+#include "script_component.hpp"
+
+class CfgPatches {
+ class ADDON {
+ units[] = {};
+ weapons[] = {};
+ requiredVersion = REQUIRED_VERSION;
+ requiredAddons[] = {"ace_interaction"};
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"KoffeinFlummi", "BaerMitUmlaut"};
+ url = ECSTRING(main,URL);
+ VERSION_CONFIG;
+ };
+};
+
+#include "CfgEventHandlers.hpp"
+#include "CfgMoves.hpp"
+#include "CfgSounds.hpp"
+#include "CfgVehicles.hpp"
+#include "CfgWaypoints.hpp"
diff --git a/addons/fastroping/data/friesAnchorBar.p3d b/addons/fastroping/data/friesAnchorBar.p3d
new file mode 100644
index 0000000000..2b14bb8010
Binary files /dev/null and b/addons/fastroping/data/friesAnchorBar.p3d differ
diff --git a/addons/fastroping/data/friesAnchorBar.rvmat b/addons/fastroping/data/friesAnchorBar.rvmat
new file mode 100644
index 0000000000..06a8415c04
--- /dev/null
+++ b/addons/fastroping/data/friesAnchorBar.rvmat
@@ -0,0 +1,66 @@
+ambient[] = {1,1,1,1};
+diffuse[] = {1,1,1,1};
+forcedDiffuse[] = {0,0,0,0};
+emmisive[] = {0,0,0,0};
+specular[] = {0.071,0.071,0.071,1};
+specularPower = 110;
+PixelShaderID = "Super";
+VertexShaderID = "Super";
+class Stage1 {
+ texture = "z\ace\addons\fastroping\data\friesAnchorBar_nohq.paa";
+ uvSource = "tex";
+ class uvTransform {
+ aside[] = {1,0,0};
+ up[] = {0,1,0};
+ dir[] = {0,0,0};
+ pos[] = {0,0,0};
+ };
+};
+class Stage2 {
+ texture = "#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)";
+ uvSource = "tex";
+ class uvTransform {
+ aside[] = {10,0,0};
+ up[] = {0,10,0};
+ dir[] = {0,0,0};
+ pos[] = {0,0,0};
+ };
+};
+class Stage3 {
+ texture = "#(argb,8,8,3)color(0,0,0,0,MC)";
+ uvSource = "tex";
+ class uvTransform {
+ aside[] = {1,0,0};
+ up[] = {0,1,0};
+ dir[] = {0,0,0};
+ pos[] = {0,0,0};
+ };
+};
+class Stage4 {
+ texture = "z\ace\addons\fastroping\data\friesAnchorBar_as.paa";
+ uvSource = "tex";
+ class uvTransform {
+ aside[] = {1,0,0};
+ up[] = {0,1,0};
+ dir[] = {0,0,1};
+ pos[] = {0,0,1};
+ };
+};
+class Stage5 {
+ texture = "z\ace\addons\fastroping\data\friesAnchorBar_smdi.paa";
+ uvSource = "tex";
+ class uvTransform {
+ aside[] = {1,0,0};
+ up[] = {0,1,0};
+ dir[] = {0,0,1};
+ pos[] = {0,0,1};
+ };
+};
+class Stage6 {
+ texture = "#(ai,64,64,1)fresnel(4.5,1.1)";
+ uvSource = "none";
+};
+class Stage7 {
+ texture = "a3\data_f\env_land_ca.paa";
+ uvSource = "none";
+};
diff --git a/addons/fastroping/data/friesAnchorBar_as.paa b/addons/fastroping/data/friesAnchorBar_as.paa
new file mode 100644
index 0000000000..5bfbbdd34e
Binary files /dev/null and b/addons/fastroping/data/friesAnchorBar_as.paa differ
diff --git a/addons/fastroping/data/friesAnchorBar_co.paa b/addons/fastroping/data/friesAnchorBar_co.paa
new file mode 100644
index 0000000000..e816dc89ed
Binary files /dev/null and b/addons/fastroping/data/friesAnchorBar_co.paa differ
diff --git a/addons/fastroping/data/friesAnchorBar_nohq.paa b/addons/fastroping/data/friesAnchorBar_nohq.paa
new file mode 100644
index 0000000000..2d46991424
Binary files /dev/null and b/addons/fastroping/data/friesAnchorBar_nohq.paa differ
diff --git a/addons/fastroping/data/friesAnchorBar_smdi.paa b/addons/fastroping/data/friesAnchorBar_smdi.paa
new file mode 100644
index 0000000000..7f8c450eda
Binary files /dev/null and b/addons/fastroping/data/friesAnchorBar_smdi.paa differ
diff --git a/addons/fastroping/data/friesGantry.p3d b/addons/fastroping/data/friesGantry.p3d
new file mode 100644
index 0000000000..e4b54b0ec1
Binary files /dev/null and b/addons/fastroping/data/friesGantry.p3d differ
diff --git a/addons/fastroping/data/friesGantry.rvmat b/addons/fastroping/data/friesGantry.rvmat
new file mode 100644
index 0000000000..7976eefe42
--- /dev/null
+++ b/addons/fastroping/data/friesGantry.rvmat
@@ -0,0 +1,66 @@
+ambient[] = {1,1,1,1};
+diffuse[] = {1,1,1,1};
+forcedDiffuse[] = {0,0,0,0};
+emmisive[] = {0,0,0,0};
+specular[] = {0.071,0.071,0.071,1};
+specularPower = 110;
+PixelShaderID = "Super";
+VertexShaderID = "Super";
+class Stage1 {
+ texture = "z\ace\addons\fastroping\data\friesGantry_nohq.paa";
+ uvSource = "tex";
+ class uvTransform {
+ aside[] = {1,0,0};
+ up[] = {0,1,0};
+ dir[] = {0,0,0};
+ pos[] = {0,0,0};
+ };
+};
+class Stage2 {
+ texture = "#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)";
+ uvSource = "tex";
+ class uvTransform {
+ aside[] = {10,0,0};
+ up[] = {0,10,0};
+ dir[] = {0,0,0};
+ pos[] = {0,0,0};
+ };
+};
+class Stage3 {
+ texture = "#(argb,8,8,3)color(0,0,0,0,MC)";
+ uvSource = "tex";
+ class uvTransform {
+ aside[] = {1,0,0};
+ up[] = {0,1,0};
+ dir[] = {0,0,0};
+ pos[] = {0,0,0};
+ };
+};
+class Stage4 {
+ texture = "z\ace\addons\fastroping\data\friesGantry_as.paa";
+ uvSource = "tex";
+ class uvTransform {
+ aside[] = {1,0,0};
+ up[] = {0,1,0};
+ dir[] = {0,0,1};
+ pos[] = {0,0,1};
+ };
+};
+class Stage5 {
+ texture = "z\ace\addons\fastroping\data\friesGantry_smdi.paa";
+ uvSource = "tex";
+ class uvTransform {
+ aside[] = {1,0,0};
+ up[] = {0,1,0};
+ dir[] = {0,0,1};
+ pos[] = {0,0,1};
+ };
+};
+class Stage6 {
+ texture = "#(ai,64,64,1)fresnel(4.5,1.1)";
+ uvSource = "none";
+};
+class Stage7 {
+ texture = "a3\data_f\env_land_ca.paa";
+ uvSource = "none";
+};
diff --git a/addons/fastroping/data/friesGantry_as.paa b/addons/fastroping/data/friesGantry_as.paa
new file mode 100644
index 0000000000..2b61d9cceb
Binary files /dev/null and b/addons/fastroping/data/friesGantry_as.paa differ
diff --git a/addons/fastroping/data/friesGantry_co.paa b/addons/fastroping/data/friesGantry_co.paa
new file mode 100644
index 0000000000..af3085a90c
Binary files /dev/null and b/addons/fastroping/data/friesGantry_co.paa differ
diff --git a/addons/fastroping/data/friesGantry_nohq.paa b/addons/fastroping/data/friesGantry_nohq.paa
new file mode 100644
index 0000000000..21419b90ab
Binary files /dev/null and b/addons/fastroping/data/friesGantry_nohq.paa differ
diff --git a/addons/fastroping/data/friesGantry_smdi.paa b/addons/fastroping/data/friesGantry_smdi.paa
new file mode 100644
index 0000000000..a11795fa3c
Binary files /dev/null and b/addons/fastroping/data/friesGantry_smdi.paa differ
diff --git a/addons/fastroping/data/helper.p3d b/addons/fastroping/data/helper.p3d
new file mode 100644
index 0000000000..e8b05a4504
Binary files /dev/null and b/addons/fastroping/data/helper.p3d differ
diff --git a/addons/fastroping/data/model.cfg b/addons/fastroping/data/model.cfg
new file mode 100644
index 0000000000..3291e7a509
--- /dev/null
+++ b/addons/fastroping/data/model.cfg
@@ -0,0 +1,113 @@
+class CfgSkeletons {
+ class Default {
+ isDiscrete = 1;
+ skeletonInherit = "";
+ skeletonBones[] = {};
+ };
+ class ace_friesAnchorBar_skeleton: Default {
+ isDiscrete = 1;
+ skeletonInherit = "Default";
+ skeletonBones[] = {
+ "barRight", "",
+ "barLeft", ""
+ };
+ };
+ class ace_friesGantry_skeleton: Default {
+ isDiscrete = 1;
+ skeletonInherit = "Default";
+ skeletonBones[] = {
+ "gantryRight", "",
+ "gantryLeft", ""
+ };
+ };
+};
+
+class CfgModels {
+ class Default {
+ sectionsInherit = "";
+ sections[] = {""};
+ skeletonName = "";
+ };
+ class friesAnchorBar: Default {
+ skeletonName = "ace_friesAnchorBar_skeleton";
+ sectionsInherit = "";
+ sections[] = {"ropeOriginRight", "ropeOriginLeft"};
+ class animations {
+ class extendHookRight {
+ type = "translation";
+ source = "";
+ selection = "barRight";
+ axis = "slideAxis";
+ animPeriod = 0;
+ minValue = 0;
+ maxValue = 1;
+ minPhase = 0;
+ maxPhase = 1;
+ offset0 = 0;
+ offset1 = 0.45;
+ };
+ class extendHookLeft: extendHookRight {
+ selection = "barLeft";
+ offset1 = -0.45;
+ };
+ };
+ };
+ class friesGantry: Default {
+ skeletonName = "ace_friesGantry_skeleton";
+ sectionsInherit = "";
+ sections[] = {"ropeOriginRight", "ropeOriginLeft"};
+ class animations {
+ class adjustWidth {
+ type = "translation";
+ source = "";
+ selection = "gantryRight";
+ axis = "axisWidth";
+ animPeriod = 0;
+ minValue = 0;
+ maxValue = 1;
+ offset0 = 0;
+ offset1 = 10;
+ };
+ class rotateGantryLeft {
+ type = "rotation";
+ source = "";
+ selection = "gantryLeft";
+ axis = "axisRotation";
+ animPeriod = 0;
+ minValue = 0;
+ maxValue = 1;
+ angle0 = "rad 0";
+ angle1 = "rad 360";
+ };
+ class rotateGantryRight {
+ type = "rotation";
+ source = "";
+ selection = "gantryRight";
+ axis = "axisRotation";
+ animPeriod = 0;
+ minValue = 0;
+ maxValue = 1;
+ angle0 = "rad 0";
+ angle1 = "rad 360";
+ };
+ class hideGantryLeft {
+ type = "hide";
+ source = "";
+ selection = "gantryLeft";
+ animPeriod = 0;
+ minValue = 0;
+ maxValue = 1;
+ hideValue = 0.99999;
+ };
+ class hideGantryRight {
+ type = "hide";
+ source = "";
+ selection = "gantryRight";
+ animPeriod = 0;
+ minValue = 0;
+ maxValue = 1;
+ hideValue = 0.99999;
+ };
+ };
+ };
+};
diff --git a/addons/fastroping/data/sounds/LICENSE.md b/addons/fastroping/data/sounds/LICENSE.md
new file mode 100644
index 0000000000..71835222cd
--- /dev/null
+++ b/addons/fastroping/data/sounds/LICENSE.md
@@ -0,0 +1,6 @@
+Source sounds are adapted and changed.
+
+**Fastroping_Rope (fastroping_rope.ogg):**
+"[Rub.aif](http://freesound.org/people/le_abbaye_Noirlac/sounds/129471/)" by [Tessa Elieff](http://freesound.org/people/le_abbaye_Noirlac/) is [CreativeCommons Attributions 3.0](http://creativecommons.org/licenses/by/3.0/)
+
+All other sounds from helenacm and Adam_N, both under Creative Commons 0 (no attribution required).
\ No newline at end of file
diff --git a/addons/fastroping/data/sounds/fastroping_rope.ogg b/addons/fastroping/data/sounds/fastroping_rope.ogg
new file mode 100644
index 0000000000..ec68da2960
Binary files /dev/null and b/addons/fastroping/data/sounds/fastroping_rope.ogg differ
diff --git a/addons/fastroping/data/sounds/fastroping_thud.ogg b/addons/fastroping/data/sounds/fastroping_thud.ogg
new file mode 100644
index 0000000000..40fd823fcf
Binary files /dev/null and b/addons/fastroping/data/sounds/fastroping_thud.ogg differ
diff --git a/addons/fastroping/functions/fnc_canCloseRamp.sqf b/addons/fastroping/functions/fnc_canCloseRamp.sqf
new file mode 100644
index 0000000000..58827cb29b
--- /dev/null
+++ b/addons/fastroping/functions/fnc_canCloseRamp.sqf
@@ -0,0 +1,29 @@
+/*
+ * Author: BaerMitUmlaut
+ * Checks if the player can close the ramp of the given helo.
+ *
+ * Arguments:
+ * 0: The helicopter
+ * 1: The ramp animation name
+ * 2: Turret paths that can close the ramp
+ *
+ * Return Value:
+ * Able to close ramp
+ *
+ * Example:
+ * [_player, _vehicle] call ace_fastroping_fnc_canCloseRamp
+ *
+ * Public: No
+ */
+
+#include "script_component.hpp"
+params ["_vehicle", "_door", "_turretPaths"];
+
+(_vehicle doorPhase _door > 0.5) &&
+{alive _vehicle} &&
+{(_vehicle getVariable ["bis_disabled_Ramp", 0]) != 1} &&
+{!(_vehicle getVariable [QGVAR(doorsLocked), false])} &&
+{
+ (ACE_player == driver _vehicle) ||
+ {((assignedVehicleRole ACE_player) param [1, []]) in _turretPaths}
+}
diff --git a/addons/fastroping/functions/fnc_canCutRopes.sqf b/addons/fastroping/functions/fnc_canCutRopes.sqf
new file mode 100644
index 0000000000..9775b155bb
--- /dev/null
+++ b/addons/fastroping/functions/fnc_canCutRopes.sqf
@@ -0,0 +1,22 @@
+/*
+ * Author: BaerMitUmlaut
+ * Checks if the unit can cut deployed ropes.
+ *
+ * Arguments:
+ * 0: The helicopter itself
+ *
+ * Return Value:
+ * Able to cut ropes
+ *
+ * Example:
+ * [_vehicle] call ace_fastroping_fnc_canCutRopes
+ *
+ * Public: No
+ */
+
+#include "script_component.hpp"
+params ["_vehicle"];
+
+private _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []];
+
+!(_deployedRopes isEqualTo [])
diff --git a/addons/fastroping/functions/fnc_canDeployRopes.sqf b/addons/fastroping/functions/fnc_canDeployRopes.sqf
new file mode 100644
index 0000000000..6c8f1d28ed
--- /dev/null
+++ b/addons/fastroping/functions/fnc_canDeployRopes.sqf
@@ -0,0 +1,32 @@
+/*
+ * Author: BaerMitUmlaut
+ * Checks if the unit can deploy ropes from the helicopter.
+ *
+ * Arguments:
+ * 0: Unit occupying the helicopter
+ * 1: The helicopter itself
+ *
+ * Return Value:
+ * Able to deploy ropes
+ *
+ * Example:
+ * [_player, _vehicle] call ace_fastroping_fnc_canDeployRopes
+ *
+ * Public: No
+ */
+
+#include "script_component.hpp"
+params ["_unit", "_vehicle"];
+private ["_config", "_enabled", "_deploymentStage"];
+
+_config = configFile >> "CfgVehicles" >> typeOf _vehicle;
+_enabled = getNumber (_config >> QGVAR(enabled));
+_deploymentStage = _vehicle getVariable [QGVAR(deploymentStage), 0];
+
+(driver _vehicle != _unit) &&
+{getPos _vehicle select 2 > 2} &&
+{_enabled == 1 || {_enabled == 2 && {!(isNull (_vehicle getVariable [QGVAR(FRIES), objNull]))}}} &&
+{
+ (_deploymentStage == 0 && {getText (_config >> QGVAR(onPrepare)) == ""}) ||
+ {_deploymentStage == 2 && {getText (_config >> QGVAR(onPrepare)) != ""}}
+}
diff --git a/addons/fastroping/functions/fnc_canFastRope.sqf b/addons/fastroping/functions/fnc_canFastRope.sqf
new file mode 100644
index 0000000000..33c6bc2839
--- /dev/null
+++ b/addons/fastroping/functions/fnc_canFastRope.sqf
@@ -0,0 +1,26 @@
+/*
+ * Author: BaerMitUmlaut
+ * Checks if the unit can fast rope from the helicopter.
+ *
+ * Arguments:
+ * 0: Unit occupying the helicopter
+ * 1: The helicopter itself
+ *
+ * Return Value:
+ * Able to fast ropes
+ *
+ * Example:
+ * [_player, _vehicle] call ace_fastroping_fnc_canDeployRopes
+ *
+ * Public: No
+ */
+
+#include "script_component.hpp"
+params ["_unit", "_vehicle"];
+
+private _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []];
+
+((driver _vehicle != _unit) &&
+{!(_deployedRopes isEqualTo [])} &&
+{{!(_x select 5)} count (_deployedRopes) > 0} &&
+{getPos _vehicle select 2 > 2})
diff --git a/addons/fastroping/functions/fnc_canPrepareFRIES.sqf b/addons/fastroping/functions/fnc_canPrepareFRIES.sqf
new file mode 100644
index 0000000000..67e2165c3f
--- /dev/null
+++ b/addons/fastroping/functions/fnc_canPrepareFRIES.sqf
@@ -0,0 +1,24 @@
+/*
+ * Author: BaerMitUmlaut
+ * Checks if the unit can prepare the helicopters FRIES.
+ *
+ * Arguments:
+ * 0: The helicopter itself
+ *
+ * Return Value:
+ * Able to prepare FRIES
+ *
+ * Example:
+ * [_vehicle] call ace_fastroping_fnc_canPrepareFRIES
+ *
+ * Public: No
+ */
+
+#include "script_component.hpp"
+params ["_vehicle"];
+
+private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
+
+((getNumber (_config >> QGVAR(enabled)) == 1) || {!(isNull (_vehicle getVariable [QGVAR(FRIES), objNull]))}) &&
+{(_vehicle getVariable [QGVAR(deploymentStage), 0]) == 0} &&
+{getText (_config >> QGVAR(onPrepare)) != ""}
diff --git a/addons/fastroping/functions/fnc_checkVehicleThread.sqf b/addons/fastroping/functions/fnc_checkVehicleThread.sqf
new file mode 100644
index 0000000000..38a2cad8c6
--- /dev/null
+++ b/addons/fastroping/functions/fnc_checkVehicleThread.sqf
@@ -0,0 +1,25 @@
+/*
+ * Author: BaerMitUmlaut
+ * Checks if the given helicopter still exits, and if not, destroys the FRIES.
+ *
+ * Arguments:
+ * 0: The helicopter
+ * 1: The helicopter's FRIES
+ *
+ * Return Value:
+ * None
+ *
+ * Example:
+ * [_vehicle, _fries] call ace_fastroping_fnc_checkVehicleThread
+ *
+ * Public: No
+ */
+
+#include "script_component.hpp"
+params ["_vehicle", "_fries"];
+
+if (isNull _vehicle) then {
+ deleteVehicle _fries;
+} else {
+ [FUNC(checkVehicleThread), _this, 5] call CBA_fnc_waitAndExecute;
+};
diff --git a/addons/fastroping/functions/fnc_cutRopes.sqf b/addons/fastroping/functions/fnc_cutRopes.sqf
new file mode 100644
index 0000000000..d619a24297
--- /dev/null
+++ b/addons/fastroping/functions/fnc_cutRopes.sqf
@@ -0,0 +1,53 @@
+/*
+ * Author: BaerMitUmlaut
+ * Cut deployed ropes.
+ *
+ * Arguments:
+ * 0: A helicopter with deployed ropes
+ *
+ * Return Value:
+ * None
+ *
+ * Example:
+ * [_vehicle] call ace_fastroping_fnc_cutRopes
+ *
+ * Public: No
+ */
+
+#include "script_component.hpp"
+params ["_vehicle"];
+private ["_deployedRopes", "_config", "_waitTime"];
+
+_deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []];
+{
+ _x params ["", "_ropeTop", "_ropeBottom", "_dummy", "_hook", "_occupied"];
+
+ //Make player fall if rope is occupied
+ if (_occupied) then {
+ private _attachedObjects = attachedObjects _dummy;
+ //Rope is considered occupied when it's broken as well, so check if array is empty
+ //Note: ropes are not considered attached objects by Arma
+ if !(_attachedObjects isEqualTo []) then {
+ detach ((attachedObjects _dummy) select 0);
+ };
+ };
+
+ //Destroy rope
+ //Only delete the hook first so the rope falls down.
+ //Note: ropeDetach was used here before, but the command seems a bit broken.
+ deleteVehicle _hook;
+ [{{deleteVehicle _x} count _this}, [_ropeTop, _ropeBottom, _dummy], 60] call CBA_fnc_waitAndExecute;
+} count _deployedRopes;
+
+_vehicle setVariable [QGVAR(deployedRopes), [], true];
+_vehicle setVariable [QGVAR(deploymentStage), 1, true];
+
+_config = configFile >> "CfgVehicles" >> typeOf _vehicle;
+_waitTime = 0;
+if (isText (_config >> QGVAR(onCut))) then {
+ _waitTime = [_vehicle] call (missionNamespace getVariable (getText (_config >> QGVAR(onCut))));
+};
+
+[{
+ _this setVariable [QGVAR(deploymentStage), 0, true];
+}, _vehicle, _waitTime] call CBA_fnc_waitAndExecute;
diff --git a/addons/fastroping/functions/fnc_deployAI.sqf b/addons/fastroping/functions/fnc_deployAI.sqf
new file mode 100644
index 0000000000..843f23cdb5
--- /dev/null
+++ b/addons/fastroping/functions/fnc_deployAI.sqf
@@ -0,0 +1,96 @@
+/*
+ * Author: BaerMitUmlaut
+ * Auomatically deploy a helicopter filled with AI units.
+ *
+ * Arguments:
+ * 0: The helicopter
+ * 1: Deploy special roles (gunners, copilot) (default: false)
+ * 2: Create deployment group (default: true)
+ *
+ * Return Value:
+ * None
+ *
+ * Example:
+ * [_vehicle] call ace_fastroping_fnc_deployAI
+ *
+ * Public: Yes
+ */
+
+#include "script_component.hpp"
+params [["_vehicle", objNull, [objNull]], ["_deploySpecial", false, [true]], ["_createDeploymentGroup", true, [true]]];
+private ["_config", "_configEnabled", "_deployTime", "_unitsToDeploy", "_deployGroup"];
+
+if (isNull _vehicle || {!(_vehicle isKindOf "Helicopter")}) exitWith {
+ if (hasInterface) then {
+ // Note: BIS_fnc_guiMessage causes a CTD with call, so spawn is used instead.
+ ["deployAI was called with an invalid or non-existant vehicle.", QFUNC(deployAI)] spawn BIS_fnc_guiMessage;
+ };
+ ACE_LOGERROR('FUNC(deployAI): deployAI was called with an invalid or non-existant vehicle.');
+};
+
+_config = configFile >> "CfgVehicles" >> typeOf _vehicle;
+_configEnabled = getNumber (_config >> QGVAR(enabled));
+if (_configEnabled == 0) exitWith {
+ if (hasInterface) then {
+ [format ["You cannot fast rope from a ""%1"" helicopter.", getText (_config >> "DisplayName")], QFUNC(deployAI)] spawn BIS_fnc_guiMessage;
+ };
+ ACE_LOGERROR_1('FUNC(deployAI): You cannot fast rope from a "%1" helicopter.',getText (_config >> "DisplayName"));
+};
+
+if (_configEnabled == 2 && {isNull (_vehicle getVariable [QGVAR(FRIES), objNull])}) exitWith {
+ if (hasInterface) then {
+ [format ["""%1"" requires a FRIES for fastroping, but has not been equipped with one.", getText (_config >> "DisplayName")], QFUNC(deployAI)] spawn BIS_fnc_guiMessage;
+ };
+ ACE_LOGERROR_1('FUNC(deployAI): "%1" requires a FRIES for fastroping but has not been equipped with one.',getText (_config >> "DisplayName"));
+};
+
+_unitsToDeploy = crew _vehicle;
+if (_deploySpecial) then {
+ _unitsToDeploy deleteAt (_unitsToDeploy find driver _vehicle);
+} else {
+ _unitsToDeploy = _unitsToDeploy select {(assignedVehicleRole _x) select 0 == "cargo"};
+};
+
+if (_unitsToDeploy isEqualTo []) exitWith {
+ ACE_LOGWARNING_1('FUNC(deployAI): Found no units to deploy in "%1".',getText (_config >> "DisplayName"));
+};
+
+if (_createDeploymentGroup) then {
+ _deployGroup = createGroup side (_unitsToDeploy select 0);
+ _unitsToDeploy joinSilent _deployGroup;
+};
+
+_deployTime = 0;
+if (getText (_config >> QGVAR(onPrepare)) != "") then {
+ _deployTime = [_vehicle] call (missionNamespace getVariable (getText (_config >> QGVAR(onPrepare))));
+};
+[{[_this] call FUNC(deployRopes)}, _vehicle, _deployTime] call CBA_fnc_waitAndExecute;
+driver _vehicle disableAI "MOVE";
+
+DFUNC(deployAIRecursive) = {
+ params ["_vehicle", "_unitsToDeploy"];
+
+ private _unit = _unitsToDeploy deleteAt 0;
+ unassignVehicle _unit;
+ [_unit, _vehicle] call FUNC(fastRope);
+
+ if !(_unitsToDeploy isEqualTo []) then {
+ [{
+ [{
+ params ["_vehicle"];
+ private _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []];
+ ({!(_x select 5)} count (_deployedRopes)) > 0
+ }, FUNC(deployAIRecursive), _this] call CBA_fnc_waitUntilAndExecute;
+ }, [_vehicle, _unitsToDeploy], 1] call CBA_fnc_waitAndExecute;
+ } else {
+ [{
+ private _deployedRopes = _this getVariable [QGVAR(deployedRopes), []];
+ ({_x select 5} count (_deployedRopes)) == 0
+ }, {
+ [_this] call FUNC(cutRopes);
+ driver _this enableAI "MOVE";
+ }, _vehicle] call CBA_fnc_waitUntilAndExecute;
+ };
+};
+
+[FUNC(deployAIRecursive), [_vehicle, _unitsToDeploy], _deployTime + 4] call CBA_fnc_waitAndExecute;
diff --git a/addons/fastroping/functions/fnc_deployAIWaypoint.sqf b/addons/fastroping/functions/fnc_deployAIWaypoint.sqf
new file mode 100644
index 0000000000..9d8f4a03e2
--- /dev/null
+++ b/addons/fastroping/functions/fnc_deployAIWaypoint.sqf
@@ -0,0 +1,42 @@
+/*
+ * Author: BaerMitUmlaut
+ * Waypoint function for the fast rope waypoint.
+ *
+ * Arguments:
+ * 0: Group
+ * 1: Waypoint position
+ *
+ * Return Value:
+ * true
+ *
+ * Example:
+ * [_group, [6560, 12390, 0]] call ace_fastroping_fnc_deployAIWayoint
+ *
+ * Public: No
+ */
+
+#include "script_component.hpp"
+params [["_group", grpNull, [grpNull]], ["_position", [0, 0, 0], [[]], 3]];
+private ["_vehicle", "_commander", "_speedMode"];
+
+_vehicle = vehicle leader _group;
+_commander = effectiveCommander _vehicle;
+_speedMode = speedMode _group;
+
+// - Approach -----------------------------------------------------------------
+if (_vehicle distance2D _position > 50) then {
+ _group setSpeedMode "LIMITED";
+ _vehicle flyInHeight 20;
+ _commander doMove _position;
+ waitUntil {_vehicle distance2D _position < 50};
+ waitUntil {vectorMagnitude (velocity _vehicle) < 3};
+ //doStop _commander;
+};
+
+// - Deployment ---------------------------------------------------------------
+[_vehicle] call FUNC(deployAI);
+waitUntil {!((_vehicle getVariable [QGVAR(deployedRopes), []]) isEqualTo [])};
+waitUntil {(_vehicle getVariable [QGVAR(deployedRopes), []]) isEqualTo []};
+_group setSpeedMode _speedMode;
+
+true
diff --git a/addons/fastroping/functions/fnc_deployRopes.sqf b/addons/fastroping/functions/fnc_deployRopes.sqf
new file mode 100644
index 0000000000..c944b2c3cb
--- /dev/null
+++ b/addons/fastroping/functions/fnc_deployRopes.sqf
@@ -0,0 +1,56 @@
+/*
+ * Author: BaerMitUmlaut
+ * Deploy ropes from the helicopter.
+ *
+ * Arguments:
+ * 0: The helicopter itself
+ *
+ * Return Value:
+ * None
+ *
+ * Example:
+ * [_vehicle] call ace_fastroping_fnc_deployRopes
+ *
+ * Public: No
+ */
+
+#include "script_component.hpp"
+params ["_vehicle"];
+private ["_config", "_ropeOrigins", "_ropeOrigin", "_deployedRopes", "_hookAttachment", "_origin", "_dummy", "_hook", "_ropeTop", "_ropeBottom"];
+
+_config = configFile >> "CfgVehicles" >> typeOf _vehicle;
+
+_ropeOrigins = getArray (_config >> QGVAR(ropeOrigins));
+_deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []];
+_hookAttachment = _vehicle getVariable [QGVAR(FRIES), _vehicle];
+{
+ _ropeOrigin = _x;
+ _hook = QGVAR(helper) createVehicle [0, 0, 0];
+ _hook allowDamage false;
+ if (typeName _ropeOrigin == "ARRAY") then {
+ _hook attachTo [_hookAttachment, _ropeOrigin];
+ } else {
+ _hook attachTo [_hookAttachment, [0, 0, 0], _ropeOrigin];
+ };
+
+ _origin = getPosATL _hook;
+
+ _dummy = createVehicle [QGVAR(helper), _origin vectorAdd [0, 0, -1], [], 0, "CAN_COLLIDE"];
+ _dummy allowDamage false;
+ _dummy disableCollisionWith _vehicle;
+
+ _ropeTop = ropeCreate [_dummy, [0, 0, 0], _hook, [0, 0, 0], 0.5];
+ _ropeBottom = ropeCreate [_dummy, [0, 0, 0], 1];
+ ropeUnwind [_ropeBottom, 30, 34.5, false];
+
+ _ropeTop addEventHandler ["RopeBreak", {[_this, "top"] call FUNC(onRopeBreak)}];
+ _ropeBottom addEventHandler ["RopeBreak", {[_this, "bottom"] call FUNC(onRopeBreak)}];
+
+ //deployedRopes format: attachment point, top part of the rope, bottom part of the rope, attachTo helper object, occupied
+ _deployedRopes pushBack [_ropeOrigin, _ropeTop, _ropeBottom, _dummy, _hook, false];
+
+ false
+} count _ropeOrigins;
+
+_vehicle setVariable [QGVAR(deployedRopes), _deployedRopes, true];
+_vehicle setVariable [QGVAR(deploymentStage), 3, true];
diff --git a/addons/fastroping/functions/fnc_equipFRIES.sqf b/addons/fastroping/functions/fnc_equipFRIES.sqf
new file mode 100644
index 0000000000..6d714611be
--- /dev/null
+++ b/addons/fastroping/functions/fnc_equipFRIES.sqf
@@ -0,0 +1,40 @@
+/*
+ * Author: BaerMitUmlaut
+ * Equips the given helicopter with a FRIES.
+ *
+ * Arguments:
+ * 0: The helicopter
+ *
+ * Return Value:
+ * None
+ *
+ * Example:
+ * [_vehicle] call ace_fastroping_fnc_equipFRIES
+ *
+ * Public: No
+ */
+
+#include "script_component.hpp"
+params ["_vehicle"];
+private ["_config", "_fries"];
+
+_config = configFile >> "CfgVehicles" >> typeOf _vehicle;
+if !(isNumber (_config >> QGVAR(enabled))) then {
+ ["%1 has not been configured for ACE_Fastroping.", getText (_config >> "DisplayName")] call BIS_fnc_error;
+} else {
+ if (getNumber (_config >> QGVAR(enabled)) == 2) then {
+ _fries = (getText (_config >> QGVAR(friesType))) createVehicle [0, 0, 0];
+ _fries attachTo [_vehicle, (getArray (_config >> QGVAR(friesAttachmentPoint)))];
+ _vehicle setVariable [QGVAR(FRIES), _fries, true];
+ _vehicle addEventHandler ["Killed", {
+ params ["_vehicle"];
+ deleteVehicle (_vehicle getVariable [QGVAR(FRIES), objNull]);
+ _vehicle setVariable [QGVAR(FRIES), nil, true];
+
+ if !((_vehicle getVariable [QGVAR(deployedRopes), []] isEqualTo [])) then {
+ [_vehicle] call FUNC(cutRopes);
+ };
+ }];
+ [FUNC(checkVehicleThread), [_vehicle, _fries], 5] call CBA_fnc_waitAndExecute;
+ };
+};
diff --git a/addons/fastroping/functions/fnc_fastRope.sqf b/addons/fastroping/functions/fnc_fastRope.sqf
new file mode 100644
index 0000000000..0db73f4fce
--- /dev/null
+++ b/addons/fastroping/functions/fnc_fastRope.sqf
@@ -0,0 +1,40 @@
+/*
+ * Author: BaerMitUmlaut
+ * Lets the unit fast rope.
+ *
+ * Arguments:
+ * 0: Unit occupying the helicopter
+ * 1: The helicopter itself
+ *
+ * Return Value:
+ * None
+ *
+ * Example:
+ * [_player, _vehicle] call ace_fastroping_fnc_fastRope
+ *
+ * Public: No
+ */
+
+#include "script_component.hpp"
+params ["_unit", "_vehicle"];
+private ["_deployedRopes", "_usableRope", "_usableRopeIndex"];
+
+//Select unoccupied rope
+_deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []];
+_usableRope = _deployedRopes select 0;
+_usableRopeIndex = 0;
+{
+ if !(_x select 5) exitWith {
+ _usableRope = _x;
+ _usableRopeIndex = _forEachIndex;
+ };
+} forEach _deployedRopes;
+
+_usableRope set [5, true];
+_deployedRopes set [_usableRopeIndex, _usableRope];
+_vehicle setVariable [QGVAR(deployedRopes), _deployedRopes, true];
+
+//Start server PFH asap
+[QGVAR(startFastRope), [_unit, _vehicle, _usableRope, _usableRopeIndex, false]] call CBA_fnc_serverEvent;
+moveOut _unit;
+[FUNC(fastRopeLocalPFH), 0, [_unit, _vehicle, _usableRope, _usableRopeIndex, diag_tickTime]] call CBA_fnc_addPerFrameHandler;
diff --git a/addons/fastroping/functions/fnc_fastRopeLocalPFH.sqf b/addons/fastroping/functions/fnc_fastRopeLocalPFH.sqf
new file mode 100644
index 0000000000..72177bce00
--- /dev/null
+++ b/addons/fastroping/functions/fnc_fastRopeLocalPFH.sqf
@@ -0,0 +1,51 @@
+/*
+ * Author: BaerMitUmlaut
+ * Local PerFrameHandler during fast roping.
+ *
+ * Arguments:
+ * 0: PFH arguments
+ * 1: PFH handle
+ *
+ * Return Value:
+ * None
+ *
+ * Example:
+ * [[_unit, _vehicle, _rope, _ropeIndex], 0] call ace_fastroping_fnc_fastRopeLocalPFH
+ *
+ * Public: No
+ */
+
+#include "script_component.hpp"
+params ["_arguments", "_pfhHandle"];
+_arguments params ["_unit", "_vehicle", "_rope", "_ropeIndex", "_timeToPlayRopeSound"];
+_rope params ["_attachmentPoint", "_ropeTop", "_ropeBottom", "_dummy", "_hook", "_occupied"];
+private ["_vectorUp", "_vectorDir", "_origin"];
+
+//Wait until the unit is actually outside of the helicopter
+if (vehicle _unit != _unit) exitWith {};
+
+//Start fast roping
+if (animationState _unit != "ACE_FastRoping") exitWith {
+ _unit disableCollisionWith _dummy;
+ _unit attachTo [_dummy, [0, 0, -1.45]];
+ [_unit, "ACE_FastRoping", 2] call EFUNC(common,doAnimation);
+};
+
+
+//End of fast rope
+if (isNull attachedTo _unit) exitWith {
+ TRACE_1("exit pfeh",_unit);
+ [_unit, "", 2] call EFUNC(common,doAnimation);
+ _unit setVectorUp [0, 0, 1];
+
+ if (_unit == ACE_player) then {
+ playSound QGVAR(Thud);
+ };
+
+ [_pfhHandle] call CBA_fnc_removePerFrameHandler;
+};
+
+if (_unit == ACE_player && {diag_tickTime > _timeToPlayRopeSound}) then {
+ _arguments set [4, (_timeToPlayRopeSound + 1)];
+ playSound QGVAR(Rope);
+};
diff --git a/addons/fastroping/functions/fnc_fastRopeServerPFH.sqf b/addons/fastroping/functions/fnc_fastRopeServerPFH.sqf
new file mode 100644
index 0000000000..2ebffe680e
--- /dev/null
+++ b/addons/fastroping/functions/fnc_fastRopeServerPFH.sqf
@@ -0,0 +1,82 @@
+/*
+ * Author: BaerMitUmlaut
+ * Server PerFrameHandler during fast roping.
+ *
+ * Arguments:
+ * 0: PFH arguments
+ * 1: PFH handle
+ *
+ * Return Value:
+ * None
+ *
+ * Example:
+ * [[_unit, _vehicle, _rope, _ropeIndex], 0] call ace_fastroping_fnc_fastRopeServerPFH
+ *
+ * Public: No
+ */
+
+#include "script_component.hpp"
+params ["_arguments", "_pfhHandle"];
+_arguments params ["_unit", "_vehicle", "_rope", "_ropeIndex", "_hasBeenAttached"];
+_rope params ["_attachmentPoint", "_ropeTop", "_ropeBottom", "_dummy", "_hook", "_occupied"];
+private ["_vectorUp", "_vectorDir", "_origin"];
+
+//Wait until the unit is actually outside of the helicopter
+if (vehicle _unit != _unit) exitWith {};
+
+//Start fast roping
+if (getMass _dummy != 80) exitWith {
+ //Fix for twitchyness
+ _dummy setMass 80;
+ _dummy setCenterOfMass [0, 0, -2];
+ _origin = getPosASL _hook;
+ _dummy setPosASL (_origin vectorAdd [0, 0, -2]);
+ _dummy setVectorUp [0, 0, 1];
+
+ ropeUnwind [_ropeTop, 6, 34.5];
+ ropeUnwind [_ropeBottom, 6, 0.5];
+};
+
+//Check if the player has been attached to the rope yet
+if (!_hasBeenAttached && {!(isNull attachedTo _unit)}) then {
+ _hasBeenAttached = true;
+ _arguments set [4, true];
+};
+
+//Exit when the unit has been detached and is falling (rope broke, heli flew too fast, etc.)
+//Make sure this isn't executed before the unit is actually fastroping
+if (_hasBeenAttached && {isNull attachedTo _unit}) exitWith {
+ [_pfhHandle] call CBA_fnc_removePerFrameHandler;
+};
+
+//Setting the velocity manually to reduce twitching
+_dummy setVelocity [0,0,-6];
+
+//Check if fast rope is finished
+if (((getPos _unit select 2) < 0.2) || {ropeLength _ropeTop == 34.5} || {vectorMagnitude (velocity _vehicle) > 5} || {!(alive _unit)} || {captive _unit}) exitWith {
+ detach _unit;
+
+ //Reset rope
+ deleteVehicle _ropeTop;
+ deleteVehicle _ropeBottom;
+
+ _origin = getPosASL _hook;
+ _dummy setPosASL (_origin vectorAdd [0, 0, -1]);
+
+ //Restore original mass and center of mass
+ _dummy setMass 40;
+ _dummy setCenterOfMass [0.000143227,0.00105986,-0.246147];
+
+ _ropeTop = ropeCreate [_dummy, [0, 0, 0], _hook, [0, 0, 0], 0.5];
+ _ropeBottom = ropeCreate [_dummy, [0, 0, 0], 34.5];
+
+ _ropeTop addEventHandler ["RopeBreak", {[_this, "top"] call FUNC(onRopeBreak)}];
+ _ropeBottom addEventHandler ["RopeBreak", {[_this, "bottom"] call FUNC(onRopeBreak)}];
+
+ //Update deployedRopes array
+ _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []];
+ _deployedRopes set [_ropeIndex, [_attachmentPoint, _ropeTop, _ropeBottom, _dummy, _hook, false]];
+ _vehicle setVariable [QGVAR(deployedRopes), _deployedRopes, true];
+
+ [_pfhHandle] call CBA_fnc_removePerFrameHandler;
+};
diff --git a/addons/fastroping/functions/fnc_moduleEquipFRIES.sqf b/addons/fastroping/functions/fnc_moduleEquipFRIES.sqf
new file mode 100644
index 0000000000..9bde56debe
--- /dev/null
+++ b/addons/fastroping/functions/fnc_moduleEquipFRIES.sqf
@@ -0,0 +1,27 @@
+/*
+ * Author: BaerMitUmlaut
+ * Equips synched helicopters with a FRIES.
+ *
+ * Arguments:
+ * 0: Module
+ *
+ * Return Value:
+ * None
+ *
+ * Example:
+ * [_module] call ace_fastroping_fnc_moduleEquipFRIES
+ *
+ * Public: No
+ */
+
+#include "script_component.hpp"
+params ["_module"];
+
+private _synchedUnits = synchronizedObjects _module;
+{
+ if (_x isKindOf "CAManBase") then {
+ _x = vehicle _x;
+ };
+ [_x] call FUNC(equipFRIES);
+ false
+} count _synchedUnits;
diff --git a/addons/fastroping/functions/fnc_onCutCommon.sqf b/addons/fastroping/functions/fnc_onCutCommon.sqf
new file mode 100644
index 0000000000..004c176b65
--- /dev/null
+++ b/addons/fastroping/functions/fnc_onCutCommon.sqf
@@ -0,0 +1,47 @@
+/*
+ * Author: BaerMitUmlaut
+ * Function for opening doors and extending the hook for most vanilla helos.
+ *
+ * Arguments:
+ * 0: Helicopter
+ *
+ * Return Value:
+ * Amount of time to wait before cutting ropes
+ *
+ * Example:
+ * [_vehicle] call ace_fastroping_fnc_onCutRopesCommon
+ *
+ * Public: No
+ */
+
+#include "script_component.hpp"
+params ["_vehicle"];
+
+private _fries = _vehicle getVariable [QGVAR(FRIES), objNull];
+if !(isNull _fries) then {
+ _fries animate ["extendHookRight", 0];
+ _fries animate ["extendHookLeft", 0];
+ [{
+ _this animateDoor ["door_R", 0];
+ _this animateDoor ["door_L", 0];
+ _this animateDoor ["CargoRamp_Open", 0];
+ _this animateDoor ["Door_rear_source", 0];
+ _this animateDoor ["Door_6_source", 0];
+ _this animate ["dvere1_posunZ", 0];
+ _this animate ["dvere2_posunZ", 0];
+ _this setVariable [QGVAR(doorsLocked), false, true];
+ }, _vehicle, 2] call CBA_fnc_waitAndExecute;
+
+ 4
+} else {
+ _vehicle animateDoor ["door_R", 0];
+ _vehicle animateDoor ["door_L", 0];
+ _vehicle animateDoor ["CargoRamp_Open", 0];
+ _vehicle animateDoor ["Door_rear_source", 0];
+ _vehicle animateDoor ["Door_6_source", 0];
+ _vehicle animate ["dvere1_posunZ", 0];
+ _vehicle animate ["dvere2_posunZ", 0];
+ _vehicle setVariable [QGVAR(doorsLocked), false, true];
+
+ 2
+};
diff --git a/addons/fastroping/functions/fnc_onPrepareCommon.sqf b/addons/fastroping/functions/fnc_onPrepareCommon.sqf
new file mode 100644
index 0000000000..37eb6c7eb8
--- /dev/null
+++ b/addons/fastroping/functions/fnc_onPrepareCommon.sqf
@@ -0,0 +1,42 @@
+/*
+ * Author: BaerMitUmlaut
+ * Function for closing doors and retracting the hook for most vanilla helos.
+ *
+ * Arguments:
+ * 0: Helicopter
+ *
+ * Return Value:
+ * Amount of time to wait before deploying ropes
+ *
+ * Example:
+ * [_vehicle] call ace_fastroping_fnc_onDeployRopesCommon
+ *
+ * Public: No
+ */
+
+#include "script_component.hpp"
+params ["_vehicle"];
+private ["_fries", "_waitTime"];
+
+_waitTime = 2;
+
+_vehicle animateDoor ["door_R", 1];
+_vehicle animateDoor ["door_L", 1];
+_vehicle animateDoor ["CargoRamp_Open", 1];
+_vehicle animateDoor ["Door_rear_source", 1];
+_vehicle animateDoor ["Door_6_source", 1];
+_vehicle animate ["dvere1_posunZ", 1];
+_vehicle animate ["dvere2_posunZ", 1];
+
+_vehicle setVariable [QGVAR(doorsLocked), true, true];
+
+_fries = _vehicle getVariable [QGVAR(FRIES), objNull];
+if !(isNull _fries) then {
+ [{
+ _this animate ["extendHookRight", 1];
+ _this animate ["extendHookLeft", 1];
+ }, _fries, 2] call CBA_fnc_waitAndExecute;
+ _waitTime = 4;
+};
+
+_waitTime
diff --git a/addons/fastroping/functions/fnc_onRopeBreak.sqf b/addons/fastroping/functions/fnc_onRopeBreak.sqf
new file mode 100644
index 0000000000..ed5f8bf1c8
--- /dev/null
+++ b/addons/fastroping/functions/fnc_onRopeBreak.sqf
@@ -0,0 +1,52 @@
+/*
+ * Author: BaerMitUmlaut
+ * Handles ropes breaking when deployed.
+ *
+ * Arguments:
+ * 0: RopeBreak EH arguments
+ * 1: Part of rope ("top" or "bottom")
+ *
+ * Return Value:
+ * None
+ *
+ * Public: No
+ */
+
+#include "script_component.hpp"
+params ["_ehArgs", "_part"];
+_ehArgs params ["_rope", "_helper1", "_helper2"];
+private ["_vehicle", "_deployedRopes", "_brokenRope", "_unit"];
+
+if (_part == "bottom") then {
+ _helper2 = (ropeAttachedObjects _helper1) select 0;
+};
+
+_vehicle = attachedTo _helper2;
+if (isNil "_vehicle") exitWith {}; //Exit when vehicle got destroyed
+if (_vehicle isKindOf "ACE_friesBase") then {
+ _vehicle = attachedTo _vehicle;
+};
+
+_deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []];
+_brokenRope = [];
+{
+ if ((_x select 1 == _rope) || {(_x select 2 == _rope)}) exitWith {
+ _brokenRope = _x;
+ };
+} forEach _deployedRopes;
+_brokenRope set [5, true];
+_vehicle setVariable [QGVAR(deployedRopes), _deployedRopes, true];
+
+_unit = {
+ if (_x isKindOf "CAManBase") exitWith {_x};
+} forEach (attachedObjects (_brokenRope select 3));
+
+if !(isNil "_unit") then {
+ if (_part == "top") then {
+ detach _unit;
+ } else {
+ //TODO: ???
+ //Rope might break at the very bottom
+ //-> letting the unit fall is not always ideal
+ };
+};
diff --git a/addons/fastroping/functions/fnc_prepareFRIES.sqf b/addons/fastroping/functions/fnc_prepareFRIES.sqf
new file mode 100644
index 0000000000..e4bce8458c
--- /dev/null
+++ b/addons/fastroping/functions/fnc_prepareFRIES.sqf
@@ -0,0 +1,32 @@
+/*
+ * Author: BaerMitUmlaut
+ * Prepares the helicopters FRIES.
+ *
+ * Arguments:
+ * 0: A helicopter with deployed ropes
+ *
+ * Return Value:
+ * None
+ *
+ * Example:
+ * [_vehicle] call ace_fastroping_fnc_prepareFRIES
+ *
+ * Public: No
+ */
+
+#include "script_component.hpp"
+params ["_vehicle"];
+private ["_config", "_waitTime"];
+
+//Stage indicator: 0 - travel mode; 1 - preparing FRIES; 2 - FRIES ready; 3 - ropes deployed
+_vehicle setVariable [QGVAR(deploymentStage), 1, true];
+
+_config = configFile >> "CfgVehicles" >> typeOf _vehicle;
+_waitTime = 0;
+if (isText (_config >> QGVAR(onPrepare))) then {
+ _waitTime = [_vehicle] call (missionNamespace getVariable (getText (_config >> QGVAR(onPrepare))));
+};
+
+[{
+ _this setVariable [QGVAR(deploymentStage), 2, true];
+}, _vehicle, _waitTime] call CBA_fnc_waitAndExecute;
diff --git a/addons/fastroping/functions/script_component.hpp b/addons/fastroping/functions/script_component.hpp
new file mode 100644
index 0000000000..00e1b5bb76
--- /dev/null
+++ b/addons/fastroping/functions/script_component.hpp
@@ -0,0 +1 @@
+#include "\z\ace\addons\fastroping\script_component.hpp"
diff --git a/addons/difficulties/script_component.hpp b/addons/fastroping/script_component.hpp
similarity index 52%
rename from addons/difficulties/script_component.hpp
rename to addons/fastroping/script_component.hpp
index b6f387b02f..3770bfe0d4 100644
--- a/addons/difficulties/script_component.hpp
+++ b/addons/fastroping/script_component.hpp
@@ -1,4 +1,4 @@
-#define COMPONENT difficulties
+#define COMPONENT fastroping
#include "\z\ace\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL
@@ -6,12 +6,12 @@
// #define CBA_DEBUG_SYNCHRONOUS
// #define ENABLE_PERFORMANCE_COUNTERS
-#ifdef DEBUG_ENABLED_DIFFICULTIES
+#ifdef DEBUG_ENABLED_FASTROPING
#define DEBUG_MODE_FULL
#endif
-#ifdef DEBUG_ENABLED_DIFFICULTIES
- #define DEBUG_SETTINGS DEBUG_ENABLED_DIFFICULTIES
+#ifdef DEBUG_SETTINGS_FASTROPING
+ #define DEBUG_SETTINGS DEBUG_SETTINGS_FASTROPING
#endif
-#include "\z\ace\addons\main\script_macros.hpp"
\ No newline at end of file
+#include "\z\ace\addons\main\script_macros.hpp"
diff --git a/addons/fastroping/stringtable.xml b/addons/fastroping/stringtable.xml
new file mode 100644
index 0000000000..6d64fc24f5
--- /dev/null
+++ b/addons/fastroping/stringtable.xml
@@ -0,0 +1,91 @@
+
+
+
+
+ Equip FRIES
+ Rüste FRIES aus
+ Wyposaż FRIES
+ Equiper le FRIES
+ Equipar FRIES
+ Equipaggia la FRIES
+ Vybavit FRIES
+ Equipar FRIES
+
+
+ Equips compatible helicopters with a Fast Rope Insertion Extraction System.
+ Rüstet kompatible Helikopter mit einem Fast Rope Insertion Extraction System aus.
+ Wyposaża kompatybilne helikoptery w zestaw Fast Rope Insertion Extraction System.
+ Equipe les hélicoptères compatibles avec un Module Fast Rope Insertion Extraction System.
+ Equipar helicoptero compatible con un Sistema de Inserción Extracción Fast Rope.
+ Equipagga l'elicottero compatibile con il Fast Rope Insertion Exstraction System
+ Vybavit kompatibilní vrtulníky systémem Fast Rope Insertion Extraction (FRIES).
+ Equipa um helicóptero compatível com o Fast Rope Insertion Exctraction System.
+
+
+ Prepare fast roping system
+ Bereite Fast Roping System vor
+ Przygotuj system zjazdu na linach
+ Préparer le système de corde lisse
+ Preparar el sistema fast roping
+ Prepara le corde
+ Připravit systém slaňování
+ Prepara sistema de descida rápida
+
+
+ Deploy ropes
+ Seile auswerfen
+ Wypuść liny
+ Déployer les cordes
+ Desplegar cuerdas
+ Srotola le corde
+ Připravit lana
+ Jogar cordas
+
+
+ Fast rope
+ Abseilen
+ Zjedź na linie
+ Descendre à la corde
+ Descender por la cuerda
+ Scendi sulla corda
+ SLANIT
+ Descida rápida
+
+
+ Cut ropes
+ Seile abwerfen
+ Odetnij liny
+ Détacher les cordes
+ Cortar cuerdas
+ Taglia le corde
+ Odříznout lano
+ Cortar cordas
+
+
+ Equip helicopter with FRIES
+ Rüste Helicopter mit FRIES aus
+ Wyposaż helikopter w FRIES
+ Equiper l'hélicoptère avec le FRIED
+ Equipar helicoptero con FRIES
+ Equipaggia l'elicottero con FRIES
+ Vybavit vrtulník pomocí FRIES
+ Equipar helicóptero com FRIES
+
+
+ Equips the selected helicopter with a Fast Rope Insertion Extraction System
+ Rüstet den ausgewählten Helicopter mit einem Fast Rope Insertion Extraction System aus
+ Wyposaża wybrany helikopter w zestaw Fast Rope Insertion Extraction System
+ Equipe l'hélicoptère sélectionné avec un Fast Rope Insertion Extraction System
+ Equipa el helicoptero seleccionado con un Sistema de Inserción Extracción Fast Rope
+ Equipaggia l'elicottero selezionato con il Fast Rope Insertion Extraction System
+ Vybavit vybraný vrtulník systémem Fast Rope Insertion Extraction (FRIES)
+ Equipa um helicóptero selecionado com um sistema de Fast Rope Insertion Extraction System
+
+
+ LET UNITS FAST ROPE
+ EINHEITEN ABSEILEN LASSEN
+ SCENDI DALLE CORDE
+ Equipa o helicóptero selecionado com o Fast Rope Insertion Extraction System
+
+
+
\ No newline at end of file
diff --git a/addons/fcs/ACE_UI.hpp b/addons/fcs/ACE_UI.hpp
new file mode 100644
index 0000000000..ca35779f36
--- /dev/null
+++ b/addons/fcs/ACE_UI.hpp
@@ -0,0 +1,7 @@
+class ACE_UI {
+ class gunnerZeroing {
+ class conditions {
+ ADDON = "false";
+ };
+ };
+};
diff --git a/addons/fcs/CfgEventHandlers.hpp b/addons/fcs/CfgEventHandlers.hpp
index 8c5b768ca9..b477f93d6a 100644
--- a/addons/fcs/CfgEventHandlers.hpp
+++ b/addons/fcs/CfgEventHandlers.hpp
@@ -1,4 +1,10 @@
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
diff --git a/addons/fcs/CfgOptics.hpp b/addons/fcs/CfgOptics.hpp
index 91f83dd6f6..aa68a6f68a 100644
--- a/addons/fcs/CfgOptics.hpp
+++ b/addons/fcs/CfgOptics.hpp
@@ -123,7 +123,7 @@ class RscInGameUI {
};
};
class Rsc_ACE_Helo_UI_Turret: RscUnitInfo {
- onLoad = "uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0]; [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""";
+ onLoad = "[""onLoad"",_this,""RscUnitInfo"",'IGUI'] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0];";
class CA_IGUI_elements_group: RscControlsGroup {
class controls {
MACRO_RANGEFINDER
diff --git a/addons/fcs/XEH_PREP.hpp b/addons/fcs/XEH_PREP.hpp
new file mode 100644
index 0000000000..be505b95fe
--- /dev/null
+++ b/addons/fcs/XEH_PREP.hpp
@@ -0,0 +1,16 @@
+
+PREP(adjustRange);
+PREP(calculateSolution);
+PREP(canResetFCS);
+PREP(canUseFCS);
+PREP(canUseRangefinder);
+PREP(firedEH);
+PREP(getAngle);
+PREP(getRange);
+PREP(handleAirBurstAmmunitionPFH);
+PREP(onForceUpdate);
+PREP(keyDown);
+PREP(keyUp);
+PREP(reset);
+PREP(updateRangeHUD);
+PREP(vehicleInit);
diff --git a/addons/fcs/XEH_postInit.sqf b/addons/fcs/XEH_postInit.sqf
index 25fd09ba8c..02c9e72ae5 100644
--- a/addons/fcs/XEH_postInit.sqf
+++ b/addons/fcs/XEH_postInit.sqf
@@ -8,16 +8,16 @@ if (!hasInterface) exitWith {};
#include "initKeybinds.sqf"
-["infoDisplayChanged", {
+["ace_infoDisplayChanged", {
if (!isNull ((_this select 0) displayCtrl 1713151)) then {
uiNamespace setVariable ["ACE_dlgRangefinder", _this select 0];
((_this select 0) displayCtrl 151) ctrlSetTextColor [0,0,0,0];
};
-}] call EFUNC(common,addEventHandler);
+}] call CBA_fnc_addEventHandler;
// Register fire event handler
-["firedPlayerVehicle", DFUNC(firedEH)] call EFUNC(common,addEventHandler);
-["firedPlayerVehicleNonLocal", DFUNC(firedEH)] call EFUNC(common,addEventHandler);
+["ace_firedPlayerVehicle", DFUNC(firedEH)] call CBA_fnc_addEventHandler;
+["ace_firedPlayerVehicleNonLocal", DFUNC(firedEH)] call CBA_fnc_addEventHandler;
// Register event for global updates
-[QGVAR(forceUpdate), {[ACE_player] call FUNC(onForceUpdate)}] call EFUNC(common,addEventHandler);
+[QGVAR(forceUpdate), {[ACE_player] call FUNC(onForceUpdate)}] call CBA_fnc_addEventHandler;
diff --git a/addons/fcs/XEH_preInit.sqf b/addons/fcs/XEH_preInit.sqf
index c3fa171adf..a7feade1c3 100644
--- a/addons/fcs/XEH_preInit.sqf
+++ b/addons/fcs/XEH_preInit.sqf
@@ -2,20 +2,6 @@
ADDON = false;
-PREP(adjustRange);
-PREP(calculateSolution);
-PREP(canResetFCS);
-PREP(canUseFCS);
-PREP(canUseRangefinder);
-PREP(firedEH);
-PREP(getAngle);
-PREP(getRange);
-PREP(handleAirBurstAmmunitionPFH);
-PREP(onForceUpdate);
-PREP(keyDown);
-PREP(keyUp);
-PREP(reset);
-PREP(updateRangeHUD);
-PREP(vehicleInit);
+#include "XEH_PREP.hpp"
ADDON = true;
diff --git a/addons/fcs/XEH_preStart.sqf b/addons/fcs/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/fcs/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/fcs/config.cpp b/addons/fcs/config.cpp
index 12edf02ba3..a38cee5d7d 100644
--- a/addons/fcs/config.cpp
+++ b/addons/fcs/config.cpp
@@ -6,13 +6,15 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_interaction"};
- author[] = {"KoffeinFlummi","BadGuy (simon84)","commy2"};
- authorUrl = "https://github.com/KoffeinFlummi/";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"KoffeinFlummi","BadGuy (simon84)","commy2"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
#include "CfgEventHandlers.hpp"
+#include "ACE_UI.hpp"
#include "CfgAmmo.hpp"
#include "CfgMagazines.hpp"
diff --git a/addons/fcs/functions/fnc_adjustRange.sqf b/addons/fcs/functions/fnc_adjustRange.sqf
index f6f543d35a..bed9389716 100644
--- a/addons/fcs/functions/fnc_adjustRange.sqf
+++ b/addons/fcs/functions/fnc_adjustRange.sqf
@@ -22,6 +22,7 @@ private _min = getNumber (_turretConfig >> QGVAR(MinDistance));
private _max = getNumber (_turretConfig >> QGVAR(MaxDistance));
private _distance = _vehicle getVariable [format ["%1_%2", QGVAR(Distance), _turret], _min];
+TRACE_4("",_distance,_delta,_min,_max);
_distance = _distance + _delta;
_distance = _distance min _max;
diff --git a/addons/fcs/functions/fnc_calculateSolution.sqf b/addons/fcs/functions/fnc_calculateSolution.sqf
index 9908832824..6d489de006 100644
--- a/addons/fcs/functions/fnc_calculateSolution.sqf
+++ b/addons/fcs/functions/fnc_calculateSolution.sqf
@@ -15,6 +15,7 @@
*/
#include "script_component.hpp"
params ["_vehicle","_turret","_distance","_angleTarget"];
+TRACE_4("params",_vehicle,_turret,_distance,_angleTarget);
private _FCSMagazines = [];
private _FCSElevation = [];
diff --git a/addons/fcs/functions/fnc_canUseFCS.sqf b/addons/fcs/functions/fnc_canUseFCS.sqf
index 91b49554c2..3899584788 100644
--- a/addons/fcs/functions/fnc_canUseFCS.sqf
+++ b/addons/fcs/functions/fnc_canUseFCS.sqf
@@ -8,9 +8,13 @@
* Return Value:
* Boolean
*
+ * Example:
+ * [] call ace_fcs_fnc_canUseFCS
+ *
* Public: No
*/
#include "script_component.hpp"
getNumber ([configFile >> "CfgVehicles" >> typeOf vehicle ACE_player, [ACE_player] call EFUNC(common,getTurretIndex)] call EFUNC(common,getTurretConfigPath) >> QGVAR(Enabled)) == 1
-&& {cameraView == "GUNNER"} // return
+&& {cameraView == "GUNNER"}
+&& {!([ACE_player] call CBA_fnc_canUseWeapon)} //Not Turned Out
diff --git a/addons/fcs/functions/fnc_firedEH.sqf b/addons/fcs/functions/fnc_firedEH.sqf
index a9f4975780..4c9b7d8b85 100644
--- a/addons/fcs/functions/fnc_firedEH.sqf
+++ b/addons/fcs/functions/fnc_firedEH.sqf
@@ -16,10 +16,11 @@
TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile, _vehicle, _gunner, _turret);
private _FCSMagazines = _vehicle getVariable [format ["%1_%2", QGVAR(Magazines), _turret], []];
-private _FCSElevation = _vehicle getVariable format ["%1_%2", QGVAR(Elevation), _turret];
if !(_magazine in _FCSMagazines) exitWith {};
+private _FCSElevation = _vehicle getVariable format ["%1_%2", QGVAR(Elevation), _turret];
+
// GET ELEVATION OFFSET OF CURRENT MAGAZINE
private _offset = 0;
diff --git a/addons/fcs/functions/fnc_keyDown.sqf b/addons/fcs/functions/fnc_keyDown.sqf
index e61baed136..3c4943badf 100644
--- a/addons/fcs/functions/fnc_keyDown.sqf
+++ b/addons/fcs/functions/fnc_keyDown.sqf
@@ -29,7 +29,7 @@ private _distance = [
if !(!GVAR(enabled) && FUNC(canUseFCS)) exitWith {};
GVAR(Enabled) = true;
-GVAR(time) = ACE_time;
+GVAR(time) = CBA_missionTime;
private _weaponDirection = _vehicle weaponDirection (_vehicle currentWeaponTurret _turret); // @todo doesn't work for sub turrets
diff --git a/addons/fcs/functions/fnc_keyUp.sqf b/addons/fcs/functions/fnc_keyUp.sqf
index 919ac3a58e..a07f5d5d35 100644
--- a/addons/fcs/functions/fnc_keyUp.sqf
+++ b/addons/fcs/functions/fnc_keyUp.sqf
@@ -14,6 +14,7 @@
#include "script_component.hpp"
params ["_vehicle", "_turret", "_distance", ["_showHint", false], ["_playSound", true]];
+TRACE_5("params",_vehicle,_turret,_distance,_showHint,_playSound);
private _turretConfig = [configFile >> "CfgVehicles" >> typeOf _vehicle, _turret] call EFUNC(common,getTurretConfigPath);
@@ -23,6 +24,8 @@ if (isNil "_distance") then {
getNumber (_turretConfig >> QGVAR(MaxDistance)),
getNumber (_turretConfig >> QGVAR(MinDistance))
] call FUNC(getRange);
+} else {
+ ((uiNamespace getVariable ["ACE_dlgRangefinder", displayNull]) displayCtrl 1713151) ctrlSetText ([_distance, 4, 0] call CBA_fnc_formatNumber);
};
// MOVING TARGETS
@@ -41,10 +44,10 @@ private _angleTarget = asin (_weaponDirection select 2);
private _movingAzimuth = 0;
-if (ACE_time - GVAR(time) > 1 && GVAR(time) != -1 && isNil {_this select 2}) then {
+if (CBA_missionTime - GVAR(time) > 1 && GVAR(time) != -1 && isNil {_this select 2}) then {
// calculate speed of target
private _posTarget = (getPosASL _vehicle) vectorAdd (_weaponDirection vectorMultiply _distance);
- private _velocityTarget = (_posTarget vectorDiff GVAR(position)) vectorMultiply (1 / (ACE_time - GVAR(time)));
+ private _velocityTarget = (_posTarget vectorDiff GVAR(position)) vectorMultiply (1 / (CBA_missionTime - GVAR(time)));
// estimate time to target
private _magazine = _vehicle currentMagazineTurret _turret;
diff --git a/addons/fcs/functions/fnc_onForceUpdate.sqf b/addons/fcs/functions/fnc_onForceUpdate.sqf
index 1bf1f0d701..2c6d136300 100644
--- a/addons/fcs/functions/fnc_onForceUpdate.sqf
+++ b/addons/fcs/functions/fnc_onForceUpdate.sqf
@@ -1,13 +1,13 @@
-#include "script_component.hpp"
-
-params ["_unit"];
-
-private _vehicle = vehicle _unit;
-
-if !([_unit, _vehicle, []] call EFUNC(common,canInteractWith)) exitWith {false};
-if !((!GVAR(enabled) && FUNC(canUseFCS)) || FUNC(canUseRangefinder)) exitWith {false};
-
-private _turret = [_unit] call EFUNC(common,getTurretIndex);
-
-[_vehicle, _turret] call FUNC(keyDown);
-[_vehicle, _turret] call FUNC(keyUp);
+#include "script_component.hpp"
+
+params ["_unit"];
+
+private _vehicle = vehicle _unit;
+
+if !([_unit, _vehicle, []] call EFUNC(common,canInteractWith)) exitWith {false};
+if !((!GVAR(enabled) && FUNC(canUseFCS)) || FUNC(canUseRangefinder)) exitWith {false};
+
+private _turret = [_unit] call EFUNC(common,getTurretIndex);
+
+[_vehicle, _turret] call FUNC(keyDown);
+[_vehicle, _turret] call FUNC(keyUp);
diff --git a/addons/finger/ACE_Settings.hpp b/addons/finger/ACE_Settings.hpp
index a4beb40eb8..73e1db1904 100644
--- a/addons/finger/ACE_Settings.hpp
+++ b/addons/finger/ACE_Settings.hpp
@@ -1,27 +1,27 @@
-class ACE_Settings {
- class GVAR(enabled) {
- value = 0;
- typeName = "BOOL";
- displayName = CSTRING(enabled_displayName);
- };
- class GVAR(maxRange) {
- value = 4;
- typeName = "SCALAR";
- displayName = CSTRING(maxRange_displayName);
- description = CSTRING(maxRange_description);
- };
- class GVAR(indicatorForSelf) {
- value = 1;
- typeName = "BOOL";
- isClientSettable = 1;
- displayName = CSTRING(indicatorForSelf_name);
- description = CSTRING(indicatorForSelf_description);
- };
- class GVAR(indicatorColor) {
- value[] = {0.83, 0.68, 0.21, 0.75};
- typeName = "COLOR";
- isClientSettable = 1;
- displayName = CSTRING(indicatorColor_name);
- description = CSTRING(indicatorColor_description);
- };
-};
+class ACE_Settings {
+ class GVAR(enabled) {
+ value = 0;
+ typeName = "BOOL";
+ displayName = CSTRING(enabled_displayName);
+ };
+ class GVAR(maxRange) {
+ value = 4;
+ typeName = "SCALAR";
+ displayName = CSTRING(maxRange_displayName);
+ description = CSTRING(maxRange_description);
+ };
+ class GVAR(indicatorForSelf) {
+ value = 1;
+ typeName = "BOOL";
+ isClientSettable = 1;
+ displayName = CSTRING(indicatorForSelf_name);
+ description = CSTRING(indicatorForSelf_description);
+ };
+ class GVAR(indicatorColor) {
+ value[] = {0.83, 0.68, 0.21, 0.75};
+ typeName = "COLOR";
+ isClientSettable = 1;
+ displayName = CSTRING(indicatorColor_name);
+ description = CSTRING(indicatorColor_description);
+ };
+};
diff --git a/addons/finger/CfgEventHandlers.hpp b/addons/finger/CfgEventHandlers.hpp
index 917a0acbd7..becf395052 100644
--- a/addons/finger/CfgEventHandlers.hpp
+++ b/addons/finger/CfgEventHandlers.hpp
@@ -1,8 +1,16 @@
+
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
};
};
+
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
diff --git a/addons/finger/CfgVehicles.hpp b/addons/finger/CfgVehicles.hpp
index e78ef50123..8125e7f2f5 100644
--- a/addons/finger/CfgVehicles.hpp
+++ b/addons/finger/CfgVehicles.hpp
@@ -4,7 +4,7 @@ class CfgVehicles {
scope = 2;
category = "ACE";
displayName = CSTRING(moduleSettings_displayName);
- icon = QUOTE(PATHTOF(UI\Icon_Module_finger_ca.paa));
+ icon = QPATHTOF(UI\Icon_Module_finger_ca.paa);
function = QFUNC(moduleSettings);
isGlobal = 0;
isSingular = 1;
@@ -12,6 +12,7 @@ class CfgVehicles {
class Arguments {
class enabled {
displayName = CSTRING(enabled_DisplayName);
+ description = CSTRING(enabled_DisplayName);
typeName = "BOOL";
defaultValue = 1;
};
diff --git a/addons/finger/XEH_PREP.hpp b/addons/finger/XEH_PREP.hpp
new file mode 100644
index 0000000000..6965917bd8
--- /dev/null
+++ b/addons/finger/XEH_PREP.hpp
@@ -0,0 +1,5 @@
+
+PREP(incomingFinger);
+PREP(keyPress);
+PREP(moduleSettings);
+PREP(perFrameEH);
diff --git a/addons/finger/XEH_postInit.sqf b/addons/finger/XEH_postInit.sqf
index 394c0cfd3b..a1b7ebb9f0 100644
--- a/addons/finger/XEH_postInit.sqf
+++ b/addons/finger/XEH_postInit.sqf
@@ -6,18 +6,18 @@ GVAR(lastFPTime) = -1;
GVAR(fingersHash) = HASH_CREATE;
GVAR(pfeh_id) = -1;
-["SettingsInitialized", {
- //If not enabled, dont't bother adding keybind or eventhandler
+["ace_settingsInitialized", {
+ //If not enabled, dont't bother adding eventhandler
+ TRACE_1("ace_settingsInitialized eh", GVAR(enabled));
if (!GVAR(enabled)) exitWith {};
+ [QGVAR(fingered), {_this call FUNC(incomingFinger)}] call CBA_fnc_addEventHandler;
+}] call CBA_fnc_addEventHandler;
- [QGVAR(fingered), {_this call FUNC(incomingFinger)}] call EFUNC(common,addEventHandler);
-
- ["ACE3 Common",
- QGVAR(finger),
- [(localize LSTRING(keyComb)), (localize LSTRING(keyComb_description))],
- {
- _this call FUNC(keyPress);
- },
- {false},
- [41, [true, false, false]], true] call CBA_fnc_addKeybind; // Shift + Tilda (hold)
-}] call EFUNC(common,addEventHandler);
+//Add Keybind:
+["ACE3 Common", QGVAR(finger), [(localize LSTRING(keyComb)), (localize LSTRING(keyComb_description))],
+{
+ if (!GVAR(enabled)) exitWith {false};
+ _this call FUNC(keyPress);
+},
+{false},
+[41, [true, false, false]], true] call CBA_fnc_addKeybind; // Shift + Tilda (hold)
diff --git a/addons/finger/XEH_preInit.sqf b/addons/finger/XEH_preInit.sqf
index e7e68cf8ec..a7feade1c3 100644
--- a/addons/finger/XEH_preInit.sqf
+++ b/addons/finger/XEH_preInit.sqf
@@ -2,9 +2,6 @@
ADDON = false;
-PREP(incomingFinger);
-PREP(keyPress);
-PREP(moduleSettings);
-PREP(perFrameEH);
+#include "XEH_PREP.hpp"
ADDON = true;
diff --git a/addons/finger/XEH_preStart.sqf b/addons/finger/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/finger/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/finger/config.cpp b/addons/finger/config.cpp
index 2cc3be5ddd..fa953b4298 100644
--- a/addons/finger/config.cpp
+++ b/addons/finger/config.cpp
@@ -1,18 +1,19 @@
-#include "script_component.hpp"
-
-class CfgPatches {
- class ADDON {
- units[] = {QGVAR(moduleSettings)};
- weapons[] = {};
- requiredVersion = REQUIRED_VERSION;
- requiredAddons[] = {"ace_common"};
- author[] = {"Drill"};
- authorUrl = "https://github.com/TheDrill/";
- VERSION_CONFIG;
- };
-};
-
-
-#include "ACE_Settings.hpp"
-#include "CfgEventHandlers.hpp"
-#include "CfgVehicles.hpp"
+#include "script_component.hpp"
+
+class CfgPatches {
+ class ADDON {
+ units[] = {QGVAR(moduleSettings)};
+ weapons[] = {};
+ requiredVersion = REQUIRED_VERSION;
+ requiredAddons[] = {"ace_common"};
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"Drill"};
+ url = ECSTRING(main,URL);
+ VERSION_CONFIG;
+ };
+};
+
+
+#include "ACE_Settings.hpp"
+#include "CfgEventHandlers.hpp"
+#include "CfgVehicles.hpp"
diff --git a/addons/finger/functions/fnc_incomingFinger.sqf b/addons/finger/functions/fnc_incomingFinger.sqf
index 02c870a519..0b21bd4930 100644
--- a/addons/finger/functions/fnc_incomingFinger.sqf
+++ b/addons/finger/functions/fnc_incomingFinger.sqf
@@ -27,7 +27,7 @@ _fingerPos = if (_sourceUnit == ACE_player) then {
_fingerPosPrecise vectorAdd [random (2*FP_RANDOMIZATION_X) - FP_RANDOMIZATION_X, random (2*FP_RANDOMIZATION_X) - FP_RANDOMIZATION_X, random (2*FP_RANDOMIZATION_Y) - FP_RANDOMIZATION_Y]
};
-_data = [ACE_diagTime, _fingerPos, ([_sourceUnit, false, true] call EFUNC(common,getName))];
+_data = [diag_tickTime, _fingerPos, ([_sourceUnit, false, true] call EFUNC(common,getName))];
HASH_SET(GVAR(fingersHash), _sourceUnit, _data);
if (GVAR(pfeh_id) == -1) then {
diff --git a/addons/finger/functions/fnc_keyPress.sqf b/addons/finger/functions/fnc_keyPress.sqf
index 1ce83d62dc..d0d8bce811 100644
--- a/addons/finger/functions/fnc_keyPress.sqf
+++ b/addons/finger/functions/fnc_keyPress.sqf
@@ -25,9 +25,9 @@ if ((ACE_player != vehicle ACE_player) && {!((vehicle ACE_player) isKindOf "Stat
//Check camera view (not in GUNNER)
if !(cameraView in ["INTERNAL", "EXTERNAL"]) exitWith {false};
//Exit if run recently (run every 1 seconds)
-if (ACE_diagTime < (GVAR(lastFPTime) + FP_ACTION_TIMEOUT)) exitWith {true};
+if (diag_tickTime < (GVAR(lastFPTime) + FP_ACTION_TIMEOUT)) exitWith {true};
-GVAR(lastFPTime) = ACE_diagTime;
+GVAR(lastFPTime) = diag_tickTime;
_fingerPosPrecise = positionCameraToWorld [0, 0, FP_DISTANCE];
_playerEyePos = eyePos ACE_player;
@@ -55,7 +55,7 @@ _nearbyMen = (ACE_player nearObjects ["CAManBase", (GVAR(maxRange) + 2)]);
TRACE_1("sending finger to",_sendFingerToPlayers);
-[QGVAR(fingered), _sendFingerToPlayers, [ACE_player, _fingerPosPrecise]] call EFUNC(common,targetEvent);
+[QGVAR(fingered), [ACE_player, _fingerPosPrecise], _sendFingerToPlayers] call CBA_fnc_targetEvent;
ACE_player playActionNow "GestureGo";
diff --git a/addons/finger/functions/fnc_perFrameEH.sqf b/addons/finger/functions/fnc_perFrameEH.sqf
index 7f0150c492..41fb718146 100644
--- a/addons/finger/functions/fnc_perFrameEH.sqf
+++ b/addons/finger/functions/fnc_perFrameEH.sqf
@@ -31,7 +31,7 @@ _iconSize = BASE_SIZE * _fovCorrection;
{
_data = HASH_GET(GVAR(fingersHash), _x);
_data params ["_lastTime", "_pos", "_name"];
- _timeLeftToShow = _lastTime + FP_TIMEOUT - ACE_diagTime;
+ _timeLeftToShow = _lastTime + FP_TIMEOUT - diag_tickTime;
if (_timeLeftToShow <= 0) then {
HASH_REM(GVAR(fingersHash), _x);
} else {
@@ -41,7 +41,7 @@ _iconSize = BASE_SIZE * _fovCorrection;
_drawColor set [3, ((_drawColor select 3) * (_timeLeftToShow / 0.5))];
};
- drawIcon3D [QUOTE(PATHTOF(UI\fp_icon2.paa)), _drawColor, _pos, _iconSize, _iconSize, 0, _name, 1, 0.03, "PuristaMedium"];
+ drawIcon3D [QPATHTOF(UI\fp_icon2.paa), _drawColor, _pos, _iconSize, _iconSize, 0, _name, 1, 0.03, "RobotoCondensed"];
};
} count (GVAR(fingersHash) select 0);
diff --git a/addons/finger/script_component.hpp b/addons/finger/script_component.hpp
index edaf93a942..c9164763e7 100644
--- a/addons/finger/script_component.hpp
+++ b/addons/finger/script_component.hpp
@@ -1,26 +1,26 @@
-#define COMPONENT finger
-#include "\z\ace\addons\main\script_mod.hpp"
-
-// #define DEBUG_MODE_FULL
-// #define DISABLE_COMPILE_CACHE
-// #define CBA_DEBUG_SYNCHRONOUS
-// #define ENABLE_PERFORMANCE_COUNTERS
-
-#ifdef DEBUG_ENABLED_FINGER
- #define DEBUG_MODE_FULL
-#endif
-
-#ifdef DEBUG_SETTINGS_FINGER
- #define DEBUG_SETTINGS DEBUG_SETTINGS_FINGER
-#endif
-
-#include "\z\ace\addons\main\script_macros.hpp"
-
-#define BASE_SIZE 44
-
-#define FP_TIMEOUT 2
-#define FP_ACTION_TIMEOUT 1
-
-#define FP_DISTANCE 10000
-#define FP_RANDOMIZATION_X 350
-#define FP_RANDOMIZATION_Y 100
+#define COMPONENT finger
+#include "\z\ace\addons\main\script_mod.hpp"
+
+// #define DEBUG_MODE_FULL
+// #define DISABLE_COMPILE_CACHE
+// #define CBA_DEBUG_SYNCHRONOUS
+// #define ENABLE_PERFORMANCE_COUNTERS
+
+#ifdef DEBUG_ENABLED_FINGER
+ #define DEBUG_MODE_FULL
+#endif
+
+#ifdef DEBUG_SETTINGS_FINGER
+ #define DEBUG_SETTINGS DEBUG_SETTINGS_FINGER
+#endif
+
+#include "\z\ace\addons\main\script_macros.hpp"
+
+#define BASE_SIZE 44
+
+#define FP_TIMEOUT 2
+#define FP_ACTION_TIMEOUT 1
+
+#define FP_DISTANCE 10000
+#define FP_RANDOMIZATION_X 350
+#define FP_RANDOMIZATION_Y 100
diff --git a/addons/finger/stringtable.xml b/addons/finger/stringtable.xml
index a528da3a23..3f68d337f2 100644
--- a/addons/finger/stringtable.xml
+++ b/addons/finger/stringtable.xml
@@ -3,16 +3,19 @@
Show pointing indicator to self
+ Zeigersymbol einem selbst anzeigen
Индикатор пальца для показывающего
- Afficher un indicateur de pointage pour soit même
+ Afficher un indicateur de pointage pour soi-même
Pokaż indykator wskazywania palcem dla siebie
Saját mutatási indikátor megjelenítése
Mostrar indicador para si mesmo
Mostrar el indicador de señalado a uno mismo
Zobrazit ukázání směru pro sebe
+ Mostra puntatore per te stesso
Render the indicator for the pointing player. This option doesn't affect whether the other players would see the indicator
+ Zeigt das eigene Zeigersymbol an. Diese Einstellung beeinflusst jedoch nicht andere Spieler, welche das Zeigersymbol sehen können.
Отображать индикатор указания пальцем для показывающего игрока. Эта настройка не влияет на то, будут ли другие игроки видеть индикатор
Affiche l'indicateur pour le joueur qui pointe. Cette option n'affecte pas les autres joueurs
Wyświetl indykator kiedy wskazujesz coś palcem. Ta opcja nie wpływa na to, czy inni gracze zobaczą ten indykator czy też nie.
@@ -20,9 +23,11 @@
Renderizar o indicador para o jogador que está apontando. Esta opção não afeta se os outros jogadores verão ou não o indicador
Muestra el indicador para el jugador que apunta. Esta opción no afecta si los otros jugadores verían el indicador
Zobrazit infikátor, když ukážete prstem. Tato volba nemá vliv, zda ostatní hráči uvidí indikátor nebo ne.
+ Mostra puntatore per il giocatore indicato. Questa opzione non influisce la possibilità che gli altri giocatori vedano il puntatore
Pointing indicator
+ Zeigersymbol
Индикатор указания пальцем
Indicateur de pointage
Indykator palca
@@ -30,29 +35,35 @@
Indicador de apontamento
Indicador de señalado
Ukazování směru
+ Indicatore di puntamento
Color of the pointing indicator circle
+ Farbe des Zeigersymbols
Цвет индикатора указания пальцем
- Couleur de l'indicateur
+ Couleur de l'indicateur de pointage
Kolor okręgu wyświetlanego przy wskazywaniu palcem
Mutatási indikátor körének színe
Cor do círculo de indicação
Color del círculo indicador que señala
Barva kruhu pro ukázání směru
+ Colore del cerchio dell'indicatore di puntamento
Action "point a finger at"
+ Aktion: "Zeige Finger auf"
Действие "показать пальцем на"
- Action 'Pointer le doigt à"
+ Action 'Pointer du doigt"
Akcja "wskaż palcem"
Cselekvés "ujj rámutatása"
Ação "Apontar um dedo para"
Acción "apuntar con el dedo a"
Akce "ukázat prstem na"
+ Azione "punta il dito a"
Points, and shows a virtual marker of where you are looking to nearby units. Can be held down.
+ Zeigt in der Nähe befindlichen Spielern die eigene Blickrichtung mit Hilfe eines Kreissymbols an.
Montre du doigt et affiche un marqueur virtuel de la direction pointée aux uinités proches. Peut être maintenu
Wskazuje a także wyświetla wirtualny marker-okrąg w miejscu, w które patrzysz, dla wszystkich pobliskich jednostek. Może być przytrzymywany.
Mutat, és elhelyez egy virtuális jelölőt a nézett területhez közeli egységekhez. Lenyomva tartható.
@@ -60,29 +71,35 @@
Показывает пальцем и рисует виртуальный маркер в направлении взгляда ближайшим игрокам. Можно удерживать.
Señala y muestra un marcador virtual donde ustás apuntando para las unidades cercanas. Puede ser mantenido.
Ukazuje virtuální značku kruhu ve směru, kterým se díváte pro všechny blízké jednotky.
+ Punta e mostra un marker virtuale di dove stai guardando alle unità vicine. Può essere tenuto premuto.
Pointing Settings
- Option "Montrer du doigt"
+ Zeigen Einstellungen
+ Options "Montrer du doigt"
Ustawienia wskazywania palcem
Ujj beállításai
Preferências de apontamento
Настройки указания пальцем
Ajustes de señalado
Nastavení ukázování směru
+ Impostazioni puntamento
Pointing Enabled
- Activer "Montrer du doigt"
+ Zeigen aktiviert
+ "Montrer du doigt" activé
Aktywuj wskazywanie
Mutatás engedélyezése
Apontamento ativado
Указание пальцем включено
Señalado habilitado
Ukazování povoleno
+ Puntamento abilitato
Pointing Max Range
+ Maximale Zeigerreichweite
Distance maximale du pointage
Maks. zasięg wskazywania
Ujj maximum hatótávja
@@ -90,9 +107,11 @@
Макс. дальность
Distancia máxima de señalado
Maximální dosah pro ukazování směru
+ Raggio massimo puntamento
Max range between players to show the pointing indicator [default: 4 meters]
+ Maximale Reichweite zwischen Spielern, welche das Zeigesymbol des jeweils anderen sehen können. (Standart: 4 Meter)
Distance maximale entre joueurs pour afficher l'indicateur (défaut: 4 mètres)
Określ dystans na jakim można wskazywać coś palcem innym graczom. [domyślnie: 4m]
A maximális távolság, amelyben a közeli játékosoknak megjelenik az indikátor. [alapértelmezett: 4 méter]
@@ -100,6 +119,7 @@
Максимальная дальность между игроками для отображения индикатора указания пальцем [по-умолчанию: 4 метра]
Distancia máxima entre los jugadores para mostrar el indicador que señala [por defecto: 4 metros]
Maximální vzdálenost mezi hráči pro ukázání směru [výchozí: 4 metry]
+ Distanza massima tra giocatori per mostrare l'indicatore di puntamento [default: 4 metri]
-
\ No newline at end of file
+
diff --git a/addons/flashlights/CfgEventHandlers.hpp b/addons/flashlights/CfgEventHandlers.hpp
index d5f49bd5c3..30381d7200 100644
--- a/addons/flashlights/CfgEventHandlers.hpp
+++ b/addons/flashlights/CfgEventHandlers.hpp
@@ -1,3 +1,4 @@
+
class Extended_PostInit_EventHandlers {
class ADDON {
clientInit = QUOTE(call COMPILE_FILE(XEH_postInitClient) );
diff --git a/addons/flashlights/CfgWeapons.hpp b/addons/flashlights/CfgWeapons.hpp
index 09fe70d764..84edac6c85 100644
--- a/addons/flashlights/CfgWeapons.hpp
+++ b/addons/flashlights/CfgWeapons.hpp
@@ -17,8 +17,8 @@ class CfgWeapons {
class ACE_Flashlight_MX991: ACE_ItemCore {
displayName = CSTRING(MX991_DisplayName);
descriptionShort = CSTRING(MX991_Description);
- model = QUOTE(PATHTOF(data\MX_991.p3d));
- picture = PATHTOF(UI\mx991_ca.paa);
+ model = QPATHTOF(data\MX_991.p3d);
+ picture = QPATHTOF(UI\mx991_ca.paa);
scope = 2;
class ItemInfo: InventoryItem_Base_F {
mass = 1;
@@ -32,8 +32,8 @@ class CfgWeapons {
class ACE_Flashlight_KSF1: ACE_ItemCore {
displayName = CSTRING(KSF1_DisplayName);
descriptionShort = CSTRING(KSF1_Description);
- model = QUOTE(PATHTOF(data\KSF_1.p3d));
- picture = PATHTOF(UI\ksf1_ca.paa);
+ model = QPATHTOF(data\KSF_1.p3d);
+ picture = QPATHTOF(UI\ksf1_ca.paa);
scope = 2;
class ItemInfo: InventoryItem_Base_F {
mass = 1;
@@ -47,8 +47,8 @@ class CfgWeapons {
class ACE_Flashlight_XL50: ACE_ItemCore {
displayName = CSTRING(XL50_DisplayName);
descriptionShort = CSTRING(XL50_Description);
- model = QUOTE(PATHTOF(data\Maglight.p3d));
- picture = PATHTOF(UI\xl50_ca.paa);
+ model = QPATHTOF(data\Maglight.p3d);
+ picture = QPATHTOF(UI\xl50_ca.paa);
scope = 2;
class ItemInfo: InventoryItem_Base_F {
mass = 1;
diff --git a/addons/flashlights/config.cpp b/addons/flashlights/config.cpp
index b34c4b8000..08349be0a7 100644
--- a/addons/flashlights/config.cpp
+++ b/addons/flashlights/config.cpp
@@ -6,8 +6,9 @@ class CfgPatches {
weapons[] = {"ACE_Flashlight_MX991", "ACE_Flashlight_KSF1", "ACE_Flashlight_XL50"};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_interaction"};
- author[] = {"voiper"};
- authorUrl = "https://github.com/voiperr/";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"voiper"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
diff --git a/addons/flashlights/stringtable.xml b/addons/flashlights/stringtable.xml
index bc6908ab97..dad3158b38 100644
--- a/addons/flashlights/stringtable.xml
+++ b/addons/flashlights/stringtable.xml
@@ -3,51 +3,69 @@
Fulton MX-991
+ Fulton MX-991
Fulton MX-991
Fulton MX-991
Fulton MX-991
Fulton MX-991
Fulton MX-991
+ Fulton MX-991
+ Fulton MX-991
Flashlight with red filter. For use on map.
+ Taschenlampe mit rotem Filter zum Kartenlesen.
Latarka z czerwonym filtrem. Używana do podświetlania mapy.
Lanterna com filtro vermelho. Para uso no mapa.
Фонарь с красным светофильтром. Для использования на карте.
Svítilna s červeným filtrem. Pro nahlédnutí do mapy.
Linterna con filtro rojo. Para su uso en el mapa.
+ Torcia con filtro rosso. Da usare in mappa.
+ Lampe de poche avec un filtre rouge. Pour éclairer une carte.
Maglite XL50
+ Maglite XL50
Maglite XL50
Maglite XL50
Maglite XL50
Maglite XL50
Maglite XL50
+ Maglite XL50
+ Maglite XL50
White mini flashlight. For use on map.
+ Mini-Taschenlampe mit weißem Licht zum Kartenlesen.
Mini latarka. Światło białe. Używana do podświetlania mapy.
Mini lanterna branca. Para uso no mapa.
Небольшой фонарик белого света. Для использования на карте.
Bílá mini svítilna. Pro nahlédnutí do mapy.
Mini linterna blanca. Para su uso en el mapa.
+ Mini-torcia bianca. Da usare in mappa.
+ Lampe de poche (blanche). Pour éclairer une carte.
KSF-1
+ KSF-1
KSF-1
KSF-1
KSF-1
KSF-1
KSF-1
+ KSF-1
+ KSF-1
Flashlight with red filter. For use on map.
+ Tachenlampe mit rotem Filter zum Kartenlesen.
Latarka z czerwonym filtrem. Używana do podświetlania mapy.
Lanterna com filtro vermelho. Para uso no mapa.
Фонарь с красным светофильтром. Для использования на карте.
Svítilna s červeným filtrem. Pro nahlédnutí do mapy.
Linterna con filtro rojo. Para su uso en el mapa.
+ Torcia con filtro rosso. Da usare in mappa.
+ Lampe de poche avec un filtre rouge. Pour éclairer une carte.
diff --git a/addons/flashsuppressors/CfgWeapons.hpp b/addons/flashsuppressors/CfgWeapons.hpp
index 198fec7316..e807dc2ae9 100644
--- a/addons/flashsuppressors/CfgWeapons.hpp
+++ b/addons/flashsuppressors/CfgWeapons.hpp
@@ -1,29 +1,101 @@
+class asdg_MuzzleSlot;
+class asdg_MuzzleSlot_338: asdg_MuzzleSlot { // for .338 universal mount suppressors
+ class compatibleItems {
+ ACE_muzzle_mzls_338 = 1;
+ };
+};
+class asdg_MuzzleSlot_762: asdg_MuzzleSlot { // for 7.62x51 universal mount suppressors
+ class compatibleItems {
+ ACE_muzzle_mzls_B = 1;
+ };
+};
+class asdg_MuzzleSlot_93x64: asdg_MuzzleSlot { // for 9.3x64 universal mount suppressors
+ class compatibleItems {
+ ACE_muzzle_mzls_93mmg = 1;
+ };
+};
+class asdg_MuzzleSlot_9MM_SMG: asdg_MuzzleSlot { // for 9x19mm universal mount SMG suppressors
+ class compatibleItems {
+ ACE_muzzle_mzls_smg_02 = 1;
+ };
+};
+class asdg_MuzzleSlot_556: asdg_MuzzleSlot { // for 5.56x45 universal mount suppressors
+ class compatibleItems {
+ ACE_muzzle_mzls_L = 1;
+ };
+};
+class asdg_MuzzleSlot_45ACP_SMG: asdg_MuzzleSlot { // for .45ACP universal mount SMG suppressors
+ class compatibleItems {
+ ACE_muzzle_mzls_smg_01 = 1;
+ };
+};
+class asdg_MuzzleSlot_762MG: asdg_MuzzleSlot { // for 7.62, 6.5 and 5.56 universal mount MG suppressors
+ class compatibleItems {
+ ACE_muzzle_mzls_B = 1;
+ };
+};
class MuzzleSlot;
class CfgWeapons {
-
- /* MX */
-
- class Rifle;
- class Rifle_Base_F: Rifle {
+ class Rifle_Base_F;
+
+ class Rifle_Long_Base_F: Rifle_Base_F {
class WeaponSlotsInfo;
};
- class arifle_MX_Base_F: Rifle_Base_F {
+ /* MX */
+ class arifle_MX_Base_F: Rifle_Base_F {
+ class WeaponSlotsInfo;
+ };
+
+ class arifle_MXC_F: arifle_MX_Base_F {
class WeaponSlotsInfo: WeaponSlotsInfo {
- class MuzzleSlot: MuzzleSlot {
- compatibleItems[] += {"ACE_muzzle_mzls_H"};
+ class MuzzleSlot: asdg_MuzzleSlot_762 {
+ class compatibleItems: compatibleItems {
+ ACE_muzzle_mzls_H = 1;
+ ACE_muzzle_mzls_B = 0;
+ };
+ };
+ };
+ };
+ class arifle_MX_F: arifle_MX_Base_F {
+ class WeaponSlotsInfo: WeaponSlotsInfo {
+ class MuzzleSlot: asdg_MuzzleSlot_762 {
+ class compatibleItems: compatibleItems {
+ ACE_muzzle_mzls_H = 1;
+ ACE_muzzle_mzls_B = 0;
+ };
+ };
+ };
+ };
+ class arifle_MX_GL_F: arifle_MX_Base_F {
+ class WeaponSlotsInfo: WeaponSlotsInfo {
+ class MuzzleSlot: asdg_MuzzleSlot_762 {
+ class compatibleItems: compatibleItems {
+ ACE_muzzle_mzls_H = 1;
+ ACE_muzzle_mzls_B = 0;
+ };
};
};
};
-
class arifle_MX_SW_F: arifle_MX_Base_F {
class WeaponSlotsInfo: WeaponSlotsInfo {
- class MuzzleSlot: MuzzleSlot {
- // Shit is broken again
- //compatibleItems[] += {"ACE_muzzle_mzls_H"};
- compatibleItems[] = {"muzzle_snds_H","muzzle_snds_H_SW","ACE_muzzle_mzls_H"};
+ class MuzzleSlot: asdg_MuzzleSlot_762MG {
+ class compatibleItems: compatibleItems {
+ ACE_muzzle_mzls_H = 1;
+ ACE_muzzle_mzls_B = 0;
+ };
+ };
+ };
+ };
+ class arifle_MXM_F: arifle_MX_Base_F {
+ class WeaponSlotsInfo: WeaponSlotsInfo {
+ class MuzzleSlot: asdg_MuzzleSlot_762 {
+ class compatibleItems: compatibleItems {
+ ACE_muzzle_mzls_H = 1;
+ ACE_muzzle_mzls_B = 0;
+ };
};
};
};
@@ -31,148 +103,53 @@ class CfgWeapons {
/* Katiba */
- class arifle_katiba_Base_F: Rifle_Base_F {
+ class arifle_Katiba_Base_F: Rifle_Base_F {
+ class WeaponSlotsInfo;
+ };
+ class arifle_Katiba_F: arifle_Katiba_Base_F {
class WeaponSlotsInfo: WeaponSlotsInfo {
- class MuzzleSlot: MuzzleSlot {
- compatibleItems[] += {"ACE_muzzle_mzls_H"};
+ class MuzzleSlot: asdg_MuzzleSlot_762 {
+ class compatibleItems: compatibleItems {
+ ACE_muzzle_mzls_H = 1;
+ ACE_muzzle_mzls_B = 0;
+ };
+ };
+ };
+ };
+ class arifle_Katiba_C_F: arifle_Katiba_Base_F {
+ class WeaponSlotsInfo: WeaponSlotsInfo {
+ class MuzzleSlot: asdg_MuzzleSlot_762 {
+ class compatibleItems: compatibleItems {
+ ACE_muzzle_mzls_H = 1;
+ ACE_muzzle_mzls_B = 0;
+ };
+ };
+ };
+ };
+ class arifle_Katiba_GL_F: arifle_Katiba_Base_F {
+ class WeaponSlotsInfo: WeaponSlotsInfo {
+ class MuzzleSlot: asdg_MuzzleSlot_762 {
+ class compatibleItems: compatibleItems {
+ ACE_muzzle_mzls_H = 1;
+ ACE_muzzle_mzls_B = 0;
+ };
};
};
};
/* Other */
-
- class Rifle_Long_Base_F: Rifle_Base_F {
- class WeaponSlotsInfo;
- };
-
- class EBR_base_F: Rifle_Long_Base_F {
- class WeaponSlotsInfo: WeaponSlotsInfo {
- class MuzzleSlot: MuzzleSlot {
- compatibleItems[] += {"ACE_muzzle_mzls_B"};
- };
- };
- };
-
- class DMR_01_base_F: Rifle_Long_Base_F {
- class WeaponSlotsInfo: WeaponSlotsInfo {
- class MuzzleSlot: MuzzleSlot {
- compatibleItems[] += {"ACE_muzzle_mzls_B"};
- };
- };
- };
-
- class DMR_02_base_F: Rifle_Long_Base_F {
- class WeaponSlotsInfo: WeaponSlotsInfo {
- class MuzzleSlot: MuzzleSlot {
- compatibleItems[] += {"ACE_muzzle_mzls_338"};
- };
- };
- };
-
- class DMR_03_base_F: Rifle_Long_Base_F {
- class WeaponSlotsInfo: WeaponSlotsInfo {
- class MuzzleSlot: MuzzleSlot {
- compatibleItems[] += {"ACE_muzzle_mzls_B"};
- };
- };
- };
-
- class DMR_05_base_F: Rifle_Long_Base_F {
- class WeaponSlotsInfo: WeaponSlotsInfo {
- class MuzzleSlot: MuzzleSlot {
- compatibleItems[] += {"ACE_muzzle_mzls_93mmg"};
- };
- };
- };
-
- class DMR_06_base_F: Rifle_Long_Base_F {
- class WeaponSlotsInfo: WeaponSlotsInfo {
- class MuzzleSlot: MuzzleSlot {
- compatibleItems[] += {"ACE_muzzle_mzls_B"};
- };
- };
- };
-
- class MMG_01_base_F: Rifle_Long_Base_F {
- class WeaponSlotsInfo: WeaponSlotsInfo {
- class MuzzleSlot: MuzzleSlot {
- compatibleItems[] += {"ACE_muzzle_mzls_93mmg"};
- };
- };
- };
-
- class MMG_02_base_F: Rifle_Long_Base_F {
- class WeaponSlotsInfo: WeaponSlotsInfo {
- class MuzzleSlot: MuzzleSlot {
- compatibleItems[] += {"ACE_muzzle_mzls_338"};
- };
- };
- };
-
class LMG_Mk200_F: Rifle_Long_Base_F {
class WeaponSlotsInfo: WeaponSlotsInfo {
- class MuzzleSlot: MuzzleSlot {
- compatibleItems[] += {"ACE_muzzle_mzls_H"};
+ class MuzzleSlot: asdg_MuzzleSlot_762MG {
+ class compatibleItems: compatibleItems {
+ ACE_muzzle_mzls_H = 1;
+ ACE_muzzle_mzls_B = 0;
+ };
};
};
};
- class LMG_Zafir_F: Rifle_Long_Base_F {
- class WeaponSlotsInfo: WeaponSlotsInfo {
- class MuzzleSlot: MuzzleSlot {
- compatibleItems[] += {"ACE_muzzle_mzls_B"};
- };
- };
- };
-
-
- /* Assault Rifles */
-
- class Tavor_base_F: Rifle_Base_F {
- class WeaponSlotsInfo: WeaponSlotsInfo {
- class MuzzleSlot: MuzzleSlot {
- compatibleItems[] += {"ACE_muzzle_mzls_L"};
- };
- };
- };
-
- class mk20_base_F: Rifle_Base_F {
- class WeaponSlotsInfo: WeaponSlotsInfo {
- class MuzzleSlot: MuzzleSlot {
- compatibleItems[] += {"ACE_muzzle_mzls_L"};
- };
- };
- };
-
-
- /* SMGs */
-
- class pdw2000_base_F: Rifle_Base_F {
- class WeaponSlotsInfo: WeaponSlotsInfo {
- class MuzzleSlot: MuzzleSlot {
- compatibleItems[] += {"ACE_muzzle_mzls_smg_02"};
- };
- };
- };
-
- class SMG_01_Base: Rifle_Base_F {
- class WeaponSlotsInfo: WeaponSlotsInfo {
- class MuzzleSlot: MuzzleSlot {
- compatibleItems[] += {"ACE_muzzle_mzls_smg_01"};
- };
- };
- };
-
- class SMG_02_base_F: Rifle_Base_F {
- class WeaponSlotsInfo: WeaponSlotsInfo {
- class MuzzleSlot: MuzzleSlot {
- compatibleItems[] += {"ACE_muzzle_mzls_smg_02"};
- };
- };
- };
-
-
/* Pistols */
class Pistol;
diff --git a/addons/flashsuppressors/config.cpp b/addons/flashsuppressors/config.cpp
index b8e0c1e120..378858d71c 100644
--- a/addons/flashsuppressors/config.cpp
+++ b/addons/flashsuppressors/config.cpp
@@ -14,8 +14,9 @@ class CfgPatches {
};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
- author[] = {"commy2"};
- authorUrl = "https://github.com/commy2";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"commy2"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
diff --git a/addons/fonts/CfgFontFamilies.hpp b/addons/fonts/CfgFontFamilies.hpp
index 963a35fa8e..80c8114624 100644
--- a/addons/fonts/CfgFontFamilies.hpp
+++ b/addons/fonts/CfgFontFamilies.hpp
@@ -2,38 +2,38 @@ class CfgFontFamilies
{
class PixelSplitterBold
{
- fonts[] = { PATHTOF(PixelSplitterBold\PixelSplitterBold6),
- PATHTOF(PixelSplitterBold\PixelSplitterBold7),
- PATHTOF(PixelSplitterBold\PixelSplitterBold8),
- PATHTOF(PixelSplitterBold\PixelSplitterBold9),
- PATHTOF(PixelSplitterBold\PixelSplitterBold10),
- PATHTOF(PixelSplitterBold\PixelSplitterBold11),
- PATHTOF(PixelSplitterBold\PixelSplitterBold12),
- PATHTOF(PixelSplitterBold\PixelSplitterBold13),
- PATHTOF(PixelSplitterBold\PixelSplitterBold14),
- PATHTOF(PixelSplitterBold\PixelSplitterBold15),
- PATHTOF(PixelSplitterBold\PixelSplitterBold16),
- PATHTOF(PixelSplitterBold\PixelSplitterBold17),
- PATHTOF(PixelSplitterBold\PixelSplitterBold18),
- PATHTOF(PixelSplitterBold\PixelSplitterBold19),
- PATHTOF(PixelSplitterBold\PixelSplitterBold20),
- PATHTOF(PixelSplitterBold\PixelSplitterBold21),
- PATHTOF(PixelSplitterBold\PixelSplitterBold22),
- PATHTOF(PixelSplitterBold\PixelSplitterBold23),
- PATHTOF(PixelSplitterBold\PixelSplitterBold24),
- PATHTOF(PixelSplitterBold\PixelSplitterBold25),
- PATHTOF(PixelSplitterBold\PixelSplitterBold26),
- PATHTOF(PixelSplitterBold\PixelSplitterBold27),
- PATHTOF(PixelSplitterBold\PixelSplitterBold28),
- PATHTOF(PixelSplitterBold\PixelSplitterBold29),
- PATHTOF(PixelSplitterBold\PixelSplitterBold30),
- PATHTOF(PixelSplitterBold\PixelSplitterBold31),
- PATHTOF(PixelSplitterBold\PixelSplitterBold34),
- PATHTOF(PixelSplitterBold\PixelSplitterBold35),
- PATHTOF(PixelSplitterBold\PixelSplitterBold37),
- PATHTOF(PixelSplitterBold\PixelSplitterBold46)
+ fonts[] = { QPATHTOF(PixelSplitterBold\PixelSplitterBold6),
+ QPATHTOF(PixelSplitterBold\PixelSplitterBold7),
+ QPATHTOF(PixelSplitterBold\PixelSplitterBold8),
+ QPATHTOF(PixelSplitterBold\PixelSplitterBold9),
+ QPATHTOF(PixelSplitterBold\PixelSplitterBold10),
+ QPATHTOF(PixelSplitterBold\PixelSplitterBold11),
+ QPATHTOF(PixelSplitterBold\PixelSplitterBold12),
+ QPATHTOF(PixelSplitterBold\PixelSplitterBold13),
+ QPATHTOF(PixelSplitterBold\PixelSplitterBold14),
+ QPATHTOF(PixelSplitterBold\PixelSplitterBold15),
+ QPATHTOF(PixelSplitterBold\PixelSplitterBold16),
+ QPATHTOF(PixelSplitterBold\PixelSplitterBold17),
+ QPATHTOF(PixelSplitterBold\PixelSplitterBold18),
+ QPATHTOF(PixelSplitterBold\PixelSplitterBold19),
+ QPATHTOF(PixelSplitterBold\PixelSplitterBold20),
+ QPATHTOF(PixelSplitterBold\PixelSplitterBold21),
+ QPATHTOF(PixelSplitterBold\PixelSplitterBold22),
+ QPATHTOF(PixelSplitterBold\PixelSplitterBold23),
+ QPATHTOF(PixelSplitterBold\PixelSplitterBold24),
+ QPATHTOF(PixelSplitterBold\PixelSplitterBold25),
+ QPATHTOF(PixelSplitterBold\PixelSplitterBold26),
+ QPATHTOF(PixelSplitterBold\PixelSplitterBold27),
+ QPATHTOF(PixelSplitterBold\PixelSplitterBold28),
+ QPATHTOF(PixelSplitterBold\PixelSplitterBold29),
+ QPATHTOF(PixelSplitterBold\PixelSplitterBold30),
+ QPATHTOF(PixelSplitterBold\PixelSplitterBold31),
+ QPATHTOF(PixelSplitterBold\PixelSplitterBold34),
+ QPATHTOF(PixelSplitterBold\PixelSplitterBold35),
+ QPATHTOF(PixelSplitterBold\PixelSplitterBold37),
+ QPATHTOF(PixelSplitterBold\PixelSplitterBold46)
};
spaceWidth = 0.5;
spacing = 0.065;
};
-};
\ No newline at end of file
+};
diff --git a/addons/fonts/config.cpp b/addons/fonts/config.cpp
index f37dba286c..dc6b4c705f 100644
--- a/addons/fonts/config.cpp
+++ b/addons/fonts/config.cpp
@@ -6,8 +6,9 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_main"};
- author[] = {"jaynus"};
- authorUrl = "https://github.com/jaynus/";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"jaynus"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
diff --git a/addons/frag/ACE_Settings.hpp b/addons/frag/ACE_Settings.hpp
index 3e1c83839b..4dfa172bb3 100644
--- a/addons/frag/ACE_Settings.hpp
+++ b/addons/frag/ACE_Settings.hpp
@@ -1,19 +1,19 @@
class ACE_Settings {
- class GVAR(Enabled) {
+ class GVAR(enabled) {
category = CSTRING(Module_DisplayName);
displayName = CSTRING(EnableFrag);
description = CSTRING(EnableFrag_Desc);
typeName = "BOOL";
value = 1;
};
- class GVAR(SpallEnabled) {
+ class GVAR(spallEnabled) {
category = CSTRING(Module_DisplayName);
displayName = CSTRING(EnableSpall);
description = CSTRING(EnableSpall_Desc);
typeName = "BOOL";
value = 0;
};
- class GVAR(ReflectionsEnabled) {
+ class GVAR(reflectionsEnabled) {
category = CSTRING(Module_DisplayName);
displayName = CSTRING(EnableReflections);
description = CSTRING(EnableReflections_Desc);
@@ -27,7 +27,7 @@ class ACE_Settings {
typeName = "SCALAR";
value = 500;
};
- class GVAR(MaxTrackPerFrame) {
+ class GVAR(maxTrackPerFrame) {
category = CSTRING(Module_DisplayName);
displayName = CSTRING(MaxTrackPerFrame);
description = CSTRING(MaxTrackPerFrame_Desc);
@@ -35,7 +35,7 @@ class ACE_Settings {
value = 50;
};
- class GVAR(EnableDebugTrace) {
+ class GVAR(enableDebugTrace) {
category = CSTRING(Module_DisplayName);
displayName = CSTRING(EnableDebugTrace);
description = CSTRING(EnableDebugTrace_Desc);
diff --git a/addons/frag/CfgAmmo.hpp b/addons/frag/CfgAmmo.hpp
index 41734d2806..defa634102 100644
--- a/addons/frag/CfgAmmo.hpp
+++ b/addons/frag/CfgAmmo.hpp
@@ -1,476 +1,478 @@
-#define BASE_DRAG -0.01
-#define HD_MULT 5
-#define BASE_DRAG_HD (BASE_DRAG*HD_MULT)
-
-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 {
- // GVAR(skip) = 1;
- //};
-
- class Bo_GBU12_LGB;
- class ACE_GBU12 : Bo_GBU12_LGB {
- GVAR(enabled) = 1;
-
- 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 {
- GVAR(enabled) = 1;
-
- GVAR(skip) = 0;
- GVAR(force) = 1;
- // This is a good high-drag frag type for grenades.
- GVAR(classes)[] = {"ACE_frag_tiny_HD"};
- /*
- These values are based on the M67 Grenade, should be tweaked for
- individual grenades.
- */
- 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 {
- GVAR(skip) = 1;
- };
- class SmokeShell: GrenadeHand {
- GVAR(skip) = 1;
- };
-
- class RocketBase;
- class R_Hydra_HE: RocketBase {
- // Source: http://fas.org/man/dod-101/sys/missile/hydra-70.htm
- GVAR(enabled) = 1;
-
- GVAR(classes)[] = {"ACE_frag_medium", "ACE_frag_medium_HD"};
- GVAR(metal) = 3850;
- GVAR(charge) = 1040;
- GVAR(gurney_c) = 2700;
- GVAR(gurney_k) = 1/2;
- };
- //class R_57mm_HE: RocketBase {
- // GVAR(skip) = 1;
- //};
-
- class R_80mm_HE: RocketBase {
- GVAR(skip) = 1;
- };
-
- //class R_S8T_AT: RocketBase {
- // GVAR(skip) = 1;
- //};
-
- class BombCore;
- class Bo_Mk82: BombCore {
- GVAR(enabled) = 1;
-
- 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 {
- // Source: http://www.inetres.com/gp/military/infantry/grenade/40mm_ammo.html#M441
- GVAR(enabled) = 1;
-
- GVAR(classes)[] = {"ACE_frag_tiny_HD"};
- GVAR(metal) = 200;
- GVAR(charge) = 32;
- GVAR(gurney_c) = 2700;
- GVAR(gurney_k) = 1/2;
- };
- class G_40mm_HEDP: G_40mm_HE {
- // Source: http://www.inetres.com/gp/military/infantry/grenade/40mm_ammo.html#M433
- GVAR(enabled) = 1;
-
- GVAR(classes)[] = {"ACE_frag_tiny_HD"};
- GVAR(metal) = 200;
- GVAR(charge) = 45;
- GVAR(gurney_c) = 2830;
- GVAR(gurney_k) = 1/2;
- };
-
- class ACE_G_40mm_HEDP: G_40mm_HEDP {
- };
- class ACE_G_40mm_HE: G_40mm_HE {
- };
- class ACE_G_40mm_Practice: ACE_G_40mm_HE {
- GVAR(skip) = 1;
- };
- class ACE_G40mm_HE_VOG25P: G_40mm_HE {
- GVAR(skip) = 0;
- GVAR(force) = 1;
- };
-
- // curator ammo entries
- class ShellBase;
- class Sh_125mm_HEAT;
- class Sh_155mm_AMOS: ShellBase {
- // Source: http://www.globalsecurity.org/military/systems/munitions/m795.htm
- GVAR(enabled) = 1;
-
- 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) = 36000;
- GVAR(charge) = 9979;
- GVAR(gurney_c) = 2440;
- GVAR(gurney_k) = 1/2;
- };
- class Sh_82mm_AMOS : Sh_155mm_AMOS {
- // Source: http://www.arsenal-bg.com/defense_police/mortar_bombs_82mm.htm
- GVAR(enabled) = 1;
-
- GVAR(classes)[] = {"ACE_frag_medium", "ACE_frag_medium_HD"};
- GVAR(metal) = 3200;
- GVAR(charge) = 420;
- GVAR(gurney_c) = 2440;
- GVAR(gurney_k) = 1/2;
- };
- class ModuleOrdnanceMortar_F_Ammo: Sh_82mm_AMOS {
- GVAR(enabled) = 1;
-
- 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_105mm_HEAT_MP : Sh_125mm_HEAT {
- GVAR(enabled) = 1;
-
- GVAR(classes)[] = {"ACE_frag_medium", "ACE_frag_medium_HD"};
- GVAR(metal) = 11400;
- GVAR(charge) = 7100;
- GVAR(gurney_c) = 2800;
- GVAR(gurney_k) = 1/2;
- };
- class Sh_120mm_HE : ShellBase {
- GVAR(enabled) = 1;
-
- GVAR(classes)[] = {"ACE_frag_medium", "ACE_frag_medium_HD"};
- GVAR(metal) = 23000;
- GVAR(charge) = 3148;
- GVAR(gurney_c) = 2830;
- GVAR(gurney_k) = 1/2;
- };
- class Sh_125mm_HE: Sh_120mm_HE {
- GVAR(enabled) = 1;
-
- GVAR(classes)[] = {"ACE_frag_medium", "ACE_frag_medium_HD"};
- GVAR(metal) = 16000;
- GVAR(charge) = 3200;
- GVAR(gurney_c) = 2440;
- GVAR(gurney_k) = 1/2;
- };
- class ModuleOrdnanceHowitzer_F_ammo: Sh_155mm_AMOS {
- GVAR(enabled) = 1;
-
- 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 {
- // GVAR(force) = 1;
- // GVAR(multiplier) = 1.2;
- //};
-
- class MissileBase;
- class Missile_AGM_02_F : MissileBase {
- // Source: http://fas.org/man/dod-101/sys/smart/agm-65.htm
- GVAR(enabled) = 1;
-
- GVAR(classes)[] = {"ACE_frag_medium", "ACE_frag_medium_HD"};
- GVAR(metal) = 56250;
- GVAR(charge) = 39000;
- GVAR(gurney_c) = 2700;
- GVAR(gurney_k) = 1/2;
- };
- class M_Hellfire_AT: MissileBase {
- // Source: http://www.designation-systems.net/dusrm/m-114.html
- GVAR(enabled) = 1;
-
- GVAR(classes)[] = {"ACE_frag_medium", "ACE_frag_medium_HD"};
- GVAR(metal) = 8000;
- GVAR(charge) = 2400;
- GVAR(gurney_c) = 2700;
- GVAR(gurney_k) = 1/2;
- };
-
- /*
- class B_762x51_Ball;
- class ACE_frag_base: B_762x51_Ball { ////TODO: B_762x45_Ball no longer exists, is this a valid replacement?
- model = "\A3\Weapons_f\ammo\shell";
- timeToLive = 12;
- typicalSpeed = 800;
- // Fix sounds
- effectFly = "AmmoClassic";
- soundDefault1[] = {"A3\sounds_f\weapons\hits\concrete_1.wav",0.158114,1,30};
- soundDefault2[] = {"A3\sounds_f\weapons\hits\concrete_2.wav",0.158114,1,30};
- soundDefault3[] = {"A3\sounds_f\weapons\hits\concrete_3.wav",0.158114,1,30};
- soundDefault4[] = {"A3\sounds_f\weapons\hits\concrete_4.wav",0.158114,1,30};
- soundDefault5[] = {"A3\sounds_f\weapons\hits\concrete_5.wav",0.158114,1,30};
- soundDefault6[] = {"A3\sounds_f\weapons\hits\concrete_6.wav",0.158114,1,30};
- soundDefault7[] = {"A3\sounds_f\weapons\hits\concrete_7.wav",0.158114,1,30};
- soundDefault8[] = {"A3\sounds_f\weapons\hits\concrete_8.wav",0.158114,1,30};
- soundGroundSoft1[] = {"A3\sounds_f\weapons\hits\soft_ground_1.wav",0.02811705,1,30};
- soundGroundSoft2[] = {"A3\sounds_f\weapons\hits\soft_ground_2.wav",0.02811705,1,30};
- soundGroundSoft3[] = {"A3\sounds_f\weapons\hits\soft_ground_3.wav",0.02811705,1,30};
- soundGroundSoft4[] = {"A3\sounds_f\weapons\hits\soft_ground_4.wav",0.02811705,1,30};
- soundGroundSoft5[] = {"A3\sounds_f\weapons\hits\soft_ground_5.wav",0.02811705,1,30};
- soundGroundSoft6[] = {"A3\sounds_f\weapons\hits\soft_ground_6.wav",0.02811705,1,30};
- soundGroundSoft7[] = {"A3\sounds_f\weapons\hits\soft_ground_7.wav",0.02811705,1,30};
- soundGroundSoft8[] = {"A3\sounds_f\weapons\hits\soft_ground_8.wav",0.02811705,1,30};
- soundGroundHard1[] = {"A3\sounds_f\weapons\hits\hard_ground_1.wav",0.62946,1,40};
- soundGroundHard2[] = {"A3\sounds_f\weapons\hits\hard_ground_2.wav",0.62946,1,40};
- soundGroundHard3[] = {"A3\sounds_f\weapons\hits\hard_ground_3.wav",0.62946,1,40};
- soundGroundHard4[] = {"A3\sounds_f\weapons\hits\hard_ground_4.wav",0.62946,1,40};
- soundGroundHard5[] = {"A3\sounds_f\weapons\hits\hard_ground_5.wav",0.62946,1,40};
- soundGroundHard6[] = {"A3\sounds_f\weapons\hits\hard_ground_6.wav",0.62946,1,40};
- soundGroundHard7[] = {"A3\sounds_f\weapons\hits\hard_ground_7.wav",0.62946,1,40};
- soundGroundHard8[] = {"A3\sounds_f\weapons\hits\hard_ground_8.wav",0.62946,1,40};
- soundMetal1[] = {"A3\sounds_f\weapons\hits\metal_1.wav",0.158114,1,45};
- soundMetal2[] = {"A3\sounds_f\weapons\hits\metal_2.wav",0.158114,1,45};
- soundMetal3[] = {"A3\sounds_f\weapons\hits\metal_3.wav",0.158114,1,45};
- soundMetal4[] = {"A3\sounds_f\weapons\hits\metal_4.wav",0.158114,1,45};
- soundMetal5[] = {"A3\sounds_f\weapons\hits\metal_5.wav",0.158114,1,45};
- soundMetal6[] = {"A3\sounds_f\weapons\hits\metal_6.wav",0.158114,1,45};
- soundMetal7[] = {"A3\sounds_f\weapons\hits\metal_7.wav",0.158114,1,45};
- soundMetal8[] = {"A3\sounds_f\weapons\hits\metal_8.wav",0.158114,1,45};
- soundGlass1[] = {"A3\sounds_f\weapons\hits\glass_1.wav",0.177828,1,25};
- soundGlass2[] = {"A3\sounds_f\weapons\hits\glass_2.wav",0.177828,1,25};
- soundGlass3[] = {"A3\sounds_f\weapons\hits\glass_3.wav",0.177828,1,25};
- soundGlass4[] = {"A3\sounds_f\weapons\hits\glass_4.wav",0.177828,1,25};
- soundGlass5[] = {"A3\sounds_f\weapons\hits\glass_5.wav",0.177828,1,25};
- soundGlass6[] = {"A3\sounds_f\weapons\hits\glass_6.wav",0.177828,1,25};
- soundGlass7[] = {"A3\sounds_f\weapons\hits\glass_7.wav",0.177828,1,25};
- soundGlass8[] = {"A3\sounds_f\weapons\hits\glass_8.wav",0.177828,1,25};
- soundGlassArmored1[] = {"A3\sounds_f\weapons\hits\glass_arm_1.wav",0.177828,1,30};
- soundGlassArmored2[] = {"A3\sounds_f\weapons\hits\glass_arm_2.wav",0.177828,1,30};
- soundGlassArmored3[] = {"A3\sounds_f\weapons\hits\glass_arm_3.wav",0.177828,1,30};
- soundGlassArmored4[] = {"A3\sounds_f\weapons\hits\glass_arm_4.wav",0.177828,1,30};
- soundGlassArmored5[] = {"A3\sounds_f\weapons\hits\glass_arm_5.wav",0.177828,1,30};
- soundGlassArmored6[] = {"A3\sounds_f\weapons\hits\glass_arm_6.wav",0.177828,1,30};
- soundGlassArmored7[] = {"A3\sounds_f\weapons\hits\glass_arm_7.wav",0.177828,1,30};
- soundGlassArmored8[] = {"A3\sounds_f\weapons\hits\glass_arm_8.wav",0.177828,1,30};
- soundVehiclePlate1[] = {"A3\sounds_f\weapons\hits\metal_plate_1.wav",0.281170,1,40};
- soundVehiclePlate2[] = {"A3\sounds_f\weapons\hits\metal_plate_2.wav",0.281170,1,40};
- soundVehiclePlate3[] = {"A3\sounds_f\weapons\hits\metal_plate_3.wav",0.281170,1,40};
- soundVehiclePlate4[] = {"A3\sounds_f\weapons\hits\metal_plate_4.wav",0.281170,1,40};
- soundVehiclePlate5[] = {"A3\sounds_f\weapons\hits\metal_plate_5.wav",0.281170,1,40};
- soundVehiclePlate6[] = {"A3\sounds_f\weapons\hits\metal_plate_6.wav",0.281170,1,40};
- soundVehiclePlate7[] = {"A3\sounds_f\weapons\hits\metal_plate_7.wav",0.281170,1,40};
- soundVehiclePlate8[] = {"A3\sounds_f\weapons\hits\metal_plate_8.wav",0.281170,1,40};
- soundWood1[] = {"A3\sounds_f\weapons\hits\wood_1.wav",0.158114,1,30};
- soundWood2[] = {"A3\sounds_f\weapons\hits\wood_2.wav",0.158114,1,30};
- soundWood3[] = {"A3\sounds_f\weapons\hits\wood_3.wav",0.158114,1,30};
- soundWood4[] = {"A3\sounds_f\weapons\hits\wood_4.wav",0.158114,1,30};
- soundWood5[] = {"A3\sounds_f\weapons\hits\wood_5.wav",0.158114,1,30};
- soundWood6[] = {"A3\sounds_f\weapons\hits\wood_6.wav",0.158114,1,30};
- soundWood7[] = {"A3\sounds_f\weapons\hits\wood_7.wav",0.158114,1,30};
- soundWood8[] = {"A3\sounds_f\weapons\hits\wood_8.wav",0.158114,1,30};
- soundHitBody1[] = {"A3\sounds_f\weapons\hits\body_1.wav",0.0177828,1,25};
- soundHitBody2[] = {"A3\sounds_f\weapons\hits\body_2.wav",0.0177828,1,25};
- soundHitBody3[] = {"A3\sounds_f\weapons\hits\body_3.wav",0.0177828,1,25};
- soundHitBody4[] = {"A3\sounds_f\weapons\hits\body_4.wav",0.0177828,1,25};
- soundHitBody5[] = {"A3\sounds_f\weapons\hits\body_5.wav",0.0177828,1,25};
- soundHitBody6[] = {"A3\sounds_f\weapons\hits\body_6.wav",0.0177828,1,25};
- soundHitBody7[] = {"A3\sounds_f\weapons\hits\body_7.wav",0.0177828,1,25};
- soundHitBody8[] = {"A3\sounds_f\weapons\hits\body_8.wav",0.0177828,1,25};
- soundHitBuilding1[] = {"A3\sounds_f\weapons\hits\building_1.wav",0.251189,1,30};
- soundHitBuilding2[] = {"A3\sounds_f\weapons\hits\building_2.wav",0.251189,1,30};
- soundHitBuilding3[] = {"A3\sounds_f\weapons\hits\building_3.wav",0.251189,1,30};
- soundHitBuilding4[] = {"A3\sounds_f\weapons\hits\building_4.wav",0.251189,1,30};
- soundHitBuilding5[] = {"A3\sounds_f\weapons\hits\building_5.wav",0.251189,1,30};
- soundHitBuilding6[] = {"A3\sounds_f\weapons\hits\building_6.wav",0.251189,1,30};
- soundHitBuilding7[] = {"A3\sounds_f\weapons\hits\building_7.wav",0.251189,1,30};
- soundHitBuilding8[] = {"A3\sounds_f\weapons\hits\building_8.wav",0.251189,1,30};
- soundHitFoliage1[] = {"A3\sounds_f\weapons\hits\foliage_1.wav",0.177828,1,25};
- soundHitFoliage2[] = {"A3\sounds_f\weapons\hits\foliage_2.wav",0.177828,1,25};
- soundHitFoliage3[] = {"A3\sounds_f\weapons\hits\foliage_3.wav",0.177828,1,25};
- soundHitFoliage4[] = {"A3\sounds_f\weapons\hits\foliage_4.wav",0.177828,1,25};
- soundHitFoliage5[] = {"A3\sounds_f\weapons\hits\foliage_5.wav",0.177828,1,25};
- soundHitFoliage6[] = {"A3\sounds_f\weapons\hits\foliage_6.wav",0.177828,1,25};
- soundHitFoliage7[] = {"A3\sounds_f\weapons\hits\foliage_7.wav",0.177828,1,25};
- soundHitFoliage8[] = {"A3\sounds_f\weapons\hits\foliage_8.wav",0.177828,1,25};
- soundPlastic1[] = {"A3\sounds_f\weapons\hits\plastic_1.wav",0.177828,1,25};
- soundPlastic2[] = {"A3\sounds_f\weapons\hits\plastic_2.wav",0.177828,1,25};
- soundPlastic3[] = {"A3\sounds_f\weapons\hits\plastic_3.wav",0.177828,1,25};
- soundPlastic4[] = {"A3\sounds_f\weapons\hits\plastic_4.wav",0.177828,1,25};
- soundPlastic5[] = {"A3\sounds_f\weapons\hits\plastic_5.wav",0.177828,1,25};
- soundPlastic6[] = {"A3\sounds_f\weapons\hits\plastic_6.wav",0.177828,1,25};
- soundPlastic7[] = {"A3\sounds_f\weapons\hits\plastic_7.wav",0.177828,1,25};
- soundPlastic8[] = {"A3\sounds_f\weapons\hits\plastic_8.wav",0.177828,1,25};
- soundConcrete1[] = {"A3\sounds_f\weapons\hits\concrete_1.wav",0.177828,1,35};
- soundConcrete2[] = {"A3\sounds_f\weapons\hits\concrete_2.wav",0.177828,1,35};
- soundConcrete3[] = {"A3\sounds_f\weapons\hits\concrete_3.wav",0.177828,1,35};
- soundConcrete4[] = {"A3\sounds_f\weapons\hits\concrete_4.wav",0.177828,1,35};
- soundConcrete5[] = {"A3\sounds_f\weapons\hits\concrete_5.wav",0.177828,1,35};
- soundConcrete6[] = {"A3\sounds_f\weapons\hits\concrete_6.wav",0.177828,1,35};
- soundConcrete7[] = {"A3\sounds_f\weapons\hits\concrete_7.wav",0.177828,1,35};
- soundConcrete8[] = {"A3\sounds_f\weapons\hits\concrete_8.wav",0.177828,1,35};
- soundRubber1[] = {"A3\sounds_f\weapons\hits\tyre_1.wav",0.158114,1,25};
- soundRubber2[] = {"A3\sounds_f\weapons\hits\tyre_2.wav",0.158114,1,25};
- soundRubber3[] = {"A3\sounds_f\weapons\hits\tyre_3.wav",0.158114,1,25};
- soundRubber4[] = {"A3\sounds_f\weapons\hits\tyre_4.wav",0.158114,1,25};
- soundRubber5[] = {"A3\sounds_f\weapons\hits\tyre_5.wav",0.158114,1,25};
- soundRubber6[] = {"A3\sounds_f\weapons\hits\tyre_6.wav",0.158114,1,25};
- soundRubber7[] = {"A3\sounds_f\weapons\hits\tyre_7.wav",0.158114,1,25};
- soundRubber8[] = {"A3\sounds_f\weapons\hits\tyre_8.wav",0.158114,1,25};
- soundWater1[] = {"A3\sounds_f\weapons\hits\water_01.wav",0.158114,1,25};
- soundWater2[] = {"A3\sounds_f\weapons\hits\water_02.wav",0.158114,1,25};
- soundWater3[] = {"A3\sounds_f\weapons\hits\water_03.wav",0.158114,1,25};
- soundWater4[] = {"A3\sounds_f\weapons\hits\water_04.wav",0.158114,1,25};
- soundWater5[] = {"A3\sounds_f\weapons\hits\water_05.wav",0.158114,1,25};
- soundWater6[] = {"A3\sounds_f\weapons\hits\water_06.wav",0.158114,1,25};
- soundWater7[] = {"A3\sounds_f\weapons\hits\water_07.wav",0.158114,1,25};
- soundWater8[] = {"A3\sounds_f\weapons\hits\water_08.wav",0.158114,1,25};
- hitGroundSoft[] = {"soundGroundSoft1",0.2,"soundGroundSoft2",0.2,"soundGroundSoft3",0.1,"soundGroundSoft4",0.1,"soundGroundSoft5",0.1,"soundGroundSoft6",0.1,"soundGroundSoft7",0.1,"soundGroundSoft8",0.1};
- hitGroundHard[] = {"soundGroundHard1",0.2,"soundGroundHard2",0.2,"soundGroundHard3",0.1,"soundGroundHard4",0.1,"soundGroundHard5",0.1,"soundGroundHard6",0.1,"soundGroundHard7",0.1,"soundGroundHard8",0.1};
- hitMan[] = {"soundHitBody1",0.125,"soundHitBody2",0.125,"soundHitBody3",0.125,"soundHitBody4",0.125,"soundHitBody5",0.125,"soundHitBody6",0.125,"soundHitBody7",0.125,"soundHitBody8",0.125};
- hitArmor[] = {"soundVehiclePlate1",0.125,"soundVehiclePlate2",0.125,"soundVehiclePlate3",0.125,"soundVehiclePlate4",0.125,"soundVehiclePlate5",0.125,"soundVehiclePlate6",0.125,"soundVehiclePlate7",0.125,"soundVehiclePlate8",0.125};
- hitBuilding[] = {"soundHitBuilding1",0.2,"soundHitBuilding2",0.2,"soundHitBuilding3",0.1,"soundHitBuilding4",0.1,"soundHitBuilding5",0.1,"soundHitBuilding6",0.1,"soundHitBuilding7",0.1,"soundHitBuilding8",0.1};
- hitFoliage[] = {"soundHitFoliage1",0.125,"soundHitFoliage2",0.125,"soundHitFoliage3",0.125,"soundHitFoliage4",0.125,"soundHitFoliage5",0.125,"soundHitFoliage6",0.125,"soundHitFoliage7",0.125,"soundHitFoliage8",0.125};
- hitWood[] = {"soundWood1",0.125,"soundWood2",0.125,"soundWood3",0.125,"soundWood4",0.125,"soundWood5",0.125,"soundWood6",0.125,"soundWood7",0.125,"soundWood8",0.125};
- hitGlass[] = {"soundGlass1",0.125,"soundGlass2",0.125,"soundGlass3",0.125,"soundGlass4",0.125,"soundGlass5",0.125,"soundGlass6",0.125,"soundGlass7",0.125,"soundGlass8",0.125};
- hitGlassArmored[] = {"soundGlassArmored1",0.125,"soundGlassArmored2",0.125,"soundGlassArmored3",0.125,"soundGlassArmored4",0.125,"soundGlassArmored5",0.125,"soundGlassArmored6",0.125,"soundGlassArmored7",0.125,"soundGlassArmored8",0.125};
- hitConcrete[] = {"soundConcrete1",0.125,"soundConcrete2",0.125,"soundConcrete3",0.125,"soundConcrete4",0.125,"soundConcrete5",0.125,"soundConcrete6",0.125,"soundConcrete7",0.125,"soundConcrete8",0.125};
- hitRubber[] = {"soundRubber1",0.125,"soundRubber2",0.125,"soundRubber3",0.125,"soundRubber4",0.125,"soundRubber5",0.125,"soundRubber6",0.125,"soundRubber7",0.125,"soundRubber8",0.125};
- hitPlastic[] = {"soundPlastic1",0.125,"soundPlastic2",0.125,"soundPlastic3",0.125,"soundPlastic4",0.125,"soundPlastic5",0.125,"soundPlastic6",0.125,"soundPlastic7",0.125,"soundPlastic8",0.125};
- hitDefault[] = {"soundDefault1",0.2,"soundDefault2",0.2,"soundDefault3",0.1,"soundDefault4",0.1,"soundDefault5",0.1,"soundDefault6",0.1,"soundDefault7",0.1,"soundDefault8",0.1};
- hitMetal[] = {"soundMetal1",0.125,"soundMetal2",0.125,"soundMetal3",0.125,"soundMetal4",0.125,"soundMetal5",0.125,"soundMetal6",0.125,"soundMetal7",0.125,"soundMetal8",0.125};
- hitMetalplate[] = {"soundVehiclePlate1",0.125,"soundVehiclePlate2",0.125,"soundVehiclePlate3",0.125,"soundVehiclePlate4",0.125,"soundVehiclePlate5",0.125,"soundVehiclePlate6",0.125,"soundVehiclePlate7",0.125,"soundVehiclePlate8",0.125};
- hitWater[] = {"soundWater1",0.125,"soundWater2",0.125,"soundWater3",0.125,"soundWater4",0.125,"soundWater5",0.125,"soundWater6",0.125,"soundWater7",0.125,"soundWater8",0.125};
- bulletFly1[] = {"A3\sounds_f\weapons\hits\bullet_by_1.wav",1,1,35};
- bulletFly2[] = {"A3\sounds_f\weapons\hits\bullet_by_2.wav",1,1,35};
- bulletFly3[] = {"A3\sounds_f\weapons\hits\bullet_by_3.wav",1,1,35};
- bulletFly4[] = {"A3\sounds_f\weapons\hits\bullet_by_4.wav",1,1,35};
- bulletFly5[] = {"A3\sounds_f\weapons\hits\bullet_by_5.wav",1,1,35};
- bulletFly6[] = {"A3\sounds_f\weapons\hits\bullet_by_6.wav",1,1,35};
- bulletFly7[] = {"A3\sounds_f\weapons\hits\bullet_by_7.wav",1,1,35};
- 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};
- };
- */
-
- 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;
- indirectHitRange = 0.25;
- 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;
- indirectHitRange = 0.5;
- airFriction = BASE_DRAG*0.5;
- caliber = 2.8;
- };
-
- class ACE_frag_huge_HD: ACE_frag_large {
- hit = 40;
- indirectHit = 4;
- indirectHitRange = 0.5;
- 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;
- };
-
- #include "CfgAmmoReflections.hpp"
-};
+#define BASE_DRAG -0.01
+#define HD_MULT 5
+#define BASE_DRAG_HD (BASE_DRAG*HD_MULT)
+
+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 {
+ // GVAR(skip) = 1;
+ //};
+
+ class Bo_GBU12_LGB;
+ class ACE_GBU12 : Bo_GBU12_LGB {
+ GVAR(enabled) = 1;
+
+ 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 {
+ GVAR(enabled) = 1;
+
+ GVAR(skip) = 0;
+ GVAR(force) = 1;
+ // This is a good high-drag frag type for grenades.
+ GVAR(classes)[] = {"ACE_frag_tiny_HD"};
+ /*
+ These values are based on the M67 Grenade, should be tweaked for
+ individual grenades.
+ */
+ 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 {
+ GVAR(skip) = 1;
+ };
+ class SmokeShell: GrenadeHand {
+ GVAR(skip) = 1;
+ };
+
+ class RocketBase;
+ class R_Hydra_HE: RocketBase {
+ // Source: http://fas.org/man/dod-101/sys/missile/hydra-70.htm
+ GVAR(enabled) = 1;
+
+ GVAR(classes)[] = {"ACE_frag_medium", "ACE_frag_medium_HD"};
+ GVAR(metal) = 3850;
+ GVAR(charge) = 1040;
+ GVAR(gurney_c) = 2700;
+ GVAR(gurney_k) = 1/2;
+ };
+ //class R_57mm_HE: RocketBase {
+ // GVAR(skip) = 1;
+ //};
+
+ class R_80mm_HE: RocketBase {
+ GVAR(skip) = 1;
+ };
+
+ //class R_S8T_AT: RocketBase {
+ // GVAR(skip) = 1;
+ //};
+
+ class BombCore;
+ class Bo_Mk82: BombCore {
+ GVAR(enabled) = 1;
+
+ 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 {
+ // Source: http://www.inetres.com/gp/military/infantry/grenade/40mm_ammo.html#M441
+ GVAR(enabled) = 1;
+ GVAR(force) = 1;
+
+ GVAR(classes)[] = {"ACE_frag_tiny_HD"};
+ GVAR(metal) = 200;
+ GVAR(charge) = 32;
+ GVAR(gurney_c) = 2700;
+ GVAR(gurney_k) = 1/2;
+ };
+ class G_40mm_HEDP: G_40mm_HE {
+ // Source: http://www.inetres.com/gp/military/infantry/grenade/40mm_ammo.html#M433
+ GVAR(enabled) = 1;
+
+ GVAR(classes)[] = {"ACE_frag_tiny_HD"};
+ GVAR(metal) = 200;
+ GVAR(charge) = 45;
+ GVAR(gurney_c) = 2830;
+ GVAR(gurney_k) = 1/2;
+ };
+
+ class ACE_G_40mm_HEDP: G_40mm_HEDP {
+ };
+ class ACE_G_40mm_HE: G_40mm_HE {
+ };
+ class ACE_G_40mm_Practice: ACE_G_40mm_HE {
+ GVAR(skip) = 1;
+ GVAR(force) = 0;
+ };
+ class ACE_G40mm_HE_VOG25P: G_40mm_HE {
+ GVAR(skip) = 0;
+ GVAR(force) = 1;
+ };
+
+ // curator ammo entries
+ class ShellBase;
+ class Sh_125mm_HEAT;
+ class Sh_155mm_AMOS: ShellBase {
+ // Source: http://www.globalsecurity.org/military/systems/munitions/m795.htm
+ GVAR(enabled) = 1;
+
+ 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) = 36000;
+ GVAR(charge) = 9979;
+ GVAR(gurney_c) = 2440;
+ GVAR(gurney_k) = 1/2;
+ };
+ class Sh_82mm_AMOS : Sh_155mm_AMOS {
+ // Source: http://www.arsenal-bg.com/defense_police/mortar_bombs_82mm.htm
+ GVAR(enabled) = 1;
+
+ GVAR(classes)[] = {"ACE_frag_medium", "ACE_frag_medium_HD"};
+ GVAR(metal) = 3200;
+ GVAR(charge) = 420;
+ GVAR(gurney_c) = 2440;
+ GVAR(gurney_k) = 1/2;
+ };
+ class ModuleOrdnanceMortar_F_Ammo: Sh_82mm_AMOS {
+ GVAR(enabled) = 1;
+
+ 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_105mm_HEAT_MP : Sh_125mm_HEAT {
+ GVAR(enabled) = 1;
+
+ GVAR(classes)[] = {"ACE_frag_medium", "ACE_frag_medium_HD"};
+ GVAR(metal) = 11400;
+ GVAR(charge) = 7100;
+ GVAR(gurney_c) = 2800;
+ GVAR(gurney_k) = 1/2;
+ };
+ class Sh_120mm_HE : ShellBase {
+ GVAR(enabled) = 1;
+
+ GVAR(classes)[] = {"ACE_frag_medium", "ACE_frag_medium_HD"};
+ GVAR(metal) = 23000;
+ GVAR(charge) = 3148;
+ GVAR(gurney_c) = 2830;
+ GVAR(gurney_k) = 1/2;
+ };
+ class Sh_125mm_HE: Sh_120mm_HE {
+ GVAR(enabled) = 1;
+
+ GVAR(classes)[] = {"ACE_frag_medium", "ACE_frag_medium_HD"};
+ GVAR(metal) = 16000;
+ GVAR(charge) = 3200;
+ GVAR(gurney_c) = 2440;
+ GVAR(gurney_k) = 1/2;
+ };
+ class ModuleOrdnanceHowitzer_F_ammo: Sh_155mm_AMOS {
+ GVAR(enabled) = 1;
+
+ 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 {
+ // GVAR(force) = 1;
+ // GVAR(multiplier) = 1.2;
+ //};
+
+ class MissileBase;
+ class Missile_AGM_02_F : MissileBase {
+ // Source: http://fas.org/man/dod-101/sys/smart/agm-65.htm
+ GVAR(enabled) = 1;
+
+ GVAR(classes)[] = {"ACE_frag_medium", "ACE_frag_medium_HD"};
+ GVAR(metal) = 56250;
+ GVAR(charge) = 39000;
+ GVAR(gurney_c) = 2700;
+ GVAR(gurney_k) = 1/2;
+ };
+ class M_Hellfire_AT: MissileBase {
+ // Source: http://www.designation-systems.net/dusrm/m-114.html
+ GVAR(enabled) = 1;
+
+ GVAR(classes)[] = {"ACE_frag_medium", "ACE_frag_medium_HD"};
+ GVAR(metal) = 8000;
+ GVAR(charge) = 2400;
+ GVAR(gurney_c) = 2700;
+ GVAR(gurney_k) = 1/2;
+ };
+
+ /*
+ class B_762x51_Ball;
+ class ACE_frag_base: B_762x51_Ball { ////TODO: B_762x45_Ball no longer exists, is this a valid replacement?
+ model = "\A3\Weapons_f\ammo\shell";
+ timeToLive = 12;
+ typicalSpeed = 800;
+ // Fix sounds
+ effectFly = "AmmoClassic";
+ soundDefault1[] = {"A3\sounds_f\weapons\hits\concrete_1.wav",0.158114,1,30};
+ soundDefault2[] = {"A3\sounds_f\weapons\hits\concrete_2.wav",0.158114,1,30};
+ soundDefault3[] = {"A3\sounds_f\weapons\hits\concrete_3.wav",0.158114,1,30};
+ soundDefault4[] = {"A3\sounds_f\weapons\hits\concrete_4.wav",0.158114,1,30};
+ soundDefault5[] = {"A3\sounds_f\weapons\hits\concrete_5.wav",0.158114,1,30};
+ soundDefault6[] = {"A3\sounds_f\weapons\hits\concrete_6.wav",0.158114,1,30};
+ soundDefault7[] = {"A3\sounds_f\weapons\hits\concrete_7.wav",0.158114,1,30};
+ soundDefault8[] = {"A3\sounds_f\weapons\hits\concrete_8.wav",0.158114,1,30};
+ soundGroundSoft1[] = {"A3\sounds_f\weapons\hits\soft_ground_1.wav",0.02811705,1,30};
+ soundGroundSoft2[] = {"A3\sounds_f\weapons\hits\soft_ground_2.wav",0.02811705,1,30};
+ soundGroundSoft3[] = {"A3\sounds_f\weapons\hits\soft_ground_3.wav",0.02811705,1,30};
+ soundGroundSoft4[] = {"A3\sounds_f\weapons\hits\soft_ground_4.wav",0.02811705,1,30};
+ soundGroundSoft5[] = {"A3\sounds_f\weapons\hits\soft_ground_5.wav",0.02811705,1,30};
+ soundGroundSoft6[] = {"A3\sounds_f\weapons\hits\soft_ground_6.wav",0.02811705,1,30};
+ soundGroundSoft7[] = {"A3\sounds_f\weapons\hits\soft_ground_7.wav",0.02811705,1,30};
+ soundGroundSoft8[] = {"A3\sounds_f\weapons\hits\soft_ground_8.wav",0.02811705,1,30};
+ soundGroundHard1[] = {"A3\sounds_f\weapons\hits\hard_ground_1.wav",0.62946,1,40};
+ soundGroundHard2[] = {"A3\sounds_f\weapons\hits\hard_ground_2.wav",0.62946,1,40};
+ soundGroundHard3[] = {"A3\sounds_f\weapons\hits\hard_ground_3.wav",0.62946,1,40};
+ soundGroundHard4[] = {"A3\sounds_f\weapons\hits\hard_ground_4.wav",0.62946,1,40};
+ soundGroundHard5[] = {"A3\sounds_f\weapons\hits\hard_ground_5.wav",0.62946,1,40};
+ soundGroundHard6[] = {"A3\sounds_f\weapons\hits\hard_ground_6.wav",0.62946,1,40};
+ soundGroundHard7[] = {"A3\sounds_f\weapons\hits\hard_ground_7.wav",0.62946,1,40};
+ soundGroundHard8[] = {"A3\sounds_f\weapons\hits\hard_ground_8.wav",0.62946,1,40};
+ soundMetal1[] = {"A3\sounds_f\weapons\hits\metal_1.wav",0.158114,1,45};
+ soundMetal2[] = {"A3\sounds_f\weapons\hits\metal_2.wav",0.158114,1,45};
+ soundMetal3[] = {"A3\sounds_f\weapons\hits\metal_3.wav",0.158114,1,45};
+ soundMetal4[] = {"A3\sounds_f\weapons\hits\metal_4.wav",0.158114,1,45};
+ soundMetal5[] = {"A3\sounds_f\weapons\hits\metal_5.wav",0.158114,1,45};
+ soundMetal6[] = {"A3\sounds_f\weapons\hits\metal_6.wav",0.158114,1,45};
+ soundMetal7[] = {"A3\sounds_f\weapons\hits\metal_7.wav",0.158114,1,45};
+ soundMetal8[] = {"A3\sounds_f\weapons\hits\metal_8.wav",0.158114,1,45};
+ soundGlass1[] = {"A3\sounds_f\weapons\hits\glass_1.wav",0.177828,1,25};
+ soundGlass2[] = {"A3\sounds_f\weapons\hits\glass_2.wav",0.177828,1,25};
+ soundGlass3[] = {"A3\sounds_f\weapons\hits\glass_3.wav",0.177828,1,25};
+ soundGlass4[] = {"A3\sounds_f\weapons\hits\glass_4.wav",0.177828,1,25};
+ soundGlass5[] = {"A3\sounds_f\weapons\hits\glass_5.wav",0.177828,1,25};
+ soundGlass6[] = {"A3\sounds_f\weapons\hits\glass_6.wav",0.177828,1,25};
+ soundGlass7[] = {"A3\sounds_f\weapons\hits\glass_7.wav",0.177828,1,25};
+ soundGlass8[] = {"A3\sounds_f\weapons\hits\glass_8.wav",0.177828,1,25};
+ soundGlassArmored1[] = {"A3\sounds_f\weapons\hits\glass_arm_1.wav",0.177828,1,30};
+ soundGlassArmored2[] = {"A3\sounds_f\weapons\hits\glass_arm_2.wav",0.177828,1,30};
+ soundGlassArmored3[] = {"A3\sounds_f\weapons\hits\glass_arm_3.wav",0.177828,1,30};
+ soundGlassArmored4[] = {"A3\sounds_f\weapons\hits\glass_arm_4.wav",0.177828,1,30};
+ soundGlassArmored5[] = {"A3\sounds_f\weapons\hits\glass_arm_5.wav",0.177828,1,30};
+ soundGlassArmored6[] = {"A3\sounds_f\weapons\hits\glass_arm_6.wav",0.177828,1,30};
+ soundGlassArmored7[] = {"A3\sounds_f\weapons\hits\glass_arm_7.wav",0.177828,1,30};
+ soundGlassArmored8[] = {"A3\sounds_f\weapons\hits\glass_arm_8.wav",0.177828,1,30};
+ soundVehiclePlate1[] = {"A3\sounds_f\weapons\hits\metal_plate_1.wav",0.281170,1,40};
+ soundVehiclePlate2[] = {"A3\sounds_f\weapons\hits\metal_plate_2.wav",0.281170,1,40};
+ soundVehiclePlate3[] = {"A3\sounds_f\weapons\hits\metal_plate_3.wav",0.281170,1,40};
+ soundVehiclePlate4[] = {"A3\sounds_f\weapons\hits\metal_plate_4.wav",0.281170,1,40};
+ soundVehiclePlate5[] = {"A3\sounds_f\weapons\hits\metal_plate_5.wav",0.281170,1,40};
+ soundVehiclePlate6[] = {"A3\sounds_f\weapons\hits\metal_plate_6.wav",0.281170,1,40};
+ soundVehiclePlate7[] = {"A3\sounds_f\weapons\hits\metal_plate_7.wav",0.281170,1,40};
+ soundVehiclePlate8[] = {"A3\sounds_f\weapons\hits\metal_plate_8.wav",0.281170,1,40};
+ soundWood1[] = {"A3\sounds_f\weapons\hits\wood_1.wav",0.158114,1,30};
+ soundWood2[] = {"A3\sounds_f\weapons\hits\wood_2.wav",0.158114,1,30};
+ soundWood3[] = {"A3\sounds_f\weapons\hits\wood_3.wav",0.158114,1,30};
+ soundWood4[] = {"A3\sounds_f\weapons\hits\wood_4.wav",0.158114,1,30};
+ soundWood5[] = {"A3\sounds_f\weapons\hits\wood_5.wav",0.158114,1,30};
+ soundWood6[] = {"A3\sounds_f\weapons\hits\wood_6.wav",0.158114,1,30};
+ soundWood7[] = {"A3\sounds_f\weapons\hits\wood_7.wav",0.158114,1,30};
+ soundWood8[] = {"A3\sounds_f\weapons\hits\wood_8.wav",0.158114,1,30};
+ soundHitBody1[] = {"A3\sounds_f\weapons\hits\body_1.wav",0.0177828,1,25};
+ soundHitBody2[] = {"A3\sounds_f\weapons\hits\body_2.wav",0.0177828,1,25};
+ soundHitBody3[] = {"A3\sounds_f\weapons\hits\body_3.wav",0.0177828,1,25};
+ soundHitBody4[] = {"A3\sounds_f\weapons\hits\body_4.wav",0.0177828,1,25};
+ soundHitBody5[] = {"A3\sounds_f\weapons\hits\body_5.wav",0.0177828,1,25};
+ soundHitBody6[] = {"A3\sounds_f\weapons\hits\body_6.wav",0.0177828,1,25};
+ soundHitBody7[] = {"A3\sounds_f\weapons\hits\body_7.wav",0.0177828,1,25};
+ soundHitBody8[] = {"A3\sounds_f\weapons\hits\body_8.wav",0.0177828,1,25};
+ soundHitBuilding1[] = {"A3\sounds_f\weapons\hits\building_1.wav",0.251189,1,30};
+ soundHitBuilding2[] = {"A3\sounds_f\weapons\hits\building_2.wav",0.251189,1,30};
+ soundHitBuilding3[] = {"A3\sounds_f\weapons\hits\building_3.wav",0.251189,1,30};
+ soundHitBuilding4[] = {"A3\sounds_f\weapons\hits\building_4.wav",0.251189,1,30};
+ soundHitBuilding5[] = {"A3\sounds_f\weapons\hits\building_5.wav",0.251189,1,30};
+ soundHitBuilding6[] = {"A3\sounds_f\weapons\hits\building_6.wav",0.251189,1,30};
+ soundHitBuilding7[] = {"A3\sounds_f\weapons\hits\building_7.wav",0.251189,1,30};
+ soundHitBuilding8[] = {"A3\sounds_f\weapons\hits\building_8.wav",0.251189,1,30};
+ soundHitFoliage1[] = {"A3\sounds_f\weapons\hits\foliage_1.wav",0.177828,1,25};
+ soundHitFoliage2[] = {"A3\sounds_f\weapons\hits\foliage_2.wav",0.177828,1,25};
+ soundHitFoliage3[] = {"A3\sounds_f\weapons\hits\foliage_3.wav",0.177828,1,25};
+ soundHitFoliage4[] = {"A3\sounds_f\weapons\hits\foliage_4.wav",0.177828,1,25};
+ soundHitFoliage5[] = {"A3\sounds_f\weapons\hits\foliage_5.wav",0.177828,1,25};
+ soundHitFoliage6[] = {"A3\sounds_f\weapons\hits\foliage_6.wav",0.177828,1,25};
+ soundHitFoliage7[] = {"A3\sounds_f\weapons\hits\foliage_7.wav",0.177828,1,25};
+ soundHitFoliage8[] = {"A3\sounds_f\weapons\hits\foliage_8.wav",0.177828,1,25};
+ soundPlastic1[] = {"A3\sounds_f\weapons\hits\plastic_1.wav",0.177828,1,25};
+ soundPlastic2[] = {"A3\sounds_f\weapons\hits\plastic_2.wav",0.177828,1,25};
+ soundPlastic3[] = {"A3\sounds_f\weapons\hits\plastic_3.wav",0.177828,1,25};
+ soundPlastic4[] = {"A3\sounds_f\weapons\hits\plastic_4.wav",0.177828,1,25};
+ soundPlastic5[] = {"A3\sounds_f\weapons\hits\plastic_5.wav",0.177828,1,25};
+ soundPlastic6[] = {"A3\sounds_f\weapons\hits\plastic_6.wav",0.177828,1,25};
+ soundPlastic7[] = {"A3\sounds_f\weapons\hits\plastic_7.wav",0.177828,1,25};
+ soundPlastic8[] = {"A3\sounds_f\weapons\hits\plastic_8.wav",0.177828,1,25};
+ soundConcrete1[] = {"A3\sounds_f\weapons\hits\concrete_1.wav",0.177828,1,35};
+ soundConcrete2[] = {"A3\sounds_f\weapons\hits\concrete_2.wav",0.177828,1,35};
+ soundConcrete3[] = {"A3\sounds_f\weapons\hits\concrete_3.wav",0.177828,1,35};
+ soundConcrete4[] = {"A3\sounds_f\weapons\hits\concrete_4.wav",0.177828,1,35};
+ soundConcrete5[] = {"A3\sounds_f\weapons\hits\concrete_5.wav",0.177828,1,35};
+ soundConcrete6[] = {"A3\sounds_f\weapons\hits\concrete_6.wav",0.177828,1,35};
+ soundConcrete7[] = {"A3\sounds_f\weapons\hits\concrete_7.wav",0.177828,1,35};
+ soundConcrete8[] = {"A3\sounds_f\weapons\hits\concrete_8.wav",0.177828,1,35};
+ soundRubber1[] = {"A3\sounds_f\weapons\hits\tyre_1.wav",0.158114,1,25};
+ soundRubber2[] = {"A3\sounds_f\weapons\hits\tyre_2.wav",0.158114,1,25};
+ soundRubber3[] = {"A3\sounds_f\weapons\hits\tyre_3.wav",0.158114,1,25};
+ soundRubber4[] = {"A3\sounds_f\weapons\hits\tyre_4.wav",0.158114,1,25};
+ soundRubber5[] = {"A3\sounds_f\weapons\hits\tyre_5.wav",0.158114,1,25};
+ soundRubber6[] = {"A3\sounds_f\weapons\hits\tyre_6.wav",0.158114,1,25};
+ soundRubber7[] = {"A3\sounds_f\weapons\hits\tyre_7.wav",0.158114,1,25};
+ soundRubber8[] = {"A3\sounds_f\weapons\hits\tyre_8.wav",0.158114,1,25};
+ soundWater1[] = {"A3\sounds_f\weapons\hits\water_01.wav",0.158114,1,25};
+ soundWater2[] = {"A3\sounds_f\weapons\hits\water_02.wav",0.158114,1,25};
+ soundWater3[] = {"A3\sounds_f\weapons\hits\water_03.wav",0.158114,1,25};
+ soundWater4[] = {"A3\sounds_f\weapons\hits\water_04.wav",0.158114,1,25};
+ soundWater5[] = {"A3\sounds_f\weapons\hits\water_05.wav",0.158114,1,25};
+ soundWater6[] = {"A3\sounds_f\weapons\hits\water_06.wav",0.158114,1,25};
+ soundWater7[] = {"A3\sounds_f\weapons\hits\water_07.wav",0.158114,1,25};
+ soundWater8[] = {"A3\sounds_f\weapons\hits\water_08.wav",0.158114,1,25};
+ hitGroundSoft[] = {"soundGroundSoft1",0.2,"soundGroundSoft2",0.2,"soundGroundSoft3",0.1,"soundGroundSoft4",0.1,"soundGroundSoft5",0.1,"soundGroundSoft6",0.1,"soundGroundSoft7",0.1,"soundGroundSoft8",0.1};
+ hitGroundHard[] = {"soundGroundHard1",0.2,"soundGroundHard2",0.2,"soundGroundHard3",0.1,"soundGroundHard4",0.1,"soundGroundHard5",0.1,"soundGroundHard6",0.1,"soundGroundHard7",0.1,"soundGroundHard8",0.1};
+ hitMan[] = {"soundHitBody1",0.125,"soundHitBody2",0.125,"soundHitBody3",0.125,"soundHitBody4",0.125,"soundHitBody5",0.125,"soundHitBody6",0.125,"soundHitBody7",0.125,"soundHitBody8",0.125};
+ hitArmor[] = {"soundVehiclePlate1",0.125,"soundVehiclePlate2",0.125,"soundVehiclePlate3",0.125,"soundVehiclePlate4",0.125,"soundVehiclePlate5",0.125,"soundVehiclePlate6",0.125,"soundVehiclePlate7",0.125,"soundVehiclePlate8",0.125};
+ hitBuilding[] = {"soundHitBuilding1",0.2,"soundHitBuilding2",0.2,"soundHitBuilding3",0.1,"soundHitBuilding4",0.1,"soundHitBuilding5",0.1,"soundHitBuilding6",0.1,"soundHitBuilding7",0.1,"soundHitBuilding8",0.1};
+ hitFoliage[] = {"soundHitFoliage1",0.125,"soundHitFoliage2",0.125,"soundHitFoliage3",0.125,"soundHitFoliage4",0.125,"soundHitFoliage5",0.125,"soundHitFoliage6",0.125,"soundHitFoliage7",0.125,"soundHitFoliage8",0.125};
+ hitWood[] = {"soundWood1",0.125,"soundWood2",0.125,"soundWood3",0.125,"soundWood4",0.125,"soundWood5",0.125,"soundWood6",0.125,"soundWood7",0.125,"soundWood8",0.125};
+ hitGlass[] = {"soundGlass1",0.125,"soundGlass2",0.125,"soundGlass3",0.125,"soundGlass4",0.125,"soundGlass5",0.125,"soundGlass6",0.125,"soundGlass7",0.125,"soundGlass8",0.125};
+ hitGlassArmored[] = {"soundGlassArmored1",0.125,"soundGlassArmored2",0.125,"soundGlassArmored3",0.125,"soundGlassArmored4",0.125,"soundGlassArmored5",0.125,"soundGlassArmored6",0.125,"soundGlassArmored7",0.125,"soundGlassArmored8",0.125};
+ hitConcrete[] = {"soundConcrete1",0.125,"soundConcrete2",0.125,"soundConcrete3",0.125,"soundConcrete4",0.125,"soundConcrete5",0.125,"soundConcrete6",0.125,"soundConcrete7",0.125,"soundConcrete8",0.125};
+ hitRubber[] = {"soundRubber1",0.125,"soundRubber2",0.125,"soundRubber3",0.125,"soundRubber4",0.125,"soundRubber5",0.125,"soundRubber6",0.125,"soundRubber7",0.125,"soundRubber8",0.125};
+ hitPlastic[] = {"soundPlastic1",0.125,"soundPlastic2",0.125,"soundPlastic3",0.125,"soundPlastic4",0.125,"soundPlastic5",0.125,"soundPlastic6",0.125,"soundPlastic7",0.125,"soundPlastic8",0.125};
+ hitDefault[] = {"soundDefault1",0.2,"soundDefault2",0.2,"soundDefault3",0.1,"soundDefault4",0.1,"soundDefault5",0.1,"soundDefault6",0.1,"soundDefault7",0.1,"soundDefault8",0.1};
+ hitMetal[] = {"soundMetal1",0.125,"soundMetal2",0.125,"soundMetal3",0.125,"soundMetal4",0.125,"soundMetal5",0.125,"soundMetal6",0.125,"soundMetal7",0.125,"soundMetal8",0.125};
+ hitMetalplate[] = {"soundVehiclePlate1",0.125,"soundVehiclePlate2",0.125,"soundVehiclePlate3",0.125,"soundVehiclePlate4",0.125,"soundVehiclePlate5",0.125,"soundVehiclePlate6",0.125,"soundVehiclePlate7",0.125,"soundVehiclePlate8",0.125};
+ hitWater[] = {"soundWater1",0.125,"soundWater2",0.125,"soundWater3",0.125,"soundWater4",0.125,"soundWater5",0.125,"soundWater6",0.125,"soundWater7",0.125,"soundWater8",0.125};
+ bulletFly1[] = {"A3\sounds_f\weapons\hits\bullet_by_1.wav",1,1,35};
+ bulletFly2[] = {"A3\sounds_f\weapons\hits\bullet_by_2.wav",1,1,35};
+ bulletFly3[] = {"A3\sounds_f\weapons\hits\bullet_by_3.wav",1,1,35};
+ bulletFly4[] = {"A3\sounds_f\weapons\hits\bullet_by_4.wav",1,1,35};
+ bulletFly5[] = {"A3\sounds_f\weapons\hits\bullet_by_5.wav",1,1,35};
+ bulletFly6[] = {"A3\sounds_f\weapons\hits\bullet_by_6.wav",1,1,35};
+ bulletFly7[] = {"A3\sounds_f\weapons\hits\bullet_by_7.wav",1,1,35};
+ 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};
+ };
+ */
+
+ 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;
+ indirectHitRange = 0.25;
+ 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;
+ indirectHitRange = 0.5;
+ airFriction = BASE_DRAG*0.5;
+ caliber = 2.8;
+ };
+
+ class ACE_frag_huge_HD: ACE_frag_large {
+ hit = 40;
+ indirectHit = 4;
+ indirectHitRange = 0.5;
+ 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;
+ };
+
+ #include "CfgAmmoReflections.hpp"
+};
diff --git a/addons/frag/CfgAmmoReflections.hpp b/addons/frag/CfgAmmoReflections.hpp
index 0331dd41dd..fdaac6dd90 100644
--- a/addons/frag/CfgAmmoReflections.hpp
+++ b/addons/frag/CfgAmmoReflections.hpp
@@ -1,130 +1,130 @@
-//CfgAmmoReflections.hpp
-
-#define ACE_EXPLOSION_REFLECTION(range, hit)\
-class ace_explosion_reflection_##range##_##hit : ace_explosion_reflection_base {\
- indirectHitRange = range;\
- indirectHit = hit;\
- dangerRadiusHit = range*3;\
- suppressionRadiusHit = range*2;\
-}
-
-#define ACE_EXPLOSION_RANGE(range)\
- ACE_EXPLOSION_REFLECTION(range,10);\
- ACE_EXPLOSION_REFLECTION(range,20);\
- ACE_EXPLOSION_REFLECTION(range,30);\
- ACE_EXPLOSION_REFLECTION(range,40);\
- ACE_EXPLOSION_REFLECTION(range,50);\
- ACE_EXPLOSION_REFLECTION(range,60);\
- ACE_EXPLOSION_REFLECTION(range,70);\
- ACE_EXPLOSION_REFLECTION(range,80);\
- ACE_EXPLOSION_REFLECTION(range,90);\
- ACE_EXPLOSION_REFLECTION(range,100);\
- ACE_EXPLOSION_REFLECTION(range,110);\
- ACE_EXPLOSION_REFLECTION(range,120);\
- ACE_EXPLOSION_REFLECTION(range,130);\
- ACE_EXPLOSION_REFLECTION(range,140);\
- ACE_EXPLOSION_REFLECTION(range,150);\
- ACE_EXPLOSION_REFLECTION(range,160);\
- ACE_EXPLOSION_REFLECTION(range,170);\
- ACE_EXPLOSION_REFLECTION(range,180);\
- ACE_EXPLOSION_REFLECTION(range,190);\
- ACE_EXPLOSION_REFLECTION(range,200);\
- ACE_EXPLOSION_REFLECTION(range,210);\
- ACE_EXPLOSION_REFLECTION(range,220);\
- ACE_EXPLOSION_REFLECTION(range,230);\
- ACE_EXPLOSION_REFLECTION(range,240);\
- ACE_EXPLOSION_REFLECTION(range,250);\
- ACE_EXPLOSION_REFLECTION(range,260);\
- ACE_EXPLOSION_REFLECTION(range,270);\
- ACE_EXPLOSION_REFLECTION(range,280);\
- ACE_EXPLOSION_REFLECTION(range,290);\
- ACE_EXPLOSION_REFLECTION(range,300);\
- ACE_EXPLOSION_REFLECTION(range,310);\
- ACE_EXPLOSION_REFLECTION(range,320);\
- ACE_EXPLOSION_REFLECTION(range,330);\
- ACE_EXPLOSION_REFLECTION(range,340);\
- ACE_EXPLOSION_REFLECTION(range,350);\
- ACE_EXPLOSION_REFLECTION(range,360);\
- ACE_EXPLOSION_REFLECTION(range,370);\
- ACE_EXPLOSION_REFLECTION(range,380);\
- ACE_EXPLOSION_REFLECTION(range,390);\
- ACE_EXPLOSION_REFLECTION(range,400);\
- ACE_EXPLOSION_REFLECTION(range,410);\
- ACE_EXPLOSION_REFLECTION(range,420);\
- ACE_EXPLOSION_REFLECTION(range,430);\
- ACE_EXPLOSION_REFLECTION(range,440);\
- ACE_EXPLOSION_REFLECTION(range,450);\
- ACE_EXPLOSION_REFLECTION(range,460);\
- ACE_EXPLOSION_REFLECTION(range,470);\
- ACE_EXPLOSION_REFLECTION(range,480);\
- ACE_EXPLOSION_REFLECTION(range,490);\
- ACE_EXPLOSION_REFLECTION(range,500)
-
-class ace_explosion_reflection_base : Sh_120mm_HE {
- CraterWaterEffects = "";
- CraterEffects = "";
- effectsMissile = "";
- ExplosionEffects = "";
- effectFlare = "";
- class HitEffects {
- hitWater = "";
- };
- multiSoundHit[] = {};
- explosionTime = 0.0001;
- explosive = 1;
- soundFakeFall[] = {};
- typicalSpeed = 0;
- model = "\A3\Weapons_F\empty.p3d";
- craterShape = "\A3\weapons_f\empty.p3d";
-};
-
-ACE_EXPLOSION_RANGE(2);
-ACE_EXPLOSION_RANGE(4);
-ACE_EXPLOSION_RANGE(6);
-ACE_EXPLOSION_RANGE(8);
-ACE_EXPLOSION_RANGE(10);
-ACE_EXPLOSION_RANGE(12);
-ACE_EXPLOSION_RANGE(14);
-ACE_EXPLOSION_RANGE(16);
-ACE_EXPLOSION_RANGE(18);
-ACE_EXPLOSION_RANGE(20);
-ACE_EXPLOSION_RANGE(22);
-ACE_EXPLOSION_RANGE(24);
-ACE_EXPLOSION_RANGE(26);
-ACE_EXPLOSION_RANGE(28);
-ACE_EXPLOSION_RANGE(30);
-ACE_EXPLOSION_RANGE(32);
-ACE_EXPLOSION_RANGE(34);
-ACE_EXPLOSION_RANGE(36);
-ACE_EXPLOSION_RANGE(38);
-ACE_EXPLOSION_RANGE(40);
-ACE_EXPLOSION_RANGE(42);
-ACE_EXPLOSION_RANGE(44);
-ACE_EXPLOSION_RANGE(46);
-ACE_EXPLOSION_RANGE(48);
-ACE_EXPLOSION_RANGE(50);
-ACE_EXPLOSION_RANGE(52);
-ACE_EXPLOSION_RANGE(54);
-ACE_EXPLOSION_RANGE(56);
-ACE_EXPLOSION_RANGE(58);
-ACE_EXPLOSION_RANGE(60);
-ACE_EXPLOSION_RANGE(62);
-ACE_EXPLOSION_RANGE(64);
-ACE_EXPLOSION_RANGE(66);
-ACE_EXPLOSION_RANGE(68);
-ACE_EXPLOSION_RANGE(70);
-ACE_EXPLOSION_RANGE(72);
-ACE_EXPLOSION_RANGE(74);
-ACE_EXPLOSION_RANGE(76);
-ACE_EXPLOSION_RANGE(78);
-ACE_EXPLOSION_RANGE(80);
-ACE_EXPLOSION_RANGE(82);
-ACE_EXPLOSION_RANGE(84);
-ACE_EXPLOSION_RANGE(86);
-ACE_EXPLOSION_RANGE(88);
-ACE_EXPLOSION_RANGE(90);
-ACE_EXPLOSION_RANGE(92);
-ACE_EXPLOSION_RANGE(94);
-ACE_EXPLOSION_RANGE(96);
-ACE_EXPLOSION_RANGE(98);
-ACE_EXPLOSION_RANGE(100);
+//CfgAmmoReflections.hpp
+
+#define ACE_EXPLOSION_REFLECTION(range, hit)\
+class ace_explosion_reflection_##range##_##hit : ace_explosion_reflection_base {\
+ indirectHitRange = range;\
+ indirectHit = hit;\
+ dangerRadiusHit = range*3;\
+ suppressionRadiusHit = range*2;\
+}
+
+#define ACE_EXPLOSION_RANGE(range)\
+ ACE_EXPLOSION_REFLECTION(range,10);\
+ ACE_EXPLOSION_REFLECTION(range,20);\
+ ACE_EXPLOSION_REFLECTION(range,30);\
+ ACE_EXPLOSION_REFLECTION(range,40);\
+ ACE_EXPLOSION_REFLECTION(range,50);\
+ ACE_EXPLOSION_REFLECTION(range,60);\
+ ACE_EXPLOSION_REFLECTION(range,70);\
+ ACE_EXPLOSION_REFLECTION(range,80);\
+ ACE_EXPLOSION_REFLECTION(range,90);\
+ ACE_EXPLOSION_REFLECTION(range,100);\
+ ACE_EXPLOSION_REFLECTION(range,110);\
+ ACE_EXPLOSION_REFLECTION(range,120);\
+ ACE_EXPLOSION_REFLECTION(range,130);\
+ ACE_EXPLOSION_REFLECTION(range,140);\
+ ACE_EXPLOSION_REFLECTION(range,150);\
+ ACE_EXPLOSION_REFLECTION(range,160);\
+ ACE_EXPLOSION_REFLECTION(range,170);\
+ ACE_EXPLOSION_REFLECTION(range,180);\
+ ACE_EXPLOSION_REFLECTION(range,190);\
+ ACE_EXPLOSION_REFLECTION(range,200);\
+ ACE_EXPLOSION_REFLECTION(range,210);\
+ ACE_EXPLOSION_REFLECTION(range,220);\
+ ACE_EXPLOSION_REFLECTION(range,230);\
+ ACE_EXPLOSION_REFLECTION(range,240);\
+ ACE_EXPLOSION_REFLECTION(range,250);\
+ ACE_EXPLOSION_REFLECTION(range,260);\
+ ACE_EXPLOSION_REFLECTION(range,270);\
+ ACE_EXPLOSION_REFLECTION(range,280);\
+ ACE_EXPLOSION_REFLECTION(range,290);\
+ ACE_EXPLOSION_REFLECTION(range,300);\
+ ACE_EXPLOSION_REFLECTION(range,310);\
+ ACE_EXPLOSION_REFLECTION(range,320);\
+ ACE_EXPLOSION_REFLECTION(range,330);\
+ ACE_EXPLOSION_REFLECTION(range,340);\
+ ACE_EXPLOSION_REFLECTION(range,350);\
+ ACE_EXPLOSION_REFLECTION(range,360);\
+ ACE_EXPLOSION_REFLECTION(range,370);\
+ ACE_EXPLOSION_REFLECTION(range,380);\
+ ACE_EXPLOSION_REFLECTION(range,390);\
+ ACE_EXPLOSION_REFLECTION(range,400);\
+ ACE_EXPLOSION_REFLECTION(range,410);\
+ ACE_EXPLOSION_REFLECTION(range,420);\
+ ACE_EXPLOSION_REFLECTION(range,430);\
+ ACE_EXPLOSION_REFLECTION(range,440);\
+ ACE_EXPLOSION_REFLECTION(range,450);\
+ ACE_EXPLOSION_REFLECTION(range,460);\
+ ACE_EXPLOSION_REFLECTION(range,470);\
+ ACE_EXPLOSION_REFLECTION(range,480);\
+ ACE_EXPLOSION_REFLECTION(range,490);\
+ ACE_EXPLOSION_REFLECTION(range,500)
+
+class ace_explosion_reflection_base : Sh_120mm_HE {
+ CraterWaterEffects = "";
+ CraterEffects = "";
+ effectsMissile = "";
+ ExplosionEffects = "";
+ effectFlare = "";
+ class HitEffects {
+ hitWater = "";
+ };
+ multiSoundHit[] = {};
+ explosionTime = 0.0001;
+ explosive = 1;
+ soundFakeFall[] = {};
+ typicalSpeed = 0;
+ model = "\A3\Weapons_F\empty.p3d";
+ craterShape = "\A3\weapons_f\empty.p3d";
+};
+
+ACE_EXPLOSION_RANGE(2);
+ACE_EXPLOSION_RANGE(4);
+ACE_EXPLOSION_RANGE(6);
+ACE_EXPLOSION_RANGE(8);
+ACE_EXPLOSION_RANGE(10);
+ACE_EXPLOSION_RANGE(12);
+ACE_EXPLOSION_RANGE(14);
+ACE_EXPLOSION_RANGE(16);
+ACE_EXPLOSION_RANGE(18);
+ACE_EXPLOSION_RANGE(20);
+ACE_EXPLOSION_RANGE(22);
+ACE_EXPLOSION_RANGE(24);
+ACE_EXPLOSION_RANGE(26);
+ACE_EXPLOSION_RANGE(28);
+ACE_EXPLOSION_RANGE(30);
+ACE_EXPLOSION_RANGE(32);
+ACE_EXPLOSION_RANGE(34);
+ACE_EXPLOSION_RANGE(36);
+ACE_EXPLOSION_RANGE(38);
+ACE_EXPLOSION_RANGE(40);
+ACE_EXPLOSION_RANGE(42);
+ACE_EXPLOSION_RANGE(44);
+ACE_EXPLOSION_RANGE(46);
+ACE_EXPLOSION_RANGE(48);
+ACE_EXPLOSION_RANGE(50);
+ACE_EXPLOSION_RANGE(52);
+ACE_EXPLOSION_RANGE(54);
+ACE_EXPLOSION_RANGE(56);
+ACE_EXPLOSION_RANGE(58);
+ACE_EXPLOSION_RANGE(60);
+ACE_EXPLOSION_RANGE(62);
+ACE_EXPLOSION_RANGE(64);
+ACE_EXPLOSION_RANGE(66);
+ACE_EXPLOSION_RANGE(68);
+ACE_EXPLOSION_RANGE(70);
+ACE_EXPLOSION_RANGE(72);
+ACE_EXPLOSION_RANGE(74);
+ACE_EXPLOSION_RANGE(76);
+ACE_EXPLOSION_RANGE(78);
+ACE_EXPLOSION_RANGE(80);
+ACE_EXPLOSION_RANGE(82);
+ACE_EXPLOSION_RANGE(84);
+ACE_EXPLOSION_RANGE(86);
+ACE_EXPLOSION_RANGE(88);
+ACE_EXPLOSION_RANGE(90);
+ACE_EXPLOSION_RANGE(92);
+ACE_EXPLOSION_RANGE(94);
+ACE_EXPLOSION_RANGE(96);
+ACE_EXPLOSION_RANGE(98);
+ACE_EXPLOSION_RANGE(100);
diff --git a/addons/frag/CfgEventhandlers.hpp b/addons/frag/CfgEventhandlers.hpp
index 3b3f4898e5..becf395052 100644
--- a/addons/frag/CfgEventhandlers.hpp
+++ b/addons/frag/CfgEventhandlers.hpp
@@ -1,11 +1,18 @@
-class Extended_PreInit_EventHandlers {
- class ADDON {
- init = QUOTE(call COMPILE_FILE(XEH_preInit));
- };
-};
-
-class Extended_PostInit_EventHandlers {
- class ADDON {
- init = QUOTE(call COMPILE_FILE(XEH_postInit));
- };
-};
+
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
+class Extended_PreInit_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preInit));
+ };
+};
+
+class Extended_PostInit_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_postInit));
+ };
+};
diff --git a/addons/frag/XEH_PREP.hpp b/addons/frag/XEH_PREP.hpp
new file mode 100644
index 0000000000..2fed1630f2
--- /dev/null
+++ b/addons/frag/XEH_PREP.hpp
@@ -0,0 +1,28 @@
+PREP(dev_debugAmmo);
+
+PREP(doSpall);
+PREP(fired);
+PREP(frago);
+PREP(spallTrack);
+
+// * Other */
+PREP(addBlackList);
+PREP(addTrack);
+PREP(drawTraces);
+PREP(removeTrack);
+PREP(spallHP);
+PREP(startTracing);
+PREP(stopTracing);
+PREP(trackTrace);
+
+// New tracking mechanisms
+PREP(masterPFH);
+PREP(pfhRound);
+PREP(addPfhRound);
+PREP(removePfhRound); // THIS SHOULD ABE USED SPARINGLY
+
+// Explosive Reflection
+GVAR(replacedBisArtyWrapper) = true;
+PREP(findReflections);
+PREP(doExplosions);
+PREP(doReflections);
diff --git a/addons/frag/XEH_postInit.sqf b/addons/frag/XEH_postInit.sqf
index 977866e24e..02d27434dd 100644
--- a/addons/frag/XEH_postInit.sqf
+++ b/addons/frag/XEH_postInit.sqf
@@ -1,30 +1,30 @@
-#include "script_component.hpp"
-
-if(GVAR(EnableDebugTrace) && !isMultiplayer) then {
- GVAR(traceFrags) = true;
- GVAR(autoTrace) = true;
-};
-
-if(isServer) then {
- [QGVAR(frag_eh), { _this call FUNC(frago); }] call EFUNC(common,addEventHandler);
-};
-
-["SettingsInitialized", {
- //If not enabled, exit
- if (!GVAR(enabled)) exitWith {};
-
- // Register fire event handler
- ["firedPlayer", DFUNC(fired)] call EFUNC(common,addEventHandler);
- ["firedPlayerNonLocal", DFUNC(fired)] call EFUNC(common,addEventHandler);
- ["firedNonPlayer", DFUNC(fired)] call EFUNC(common,addEventHandler);
- ["firedPlayerVehicle", DFUNC(fired)] call EFUNC(common,addEventHandler);
- ["firedPlayerVehicleNonLocal", DFUNC(fired)] call EFUNC(common,addEventHandler);
- ["firedNonPlayerVehicle", DFUNC(fired)] call EFUNC(common,addEventHandler);
-
- [FUNC(masterPFH), 0, []] call CBA_fnc_addPerFrameHandler;
-
-}] call EFUNC(common,addEventHandler);
-
-//Cache for ammo type configs
-GVAR(cacheRoundsTypesToTrack) = createLocation ["ACE_HashLocation", [-10000,-10000,-10000], 0, 0];
-GVAR(cacheRoundsTypesToTrack) setText QGVAR(cacheRoundsTypesToTrack);
+#include "script_component.hpp"
+
+if(GVAR(EnableDebugTrace) && !isMultiplayer) then {
+ GVAR(traceFrags) = true;
+ GVAR(autoTrace) = true;
+};
+
+if(isServer) then {
+ [QGVAR(frag_eh), { _this call FUNC(frago); }] call CBA_fnc_addEventHandler;
+};
+
+["ace_settingsInitialized", {
+ //If not enabled, exit
+ if (!GVAR(enabled)) exitWith {};
+
+ // Register fire event handler
+ ["ace_firedPlayer", DFUNC(fired)] call CBA_fnc_addEventHandler;
+ ["ace_firedPlayerNonLocal", DFUNC(fired)] call CBA_fnc_addEventHandler;
+ ["ace_firedNonPlayer", DFUNC(fired)] call CBA_fnc_addEventHandler;
+ ["ace_firedPlayerVehicle", DFUNC(fired)] call CBA_fnc_addEventHandler;
+ ["ace_firedPlayerVehicleNonLocal", DFUNC(fired)] call CBA_fnc_addEventHandler;
+ ["ace_firedNonPlayerVehicle", DFUNC(fired)] call CBA_fnc_addEventHandler;
+
+ [FUNC(masterPFH), 0, []] call CBA_fnc_addPerFrameHandler;
+
+}] call CBA_fnc_addEventHandler;
+
+//Cache for ammo type configs
+GVAR(cacheRoundsTypesToTrack) = createLocation ["ACE_HashLocation", [-10000,-10000,-10000], 0, 0];
+GVAR(cacheRoundsTypesToTrack) setText QGVAR(cacheRoundsTypesToTrack);
diff --git a/addons/frag/XEH_preInit.sqf b/addons/frag/XEH_preInit.sqf
index cdd9342ffd..9c03491a4e 100644
--- a/addons/frag/XEH_preInit.sqf
+++ b/addons/frag/XEH_preInit.sqf
@@ -1,51 +1,25 @@
-#include "script_component.hpp"
-
-ADDON = false;
-
-PREP(doSpall);
-PREP(fired);
-PREP(frago);
-PREP(spallTrack);
-
-GVAR(blackList) = [];
-GVAR(traceFrags) = false;
-
-GVAR(TOTALFRAGS) = 0;
-
-GVAR(spallHPData) = [];
-GVAR(spallIsTrackingCount) = 0;
-
-GVAR(autoTrace) = false;
-GVAR(traceID) = -1;
-GVAR(traces) = [];
-GVAR(tracesStarted) = false;
-
-// * Other Shit */
-PREP(addBlackList);
-PREP(addTrack);
-PREP(drawTraces);
-PREP(removeTrack);
-PREP(spallHP);
-PREP(startTracing);
-PREP(stopTracing);
-PREP(trackTrace);
-
-// New tracking mechanisms
-PREP(masterPFH);
-PREP(pfhRound);
-PREP(addPfhRound);
-PREP(removePfhRound); // THIS SHOULD ABE USED SPARINGLY
-
-// Explosive Reflection
-GVAR(replacedBisArtyWrapper) = true;
-PREP(findReflections);
-PREP(doExplosions);
-PREP(doReflections);
-
-
-GVAR(lastIterationIndex) = 0;
-GVAR(objects) = [];
-GVAR(objectTypes) = [];
-GVAR(arguments) = [];
-
-ADDON = true;
+#include "script_component.hpp"
+
+ADDON = false;
+
+#include "XEH_PREP.hpp"
+
+GVAR(blackList) = [];
+GVAR(traceFrags) = false;
+
+GVAR(TOTALFRAGS) = 0;
+
+GVAR(spallHPData) = [];
+GVAR(spallIsTrackingCount) = 0;
+
+GVAR(autoTrace) = false;
+GVAR(traceID) = -1;
+GVAR(traces) = [];
+GVAR(tracesStarted) = false;
+
+GVAR(lastIterationIndex) = 0;
+GVAR(objects) = [];
+GVAR(objectTypes) = [];
+GVAR(arguments) = [];
+
+ADDON = true;
diff --git a/addons/frag/XEH_preStart.sqf b/addons/frag/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/frag/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/frag/config.cpp b/addons/frag/config.cpp
index 16af88bfc4..1727570003 100644
--- a/addons/frag/config.cpp
+++ b/addons/frag/config.cpp
@@ -1,15 +1,17 @@
-#include "script_component.hpp"
-class CfgPatches {
- class ADDON {
- units[] = {};
- weapons[] = {};
- requiredVersion = REQUIRED_VERSION;
- requiredAddons[] = {"ace_common"};
- author[] = {"Nou"};
- VERSION_CONFIG;
- };
-};
-
-#include "CfgEventhandlers.hpp"
-#include "CfgAmmo.hpp"
-#include "ACE_Settings.hpp"
\ No newline at end of file
+#include "script_component.hpp"
+class CfgPatches {
+ class ADDON {
+ units[] = {};
+ weapons[] = {};
+ requiredVersion = REQUIRED_VERSION;
+ requiredAddons[] = {"ace_common"};
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"Nou"};
+ url = ECSTRING(main,URL);
+ VERSION_CONFIG;
+ };
+};
+
+#include "CfgEventhandlers.hpp"
+#include "CfgAmmo.hpp"
+#include "ACE_Settings.hpp"
diff --git a/addons/frag/functions/fnc_addPfhRound.sqf b/addons/frag/functions/fnc_addPfhRound.sqf
index 5d7857c67a..14f1e2f3ad 100644
--- a/addons/frag/functions/fnc_addPfhRound.sqf
+++ b/addons/frag/functions/fnc_addPfhRound.sqf
@@ -1,74 +1,74 @@
-//#define DEBUG_MODE_FULL
-#include "script_component.hpp"
-
-private ["_enabled", "_doSpall", "_spallTrack", "_spallTrackID"];
-PARAMS_3(_gun,_type,_round);
-DEFAULT_PARAM(3,_doFragTrack,false);
-
-if (!GVAR(enabled)) exitWith {};
-
-//_enabled = getNumber (configFile >> "CfgAmmo" >> _type >> QGVAR(enabled));
-//if(_enabled < 1) exitWith {};
-
-if(_round in GVAR(blackList)) exitWith {
- GVAR(blackList) = GVAR(blackList) - [_round];
-};
-
-// Exit on max track
-if( (count GVAR(objects)) > GVAR(MaxTrack)) exitWith { };
-
-if(_gun == ACE_player) then {
- _doFragTrack = true;
-} else {
- if((gunner _gun) == ACE_player) then {
- _doFragTrack = true;
- } else {
- if(local _gun && {!(isPlayer (gunner _gun))} && {!(isPlayer _gun)}) then {
- _doFragTrack = true;
- };
- };
-};
-
-_doSpall = false;
-if(GVAR(SpallEnabled)) then {
- if(GVAR(spallIsTrackingCount) <= 0) then {
- GVAR(spallHPData) = [];
- };
- if(GVAR(spallIsTrackingCount) > 5) then {
- // ACE_player sideChat "LIMT!";
- } else {
- _doSpall = true;
- GVAR(spallIsTrackingCount) = GVAR(spallIsTrackingCount) + 1;
- };
-};
-// ACE_player sideChat format["c: %1", GVAR(spallIsTrackingCount)];
-
-if(GVAR(autoTrace)) then {
- [ACE_player, _round, [1,0,0,1]] call FUNC(addTrack);
-};
-
-// We only do the single track object check here.
-// We should do an {!(_round in GVAR(objects))}
-// But we leave that out here for optimization. So this cannot be a framework function
-// Otherwise, it should only be added once and from the FiredEH
-if(_doFragTrack && alive _round) then {
- _spallTrack = [];
- _spallTrackID = [];
-
- private["_args"];
- _args = [_round, (getPosASL _round), (velocity _round), _type, diag_frameno, _gun, _doSpall, _spallTrack, _spallTrackID,
- (getNumber (configFile >> "CfgAmmo" >> _type >> QGVAR(skip))),
- (getNumber (configFile >> "CfgAmmo" >> _type >> "explosive")),
- (getNumber (configFile >> "CfgAmmo" >> _type >> "indirectHitRange")),
- (getNumber (configFile >> "CfgAmmo" >> _type >> QGVAR(force))),
- (getNumber(configFile >> "CfgAmmo" >> _type >> "indirecthit")*(sqrt((getNumber (configFile >> "CfgAmmo" >> _type >> "indirectHitRange")))))
- ];
- TRACE_1("Initializing track", _round);
- GVAR(objects) pushBack _round;
- GVAR(arguments) pushBack _args;
-
- if(_doSpall) then {
- [_round, 1, _spallTrack, _spallTrackID] call FUNC(spallTrack);
- };
- // ACE_player sideChat "WTF2";
-};
+//#define DEBUG_MODE_FULL
+#include "script_component.hpp"
+
+private ["_enabled", "_doSpall", "_spallTrack", "_spallTrackID"];
+PARAMS_3(_gun,_type,_round);
+DEFAULT_PARAM(3,_doFragTrack,false);
+
+if (!GVAR(enabled)) exitWith {};
+
+//_enabled = getNumber (configFile >> "CfgAmmo" >> _type >> QGVAR(enabled));
+//if(_enabled < 1) exitWith {};
+
+if(_round in GVAR(blackList)) exitWith {
+ GVAR(blackList) = GVAR(blackList) - [_round];
+};
+
+// Exit on max track
+if( (count GVAR(objects)) > GVAR(MaxTrack)) exitWith { };
+
+if(_gun == ACE_player) then {
+ _doFragTrack = true;
+} else {
+ if((gunner _gun) == ACE_player) then {
+ _doFragTrack = true;
+ } else {
+ if(local _gun && {!(isPlayer (gunner _gun))} && {!(isPlayer _gun)}) then {
+ _doFragTrack = true;
+ };
+ };
+};
+
+_doSpall = false;
+if(GVAR(SpallEnabled)) then {
+ if(GVAR(spallIsTrackingCount) <= 0) then {
+ GVAR(spallHPData) = [];
+ };
+ if(GVAR(spallIsTrackingCount) > 5) then {
+ // ACE_player sideChat "LIMT!";
+ } else {
+ _doSpall = true;
+ GVAR(spallIsTrackingCount) = GVAR(spallIsTrackingCount) + 1;
+ };
+};
+// ACE_player sideChat format["c: %1", GVAR(spallIsTrackingCount)];
+
+if(GVAR(autoTrace)) then {
+ [ACE_player, _round, [1,0,0,1]] call FUNC(addTrack);
+};
+
+// We only do the single track object check here.
+// We should do an {!(_round in GVAR(objects))}
+// But we leave that out here for optimization. So this cannot be a framework function
+// Otherwise, it should only be added once and from the FiredEH
+if(_doFragTrack && alive _round) then {
+ _spallTrack = [];
+ _spallTrackID = [];
+
+ private["_args"];
+ _args = [_round, (getPosASL _round), (velocity _round), _type, diag_frameno, _gun, _doSpall, _spallTrack, _spallTrackID,
+ (getNumber (configFile >> "CfgAmmo" >> _type >> QGVAR(skip))),
+ (getNumber (configFile >> "CfgAmmo" >> _type >> "explosive")),
+ (getNumber (configFile >> "CfgAmmo" >> _type >> "indirectHitRange")),
+ (getNumber (configFile >> "CfgAmmo" >> _type >> QGVAR(force))),
+ (getNumber(configFile >> "CfgAmmo" >> _type >> "indirecthit")*(sqrt((getNumber (configFile >> "CfgAmmo" >> _type >> "indirectHitRange")))))
+ ];
+ TRACE_1("Initializing track", _round);
+ GVAR(objects) pushBack _round;
+ GVAR(arguments) pushBack _args;
+
+ if(_doSpall) then {
+ [_round, 1, _spallTrack, _spallTrackID] call FUNC(spallTrack);
+ };
+ // ACE_player sideChat "WTF2";
+};
diff --git a/addons/frag/functions/fnc_addTrack.sqf b/addons/frag/functions/fnc_addTrack.sqf
index 680dc31c37..84304513e0 100644
--- a/addons/frag/functions/fnc_addTrack.sqf
+++ b/addons/frag/functions/fnc_addTrack.sqf
@@ -1,23 +1,23 @@
-#include "script_component.hpp"
-
-private ["_color", "_data", "_index", "_obj", "_objSpd", "_origin", "_positions"];
-
-if (GVAR(autoTrace)) then {
- [] call FUNC(startTracing);
-};
-
-// setAccTime 0.05;
-_index = (count GVAR(traces));
-_obj = _this select 1;
-_origin = _this select 0;
-_color = [1,0,0,1];
-if((count _this) > 2) then {
- _color = _this select 2;
-};
-_positions = [];
-_objSpd = vectorMagnitude (velocity _obj);
-_positions set[(count _positions), [(getPos _obj), _objSpd]];
-_data = [_origin, typeOf _origin, typeOf _obj, _objSpd, _positions, _color];
-
-GVAR(traces) set[_index, _data];
-[DFUNC(trackTrace), 0, [_obj, _index, ACE_time]] call CBA_fnc_addPerFrameHandler;
+#include "script_component.hpp"
+
+private ["_color", "_data", "_index", "_obj", "_objSpd", "_origin", "_positions"];
+
+if (GVAR(autoTrace)) then {
+ [] call FUNC(startTracing);
+};
+
+// setAccTime 0.05;
+_index = (count GVAR(traces));
+_obj = _this select 1;
+_origin = _this select 0;
+_color = [1,0,0,1];
+if((count _this) > 2) then {
+ _color = _this select 2;
+};
+_positions = [];
+_objSpd = vectorMagnitude (velocity _obj);
+_positions set[(count _positions), [(getPos _obj), _objSpd]];
+_data = [_origin, typeOf _origin, typeOf _obj, _objSpd, _positions, _color];
+
+GVAR(traces) set[_index, _data];
+[DFUNC(trackTrace), 0, [_obj, _index, CBA_missionTime]] call CBA_fnc_addPerFrameHandler;
diff --git a/addons/frag/functions/fnc_dev_debugAmmo.sqf b/addons/frag/functions/fnc_dev_debugAmmo.sqf
new file mode 100644
index 0000000000..1323639621
--- /dev/null
+++ b/addons/frag/functions/fnc_dev_debugAmmo.sqf
@@ -0,0 +1,62 @@
+#define DEBUG_MODE_FULL
+#include "script_component.hpp"
+
+params [["_debugMissing", true, [false]], ["_debugForce", false, [false]], ["_debugNonFrag", false, [false]]];
+
+diag_log text format ["~~~~~~~~~~~~~Start [%1]~~~~~~~~~~~~~", _this];
+
+private _allMagsConfigs = configProperties [configFile >> "CfgMagazines", "isClass _x", true];
+private _processedCfgAmmos = [];
+
+{
+ private _ammo = toLower getText (_x >> "ammo");
+ if ((_ammo != "") && {!(_ammo in _processedCfgAmmos)}) then {
+ _processedCfgAmmos pushBack _ammo;
+
+ //Ignore mines/bombs
+ if (_ammo isKindOf "TimeBombCore") exitWith {};
+
+ _ammoConfig = configFile >> "CfgAmmo" >> _ammo;
+
+ //Read configs and test if it would actually cause a frag, using same logic as FUNC(pfhRound)
+ private _skip = getNumber (_ammoConfig >> QGVAR(skip));
+ private _explosive = getNumber (_ammoConfig >> "explosive");
+ private _indirectRange = getNumber (_ammoConfig >> "indirectHitRange");
+ private _force = getNumber (_ammoConfig >> QGVAR(force));
+ private _fragPower = getNumber(_ammoConfig >> "indirecthit")*(sqrt((getNumber (_ammoConfig >> "indirectHitRange"))));
+
+ private _shouldAdd = (_skip == 0) && {(_force == 1) || {_explosive > 0.5 && {_indirectRange >= 4.5} && {_fragPower >= 35}}};
+
+ if (_shouldAdd) then {
+ if (_debugForce && {((getNumber(_ammoConfig >> "hit")) < 5) || {_fragPower < 10}}) then {
+ diag_log text format ["Ammo [%1] from Mag [%2] - Weak but will still frag!",_ammo,configName _x];
+ diag_log text format [" - _force=%1,_fragPower=%2",_force,_fragPower];
+ };
+
+ _warn = false;
+
+ _fragTypes = getArray (_ammoConfig >> "ACE_frag_CLASSES");
+ if(_fragTypes isEqualTo []) then {_warn = true;};
+ _c = getNumber(_ammoConfig >> "ACE_frag_CHARGE");
+ if(_c == 0) then {_warn = true;};
+ _m = getNumber(_ammoConfig >> "ACE_frag_METAL");
+ if(_m == 0) then {_warn = true;};
+ _k = getNumber(_ammoConfig >> "ACE_frag_GURNEY_K");
+ if(_k == 0) then {_warn = true;};
+ _gC = getNumber(_ammoConfig >> "ACE_frag_GURNEY_C");
+ if(_gC == 0) then { _warn = true;};
+
+ if(_debugMissing && _warn) then {
+ diag_log text format ["Ammo [%1] from Mag [%2] MISSING frag configs:",_ammo,configName _x];
+ diag_log text format [" - _c=%1,_m=%2,_k=%3,_gC=%4,_fragTypes=%5",_c,_m,_k,_gC,_fragTypes];
+ };
+ } else {
+ if (_debugNonFrag && {isArray (_ammoConfig >> "ACE_frag_CLASSES")}) then {
+ diag_log text format ["Ammo [%1] from Mag [%2] has frag configs but will NOT frag:",_ammo,configName _x];
+ diag_log text format ["- skip=%1,explosive=%2,indirectHitRange=%3,force=%4,fragPower=%5",_skip,_explosive,_indirectRange,_force,_fragPower];
+ };
+ };
+ };
+} forEach _allMagsConfigs;
+
+diag_log text format ["~~~~~~~~~~~~~End [%1-%2]~~~~~~~~~~~~~", count _allMagsConfigs, count _processedCfgAmmos];
diff --git a/addons/frag/functions/fnc_doExplosions.sqf b/addons/frag/functions/fnc_doExplosions.sqf
index f6daee1c06..41d546b78f 100644
--- a/addons/frag/functions/fnc_doExplosions.sqf
+++ b/addons/frag/functions/fnc_doExplosions.sqf
@@ -1,26 +1,26 @@
-//fnc_doExplosions.sqf
-#include "script_component.hpp"
-
-private ["_params", "_explosions", "_index", "_i", "_exp", "_refExp", "_bpos", "_hit", "_distance", "_indirectHitRange", "_depth"];
-_params = _this select 0;
-_explosions = _params select 0;
-_index = _params select 1;
-for "_i" from _index to ((_index+2) min (count _explosions)) do {
- _exp = _explosions select _i;
- _refExp = _exp select 0;
- _bpos = _exp select 1;
- _hit = _exp select 2;
- _distance = _exp select 3;
- _indirectHitRange = _exp select 4;
- _depth = _exp select 5;
- _refExp createVehicle (ASLtoATL _bpos);
- // if(_hit >= 150 && _distance > _indirectHitRange) then {
- // [_bpos, _refExp, _depth] call FUNC(doReflections);
- // };
-};
-_index = _index + 2;
-if(_index >= (count _explosions)) then {
- [(_this select 1)] call CBA_fnc_removePerFrameHandler;
-} else {
- _params set[1, _index];
-};
+//fnc_doExplosions.sqf
+#include "script_component.hpp"
+
+private ["_params", "_explosions", "_index", "_i", "_exp", "_refExp", "_bpos", "_hit", "_distance", "_indirectHitRange", "_depth"];
+_params = _this select 0;
+_explosions = _params select 0;
+_index = _params select 1;
+for "_i" from _index to ((_index+2) min (count _explosions)) do {
+ _exp = _explosions select _i;
+ _refExp = _exp select 0;
+ _bpos = _exp select 1;
+ _hit = _exp select 2;
+ _distance = _exp select 3;
+ _indirectHitRange = _exp select 4;
+ _depth = _exp select 5;
+ _refExp createVehicle (ASLtoATL _bpos);
+ // if(_hit >= 150 && _distance > _indirectHitRange) then {
+ // [_bpos, _refExp, _depth] call FUNC(doReflections);
+ // };
+};
+_index = _index + 2;
+if(_index >= (count _explosions)) then {
+ [(_this select 1)] call CBA_fnc_removePerFrameHandler;
+} else {
+ _params set[1, _index];
+};
diff --git a/addons/frag/functions/fnc_doReflections.sqf b/addons/frag/functions/fnc_doReflections.sqf
index 7702e34fd5..fa30aba95d 100644
--- a/addons/frag/functions/fnc_doReflections.sqf
+++ b/addons/frag/functions/fnc_doReflections.sqf
@@ -1,22 +1,18 @@
-//fnc_doReflections.sqf
-#include "script_component.hpp"
-
-private ["_pos", "_ammo", "_depth", "_hit", "_range", "_hitFactor", "_indirectHitRange", "_indirectHit", "_testParams"];
-
-_pos = _this select 0;
-_ammo = _this select 1;
-_depth = 1;
-if(count _this > 2) then {
- _depth = _this select 2;
-};
-// TEST_ICONS pushBack [_pos, format["EXP!", _hit, _range, _hitFactor]];
-if(_depth <= 2) then {
- _indirectHitRange = getNumber(configFile >> "CfgAmmo" >> _ammo >> "indirectHitRange");
- _indirectHit = getNumber(configFile >> "CfgAmmo" >> _ammo >> "indirectHit");
-
-
-
-
- _testParams = [_pos, [_indirectHitRange, _indirectHit], [], [], -4, _depth, 0];
- [DFUNC(findReflections), 0, _testParams] call CBA_fnc_addPerFrameHandler;
-};
+//fnc_doReflections.sqf
+#include "script_component.hpp"
+
+private ["_pos", "_ammo", "_depth", "_hit", "_range", "_hitFactor", "_indirectHitRange", "_indirectHit", "_testParams"];
+
+_pos = _this select 0;
+_ammo = _this select 1;
+_depth = 1;
+if(count _this > 2) then {
+ _depth = _this select 2;
+};
+// TEST_ICONS pushBack [_pos, format["EXP!", _hit, _range, _hitFactor]];
+if(_depth <= 2) then {
+ _indirectHitRange = getNumber(configFile >> "CfgAmmo" >> _ammo >> "indirectHitRange");
+ _indirectHit = getNumber(configFile >> "CfgAmmo" >> _ammo >> "indirectHit");
+ _testParams = [_pos, [_indirectHitRange, _indirectHit], [], [], -4, _depth, 0];
+ [DFUNC(findReflections), 0, _testParams] call CBA_fnc_addPerFrameHandler;
+};
diff --git a/addons/frag/functions/fnc_doSpall.sqf b/addons/frag/functions/fnc_doSpall.sqf
index 57b5d330c7..2c98e955eb 100644
--- a/addons/frag/functions/fnc_doSpall.sqf
+++ b/addons/frag/functions/fnc_doSpall.sqf
@@ -1,151 +1,151 @@
-//fnc_doSpall.sqf
-#include "script_component.hpp"
-// ACE_player sideChat "WAAAAAAAAAAAAAAAAAAAAA";
-
-private ["_hitData", "_initialData", "_hpData", "_object", "_foundObjects", "_index", "_foundObjecsts", "_roundType", "_round", "_caliber", "_explosive", "_idh", "_alive", "_exit", "_vm", "_velocity", "_oldVelocity", "_curVelocity", "_diff", "_polar", "_unitDir", "_spallPos", "_pos1", "_i", "_pos2", "_blah", "_data", "_spallPolar", "_warn", "_c", "_m", "_k", "_gC", "_fragPower", "_fragTypes", "_spread", "_spallCount", "_elev", "_dir", "_vel", "_spallFragVect", "_fragType", "_fragment", "_pos"];
-
-_hitData = _this select 0;
-_initialData = GVAR(spallHPData) select (_hitData select 0);
-_hpData = (_hitData select 1) select (_this select 1);
-
-
-_object = _hpData select 0;
-_object removeEventHandler ["hitPart", _initialData select 0];
-_foundObjects = _initialData select 7;
-_index = _foundObjects find _object;
-if(_index != -1) then {
- _foundObjecsts set[_index, nil];
-};
-
-_roundType = (_initialData select 2);
-_round = (_initialData select 3);
-_object = (_initialData select 1);
-
-_caliber = getNumber(configFile >> "CfgAmmo" >> _roundType >> "caliber");
-_explosive = getNumber(configFile >> "CfgAmmo" >> _roundType >> "explosive");
-_idh = getNumber(configFile >> "CfgAmmo" >> _roundType >> "indirectHitRange");
-
-_alive = true;
-if(!alive _round && (_initialData select 6) == 1) then {
- _alive = false;
-};
-
-if(_alive || {_caliber >= 2.5} || {(_explosive > 0 && {_idh >= 1})}) then {
- // ACE_player sideChat format["BBBB"];
- _exit = false;
- _vm = 1;
- _velocity = _initialData select 5;
-
- _oldVelocity = vectorMagnitude _velocity;
- _curVelocity = vectorMagnitude (velocity _round);
-
- if(alive _round) then {
- _diff = _velocity vectorDiff (velocity _round);
- _polar = _diff call CBA_fnc_vect2polar;
- // ACE_player sideChat format["polar: %1", _polar];
- if((abs(_polar select 1) > 45 || abs(_polar select 2) > 45)) then {
- if(_caliber < 2.5) then {
- // ACE_player sideChat format["exit!"];
- _exit = true;
- } else {
- _vm = 1-(_curVelocity/_oldVelocity);
- };
- };
- };
- if(!_exit) then {
- _unitDir = vectorNormalized _velocity;
- _pos = _hpData select 3;
- _spallPos = nil;
- for "_i" from 0 to 100 do {
- _pos1 = _pos vectorAdd (_unitDir vectorMultiply (0.01 * _i));
- _pos2 = _pos vectorAdd (_unitDir vectorMultiply (0.01 * (_i + 1)));
- // _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 {
- // ACE_player sideChat format["FOUND!"];
- _spallPos = _pos2;
- };
- };
- if(!isNil "_spallPos") then {
- _spallPolar = _velocity call CBA_fnc_vect2polar;
-
- if(_explosive > 0) then {
- // ACE_player sideChat format["EXPLOSIVE!"];
- _warn = false;
- _c = getNumber(configFile >> "CfgAmmo" >> _roundType >> "ACE_frag_CHARGE");
- if(_c == 0) then { _c = 1; _warn = true;};
- _m = getNumber(configFile >> "CfgAmmo" >> _roundType >> "ACE_frag_METAL");
- if(_m == 0) then { _m = 2; _warn = true;};
- _k = getNumber(configFile >> "CfgAmmo" >> _roundType >> "ACE_frag_GURNEY_K");
- if(_k == 0) then { _k = 1/2; _warn = true;};
- _gC = getNumber(configFile >> "CfgAmmo" >> _roundType >> "ACE_frag_GURNEY_C");
- if(_gC == 0) then { _gC = 2440; _warn = true;};
-
- if(_warn) then {
- ACE_LOGWARNING_1("Ammo class %1 lacks proper explosive properties definitions for frag!",_roundType); //TODO: turn this off when we get closer to release
- };
-
- _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",
- "ACE_frag_spall_medium", "ACE_frag_spall_large", "ACE_frag_spall_large", "ACE_frag_spall_huge",
- "ACE_frag_spall_huge"
-
- ];
-
- // diag_log text format["SPALL POWER: %1", _spallPolar select 0];
- _spread = 15+(random 25);
- _spallCount = 5+(random 10);
- for "_i" from 1 to _spallCount do {
- _elev = ((_spallPolar select 2)-_spread)+(random (_spread*2));
- _dir = ((_spallPolar select 1)-_spread)+(random (_spread*2));
- if(abs _elev > 90) then {
- _dir = _dir + 180;
- };
- _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 {
- [ACE_player, _fragment, [1,0.5,0,1]] call FUNC(addTrack);
- };
- };
- _spread = 5+(random 5);
- _spallCount = 3+(random 5);
- for "_i" from 1 to _spallCount do {
- _elev = ((_spallPolar select 2)-_spread)+(random (_spread*2));
- _dir = ((_spallPolar select 1)-_spread)+(random (_spread*2));
- if(abs _elev > 90) then {
- _dir = _dir + 180;
- };
- _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 {
- [ACE_player, _fragment, [1,0,0,1]] call FUNC(addTrack);
- };
- };
- };
- };
-};
+//fnc_doSpall.sqf
+#include "script_component.hpp"
+// ACE_player sideChat "WAAAAAAAAAAAAAAAAAAAAA";
+
+private ["_hitData", "_initialData", "_hpData", "_object", "_foundObjects", "_index", "_foundObjecsts", "_roundType", "_round", "_caliber", "_explosive", "_idh", "_alive", "_exit", "_vm", "_velocity", "_oldVelocity", "_curVelocity", "_diff", "_polar", "_unitDir", "_spallPos", "_pos1", "_i", "_pos2", "_blah", "_data", "_spallPolar", "_warn", "_c", "_m", "_k", "_gC", "_fragPower", "_fragTypes", "_spread", "_spallCount", "_elev", "_dir", "_vel", "_spallFragVect", "_fragType", "_fragment", "_pos"];
+
+_hitData = _this select 0;
+_initialData = GVAR(spallHPData) select (_hitData select 0);
+_hpData = (_hitData select 1) select (_this select 1);
+
+
+_object = _hpData select 0;
+_object removeEventHandler ["hitPart", _initialData select 0];
+_foundObjects = _initialData select 7;
+_index = _foundObjects find _object;
+if(_index != -1) then {
+ _foundObjecsts set[_index, nil];
+};
+
+_roundType = (_initialData select 2);
+_round = (_initialData select 3);
+_object = (_initialData select 1);
+
+_caliber = getNumber(configFile >> "CfgAmmo" >> _roundType >> "caliber");
+_explosive = getNumber(configFile >> "CfgAmmo" >> _roundType >> "explosive");
+_idh = getNumber(configFile >> "CfgAmmo" >> _roundType >> "indirectHitRange");
+
+_alive = true;
+if(!alive _round && (_initialData select 6) == 1) then {
+ _alive = false;
+};
+
+if(_alive || {_caliber >= 2.5} || {(_explosive > 0 && {_idh >= 1})}) then {
+ // ACE_player sideChat format["BBBB"];
+ _exit = false;
+ _vm = 1;
+ _velocity = _initialData select 5;
+
+ _oldVelocity = vectorMagnitude _velocity;
+ _curVelocity = vectorMagnitude (velocity _round);
+
+ if(alive _round) then {
+ _diff = _velocity vectorDiff (velocity _round);
+ _polar = _diff call CBA_fnc_vect2polar;
+ // ACE_player sideChat format["polar: %1", _polar];
+ if((abs(_polar select 1) > 45 || abs(_polar select 2) > 45)) then {
+ if(_caliber < 2.5) then {
+ // ACE_player sideChat format["exit!"];
+ _exit = true;
+ } else {
+ _vm = 1-(_curVelocity/_oldVelocity);
+ };
+ };
+ };
+ if(!_exit) then {
+ _unitDir = vectorNormalized _velocity;
+ _pos = _hpData select 3;
+ _spallPos = nil;
+ for "_i" from 0 to 100 do {
+ _pos1 = _pos vectorAdd (_unitDir vectorMultiply (0.01 * _i));
+ _pos2 = _pos vectorAdd (_unitDir vectorMultiply (0.01 * (_i + 1)));
+ // _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 {
+ // ACE_player sideChat format["FOUND!"];
+ _spallPos = _pos2;
+ };
+ };
+ if(!isNil "_spallPos") then {
+ _spallPolar = _velocity call CBA_fnc_vect2polar;
+
+ if(_explosive > 0) then {
+ // ACE_player sideChat format["EXPLOSIVE!"];
+ _warn = false;
+ _c = getNumber(configFile >> "CfgAmmo" >> _roundType >> "ACE_frag_CHARGE");
+ if(_c == 0) then { _c = 1; _warn = true;};
+ _m = getNumber(configFile >> "CfgAmmo" >> _roundType >> "ACE_frag_METAL");
+ if(_m == 0) then { _m = 2; _warn = true;};
+ _k = getNumber(configFile >> "CfgAmmo" >> _roundType >> "ACE_frag_GURNEY_K");
+ if(_k == 0) then { _k = 1/2; _warn = true;};
+ _gC = getNumber(configFile >> "CfgAmmo" >> _roundType >> "ACE_frag_GURNEY_C");
+ if(_gC == 0) then { _gC = 2440; _warn = true;};
+
+ if(_warn) then {
+ ACE_LOGWARNING_1("Ammo class %1 lacks proper explosive properties definitions for frag!",_roundType); //TODO: turn this off when we get closer to release
+ };
+
+ _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",
+ "ACE_frag_spall_medium", "ACE_frag_spall_large", "ACE_frag_spall_large", "ACE_frag_spall_huge",
+ "ACE_frag_spall_huge"
+
+ ];
+
+ // diag_log text format["SPALL POWER: %1", _spallPolar select 0];
+ _spread = 15+(random 25);
+ _spallCount = 5+(random 10);
+ for "_i" from 1 to _spallCount do {
+ _elev = ((_spallPolar select 2)-_spread)+(random (_spread*2));
+ _dir = ((_spallPolar select 1)-_spread)+(random (_spread*2));
+ if(abs _elev > 90) then {
+ _dir = _dir + 180;
+ };
+ _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 {
+ [ACE_player, _fragment, [1,0.5,0,1]] call FUNC(addTrack);
+ };
+ };
+ _spread = 5+(random 5);
+ _spallCount = 3+(random 5);
+ for "_i" from 1 to _spallCount do {
+ _elev = ((_spallPolar select 2)-_spread)+(random (_spread*2));
+ _dir = ((_spallPolar select 1)-_spread)+(random (_spread*2));
+ if(abs _elev > 90) then {
+ _dir = _dir + 180;
+ };
+ _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 {
+ [ACE_player, _fragment, [1,0,0,1]] call FUNC(addTrack);
+ };
+ };
+ };
+ };
+};
diff --git a/addons/frag/functions/fnc_drawTraces.sqf b/addons/frag/functions/fnc_drawTraces.sqf
index e61fc9b5ba..790d53491f 100644
--- a/addons/frag/functions/fnc_drawTraces.sqf
+++ b/addons/frag/functions/fnc_drawTraces.sqf
@@ -1,32 +1,31 @@
-#include "script_component.hpp"
-
-private ["_color", "_index", "_lastPos", "_lastSpd", "_max", "_positions", "_startSpeed"];
-
-{
- _positions = _x select 4;
- _color = _x select 5;
- _index = 0;
- _max = count _positions;
- _startSpeed = 0.01 max ((_positions select 0) select 1);
- _lastSpd = [];
- _lastPos = [];
- while {_index < _max} do {
- _data1 = _positions select _index;
- _data2 = nil;
- if(_index + ACE_TRACE_DRAW_INC >= _max) then {
- _data2 = _positions select (_max - 1);
- } else {
- _data2 = _positions select (_index + ACE_TRACE_DRAW_INC);
- };
-
- _pos1 = _data1 select 0;
- _pos2 = _data2 select 0;
- _index = _index + ACE_TRACE_DRAW_INC;
-
-
- drawLine3D [_pos1, _pos2, _color];
- _lastPos = _pos2;
- _lastSpd = _data1 select 1;
- };
- // drawIcon3D ["", [1,0,0,1], _lastPos, 0, 0, 0, format["%1m/s", _lastSpd], 1, 0.05, "PuristaMedium"];
-} forEach GVAR(traces);
+#include "script_component.hpp"
+
+private ["_color", "_index", "_lastPos", "_lastSpd", "_max", "_positions", "_startSpeed"];
+
+{
+ _positions = _x select 4;
+ _color = _x select 5;
+ _index = 0;
+ _max = count _positions;
+ _startSpeed = 0.01 max ((_positions select 0) select 1);
+ _lastSpd = [];
+ _lastPos = [];
+ while {_index < _max} do {
+ _data1 = _positions select _index;
+ _data2 = nil;
+ if(_index + ACE_TRACE_DRAW_INC >= _max) then {
+ _data2 = _positions select (_max - 1);
+ } else {
+ _data2 = _positions select (_index + ACE_TRACE_DRAW_INC);
+ };
+
+ _pos1 = _data1 select 0;
+ _pos2 = _data2 select 0;
+ _index = _index + ACE_TRACE_DRAW_INC;
+
+ drawLine3D [_pos1, _pos2, _color];
+ _lastPos = _pos2;
+ _lastSpd = _data1 select 1;
+ };
+ // drawIcon3D ["", [1,0,0,1], _lastPos, 0, 0, 0, format["%1m/s", _lastSpd], 1, 0.05, "RobotoCondensed"];
+} forEach GVAR(traces);
diff --git a/addons/frag/functions/fnc_findReflections.sqf b/addons/frag/functions/fnc_findReflections.sqf
index 5e069ddd58..d0c5c1ceec 100644
--- a/addons/frag/functions/fnc_findReflections.sqf
+++ b/addons/frag/functions/fnc_findReflections.sqf
@@ -1,128 +1,128 @@
-//fnc_findReflections.sqf
-#include "script_component.hpp"
-
-private ["_split", "_radi", "_params", "_pos", "_explosiveInfo", "_los", "_nlos", "_zIndex", "_depth", "_indirectHitRange", "_indirectHit", "_distanceCount", "_lastPos", "_test", "_vec", "_testPos", "_buckets", "_excludes", "_bucketIndex", "_bucketPos", "_bucketList", "_c", "_index", "_blist", "_avgX", "_avgY", "_avgZ", "_bpos", "_distance", "_hitFactor", "_hit", "_range", "_refExp", "_rand", "_i", "_x", "_res", "_forEachIndex", "_explosions", "_can", "_dirvec", "_zAng"];
-
-BEGIN_COUNTER(fnc_findReflections);
-_params = _this select 0;
-_pos = _params select 0;
-_explosiveInfo = _params select 1;
-_los = _params select 2;
-_nlos = _params select 3;
-_zIndex = _params select 4;
-_depth = _params select 5;
-_rand = _params select 6;
-
-_split = 15;
-_radi = (360/_split*_depth);
-
-// player sideChat format["p: %1", _explosiveInfo];
-_indirectHitRange = _explosiveInfo select 0;
-_indirectHit = _explosiveInfo select 1;
-_distanceCount = (floor _indirectHitRange*4) min 100;
-
-if(_zIndex < 5) then {
- _lastPos = _pos;
- _zAng = _zIndex*20+2;
- if(_zAng > 80) then {
- _radi = 1;
- _zAng = 90;
- };
- for "_i" from 0 to _radi do {
- _test = true;
- _vec = [1, ((_i*_split)+_rand) mod 360, _zAng] call CBA_fnc_polar2vect;
- for "_x" from 1 to _distanceCount do {
- _testPos = _pos vectorAdd (_vec vectorMultiply _x);
- // drop ["\a3\data_f\Cl_basic","","Billboard",1,15,ASLtoATL _testPos,[0,0,0],1,1.275,1.0,0.0,[1],[[1,0,0,1]],[0],0.0,2.0,"","",""];
- _res = lineIntersectsWith [_pos, _testPos];
- if(count _res > 0) exitWith {
- _test = false;
- _nlos pushBack _lastPos;
- // {
- // _x addEventHandler ["HandleDamage", { diag_log text format["this: %1", _this]; }];
- // } forEach _res;
- // drop ["\a3\data_f\Cl_basic","","Billboard",1,15,ASLtoATL _testPos,[0,0,0],1,1.275,1.0,0.0,[1],[[1,0,0,1]],[0],0.0,2.0,"","",""];
- // TEST_PAIRS pushBack [_pos, _lastPos, [1,0,0,1]];
-
- };
- // if(terrainIntersectASL [_pos, _testPos]) exitWith {};
- _lastPos = _testPos;
- };
- };
- _params set[4, _zIndex+1];
-} else {
- _depth = _depth + 1;
- _buckets = [];
- _excludes = [];
- _bucketIndex = 0;
- _bucketPos = nil;
- _bucketList = nil;
- _c = 0;
- while { count(_nlos) != count(_excludes) && _c < (count _nlos) } do {
- scopeName "mainSearch";
- {
- if(!(_forEachIndex in _excludes)) then {
- _index = _buckets pushBack [_x, [_x]];
- _excludes pushBack _forEachIndex;
- _bucketPos = _x;
- _bucketList = (_buckets select _index) select 1;
- breakTo "mainSearch";
- };
- } forEach _nlos;
- {
- if(!(_forEachIndex in _excludes)) then {
- _testPos = _x;
- if(_testPos vectorDistanceSqr _bucketPos <= 30) then {
- _bucketList pushBack _x;
- _excludes pushBack _forEachIndex;
- };
- };
- } forEach _nlos;
- _c = _c + 1;
- };
-
- // player sideChat format["c: %1", count _buckets];
- _explosions = [];
- {
- _blist = _x select 1;
- _avgX = 0;
- _avgY = 0;
- _avgZ = 0;
-
- {
- _avgX = _avgX + (_x select 0);
- _avgY = _avgY + (_x select 1);
- _avgZ = _avgZ + (_x select 2);
- } forEach _blist;
- _c = count _blist;
- _bpos = [_avgX/_c, _avgY/_c, _avgZ/_c];
-
- _distance = _pos vectorDistance _bpos;
- _hitFactor = 1-(((_distance/(_indirectHitRange*4)) min 1) max 0);
- // _hitFactor = 1/(_distance^2);
- _hit = _indirectHit*_hitFactor;
- _hit = (floor (_hit/4)) min 500;
- _hit = _hit - (_hit%10);
- _range = (floor (_indirectHitRange-(_distance/4))) min 100;
- _range = _range - (_range%2);
-
- if(_hit >= 10 && _range > 0) then {
- // TEST_ICONS pushBack [_bpos, format["h: %1, r: %2, hf: %3 d: %4 ihr: %5", _hit, _range, _hitFactor, _distance, _indirectHitRange*4]];
- // TEST_PAIRS pushBack [_pos, _bpos, [1,0,0,1]];
- _refExp = format["ace_explosion_reflection_%1_%2", _range, _hit];
- // _refExp createVehicle (ASLtoATL _bpos);
- // drop ["\a3\data_f\Cl_basic","","Billboard",1,15,ASLtoATL _bpos,[0,0,0],1,1.275,1.0,0.0,[1],[[1,0,0,1]],[0],0.0,2.0,"","",""];
-
- _explosions pushBack [_refExp, _bpos, _hit, _distance, _indirectHitRange/4, _depth];
-
- };
- if(count _explosions > (_radi*2)/_depth) exitWith {};
- } forEach _buckets;
- // _can = "Land_Bricks_V4_F" createVehicle (ASLtoATL _pos);
- // _dirvec = _pos vectorFromTo ((ATLtoASL (player modelToWorldVisual (player selectionPosition "Spine3"))));
- // _dirvec = _dirvec vectorMultiply 100;
- // _can setVelocity _dirvec;
- [DFUNC(doExplosions), 0, [_explosions, 0]] call CBA_fnc_addPerFrameHandler;
- [(_this select 1)] call CBA_fnc_removePerFrameHandler;
-};
-END_COUNTER(fnc_findReflections);
+//fnc_findReflections.sqf
+#include "script_component.hpp"
+
+private ["_split", "_radi", "_params", "_pos", "_explosiveInfo", "_los", "_nlos", "_zIndex", "_depth", "_indirectHitRange", "_indirectHit", "_distanceCount", "_lastPos", "_test", "_vec", "_testPos", "_buckets", "_excludes", "_bucketIndex", "_bucketPos", "_bucketList", "_c", "_index", "_blist", "_avgX", "_avgY", "_avgZ", "_bpos", "_distance", "_hitFactor", "_hit", "_range", "_refExp", "_rand", "_i", "_x", "_res", "_forEachIndex", "_explosions", "_can", "_dirvec", "_zAng"];
+
+BEGIN_COUNTER(fnc_findReflections);
+_params = _this select 0;
+_pos = _params select 0;
+_explosiveInfo = _params select 1;
+_los = _params select 2;
+_nlos = _params select 3;
+_zIndex = _params select 4;
+_depth = _params select 5;
+_rand = _params select 6;
+
+_split = 15;
+_radi = (360/_split*_depth);
+
+// player sideChat format["p: %1", _explosiveInfo];
+_indirectHitRange = _explosiveInfo select 0;
+_indirectHit = _explosiveInfo select 1;
+_distanceCount = (floor _indirectHitRange*4) min 100;
+
+if(_zIndex < 5) then {
+ _lastPos = _pos;
+ _zAng = _zIndex*20+2;
+ if(_zAng > 80) then {
+ _radi = 1;
+ _zAng = 90;
+ };
+ for "_i" from 0 to _radi do {
+ _test = true;
+ _vec = [1, ((_i*_split)+_rand) mod 360, _zAng] call CBA_fnc_polar2vect;
+ for "_x" from 1 to _distanceCount do {
+ _testPos = _pos vectorAdd (_vec vectorMultiply _x);
+ // drop ["\a3\data_f\Cl_basic","","Billboard",1,15,ASLtoATL _testPos,[0,0,0],1,1.275,1.0,0.0,[1],[[1,0,0,1]],[0],0.0,2.0,"","",""];
+ _res = lineIntersectsWith [_pos, _testPos];
+ if(count _res > 0) exitWith {
+ _test = false;
+ _nlos pushBack _lastPos;
+ // {
+ // _x addEventHandler ["HandleDamage", { diag_log text format["this: %1", _this]; }];
+ // } forEach _res;
+ // drop ["\a3\data_f\Cl_basic","","Billboard",1,15,ASLtoATL _testPos,[0,0,0],1,1.275,1.0,0.0,[1],[[1,0,0,1]],[0],0.0,2.0,"","",""];
+ // TEST_PAIRS pushBack [_pos, _lastPos, [1,0,0,1]];
+
+ };
+ // if(terrainIntersectASL [_pos, _testPos]) exitWith {};
+ _lastPos = _testPos;
+ };
+ };
+ _params set[4, _zIndex+1];
+} else {
+ _depth = _depth + 1;
+ _buckets = [];
+ _excludes = [];
+ _bucketIndex = 0;
+ _bucketPos = nil;
+ _bucketList = nil;
+ _c = 0;
+ while { count(_nlos) != count(_excludes) && _c < (count _nlos) } do {
+ scopeName "mainSearch";
+ {
+ if(!(_forEachIndex in _excludes)) then {
+ _index = _buckets pushBack [_x, [_x]];
+ _excludes pushBack _forEachIndex;
+ _bucketPos = _x;
+ _bucketList = (_buckets select _index) select 1;
+ breakTo "mainSearch";
+ };
+ } forEach _nlos;
+ {
+ if(!(_forEachIndex in _excludes)) then {
+ _testPos = _x;
+ if(_testPos vectorDistanceSqr _bucketPos <= 30) then {
+ _bucketList pushBack _x;
+ _excludes pushBack _forEachIndex;
+ };
+ };
+ } forEach _nlos;
+ _c = _c + 1;
+ };
+
+ // player sideChat format["c: %1", count _buckets];
+ _explosions = [];
+ {
+ _blist = _x select 1;
+ _avgX = 0;
+ _avgY = 0;
+ _avgZ = 0;
+
+ {
+ _avgX = _avgX + (_x select 0);
+ _avgY = _avgY + (_x select 1);
+ _avgZ = _avgZ + (_x select 2);
+ } forEach _blist;
+ _c = count _blist;
+ _bpos = [_avgX/_c, _avgY/_c, _avgZ/_c];
+
+ _distance = _pos vectorDistance _bpos;
+ _hitFactor = 1-(((_distance/(_indirectHitRange*4)) min 1) max 0);
+ // _hitFactor = 1/(_distance^2);
+ _hit = _indirectHit*_hitFactor;
+ _hit = (floor (_hit/4)) min 500;
+ _hit = _hit - (_hit%10);
+ _range = (floor (_indirectHitRange-(_distance/4))) min 100;
+ _range = _range - (_range%2);
+
+ if(_hit >= 10 && _range > 0) then {
+ // TEST_ICONS pushBack [_bpos, format["h: %1, r: %2, hf: %3 d: %4 ihr: %5", _hit, _range, _hitFactor, _distance, _indirectHitRange*4]];
+ // TEST_PAIRS pushBack [_pos, _bpos, [1,0,0,1]];
+ _refExp = format["ace_explosion_reflection_%1_%2", _range, _hit];
+ // _refExp createVehicle (ASLtoATL _bpos);
+ // drop ["\a3\data_f\Cl_basic","","Billboard",1,15,ASLtoATL _bpos,[0,0,0],1,1.275,1.0,0.0,[1],[[1,0,0,1]],[0],0.0,2.0,"","",""];
+
+ _explosions pushBack [_refExp, _bpos, _hit, _distance, _indirectHitRange/4, _depth];
+
+ };
+ if(count _explosions > (_radi*2)/_depth) exitWith {};
+ } forEach _buckets;
+ // _can = "Land_Bricks_V4_F" createVehicle (ASLtoATL _pos);
+ // _dirvec = _pos vectorFromTo ((ATLtoASL (player modelToWorldVisual (player selectionPosition "Spine3"))));
+ // _dirvec = _dirvec vectorMultiply 100;
+ // _can setVelocity _dirvec;
+ [DFUNC(doExplosions), 0, [_explosions, 0]] call CBA_fnc_addPerFrameHandler;
+ [(_this select 1)] call CBA_fnc_removePerFrameHandler;
+};
+END_COUNTER(fnc_findReflections);
diff --git a/addons/frag/functions/fnc_frago.sqf b/addons/frag/functions/fnc_frago.sqf
index 8c72ae8bac..ca0a9c2fc8 100644
--- a/addons/frag/functions/fnc_frago.sqf
+++ b/addons/frag/functions/fnc_frago.sqf
@@ -1,218 +1,218 @@
-//fnc_frago.sqf
-// #define DEBUG_MODE_FULL
-#include "script_component.hpp"
-
-#define FRAG_VEC_VAR 0.004
-
-#define MAX_FRAG_COUNT 50
-
-if(!isServer) exitWith { };
-
-BEGIN_COUNTER(frago);
-// _startTime = ACE_diagTime;
-
-private ["_startTime", "_round", "_lastPos", "_lastVel", "_shellType", "_gun", "_fragTypes", "_warn", "_atlPos", "_isArmed", "_fuseDist", "_indirectHitRange", "_fragRange", "_c", "_m", "_k", "_gC", "_fragPower", "_fragPowerRandom", "_manObjects", "_objects", "_crew", "_fragCount", "_fragArcs", "_doRandom", "_boundingBox", "_targetPos", "_distance", "_add", "_bbX", "_bbY", "_bbZ", "_cubic", "_targetVel", "_baseVec", "_dir", "_currentCount", "_count", "_vecVar", "_vec", "_fp", "_vel", "_fragType", "_fragObj", "_randomCount", "_sectorSize", "_sectorOffset", "_i", "_randomDir", "_endTime", "_target"];
-
-_round = _this select 0;
-_lastPos = _this select 1;
-_lastVel = _this select 2;
-_shellType = _this select 3;
-_gun = nil;
-if((count _this) > 5) then {
- _gun = _this select 5;
-};
-
-_fragTypes = [
- "ACE_frag_tiny", "ACE_frag_tiny", "ACE_frag_tiny",
- "ACE_frag_tiny_HD", "ACE_frag_tiny_HD", "ACE_frag_tiny_HD",
- "ACE_frag_small","ACE_frag_small","ACE_frag_small","ACE_frag_small",
- "ACE_frag_small_HD","ACE_frag_small_HD","ACE_frag_small_HD","ACE_frag_small_HD",
- "ACE_frag_medium_HD", "ACE_frag_medium_HD", "ACE_frag_medium_HD", "ACE_frag_medium_HD", "ACE_frag_medium_HD"
- ];
-
-_warn = false;
-if(isArray (configFile >> "CfgAmmo" >> _shellType >> "ACE_frag_CLASSES")) then {
- _fragTypes = getArray (configFile >> "CfgAmmo" >> _shellType >> "ACE_frag_CLASSES");
-} else {
- _warn = true;
-};
-
-_atlPos = ASLtoATL _lastPos;
-
-_isArmed = true;
-if(!isNil "_gun") then {
- _fuseDist = getNumber(configFile >> "CfgAmmo" >> _shellType >> "fuseDistance");
- _isArmed = ((getPosASL _gun) distance _lastPos > _fuseDist);
-};
-
-_indirectHitRange = getNumber(configFile >> "CfgAmmo" >> _shellType >> "indirecthitrange");
-_fragRange = 20*_indirectHitRange*4;
-// _c = 185; // grams of comp-b
-// _m = 210; // grams of fragmentating metal
-// _k = 3/5; // spherical K factor
-// _gC = 2843; // Gurney constant of comp-b in /ms
-
-// _c = 429; // grams of tritonal
-// _m = 496; // grams of fragmentating metal
-// _k = 1/2; // spherical K factor
-// _gC = 2320; // Gurney constant of tritonal in /ms
-
-
-_c = getNumber(configFile >> "CfgAmmo" >> _shellType >> "ACE_frag_CHARGE");
-if(_c == 0) then { _c = 1; _warn = true;};
-_m = getNumber(configFile >> "CfgAmmo" >> _shellType >> "ACE_frag_METAL");
-if(_m == 0) then { _m = 2; _warn = true;};
-_k = getNumber(configFile >> "CfgAmmo" >> _shellType >> "ACE_frag_GURNEY_K");
-if(_k == 0) then { _k = 1/2; _warn = true;};
-_gC = getNumber(configFile >> "CfgAmmo" >> _shellType >> "ACE_frag_GURNEY_C");
-if(_gC == 0) then { _gC = 2440; _warn = true;};
-
-if(_warn) then {
- ACE_LOGWARNING_1("Ammo class %1 lacks proper explosive properties definitions for frag!",_shellType); //TODO: turn this off when we get closer to release
-};
-
-_fragPower = (((_m/_c)+_k)^-(1/2))*_gC;
-_fragPower = _fragPower*0.8; // Gunery equation is for a non-fragmenting metal, imperical value of 80% represents fragmentation
-
-_fragPowerRandom = _fragPower*0.5;
-if((_atlPos select 2) < 0.5) then {
- _lastPos set[2, (_lastPos select 2)+0.5];
-};
-
-// _manObjects = _atlPos nearEntities ["CaManBase", _fragRange];
-
-// setAccTime 0.01;
-
-//_objects = nearestObjects [_atlPos, ["AllVehicles"], _fragRange]; // Not sure if tracking "ReammoBox" is required, if so revert this change for _objects
-_objects = _atlPos nearEntities [["Car", "Motorcycle", "Tank", "StaticWeapon", "CAManBase", "Air", "Ship"], _fragRange];
-
-// _objects = _manObjects;
-// Target also people inside vehicles or manning weapons
-_crew = [];
-{
- {
- _crew set [count _crew,_x]
- } forEach (crew _x);
-} forEach _objects;
-
-_objects = _objects - _crew;
-_objects = _objects + _crew;
-
-_fragCount = 0;
-
-_fragArcs = [];
-_fragArcs set[360, 0];
-
-#ifdef DEBUG_MODE_FULL
- ACE_player sideChat format["_fragRange: %1", _fragRange];
- ACE_player sideChat format["_objects: %1", _objects];
-#endif
-_doRandom = true;
-if(_isArmed && (count _objects) > 0) then {
- if (GVAR(ReflectionsEnabled)) then {
- [_lastPos, _shellType] call FUNC(doReflections);
- };
- {
- //if(random(1) > 0.5) then {
- _target = _x;
- if(alive _target) then {
- _boundingBox = boundingBox _target;
- _targetPos = (getPosASL _target);
- _distance = _targetPos distance _lastPos;
- _add = (((_boundingBox select 1) select 2)/2)+((((_distance-(_fragpower/8)) max 0)/_fragPower)*10);
- _bbX = (abs((_boundingBox select 0) select 0))+((_boundingBox select 1) select 0);
- _bbY = (abs((_boundingBox select 0) select 1))+((_boundingBox select 1) select 1);
- _bbZ = (abs((_boundingBox select 0) select 2))+((_boundingBox select 1) select 2);
- _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 {
- _currentCount = 0;
- };
- if(_currentCount < 20) then {
- _count = ceil(random(sqrt(_m/1000)));
- _vecVar = FRAG_VEC_VAR;
- if(!(_target isKindOf "Man")) then {
- _vecVar = ((sqrt _cubic)/2000)+FRAG_VEC_VAR;
- if((count (crew _target)) == 0 && _count > 0) then {
- _count = 0 max (_count/2);
- };
- };
- 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 vectorMultiply _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];
- _fragObj setPosASL _lastPos;
- _fragObj setVectorDir _vec;
- _fragObj setVelocity _vel;
- if(GVAR(traceFrags)) then {
- GVAR(TOTALFRAGS) = GVAR(TOTALFRAGS) + 1;
- [ACE_player, _fragObj, [1,0,0,1]] call FUNC(addTrack);
- };
- _fragCount = _fragCount + 1;
- _currentCount = _currentCount + 1;
- };
- _fragArcs set[_dir, _currentCount];
- };
- };
- };
- //};
- if(_fragCount > MAX_FRAG_COUNT) exitWith {};
- } forEach _objects;
- if(_fragCount > MAX_FRAG_COUNT) exitWith {};
- _randomCount = ((ceil((MAX_FRAG_COUNT-_fragCount)*0.1)) max 0)+20;
- _sectorSize = 360 / (_randomCount max 1);
- // _doRandom = false;
- if(_doRandom) then {
- for "_i" from 1 to _randomCount do {
- // Distribute evenly
- _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 vectorMultiply _fp;
-
- _fragType = round (random ((count _fragTypes)-1));
- _fragObj = (_fragTypes select _fragType) createVehicleLocal [0,0,10000];
- _fragObj setPosASL _lastPos;
- _fragObj setVectorDir _vec;
- _fragObj setVelocity _vel;
-
- if(GVAR(traceFrags)) then {
- GVAR(TOTALFRAGS) = GVAR(TOTALFRAGS) + 1;
- [ACE_player, _fragObj, [1,0.5,0,1]] call FUNC(addTrack);
- };
- _fragCount = _fragCount + 1;
- };
- };
-
-};
-// #ifdef DEBUG_MODE_FULL
- // ACE_player sideChat format["total frags: %1", GVAR(TOTALFRAGS)];
- // ACE_player sideChat format["tracks: %1", (count GVAR(trackedObjects))];
-// #endif
-// _endTime = ACE_diagTime;
+//fnc_frago.sqf
+// #define DEBUG_MODE_FULL
+#include "script_component.hpp"
+
+#define FRAG_VEC_VAR 0.004
+
+#define MAX_FRAG_COUNT 50
+
+if(!isServer) exitWith { };
+
+BEGIN_COUNTER(frago);
+// _startTime = diag_tickTime;
+
+private ["_startTime", "_round", "_lastPos", "_lastVel", "_shellType", "_gun", "_fragTypes", "_warn", "_atlPos", "_isArmed", "_fuseDist", "_indirectHitRange", "_fragRange", "_c", "_m", "_k", "_gC", "_fragPower", "_fragPowerRandom", "_manObjects", "_objects", "_crew", "_fragCount", "_fragArcs", "_doRandom", "_boundingBox", "_targetPos", "_distance", "_add", "_bbX", "_bbY", "_bbZ", "_cubic", "_targetVel", "_baseVec", "_dir", "_currentCount", "_count", "_vecVar", "_vec", "_fp", "_vel", "_fragType", "_fragObj", "_randomCount", "_sectorSize", "_sectorOffset", "_i", "_randomDir", "_endTime", "_target"];
+
+_round = _this select 0;
+_lastPos = _this select 1;
+_lastVel = _this select 2;
+_shellType = _this select 3;
+_gun = nil;
+if((count _this) > 5) then {
+ _gun = _this select 5;
+};
+
+_fragTypes = [
+ "ACE_frag_tiny", "ACE_frag_tiny", "ACE_frag_tiny",
+ "ACE_frag_tiny_HD", "ACE_frag_tiny_HD", "ACE_frag_tiny_HD",
+ "ACE_frag_small","ACE_frag_small","ACE_frag_small","ACE_frag_small",
+ "ACE_frag_small_HD","ACE_frag_small_HD","ACE_frag_small_HD","ACE_frag_small_HD",
+ "ACE_frag_medium_HD", "ACE_frag_medium_HD", "ACE_frag_medium_HD", "ACE_frag_medium_HD", "ACE_frag_medium_HD"
+ ];
+
+_warn = false;
+if(isArray (configFile >> "CfgAmmo" >> _shellType >> "ACE_frag_CLASSES")) then {
+ _fragTypes = getArray (configFile >> "CfgAmmo" >> _shellType >> "ACE_frag_CLASSES");
+} else {
+ _warn = true;
+};
+
+_atlPos = ASLtoATL _lastPos;
+
+_isArmed = true;
+if(!isNil "_gun") then {
+ _fuseDist = getNumber(configFile >> "CfgAmmo" >> _shellType >> "fuseDistance");
+ _isArmed = ((getPosASL _gun) distance _lastPos > _fuseDist);
+};
+
+_indirectHitRange = getNumber(configFile >> "CfgAmmo" >> _shellType >> "indirecthitrange");
+_fragRange = 20*_indirectHitRange*4;
+// _c = 185; // grams of comp-b
+// _m = 210; // grams of fragmentating metal
+// _k = 3/5; // spherical K factor
+// _gC = 2843; // Gurney constant of comp-b in /ms
+
+// _c = 429; // grams of tritonal
+// _m = 496; // grams of fragmentating metal
+// _k = 1/2; // spherical K factor
+// _gC = 2320; // Gurney constant of tritonal in /ms
+
+
+_c = getNumber(configFile >> "CfgAmmo" >> _shellType >> "ACE_frag_CHARGE");
+if(_c == 0) then { _c = 1; _warn = true;};
+_m = getNumber(configFile >> "CfgAmmo" >> _shellType >> "ACE_frag_METAL");
+if(_m == 0) then { _m = 2; _warn = true;};
+_k = getNumber(configFile >> "CfgAmmo" >> _shellType >> "ACE_frag_GURNEY_K");
+if(_k == 0) then { _k = 1/2; _warn = true;};
+_gC = getNumber(configFile >> "CfgAmmo" >> _shellType >> "ACE_frag_GURNEY_C");
+if(_gC == 0) then { _gC = 2440; _warn = true;};
+
+if(_warn) then {
+ ACE_LOGWARNING_1("Ammo class %1 lacks proper explosive properties definitions for frag!",_shellType); //TODO: turn this off when we get closer to release
+};
+
+_fragPower = (((_m/_c)+_k)^-(1/2))*_gC;
+_fragPower = _fragPower*0.8; // Gunery equation is for a non-fragmenting metal, imperical value of 80% represents fragmentation
+
+_fragPowerRandom = _fragPower*0.5;
+if((_atlPos select 2) < 0.5) then {
+ _lastPos set[2, (_lastPos select 2)+0.5];
+};
+
+// _manObjects = _atlPos nearEntities ["CaManBase", _fragRange];
+
+// setAccTime 0.01;
+
+//_objects = nearestObjects [_atlPos, ["AllVehicles"], _fragRange]; // Not sure if tracking "ReammoBox" is required, if so revert this change for _objects
+_objects = _atlPos nearEntities [["Car", "Motorcycle", "Tank", "StaticWeapon", "CAManBase", "Air", "Ship"], _fragRange];
+
+// _objects = _manObjects;
+// Target also people inside vehicles or manning weapons
+_crew = [];
+{
+ {
+ _crew set [count _crew,_x]
+ } forEach (crew _x);
+} forEach _objects;
+
+_objects = _objects - _crew;
+_objects = _objects + _crew;
+
+_fragCount = 0;
+
+_fragArcs = [];
+_fragArcs set[360, 0];
+
+#ifdef DEBUG_MODE_FULL
+ ACE_player sideChat format["_fragRange: %1", _fragRange];
+ ACE_player sideChat format["_objects: %1", _objects];
+#endif
+_doRandom = true;
+if(_isArmed && (count _objects) > 0) then {
+ if (GVAR(ReflectionsEnabled)) then {
+ [_lastPos, _shellType] call FUNC(doReflections);
+ };
+ {
+ //if(random(1) > 0.5) then {
+ _target = _x;
+ if(alive _target) then {
+ _boundingBox = boundingBox _target;
+ _targetPos = (getPosASL _target);
+ _distance = _targetPos distance _lastPos;
+ _add = (((_boundingBox select 1) select 2)/2)+((((_distance-(_fragpower/8)) max 0)/_fragPower)*10);
+ _bbX = (abs((_boundingBox select 0) select 0))+((_boundingBox select 1) select 0);
+ _bbY = (abs((_boundingBox select 0) select 1))+((_boundingBox select 1) select 1);
+ _bbZ = (abs((_boundingBox select 0) select 2))+((_boundingBox select 1) select 2);
+ _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 {
+ _currentCount = 0;
+ };
+ if(_currentCount < 20) then {
+ _count = ceil(random(sqrt(_m/1000)));
+ _vecVar = FRAG_VEC_VAR;
+ if(!(_target isKindOf "Man")) then {
+ _vecVar = ((sqrt _cubic)/2000)+FRAG_VEC_VAR;
+ if((count (crew _target)) == 0 && _count > 0) then {
+ _count = 0 max (_count/2);
+ };
+ };
+ 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 vectorMultiply _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];
+ _fragObj setPosASL _lastPos;
+ _fragObj setVectorDir _vec;
+ _fragObj setVelocity _vel;
+ if(GVAR(traceFrags)) then {
+ GVAR(TOTALFRAGS) = GVAR(TOTALFRAGS) + 1;
+ [ACE_player, _fragObj, [1,0,0,1]] call FUNC(addTrack);
+ };
+ _fragCount = _fragCount + 1;
+ _currentCount = _currentCount + 1;
+ };
+ _fragArcs set[_dir, _currentCount];
+ };
+ };
+ };
+ //};
+ if(_fragCount > MAX_FRAG_COUNT) exitWith {};
+ } forEach _objects;
+ if(_fragCount > MAX_FRAG_COUNT) exitWith {};
+ _randomCount = ((ceil((MAX_FRAG_COUNT-_fragCount)*0.1)) max 0)+20;
+ _sectorSize = 360 / (_randomCount max 1);
+ // _doRandom = false;
+ if(_doRandom) then {
+ for "_i" from 1 to _randomCount do {
+ // Distribute evenly
+ _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 vectorMultiply _fp;
+
+ _fragType = round (random ((count _fragTypes)-1));
+ _fragObj = (_fragTypes select _fragType) createVehicleLocal [0,0,10000];
+ _fragObj setPosASL _lastPos;
+ _fragObj setVectorDir _vec;
+ _fragObj setVelocity _vel;
+
+ if(GVAR(traceFrags)) then {
+ GVAR(TOTALFRAGS) = GVAR(TOTALFRAGS) + 1;
+ [ACE_player, _fragObj, [1,0.5,0,1]] call FUNC(addTrack);
+ };
+ _fragCount = _fragCount + 1;
+ };
+ };
+
+};
+// #ifdef DEBUG_MODE_FULL
+ // ACE_player sideChat format["total frags: %1", GVAR(TOTALFRAGS)];
+ // ACE_player sideChat format["tracks: %1", (count GVAR(trackedObjects))];
+// #endif
+// _endTime = diag_tickTime;
END_COUNTER(frago);
\ No newline at end of file
diff --git a/addons/frag/functions/fnc_masterPFH.sqf b/addons/frag/functions/fnc_masterPFH.sqf
index 637cc02f81..6af62e3f21 100644
--- a/addons/frag/functions/fnc_masterPFH.sqf
+++ b/addons/frag/functions/fnc_masterPFH.sqf
@@ -1,50 +1,50 @@
-/*
- * Author: jaynus
- *
- * Master single PFH abstraction for all rounds being tracked by frag/spall
- *
- * Arguments:
- *
- *
- * Return Value:
- * None
- */
-//#define DEBUG_MODE_FULL
-#include "script_component.hpp"
-//PARAMS_2(_pfhArgs,_handle);
-
-if (!GVAR(enabled)) exitWith {};
-
-private["_gcIndex", "_iter"];
-_gcIndex = [];
-
-_iter = 0;
-while { (count GVAR(objects)) > 0 && { _iter < (GVAR(MaxTrackPerFrame) min (count GVAR(objects))) } } do {
- private["_object", "_args"];
- if(GVAR(lastIterationIndex) >= (count GVAR(objects))) then {
- GVAR(lastIterationIndex) = 0;
- };
- _object = GVAR(objects) select GVAR(lastIterationIndex);
-
- if(!isNil "_object") then {
- _args = GVAR(arguments) select GVAR(lastIterationIndex);
-
- if(!(_args call FUNC(pfhRound))) then {
- _gcIndex pushBack GVAR(lastIterationIndex); // Add it to the GC if it returns false
- };
- };
- _iter = _iter + 1;
- GVAR(lastIterationIndex) = GVAR(lastIterationIndex) + 1;
-};
-
-// clean up dead object references
-private["_deletionCount", "_deleteIndex"];
-_deletionCount = 0;
-{
- TRACE_1("GC Projectile", _x);
- _deleteIndex = _x - _deletionCount;
- GVAR(objects) deleteAt _deleteIndex;
- GVAR(arguments) deleteAt _deleteIndex;
-
- _deletionCount = _deletionCount + 1;
-} forEach _gcIndex;
+/*
+ * Author: jaynus
+ *
+ * Master single PFH abstraction for all rounds being tracked by frag/spall
+ *
+ * Arguments:
+ *
+ *
+ * Return Value:
+ * None
+ */
+//#define DEBUG_MODE_FULL
+#include "script_component.hpp"
+//PARAMS_2(_pfhArgs,_handle);
+
+if (!GVAR(enabled)) exitWith {};
+
+private["_gcIndex", "_iter"];
+_gcIndex = [];
+
+_iter = 0;
+while { (count GVAR(objects)) > 0 && { _iter < (GVAR(MaxTrackPerFrame) min (count GVAR(objects))) } } do {
+ private["_object", "_args"];
+ if(GVAR(lastIterationIndex) >= (count GVAR(objects))) then {
+ GVAR(lastIterationIndex) = 0;
+ };
+ _object = GVAR(objects) select GVAR(lastIterationIndex);
+
+ if(!isNil "_object") then {
+ _args = GVAR(arguments) select GVAR(lastIterationIndex);
+
+ if(!(_args call FUNC(pfhRound))) then {
+ _gcIndex pushBack GVAR(lastIterationIndex); // Add it to the GC if it returns false
+ };
+ };
+ _iter = _iter + 1;
+ GVAR(lastIterationIndex) = GVAR(lastIterationIndex) + 1;
+};
+
+// clean up dead object references
+private["_deletionCount", "_deleteIndex"];
+_deletionCount = 0;
+{
+ TRACE_1("GC Projectile", _x);
+ _deleteIndex = _x - _deletionCount;
+ GVAR(objects) deleteAt _deleteIndex;
+ GVAR(arguments) deleteAt _deleteIndex;
+
+ _deletionCount = _deletionCount + 1;
+} forEach _gcIndex;
diff --git a/addons/frag/functions/fnc_pfhRound.sqf b/addons/frag/functions/fnc_pfhRound.sqf
index 8aa2303c0d..4163549fd3 100644
--- a/addons/frag/functions/fnc_pfhRound.sqf
+++ b/addons/frag/functions/fnc_pfhRound.sqf
@@ -1,50 +1,50 @@
-#include "script_component.hpp"
-private ["_round", "_lastPos", "_lastVel", "_type", "_firedFrame", "_doSpall", "_spallTrack", "_foundObjectHPIds", "_skip", "_explosive", "_indirectRange", "_force", "_fragPower"];
-_round = _this select 0;
-_lastPos = _this select 1;
-_lastVel = _this select 2;
-_type = _this select 3;
-_firedFrame = _this select 4;
-_doSpall = _this select 6;
-_spallTrack = _this select 7;
-_foundObjectHPIds = _this select 8;
-_skip = _this select 9;
-_explosive = _this select 10;
-_indirectRange = _this select 11;
-_force = _this select 12;
-_fragPower = _this select 13;
-
-if(_round in GVAR(blackList)) exitWith {
- false
-};
-
-if (!alive _round) exitWith {
- if((diag_frameno - _firedFrame) > 1) then { //skip if deleted within a single frame
- if(_skip == 0) then {
- if((_explosive > 0.5 && {_indirectRange >= 4.5} && {_fragPower >= 35}) || {_force == 1} ) then {
- [QGVAR(frag_eh), _this] call EFUNC(common,serverEvent);
- };
- };
- };
- if(_doSpall) then {
- GVAR(spallIsTrackingCount) = GVAR(spallIsTrackingCount) - 1;
- // diag_log text format["F: %1", _foundObjectHPIds];
- {
- if(!isNil "_x") then {
- _x removeEventHandler ["hitPart", _foundObjectHPIds select _forEachIndex];
- };
- } forEach _spallTrack;
- };
- false
-};
-
-_this set[1, (getPosASL _round)];
-_this set[2, (velocity _round)];
-
-if(_doSpall) then {
- private["_scale"];
- _scale = ( (count GVAR(objects)) / GVAR(MaxTrackPerFrame) ) max 0.1;
- [_round, _scale, _spallTrack, _foundObjectHPIds] call FUNC(spallTrack);
-};
-
-true
+#include "script_component.hpp"
+private ["_round", "_lastPos", "_lastVel", "_type", "_firedFrame", "_doSpall", "_spallTrack", "_foundObjectHPIds", "_skip", "_explosive", "_indirectRange", "_force", "_fragPower"];
+_round = _this select 0;
+_lastPos = _this select 1;
+_lastVel = _this select 2;
+_type = _this select 3;
+_firedFrame = _this select 4;
+_doSpall = _this select 6;
+_spallTrack = _this select 7;
+_foundObjectHPIds = _this select 8;
+_skip = _this select 9;
+_explosive = _this select 10;
+_indirectRange = _this select 11;
+_force = _this select 12;
+_fragPower = _this select 13;
+
+if(_round in GVAR(blackList)) exitWith {
+ false
+};
+
+if (!alive _round) exitWith {
+ if((diag_frameno - _firedFrame) > 1) then { //skip if deleted within a single frame
+ if(_skip == 0) then {
+ if((_explosive > 0.5 && {_indirectRange >= 4.5} && {_fragPower >= 35}) || {_force == 1} ) then {
+ [QGVAR(frag_eh), _this] call CBA_fnc_serverEvent;
+ };
+ };
+ };
+ if(_doSpall) then {
+ GVAR(spallIsTrackingCount) = GVAR(spallIsTrackingCount) - 1;
+ // diag_log text format["F: %1", _foundObjectHPIds];
+ {
+ if(!isNil "_x") then {
+ _x removeEventHandler ["hitPart", _foundObjectHPIds select _forEachIndex];
+ };
+ } forEach _spallTrack;
+ };
+ false
+};
+
+_this set[1, (getPosASL _round)];
+_this set[2, (velocity _round)];
+
+if(_doSpall) then {
+ private["_scale"];
+ _scale = ( (count GVAR(objects)) / GVAR(MaxTrackPerFrame) ) max 0.1;
+ [_round, _scale, _spallTrack, _foundObjectHPIds] call FUNC(spallTrack);
+};
+
+true
diff --git a/addons/frag/functions/fnc_removePfhRound.sqf b/addons/frag/functions/fnc_removePfhRound.sqf
index 92b09aad6d..d186da1e17 100644
--- a/addons/frag/functions/fnc_removePfhRound.sqf
+++ b/addons/frag/functions/fnc_removePfhRound.sqf
@@ -1,11 +1,11 @@
-#include "script_component.hpp"
-
-// THIS FUNCTION SHOULD NOT BE USED BECAUSE IT CAUSES AN SEARCH AND REBUILD
-
-PARAMS_1(_round);
-
-if(_round in GVAR(blackList)) then {
- GVAR(blackList) = GVAR(blackList) - [_round];
-};
-
-GVAR(objects) = GVAR(objects) - [_round];
+#include "script_component.hpp"
+
+// THIS FUNCTION SHOULD NOT BE USED BECAUSE IT CAUSES AN SEARCH AND REBUILD
+
+PARAMS_1(_round);
+
+if(_round in GVAR(blackList)) then {
+ GVAR(blackList) = GVAR(blackList) - [_round];
+};
+
+GVAR(objects) = GVAR(objects) - [_round];
diff --git a/addons/frag/functions/fnc_removeTrack.sqf b/addons/frag/functions/fnc_removeTrack.sqf
index d14b55b172..914a90602c 100644
--- a/addons/frag/functions/fnc_removeTrack.sqf
+++ b/addons/frag/functions/fnc_removeTrack.sqf
@@ -1,14 +1,14 @@
-#include "script_component.hpp"
-
-private ["_ret"];
-_ret = true;
-if(IS_ARRAY((_this select 0))) then {
- _ret = false;
-} else {
- if((_this select 0) in GVAR(trackedObjects)) then {
- GVAR(trackedObjects) = GVAR(trackedObjects) - [(_this select 0)];
- } else {
- _ret = false;
- };
-};
-_ret
+#include "script_component.hpp"
+
+private ["_ret"];
+_ret = true;
+if(IS_ARRAY((_this select 0))) then {
+ _ret = false;
+} else {
+ if((_this select 0) in GVAR(trackedObjects)) then {
+ GVAR(trackedObjects) = GVAR(trackedObjects) - [(_this select 0)];
+ } else {
+ _ret = false;
+ };
+};
+_ret
diff --git a/addons/frag/functions/fnc_spallHP.sqf b/addons/frag/functions/fnc_spallHP.sqf
index 3756bb1416..5bdde6eee9 100644
--- a/addons/frag/functions/fnc_spallHP.sqf
+++ b/addons/frag/functions/fnc_spallHP.sqf
@@ -1,29 +1,29 @@
-#include "script_component.hpp"
-
-private ["_initialData", "_hpData", "_round", "_hpRound", "_hpDirect"];
-//player sideChat format["f: %1 c: %2", (_this select 0), (count GVAR(spallHPData))];
-
-if ((_this select 0) <= (count GVAR(spallHPData))) then {
- _initialData = GVAR(spallHPData) select (_this select 0);
- if (!isNil "_initialData") then {
- _hpRound = ((_this select 1) select 0) select 2;
- _round = _initialData select 3;
- _hpDirect = ((_this select 1) select 0) select 10;
- if (_hpDirect && {_round == _hpRound}) then {
- {
- _hpData = _x;
- _round = _initialData select 3;
- // diag_log text format["HPDUMP-------------------------------------"];
- // {
- // _hp = _x;
- // diag_log text format["%1 --", _forEachIndex];
- // {
- // diag_log text format["%1: %2", _forEachIndex, _x];
- // } forEach _hp;
- // } forEach (_this select 1);
- [DFUNC(doSpall), [_this, _forEachIndex]] call EFUNC(common,execNextFrame);
- // player sideChat "WEEE";
- } forEach (_this select 1);
- };
- };
-};
+#include "script_component.hpp"
+
+private ["_initialData", "_hpData", "_round", "_hpRound", "_hpDirect"];
+//player sideChat format["f: %1 c: %2", (_this select 0), (count GVAR(spallHPData))];
+
+if ((_this select 0) <= (count GVAR(spallHPData))) then {
+ _initialData = GVAR(spallHPData) select (_this select 0);
+ if (!isNil "_initialData") then {
+ _hpRound = ((_this select 1) select 0) select 2;
+ _round = _initialData select 3;
+ _hpDirect = ((_this select 1) select 0) select 10;
+ if (_hpDirect && {_round == _hpRound}) then {
+ {
+ _hpData = _x;
+ _round = _initialData select 3;
+ // diag_log text format["HPDUMP-------------------------------------"];
+ // {
+ // _hp = _x;
+ // diag_log text format["%1 --", _forEachIndex];
+ // {
+ // diag_log text format["%1: %2", _forEachIndex, _x];
+ // } forEach _hp;
+ // } forEach (_this select 1);
+ [DFUNC(doSpall), [_this, _forEachIndex]] call CBA_fnc_execNextFrame;
+ // player sideChat "WEEE";
+ } forEach (_this select 1);
+ };
+ };
+};
diff --git a/addons/frag/functions/fnc_spallTrack.sqf b/addons/frag/functions/fnc_spallTrack.sqf
index afe4bc1931..dd369380b3 100644
--- a/addons/frag/functions/fnc_spallTrack.sqf
+++ b/addons/frag/functions/fnc_spallTrack.sqf
@@ -1,32 +1,32 @@
-//fnc_spallTrack.sqf
-#include "script_component.hpp"
-
-private ["_round", "_multiplier", "_foundObjects", "_foundObjectHPIds", "_delta", "_curPos", "_velocity", "_velocityStep", "_forwardPos", "_intersectsWith", "_index", "_hpId", "_data"];
-_round = _this select 0;
-_multiplier = _this select 1;
-_foundObjects = _this select 2;
-_foundObjectHPIds = _this select 3;
-
-_delta = (1/diag_fps) * _multiplier;
-_curPos = getPosASL _round;
-_velocity = velocity _round;
-
-_velocityStep = _velocity vectorMultiply _delta;
-_forwardPos = _curPos vectorAdd _velocityStep;
-
-_intersectsWith = lineIntersectsWith [_curPos, _forwardPos];
-
-if (count _intersectsWith > 0) then {
- // player sideChat format["inter: %1", _intersectsWith];
- {
- if(!(_x in _foundObjects)) then {
- // diag_log text format["Adding HP: %1", _x];
- _index = (count GVAR(spallHPData));
- _hpId = _x addEventHandler ["hitPart", compile format["[%1, _this] call " + QUOTE(FUNC(spallHP)), _index]];
- _foundObjects set[(count _foundObjects), _x];
- _foundObjectHPIds set[(count _foundObjectHPIds), _hpId];
- _data = [_hpId, _x, typeOf _round, _round, _curPos, _velocity, 0, _foundObjects, _foundObjectHPIds];
- GVAR(spallHPData) set[_index, _data];
- };
- } forEach _intersectsWith;
-};
+//fnc_spallTrack.sqf
+#include "script_component.hpp"
+
+private ["_round", "_multiplier", "_foundObjects", "_foundObjectHPIds", "_delta", "_curPos", "_velocity", "_velocityStep", "_forwardPos", "_intersectsWith", "_index", "_hpId", "_data"];
+_round = _this select 0;
+_multiplier = _this select 1;
+_foundObjects = _this select 2;
+_foundObjectHPIds = _this select 3;
+
+_delta = (1/diag_fps) * _multiplier;
+_curPos = getPosASL _round;
+_velocity = velocity _round;
+
+_velocityStep = _velocity vectorMultiply _delta;
+_forwardPos = _curPos vectorAdd _velocityStep;
+
+_intersectsWith = lineIntersectsWith [_curPos, _forwardPos];
+
+if (count _intersectsWith > 0) then {
+ // player sideChat format["inter: %1", _intersectsWith];
+ {
+ if(!(_x in _foundObjects)) then {
+ // diag_log text format["Adding HP: %1", _x];
+ _index = (count GVAR(spallHPData));
+ _hpId = _x addEventHandler ["hitPart", compile format["[%1, _this] call " + QFUNC(spallHP), _index]];
+ _foundObjects set[(count _foundObjects), _x];
+ _foundObjectHPIds set[(count _foundObjectHPIds), _hpId];
+ _data = [_hpId, _x, typeOf _round, _round, _curPos, _velocity, 0, _foundObjects, _foundObjectHPIds];
+ GVAR(spallHPData) set[_index, _data];
+ };
+ } forEach _intersectsWith;
+};
diff --git a/addons/frag/functions/fnc_startTracing.sqf b/addons/frag/functions/fnc_startTracing.sqf
index 5c0c8aaf77..ca9aa8c84e 100644
--- a/addons/frag/functions/fnc_startTracing.sqf
+++ b/addons/frag/functions/fnc_startTracing.sqf
@@ -1,5 +1,5 @@
-#include "script_component.hpp"
-if(!GVAR(tracesStarted)) then {
- GVAR(tracesStarted) = true;
- GVAR(traceID) = [FUNC(drawTraces), 0, []] call CBA_fnc_addPerFrameHandler;
-};
+#include "script_component.hpp"
+if(!GVAR(tracesStarted)) then {
+ GVAR(tracesStarted) = true;
+ GVAR(traceID) = [FUNC(drawTraces), 0, []] call CBA_fnc_addPerFrameHandler;
+};
diff --git a/addons/frag/functions/fnc_stopTracing.sqf b/addons/frag/functions/fnc_stopTracing.sqf
index f8ddf42084..b58352c897 100644
--- a/addons/frag/functions/fnc_stopTracing.sqf
+++ b/addons/frag/functions/fnc_stopTracing.sqf
@@ -1,5 +1,5 @@
-#include "script_component.hpp"
-if(GVAR(tracesStarted)) then {
- GVAR(tracesStarted) = false;
- [GVAR(traceID)] call CBA_fnc_removePerFrameHandler;
-};
+#include "script_component.hpp"
+if(GVAR(tracesStarted)) then {
+ GVAR(tracesStarted) = false;
+ [GVAR(traceID)] call CBA_fnc_removePerFrameHandler;
+};
diff --git a/addons/frag/functions/fnc_trackTrace.sqf b/addons/frag/functions/fnc_trackTrace.sqf
index 24910db163..d9407c3f8d 100644
--- a/addons/frag/functions/fnc_trackTrace.sqf
+++ b/addons/frag/functions/fnc_trackTrace.sqf
@@ -1,14 +1,14 @@
-#include "script_component.hpp"
-
-private ["_params", "_tracerObj", "_index", "_positions", "_data"];
-_params = _this select 0;
-_tracerObj = _params select 0;
-_index = _params select 1;
-
-if (alive _tracerObj && (count GVAR(traces)) > 0) then {
- _data = GVAR(traces) select _index;
- _positions = _data select 4;
- _positions set [(count _positions), [(getPos _tracerObj), vectorMagnitude (velocity _tracerObj)]];
-} else {
- [(_this select 1)] call CBA_fnc_removePerFrameHandler;
-};
+#include "script_component.hpp"
+
+private ["_params", "_tracerObj", "_index", "_positions", "_data"];
+_params = _this select 0;
+_tracerObj = _params select 0;
+_index = _params select 1;
+
+if (alive _tracerObj && (count GVAR(traces)) > 0) then {
+ _data = GVAR(traces) select _index;
+ _positions = _data select 4;
+ _positions set [(count _positions), [(getPos _tracerObj), vectorMagnitude (velocity _tracerObj)]];
+} else {
+ [(_this select 1)] call CBA_fnc_removePerFrameHandler;
+};
diff --git a/addons/frag/script_component.hpp b/addons/frag/script_component.hpp
index 1faa440294..b75c58452a 100644
--- a/addons/frag/script_component.hpp
+++ b/addons/frag/script_component.hpp
@@ -1,20 +1,20 @@
-#define COMPONENT frag
-#include "\z\ace\addons\main\script_mod.hpp"
-
-//#define DEBUG_ENABLED_FRAG
-// #define DEBUG_MODE_FULL
-// #define DISABLE_COMPILE_CACHE
-// #define CBA_DEBUG_SYNCHRONOUS
-// #define ENABLE_PERFORMANCE_COUNTERS
-
-#ifdef DEBUG_ENABLED_FRAG
- #define DEBUG_MODE_FULL
-#endif
-
-#ifdef DEBUG_SETTINGS_FRAG
- #define DEBUG_SETTINGS DEBUG_SETTINGS_FRAG
-#endif
-
-#include "\z\ace\addons\main\script_macros.hpp"
-
+#define COMPONENT frag
+#include "\z\ace\addons\main\script_mod.hpp"
+
+//#define DEBUG_ENABLED_FRAG
+// #define DEBUG_MODE_FULL
+// #define DISABLE_COMPILE_CACHE
+// #define CBA_DEBUG_SYNCHRONOUS
+// #define ENABLE_PERFORMANCE_COUNTERS
+
+#ifdef DEBUG_ENABLED_FRAG
+ #define DEBUG_MODE_FULL
+#endif
+
+#ifdef DEBUG_SETTINGS_FRAG
+ #define DEBUG_SETTINGS DEBUG_SETTINGS_FRAG
+#endif
+
+#include "\z\ace\addons\main\script_macros.hpp"
+
#define ACE_TRACE_DRAW_INC 1
\ No newline at end of file
diff --git a/addons/frag/stringtable.xml b/addons/frag/stringtable.xml
index b3b848ba7d..c7afb23097 100644
--- a/addons/frag/stringtable.xml
+++ b/addons/frag/stringtable.xml
@@ -11,6 +11,7 @@
Simulation de la fragmentation
Repesz-szimuláció
Симуляция осколков
+ Simulazione Frammentazione
Fragmentation Simulation
@@ -22,6 +23,7 @@
Simulation de la fragmentation
Repesz-szimuláció
Симуляция осколков
+ Simulazione Frammentazione
Enable the ACE Fragmentation Simulation
@@ -33,6 +35,7 @@
Active la simulation ACE de la fragmentation
Az ACE repesz-szimuláció engedélyezése
Включить симуляцию осколков ACE
+ Abilita la Simulazione Frammentazione di ACE
Spalling Simulation
@@ -44,6 +47,7 @@
Simulation d'éclat
Pattogzás-szimuláció
Симуляция обломков
+ Simulazione Spalling
Enable the ACE Spalling Simulation
@@ -55,12 +59,25 @@
Active la simulation d'éclat ACE
Az ACE pattogzás-szimuláció engedélyezése
Включить симуляцию обломков ACE
+ Abilita la Simulazione Spalling di ACE
Explosion Reflections Simulation
+ Symulacja odbicia eksplozji
+ Simulazione Riflessi Esplosioni
+ Druckwellensimulation
+ Activar simulación de reflexiones
+ Simulation de la réflection des explosions.
+ Simulação de reflexo de explosão
Enable the ACE Explosion Reflection Simulation
+ Włącz symulację odbicia eksplozji ACE
+ Abilita la Simulazione Riflessi Esplosioni di ACE
+ Aktiviere die ACE-Druckwellensimulation
+ Activa la simulación de reflexiones para las explosiones.
+ Activer la simulation de la réfléction des explosions ACE.
+ Ativa a simulação de reflexo de explosão do ACE
Maximum Projectiles Tracked
@@ -72,6 +89,7 @@
Nombre maximum de projectile suivis
Maximum követett repeszek
Макс. количество отслеживаемых снарядов
+ Numero massimo di Proiettili Tracciati
This setting controls the maximum amount of projectiles the fragmentation and spalling system will track at any given time. If more projectiles are fired, they will not be tracked. Lower this setting if you do not want FPS drops at high-count projectile scenarios ( >200 rounds in the air at once)
@@ -80,9 +98,10 @@
Diese Einstellung steuert die maximale Anzahl an Projektilen, die das Splitter- und Explosionssystem gleichzeitig verfolgen wird. Wenn mehr Projektile abgefeuert werden, werden sie nicht verfolgt werden. Diese Einstellung zu verringern, kann FPS-Einbrüche bei Szenarien mit vielen Projektilen verhindern (>200 Objekte gleichzeitig in der Luft)
Toto nastavení kontroluje maximální množství projektilů z fragmentace a úlomků, která jsou sledována v dané době. Pokud je vystřeleno více projektilů, tak nebudou sledovány. Snižte toto nastavení pokud si nepřejete propady FPS v situacích, kde je velké množství projektilů ( >200 nábojů najednou ve vzduchu)
Esta definição controla a quantidade máxima de projéteis que o sistema de fragmentação e estilhaçamento irá acompanhar em qualquer momento. Se mais projéteis são disparados, eles não serão rastreados. Diminua essa configuração se você não quiser que o FPS caia em cenários com alta contagem de projéteis (> 200 projéteis no ar ao mesmo tempo)
- Cette option controle le nombre maximum de projectile et d'éclat résultant de la fragmentation que le système suivra à un moment T. Si plus de projectiles sont générés, ils ne seront pas pris en compte. Baisser cette option si vous ne voulez pas de baisse de FPS en cas d'un nombre important de projectiles (>200 éclats en même temps)
+ Cette option contrôle le nombre maximum de projectiles et d'éclats résultant de la fragmentation que le système suivra à un moment T. Si plus de projectiles sont générés, ils ne seront pas pris en compte. Baisser cette option si vous ne voulez pas de baisse de FPS en cas d'un nombre important de projectiles (>200 éclats en même temps)
Ez a beállítás szabályozza a repeszeződés és pattogzás által kilőtt objektumok követett számát. Ha több ez a szám, ezek az objektumok nem lesznek követve. Csökkentsd ezt a beállítást, ha nem akarsz lassulásokat magas-törmelékmennyiségű helyzetekben (200+ repesz a levegőben egyszerre)
Эта настройка контролирует максимальное количество снарядов, которок отслеживает система осколков и обломков в каждый момент времени. Снаряды, выстреленные сверх этого числа, отслеживаться не будут. Уменьшите это значение, если вы не хотите падения FPS при большом количестве снарядов в одной перестрелке (> 200 одновременно летящих снарядов)
+ Questo parametro controlla il numero massimo di proiettili che la frammentazione e il sistema di spalling tracciano in ogni momento. Se più proiettili sono sparati, non verranno tracciati. Abbassa questo parametro se non vuoi cali di FPS in scenari con molti proiettili (>200 proiettili in aria contemporaneamente)
Maximum Projectiles Per Frame
@@ -91,9 +110,10 @@
Maks. liczba pocisków na klatkę
Maximální počet projektilů za jeden snímek
Projéteis máximos por quadro
- Nombre maximal de projectile par image
+ Nombre maximal de projectiles par image
Maximum repesz/képkocka
Макс. количество снарядов за кадр
+ Numero massimo di proiettili per Frame
The number of spall track calculations to perform in any given frame. This helps spread the FPS impact of tracking spall rounds across multiple frames, limiting its impact even further.
@@ -102,9 +122,10 @@
El número de cálculos de esquirlas que se hará en cualquier cuadro. Esto ayuda a dispersar el impacto en FPS del seguimiento de esquirlas de balas a través de múltiples cuadros, lo que limita aún más su impacto.
Počet úlomků v daném snímku. Toto pomáhá rozšířit FPS dopad sledovaného úlomku napříč více snímky, omezuje jeho vliv ještě více.
O número de cálculos por estilhaço rastreado para executar em qualquer quadro. Isso ajuda a distribuir o impacto no FPS do rastreamento de estilhaço em vários quadros, o que limita o seu impacto ainda mais.
- Le nombre d'éclat à calculer dans chaque images. Ceci permet de diffuser l'impact sur les FPS dans de multiples images, le limitant d'autant plus.
+ Le nombre d'éclats à calculer dans chaque image. Ceci permet de diffuser l'impact sur les FPS dans de multiples images, limitant la perte de FPS.
A lepattogzási útvonalak számításának darabjai képkockánként. Ez eloszlatja az FPS-megszakadást több képkockára, ezzel csökkentve a súlyosságát.
Число обрабатываемых осколков за кадр. Это позволяет распределить нагрузку по отслеживанию осколков между несколькими кадрами, чтобы предотвратить падение FPS.
+ Il numero di calcoli per tracciamento di spalling ad ogni frame. Questo aiuta a distribuire l'impatto del tracciamento dello spalling su più frame, limitando ancora di più l'impatto.
(SP Only) Frag/Spall Debug Tracing
@@ -116,6 +137,7 @@
(SP uniquement) Fragmentation/éclat debug
(Csak SP) Repesz/Pattogzás debug követés
(Только для одиночной игры) Отслеживаение/отладка осколков
+ (Solo SP) Debug Tracciamento Frag/Spall
(SP Only) Requires a mission/editor restart. Enables visual tracing of fragmentation and spalling rounds in SP game mode only.
@@ -127,6 +149,7 @@
(SP seulement) Requiert un redémarrage de mission ou de l'éditeur. Active les traceurs visuels de fragmentation et d'éclats en mode solo seulement
(Csak SP) Küldetés/Editor újraindítás szükséges. Engedélyezi a repeszek és pattogzó lövedékek vizuális nyomkövetését, csak egyjátékos módok alatt.
(Только для одиночной игры) Требует перезапуска миссии/редактора. Включает визуальные следы от осколков и обломков в режиме одиночной игры.
+ (Solo SP) Richiede un restart editor/missione. Abilita il tracciamento visivo di schegge da frammentazione/spalling in modalità Giocatore Singolo.
-
\ No newline at end of file
+
diff --git a/addons/gestures/ACE_Settings.hpp b/addons/gestures/ACE_Settings.hpp
index a9e77807c0..8ed8aedb6b 100644
--- a/addons/gestures/ACE_Settings.hpp
+++ b/addons/gestures/ACE_Settings.hpp
@@ -4,8 +4,8 @@ class ACE_Settings {
typeName = "SCALAR";
isClientSettable = 1;
category = ECSTRING(interact_menu,Category_InteractionMenu);
- displayName = CSTRING(showOnInteractionMenu_displayName);
- description = CSTRING(showOnInteractionMenu_description);
- values[] = {"$STR_A3_OPTIONS_DISABLED", CSTRING(justKeybinds), CSTRING(keysAndInteractionMenu)};
+ displayName = CSTRING(ShowOnInteractionMenu_displayName);
+ description = CSTRING(ShowOnInteractionMenu_description);
+ values[] = {"$STR_A3_OPTIONS_DISABLED", CSTRING(JustKeybinds), CSTRING(KeysAndInteractionMenu)};
};
};
diff --git a/addons/gestures/CfgEventHandlers.hpp b/addons/gestures/CfgEventHandlers.hpp
index 7b003bbe8c..83a4cf763c 100644
--- a/addons/gestures/CfgEventHandlers.hpp
+++ b/addons/gestures/CfgEventHandlers.hpp
@@ -1,6 +1,13 @@
+
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
- init = QUOTE( call COMPILE_FILE(XEH_preInit) );
+ init = QUOTE(call COMPILE_FILE(XEH_preInit));
};
};
@@ -9,3 +16,9 @@ class Extended_PostInit_EventHandlers {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
};
};
+
+class Extended_DisplayLoad_EventHandlers {
+ class RscDisplayMission {
+ ADDON = QUOTE(_this call COMPILE_FILE(XEH_missionDisplayLoad));
+ };
+};
diff --git a/addons/gestures/CfgVehicles.hpp b/addons/gestures/CfgVehicles.hpp
index 6ada84c736..2c099bcc45 100644
--- a/addons/gestures/CfgVehicles.hpp
+++ b/addons/gestures/CfgVehicles.hpp
@@ -9,134 +9,107 @@ class CfgVehicles {
statement = "";
showDisabled = 1;
priority = 3.5;
- icon = PATHTOF(UI\gestures_ca.paa);
+ icon = QPATHTOF(UI\gestures_ca.paa);
class GVAR(Advance) {
- displayName = CSTRING(BIgestureAdvance);
- condition = QUOTE(canStand _target);
+ displayName = CSTRING(Advance);
+ condition = QUOTE(true);
statement = QUOTE(_target playActionNow 'gestureAdvance';);
showDisabled = 1;
priority = 1.9;
};
class GVAR(Go) {
- displayName = CSTRING(BIgestureGo);
- condition = QUOTE(canStand _target);
+ displayName = CSTRING(Go);
+ condition = QUOTE(true);
statement = QUOTE(_target playActionNow ([ARR_2('gestureGo','gestureGoB')] select floor random 2););
showDisabled = 1;
priority = 1.8;
};
class GVAR(Follow) {
- displayName = CSTRING(BIgestureFollow);
- condition = QUOTE(canStand _target);
+ displayName = CSTRING(Follow);
+ condition = QUOTE(true);
statement = QUOTE(_target playActionNow 'gestureFollow';);
showDisabled = 1;
priority = 1.7;
};
class GVAR(Up) {
- displayName = CSTRING(BIgestureUp);
- condition = QUOTE(canStand _target);
+ displayName = CSTRING(Up);
+ condition = QUOTE(true);
statement = QUOTE(_target playActionNow 'gestureUp';);
showDisabled = 1;
priority = 1.5;
};
class GVAR(CeaseFire) {
- displayName = CSTRING(BIgestureCeaseFire);
- condition = QUOTE(canStand _target);
+ displayName = CSTRING(CeaseFire);
+ condition = QUOTE(true);
statement = QUOTE(_target playActionNow 'gestureCeaseFire';);
showDisabled = 1;
priority = 1.3;
};
- class GVAR(Freeze) {
- displayName = CSTRING(BIgestureFreeze);
- condition = QUOTE(canStand _target);
- statement = QUOTE(_target playActionNow 'gestureFreeze';);
+ class GVAR(Stop) {
+ displayName = CSTRING(Stop);
+ condition = QUOTE(true);
+ statement = QUOTE(_target playActionNow 'gestureFreeze';); // BI animation - is actualls "stop" in all stances but prone
showDisabled = 1;
priority = 1.2;
};
class GVAR(Forward) {
- displayName = CSTRING(forward);
- condition = QUOTE(canStand _target && GVAR(ReloadMutex));
+ displayName = CSTRING(Forward);
+ condition = QUOTE(true);
statement = QUOTE(QUOTE(QGVAR(forward)) call FUNC(playSignal));
showDisabled = 1;
priority = 1.9;
};
class GVAR(Regroup) {
- displayName = CSTRING(regroup);
- condition = QUOTE(canStand _target && GVAR(ReloadMutex));
+ displayName = CSTRING(Regroup);
+ condition = QUOTE(true);
statement = QUOTE(QUOTE(QGVAR(regroup)) call FUNC(playSignal));
showDisabled = 1;
priority = 1.8;
};
- class GVAR(Stop) {
- displayName = CSTRING(stop);
- condition = QUOTE(canStand _target && GVAR(ReloadMutex));
- statement = QUOTE(QUOTE(QGVAR(stop)) call FUNC(playSignal));
+ class GVAR(Freeze) {
+ displayName = CSTRING(Freeze);
+ condition = QUOTE(true);
+ statement = QUOTE(QUOTE(QGVAR(freeze)) call FUNC(playSignal));
showDisabled = 1;
priority = 1.7;
};
class GVAR(Cover) {
- displayName = CSTRING(cover);
- condition = QUOTE(canStand _target && GVAR(ReloadMutex));
+ displayName = CSTRING(Cover);
+ condition = QUOTE(true);
statement = QUOTE(QUOTE(QGVAR(cover)) call FUNC(playSignal));
showDisabled = 1;
priority = 1.6;
};
class GVAR(Point) {
- displayName = CSTRING(point);
- condition = QUOTE(canStand _target && GVAR(ReloadMutex));
+ displayName = CSTRING(Point);
+ condition = QUOTE(true);
statement = QUOTE(QUOTE(QGVAR(point)) call FUNC(playSignal));
showDisabled = 1;
priority = 1.5;
};
class GVAR(Engage) {
- displayName = CSTRING(engage);
- condition = QUOTE(canStand _target && GVAR(ReloadMutex));
+ displayName = CSTRING(Engage);
+ condition = QUOTE(true);
statement = QUOTE(QUOTE(QGVAR(engage)) call FUNC(playSignal));
showDisabled = 1;
priority = 1.4;
};
class GVAR(Hold) {
- displayName = CSTRING(hold);
- condition = QUOTE(canStand _target && GVAR(ReloadMutex));
+ displayName = CSTRING(Hold);
+ condition = QUOTE(true);
statement = QUOTE(QUOTE(QGVAR(hold)) call FUNC(playSignal));
showDisabled = 1;
priority = 1.3;
};
class GVAR(Warning) {
- displayName = CSTRING(warning);
- condition = QUOTE(canStand _target && GVAR(ReloadMutex));
+ displayName = CSTRING(Warning);
+ condition = QUOTE(true);
statement = QUOTE(QUOTE(QGVAR(warning)) call FUNC(playSignal));
showDisabled = 1;
priority = 1.2;
};
- /*
- class class GVAR(Yes) {
- displayName = ECSTRING(common,Yes);
- condition = QUOTE(canStand _target);
- statement = QUOTE(_target playActionNow ([ARR_2('gestureYes','gestureNod')] select floor random 2););
- showDisabled = 1;
- priority = 1.1;
- };
-
- class class GVAR(No) {
- displayName = ECSTRING(common,No);
- condition = QUOTE(canStand _target);
- statement = QUOTE(_target playActionNow 'gestureNo';);
- showDisabled = 1;
- priority = 1.0;
- };
-
- class class GVAR(Hi) {
- displayName = CSTRING(Gestures_Hi);
- condition = QUOTE(canStand _target);
- statement = QUOTE(_target playActionNow ([ARR_3('gestureHi','gestureHiB','gestureHiC')] select floor random 3););
- showDisabled = 1;
- priority = 0.9;
- };
- */
-
};
-
};
};
};
diff --git a/addons/gestures/README.md b/addons/gestures/README.md
new file mode 100644
index 0000000000..e224ff6d69
--- /dev/null
+++ b/addons/gestures/README.md
@@ -0,0 +1,11 @@
+ace_gestures
+========
+
+Gestures system in interaction menu and keybinds.
+
+
+## Maintainers
+
+The people responsible for merging changes to this component or answering potential questions.
+
+- [jokoho48](https://github.com/jokoho48)
diff --git a/addons/gestures/XEH_PREP.hpp b/addons/gestures/XEH_PREP.hpp
new file mode 100644
index 0000000000..dba0c4d0cc
--- /dev/null
+++ b/addons/gestures/XEH_PREP.hpp
@@ -0,0 +1,2 @@
+
+PREP(playSignal);
diff --git a/addons/gestures/XEH_missionDisplayLoad.sqf b/addons/gestures/XEH_missionDisplayLoad.sqf
new file mode 100644
index 0000000000..856f361d3a
--- /dev/null
+++ b/addons/gestures/XEH_missionDisplayLoad.sqf
@@ -0,0 +1,32 @@
+#include "script_component.hpp"
+
+disableSerialization;
+
+params ["_display"];
+
+_display displayAddEventHandler ["KeyDown", {
+ if ((_this select 1) in actionKeys "ReloadMagazine") then {
+ if (isNull ACE_player || {!alive ACE_player}) exitWith {false};
+
+ private _weapon = currentWeapon ACE_player;
+
+ if (_weapon != "") then {
+ GVAR(ReloadMutex) = false;
+
+ private _gesture = getText (configfile >> "CfgWeapons" >> _weapon >> "reloadAction");
+ private _isLauncher = _weapon isKindOf ["Launcher", configFile >> "CfgWeapons"];
+ private _config = ["CfgGesturesMale", "CfgMovesMaleSdr"] select _isLauncher;
+ private _duration = getNumber (configfile >> _config >> "States" >> _gesture >> "speed");
+
+ if (_duration != 0) then {
+ _duration = if (_duration < 0) then { abs _duration } else { 1 / _duration };
+ } else {
+ _duration = 3;
+ };
+
+ TRACE_2("Reloading, blocking gestures",_weapon,_duration);
+ [{GVAR(ReloadMutex) = true;}, [], _duration] call CBA_fnc_waitAndExecute;
+ };
+ };
+ false
+}];
diff --git a/addons/gestures/XEH_postInit.sqf b/addons/gestures/XEH_postInit.sqf
index fec57ab111..6d9e057e29 100644
--- a/addons/gestures/XEH_postInit.sqf
+++ b/addons/gestures/XEH_postInit.sqf
@@ -2,37 +2,48 @@
if (!hasInterface) exitWith {};
-#include "key.sqf"
-
// reload mutex, you can't play signal while reloading
GVAR(ReloadMutex) = true;
-// Event for main display to be loaded:
-["mainDisplayLoaded", {
- // handle reloading
- (findDisplay 46) displayAddEventHandler ["KeyDown", {
- if ((_this select 1) in actionKeys "ReloadMagazine") then {
- if ((isNull ACE_player) || {!alive ACE_player}) exitWith {false};
- private _weapon = currentWeapon ACE_player;
+// Add keybinds
+{
+ _x params ["_currentName", "_key", ["_vanillaKey", false] ];
- if (_weapon != "") then {
- GVAR(ReloadMutex) = false;
+ // Don't add "ace_gestures_" prefix to BI gestures
+ private _signalName = if (_vanillaKey) then {
+ format ["BIgesture%1", _currentName];
+ } else {
+ format [QGVAR(%1), _currentName];
+ };
- private _gesture = getText (configfile >> "CfgWeapons" >> _weapon >> "reloadAction");
- private _isLauncher = _weapon isKindOf ["Launcher", (configFile >> "CfgWeapons")];
- private _config = ["CfgGesturesMale", "CfgMovesMaleSdr"] select _isLauncher;
- private _duration = getNumber (configfile >> _config >> "States" >> _gesture >> "speed");
+ private _code = compile format [QUOTE('%1' call FUNC(playSignal)), _signalName];
- if (_duration != 0) then {
- _duration = if (_duration < 0) then { abs _duration } else { 1 / _duration };
- } else {
- _duration = 3;
- };
+ TRACE_4("Adding KeyBind",_currentName,_signalName,_code,_key);
- TRACE_2("Reloading, blocking gestures",_weapon,_duration);
- [{GVAR(ReloadMutex) = true;}, [], _duration] call EFUNC(common,waitAndExecute);
- };
- };
+ [
+ "ACE3 Gestures",
+ _currentName,
+ localize format [LSTRING(%1), _currentName],
+ _code,
+ {false},
+ [_key, [false, (_key != -1), false]],
false
- }];
-}] call EFUNC(common,addEventHandler);
+ ] call CBA_fnc_addKeybind;
+
+ false
+} count [
+ ["Freeze", 80], // Numpad 2
+ ["Cover", 81], // Numpad 3
+ ["Forward", 75], // Numpad 4
+ ["Regroup", 76], // Numpad 5
+ ["Engage", 77], // Numpad 6
+ ["Point", 71], // Numpad 7
+ ["Hold", 72], // Numpad 8
+ ["Warning", 73], // Numpad 9
+ ["Go", -1, true],
+ ["Advance", -1, true],
+ ["Follow", -1, true],
+ ["Up", -1, true],
+ ["Stop", -1, true],
+ ["CeaseFire", -1, true]
+];
diff --git a/addons/gestures/XEH_preInit.sqf b/addons/gestures/XEH_preInit.sqf
index 7fd2bb47f2..a7feade1c3 100644
--- a/addons/gestures/XEH_preInit.sqf
+++ b/addons/gestures/XEH_preInit.sqf
@@ -2,6 +2,6 @@
ADDON = false;
-PREP(playSignal);
+#include "XEH_PREP.hpp"
ADDON = true;
diff --git a/addons/gestures/XEH_preStart.sqf b/addons/gestures/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/gestures/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/gestures/anim/ace_stop.rtm b/addons/gestures/anim/ace_freeze.rtm
similarity index 100%
rename from addons/gestures/anim/ace_stop.rtm
rename to addons/gestures/anim/ace_freeze.rtm
diff --git a/addons/gestures/anim/ace_stop_stand_lowered.rtm b/addons/gestures/anim/ace_freeze_stand_lowered.rtm
similarity index 100%
rename from addons/gestures/anim/ace_stop_stand_lowered.rtm
rename to addons/gestures/anim/ace_freeze_stand_lowered.rtm
diff --git a/addons/gestures/cfgMovesBasic.hpp b/addons/gestures/cfgMovesBasic.hpp
index a708787fd5..30e2d4d2dd 100644
--- a/addons/gestures/cfgMovesBasic.hpp
+++ b/addons/gestures/cfgMovesBasic.hpp
@@ -1,7 +1,7 @@
class CfgMovesBasic {
class ManActions {
GVAR(forward) = QGVAR(forward);
- GVAR(stop) = QGVAR(stop);
+ GVAR(freeze) = QGVAR(freeze);
GVAR(cover) = QGVAR(cover);
GVAR(regroup) = QGVAR(regroup);
GVAR(engage) = QGVAR(engage);
@@ -10,7 +10,7 @@ class CfgMovesBasic {
GVAR(warning) = QGVAR(warningS);
GVAR(forwardStandLowered) = QGVAR(forwardStandLowered);
- GVAR(stopStandLowered) = QGVAR(stopStandLowered);
+ GVAR(freezeStandLowered) = QGVAR(freezeStandLowered);
GVAR(coverStandLowered) = QGVAR(coverStandLowered);
GVAR(regroupStandLowered) = QGVAR(regroupStandLowered);
GVAR(engageStandLowered) = QGVAR(engageStandLowered);
@@ -22,7 +22,7 @@ class CfgMovesBasic {
class Actions {
class NoActions: ManActions {
GVAR(forward)[] = {QGVAR(forward), "Gesture"};
- GVAR(stop)[] = {QGVAR(stop), "Gesture"};
+ GVAR(freeze)[] = {QGVAR(freeze), "Gesture"};
GVAR(cover)[] = {QGVAR(cover), "Gesture"};
GVAR(regroup)[] = {QGVAR(regroup), "Gesture"};
GVAR(engage)[] = {QGVAR(engage), "Gesture"};
@@ -31,7 +31,7 @@ class CfgMovesBasic {
GVAR(warning)[] = {QGVAR(warning), "Gesture"};
GVAR(forwardStandLowered)[] = {QGVAR(forwardStandLowered), "Gesture"};
- GVAR(stopStandLowered)[] = {QGVAR(stopStandLowered), "Gesture"};
+ GVAR(freezeStandLowered)[] = {QGVAR(freezeStandLowered), "Gesture"};
GVAR(coverStandLowered)[] = {QGVAR(coverStandLowered), "Gesture"};
GVAR(regroupStandLowered)[] = {QGVAR(regroupStandLowered), "Gesture"};
GVAR(engageStandLowered)[] = {QGVAR(engageStandLowered), "Gesture"};
@@ -126,75 +126,75 @@ class CfgGesturesMale {
};
class GVAR(forward): GVAR(Base) {
- file = QUOTE(PATHTOF(anim\ace_forward.rtm));
+ file = QPATHTOF(anim\ace_forward.rtm);
speed = 1;
};
class GVAR(forwardStandLowered): GVAR(forward) {
- file = QUOTE(PATHTOF(anim\ace_forward_stand_lowered.rtm));
+ file = QPATHTOF(anim\ace_forward_stand_lowered.rtm);
};
- class GVAR(stop): GVAR(forward) {
- file = QUOTE(PATHTOF(anim\ace_stop.rtm));
+ class GVAR(freeze): GVAR(forward) {
+ file = QPATHTOF(anim\ace_freeze.rtm);
speed = 0.6;
};
- class GVAR(stopStandLowered): GVAR(stop) {
- file = QUOTE(PATHTOF(anim\ace_stop_stand_lowered.rtm));
+ class GVAR(freezeStandLowered): GVAR(freeze) {
+ file = QPATHTOF(anim\ace_freeze_stand_lowered.rtm);
};
class GVAR(cover): GVAR(forward) {
- file = QUOTE(PATHTOF(anim\ace_cover.rtm));
+ file = QPATHTOF(anim\ace_cover.rtm);
speed = 0.8;
};
class GVAR(coverStandLowered): GVAR(cover) {
- file = QUOTE(PATHTOF(anim\ace_cover_stand_lowered.rtm));
+ file = QPATHTOF(anim\ace_cover_stand_lowered.rtm);
};
class GVAR(regroup): GVAR(forward) {
- file = QUOTE(PATHTOF(anim\ace_regroup.rtm));
+ file = QPATHTOF(anim\ace_regroup.rtm);
speed = 0.8;
};
class GVAR(regroupStandLowered): GVAR(regroup) {
- file = QUOTE(PATHTOF(anim\ace_regroup_stand_lowered.rtm));
+ file = QPATHTOF(anim\ace_regroup_stand_lowered.rtm);
};
class GVAR(engage): GVAR(forward) {
- file = QUOTE(PATHTOF(anim\ace_engage.rtm));
+ file = QPATHTOF(anim\ace_engage.rtm);
speed = 0.9;
};
class GVAR(engageStandLowered): GVAR(engage) {
- file = QUOTE(PATHTOF(anim\ace_engage_stand_lowered.rtm));
+ file = QPATHTOF(anim\ace_engage_stand_lowered.rtm);
};
class GVAR(point): GVAR(forward) {
- file = QUOTE(PATHTOF(anim\ace_point.rtm));
+ file = QPATHTOF(anim\ace_point.rtm);
speed = 0.8;
};
class GVAR(pointStandLowered): GVAR(point) {
- file = QUOTE(PATHTOF(anim\ace_point_stand_lowered.rtm));
+ file = QPATHTOF(anim\ace_point_stand_lowered.rtm);
};
class GVAR(hold): GVAR(forward) {
- file = QUOTE(PATHTOF(anim\ace_hold.rtm));
+ file = QPATHTOF(anim\ace_hold.rtm);
speed = 0.8;
};
class GVAR(holdStandLowered): GVAR(hold) {
- file = QUOTE(PATHTOF(anim\ace_hold_stand_lowered.rtm));
+ file = QPATHTOF(anim\ace_hold_stand_lowered.rtm);
};
class GVAR(warning): GVAR(forward) {
- file = QUOTE(PATHTOF(anim\ace_warning.rtm));
+ file = QPATHTOF(anim\ace_warning.rtm);
speed = 0.8;
};
class GVAR(warningStandLowered): GVAR(warning) {
- file = QUOTE(PATHTOF(anim\ace_warning_stand_lowered.rtm));
+ file = QPATHTOF(anim\ace_warning_stand_lowered.rtm);
};
};
};
diff --git a/addons/gestures/config.cpp b/addons/gestures/config.cpp
index 39cb8f0951..660c1eeff5 100644
--- a/addons/gestures/config.cpp
+++ b/addons/gestures/config.cpp
@@ -6,8 +6,9 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_interact_menu"};
- author[] = {"joko // Jonas", "Emperias", "Zigomarvin"};
- authorUrl = "https://github.com/commy2/";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"joko // Jonas", "Emperias", "Zigomarvin"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
diff --git a/addons/gestures/functions/fnc_playSignal.sqf b/addons/gestures/functions/fnc_playSignal.sqf
index feb79f5370..8f20c690ef 100644
--- a/addons/gestures/functions/fnc_playSignal.sqf
+++ b/addons/gestures/functions/fnc_playSignal.sqf
@@ -14,7 +14,7 @@
* Public: No
*/
#include "script_component.hpp"
-
+
TRACE_1("params",_this);
if (!GVAR(ReloadMutex)) exitWith {false};
diff --git a/addons/gestures/key.sqf b/addons/gestures/key.sqf
deleted file mode 100644
index 54d6d50c0c..0000000000
--- a/addons/gestures/key.sqf
+++ /dev/null
@@ -1,42 +0,0 @@
-#include "\a3\editor_f\Data\Scripts\dikCodes.h"
-
-{
- _x params ["_currentName","_key"];
-
- private _signalName = format [QGVAR(%1), _currentName];
- if (_currentName select [0,2] == "BI") then {
- //Don't add "ace_gestures_" prefix to BI gestures
- _signalName = _currentName;
- };
-
- private _code = (compile format [QUOTE('%1' call FUNC(playSignal);), _signalName]);
-
- TRACE_4("Adding KeyBind",_currentName,_signalName,_code,_key);
-
- [
- "ACE3 Gestures",
- _currentName,
- localize format[LSTRING(%1), _currentName],
- _code,
- {false},
- [_key, [false, (_key != -1), false]],
- false
- ] call CBA_fnc_addKeybind;
-
- false
-} count [
- ["stop", DIK_NUMPAD2],
- ["cover", DIK_NUMPAD3],
- ["forward", DIK_NUMPAD4],
- ["regroup", DIK_NUMPAD5],
- ["engage", DIK_NUMPAD6],
- ["point", DIK_NUMPAD7],
- ["hold", DIK_NUMPAD8],
- ["warning", DIK_NUMPAD9],
- ["BIgestureGo", -1],
- ["BIgestureAdvance", -1],
- ["BIgestureFollow", -1],
- ["BIgestureUp", -1],
- ["BIgestureFreeze", -1],
- ["BIgestureCeaseFire", -1]
-];
diff --git a/addons/gestures/stringtable.xml b/addons/gestures/stringtable.xml
index c3974ff144..bd9474f8c1 100644
--- a/addons/gestures/stringtable.xml
+++ b/addons/gestures/stringtable.xml
@@ -25,7 +25,7 @@
Gestos
Gesti
-
+
Advance
Vordringen
Avanzar
@@ -37,7 +37,7 @@
Avançar
Avanzare
-
+
Go
Los
Adelante
@@ -49,7 +49,7 @@
Mover-se
Muoversi
-
+
Follow
Folgen
Seguirme
@@ -61,7 +61,7 @@
Seguir
Seguire
-
+
Up
Aufstehen
Arriba
@@ -73,7 +73,7 @@
Acima
Alzarsi
-
+
Cease Fire
Feuer einstellen
Alto el fuego
@@ -85,19 +85,18 @@
Cessar Fogo
Cessare il Fuoco
-
- Point
- Zeigen
- Señalar
- Wskazać
- Ukázat
- Pointer
- Показать направление
- Mutat
- Apontar
- Puntare a
+
+ Stop
+ Stop
+ Halt
+ Stop
+ Стоп
+ Parar
+ Stop
+ Stop
+ Detenerse
-
+
Freeze
Keine Bewegung
Alto
@@ -109,18 +108,7 @@
Alto
Fermi
-
-
- Stop
- Stop
- Stop
- Stop
- Стоп
- Parar
- Stop
-
-
-
+
Cover
Deckung
Cubrirse
@@ -132,8 +120,7 @@
Proteger-se
Copertura
-
-
+
Rally up
Regroupement
Sammeln
@@ -141,9 +128,10 @@
Собраться
Reagrupar
Přeskupit
+ Raggruppare
+ Reunirse
-
-
+
Move forward
En avant
Vorwärts Bewegen
@@ -151,18 +139,21 @@
Вперед
Mover em frente
Kupředu
+ Muovere avanti
+ Avanzar
-
-
+
Engage
+ Angriff
Engager
Atak
Открыть огонь
Engajar
Útok
+ Ingaggiare
+ Atacar
-
-
+
Point
Pointer
Zeigen
@@ -170,9 +161,10 @@
Показать направление
Ponta
Ukázat
+ Puntare
+ Señalar
-
-
+
Hold
Tenir
Anhalten
@@ -180,9 +172,10 @@
Ждать
Esperar
Čekej
+ Mantenere
+ Esperar
-
-
+
Warning
Attention
Achtung
@@ -190,46 +183,48 @@
Внимание
Aviso
Pozor
+ Attenzione
+ Atención
-
- Hi
- Hallo
- Hola
- Witaj
- Ahoj
- Salut
- Привет
- Helló
- Olá
- Ciao
-
-
- Attack
- Angreifen
- Atacar
- Do ataku
- Zaútočit
- Attaquer
- Атаковать
- Támadás
- Atacar
- Attaccare
-
-
Map illumination?
@@ -22,6 +23,7 @@
Luminosité
Térkép megvilágítása?
Освещение карты?
+ Illuminazione Mappa?
Simulate map lighting based on ambient lighting and player's items?
@@ -32,6 +34,7 @@
Simular a luz do mapa baseado em luz ambiente e itens do jogador?
Simular iluminación de mapa basada en la iluminación ambiente y los elementos de los jugadores?
Simulovat nasvícení mapy v závisloti na okolí a předmětů hráče?
+ Simula illuminazione della mappa in base alla luce ambientale e agli oggetti del giocatore?
Map flashlight glow?
@@ -41,6 +44,8 @@
Brilho de lanterna no mapa?
Resplandor de linterna en el mapa?
Nasvícení mapy pomocí baterky?
+ Luce della torcia in mappa?
+ Lumière de la lampe de carte
Add external glow to players who use flashlight on map?
@@ -51,6 +56,7 @@
Adicionar brilho externo para jogadores que usam lanterna no mapa?
Añadir resplandor externo a los jugadores que utilizan la linterna en el mapa?
Přidat externí záři hráči který používá baterku v mapě?
+ Aggiungi luce esterna a giocatori che usano la torcia in mappa?
Map shake?
@@ -62,6 +68,7 @@
Tremblement de la carte?
Térkép-rázkódás?
Тряска карты?
+ Scuoti la mappa?
Make map shake when walking?
@@ -73,6 +80,7 @@
La carte tremble lors d'un déplacement ?
Rázkódjon-e a térkép mozgáskor?
Заставлять карту трястись при ходьбе?
+ Far scuotere la mappa mentre cammini?
Limit map zoom?
@@ -84,6 +92,7 @@
Limiter le zoom de la carte?
Térkép-nagyítás korlátozása?
Ограничить приближение карты?
+ Limita lo zoom in mappa?
Limit the amount of zoom available for the map?
@@ -95,6 +104,7 @@
Limite le zoom maximum pour la carte?
Korlátozva legyen-e a nagyítás mennyisége a térképnél?
Ограничить максимальное приближение, доступное на карте?
+ Limita l'ammontare di zoom disponibile per la mappa?
Show cursor coordinates?
@@ -106,6 +116,7 @@
Afficher les coordonnées sur le curseur ?
Kurzor-koordináták mutatása?
Показывать координаты курсора?
+ Mostra coordinate sul cursore?
Show the grid coordinates on the mouse pointer?
@@ -117,6 +128,7 @@
Affiche les coordonnées à coté du curseur ?
Mutatva legyen-e a kurzornál található rész rácskoordinátája?
Показывать координаты около курсора мыши?
+ Mostra la griglia coordinate sul cursore mouse?
This module allows you to customize the map screen.
@@ -128,6 +140,7 @@
Ez a modul lehetővé teszi a térképnézet testreszabását.
Этот модуль позволяет настроить отображение карты.
Este módulo permite personalizar la pantalla del mapa.
+ Questo modulo ti permette di customizzare lo schermo della mappa.
Blue Force Tracking
@@ -139,6 +152,7 @@
Blue Force Tracking
Blue Force követés
Система слежения Blue Force Tracking
+ Blue Force Tracking
BFT Enable
@@ -150,6 +164,7 @@
Activer le Suivi des Forces Alliées
BFT engedélyezése
Включить BFT
+ Abilita BFT
Enable Blue Force Tracking. Default: No
@@ -161,6 +176,7 @@
Activer le SFA. Défaut: non
Blue Force követés engedélyezése. Alapértelmezett: Nem
Включает систему служения BFT. По-умолчанию: Нет
+ Abilita Blue Force Tracking. Default: No
Interval
@@ -172,6 +188,7 @@
Intervalle
Intervallum
Интервал
+ Intervallo
How often the markers should be refreshed (in seconds)
@@ -183,6 +200,7 @@
Fréquence de rafraîchissement des marqueurs ?
Milyen gyakran frissüljenek a jelölők (másodpercben)
Как часто должны обновляться маркеры (в секундах)
+ Quanto spesso vengono aggiornati i marker (in secondi)
Hide AI groups?
@@ -194,6 +212,7 @@
Cacher les groupes IA ?
AI csoportok elrejtése?
Скрыть группы ботов?
+ Nascondere gruppi IA?
Hide markers for 'AI only' groups?
@@ -205,6 +224,31 @@
Cacher les marqueurs pour les groupes d'IA seulement ?
Jelölők elrejtése "csak AI" csoportoknál?
Скрыть маркеры групп, которые состоят полностью из ботов?
+ Nascondi markers per gruppi di sole IA?
+
+
+ Show player names?
+ Pokaż imiona graczy?
+ Mostrar nombres de los jugadores?
+ Zeigen Sie die Namen der Spieler?
+ Zobrazit jména hráčů?
+ Mostrar os nomes dos jogadores?
+ Afficher les noms des joueurs?
+ Itt található az a játékos nevét?
+ Показать имена игроков?
+ Mostra i nomi dei giocatori?
+
+
+ Show individual player names?
+ Pokaż poszczególne imiona graczy?
+ Mostrar nombres de los jugadores individuales?
+ Zeigen einzelnen Spielernamen?
+ Zobrazit názvy jednotlivých hráčů?
+ Mostrar nomes individuais dos jogadores?
+ Afficher les noms des joueurs individuels?
+ Itt található az adott játékos neveket?
+ Показать отдельные имена игроков?
+ Mostra i nomi dei giocatori singoli?
This module allows the tracking of allied units with BFT map markers.
@@ -216,6 +260,7 @@
Ez a modul lehetővé teszi a szövetséges egységek követését BFT térképjelzőjkkel.
Этот модуль позволяет отслеживать перемещение союзных войск по карте при помощи маркеров BFT.
Este módulo permite el seguimiento de las unidades aliadas con marcadores de mapa BFT.
+ Questo modulo permette il tracciamento di unità alleate con i marker BFT in mappa
Flashlights
@@ -226,6 +271,7 @@
Фонари
Svítilny
Linternas
+ Torcia
NVG
@@ -236,6 +282,7 @@
ПНВ
NVG
NVG
+ NVG
On
@@ -246,6 +293,7 @@
Вкл.
Zapnout
Encendido
+ Acceso
Off
@@ -256,6 +304,7 @@
Выкл.
Vypnout
Apagado
+ Spento
Increase Brightness
@@ -266,6 +315,7 @@
Увеличить яркость
Zvýšit jas
Aumentar brillo
+ Aumenta Luminosità
Decrease Brightness
@@ -276,6 +326,7 @@
Уменьшить яркость
Snížit jas
Reducir brillo
+ Diminuisci Luminosità
Turn On %1
@@ -308,6 +359,9 @@
Definir canal no início
Установить канал на старте
Zvolit kanál po startu
+ Imposta Canale all'Avvio
+ Setear canal al comenzar
+ Définir le canal de départ
Change the starting marker channel at mission start
@@ -316,6 +370,9 @@
Muda o canal do marcador no início da missão
Изменить начальный канал для установки маркеров при запуске миссии
Nastavit kanál po startu mise
+ Cambia il canale marker iniziale all'avvio di missione
+ Cambiar el canal de marcadores inicial al comenzar la misión
+ Changer le marqueur du canal de départ au départ de la mission
-
+
\ No newline at end of file
diff --git a/addons/map_gestures/ACE_Settings.hpp b/addons/map_gestures/ACE_Settings.hpp
index 0038027e3b..3730c08c58 100644
--- a/addons/map_gestures/ACE_Settings.hpp
+++ b/addons/map_gestures/ACE_Settings.hpp
@@ -44,16 +44,16 @@ class ACE_Settings {
typeName = "COLOR";
value[] = {1, 0.88, 0, 0.7};
};
- class GVAR(GroupColorConfigurations) {
- displayName = CSTRING(GroupColorConfigurations_displayName);
- description = CSTRING(GroupColorConfigurations_description);
+ class GVAR(groupColorConfigurations) {
+ displayName = CSTRING(groupColorConfigurations_displayName);
+ description = CSTRING(groupColorConfigurations_description);
category = CSTRING(mapGestures_category);
typeName = "ARRAY";
value[] = {};
};
- class GVAR(GroupColorConfigurationMapping) {
- displayName = CSTRING(GroupColorConfigurationMapping_displayName);
- description = CSTRING(GroupColorConfigurationMapping_description);
+ class GVAR(groupColorConfigurationMapping) {
+ displayName = CSTRING(groupColorConfigurationMapping_displayName);
+ description = CSTRING(groupColorConfigurationMapping_description);
category = CSTRING(mapGestures_category);
typeName = "ARRAY";
value[] = {{}, {}};
diff --git a/addons/map_gestures/CfgEventHandlers.hpp b/addons/map_gestures/CfgEventHandlers.hpp
index 7e0c8d2ce3..b0848d0248 100644
--- a/addons/map_gestures/CfgEventHandlers.hpp
+++ b/addons/map_gestures/CfgEventHandlers.hpp
@@ -1,3 +1,10 @@
+
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
diff --git a/addons/map_gestures/CfgVehicles.hpp b/addons/map_gestures/CfgVehicles.hpp
index d4c88883e6..5593d66181 100644
--- a/addons/map_gestures/CfgVehicles.hpp
+++ b/addons/map_gestures/CfgVehicles.hpp
@@ -8,7 +8,7 @@ class CfgVehicles {
isGlobal = 0;
isSingular = 1;
author = ECSTRING(common,ACETeam);
- icon = PATHTOF(ui\icon_module_map_gestures_ca.paa);
+ icon = QPATHTOF(ui\icon_module_map_gestures_ca.paa);
class Arguments {
class enabled {
displayName = CSTRING(enabled_DisplayName);
@@ -49,7 +49,7 @@ class CfgVehicles {
function = QFUNC(moduleGroupSettings);
isGlobal = 0;
author = ECSTRING(common,ACETeam);
- icon = PATHTOF(ui\icon_module_map_gestures_ca.paa);
+ icon = QPATHTOF(ui\icon_module_map_gestures_ca.paa);
class Arguments {
class leadColor {
displayName = CSTRING(leadColor_displayName);
diff --git a/addons/map_gestures/XEH_PREP.hpp b/addons/map_gestures/XEH_PREP.hpp
new file mode 100644
index 0000000000..eba9f5bfe8
--- /dev/null
+++ b/addons/map_gestures/XEH_PREP.hpp
@@ -0,0 +1,12 @@
+
+PREP(assignClientIDOnServer);
+PREP(drawMapGestures);
+PREP(endTransmit);
+PREP(getProximityPlayers);
+PREP(initTransmit);
+PREP(isValidColorArray);
+PREP(moduleGroupSettings);
+PREP(moduleSettings);
+PREP(receiverInit);
+PREP(transmit);
+PREP(transmitterInit);
diff --git a/addons/map_gestures/XEH_postInit.sqf b/addons/map_gestures/XEH_postInit.sqf
index 233ee23c04..185eaf97f0 100644
--- a/addons/map_gestures/XEH_postInit.sqf
+++ b/addons/map_gestures/XEH_postInit.sqf
@@ -6,7 +6,7 @@ if (["STMapGestures"] call EFUNC(common,isModLoaded)) exitWith {
if (!hasInterface) exitWith {};
-["SettingsInitialized", {
+["ace_settingsInitialized", {
if (!GVAR(enabled)) exitWith {};
[{
if (isNull (findDisplay 12)) exitWith {};
@@ -18,4 +18,4 @@ if (!hasInterface) exitWith {};
[_pfhId] call CBA_fnc_removePerFrameHandler;
}, 1, []] call CBA_fnc_addPerFrameHandler;
-}] call EFUNC(common,addEventHandler);
+}] call CBA_fnc_addEventHandler;
diff --git a/addons/map_gestures/XEH_preInit.sqf b/addons/map_gestures/XEH_preInit.sqf
index 8154106fd6..a7feade1c3 100644
--- a/addons/map_gestures/XEH_preInit.sqf
+++ b/addons/map_gestures/XEH_preInit.sqf
@@ -2,16 +2,6 @@
ADDON = false;
-PREP(assignClientIDOnServer);
-PREP(drawMapGestures);
-PREP(endTransmit);
-PREP(getProximityPlayers);
-PREP(initTransmit);
-PREP(isValidColorArray);
-PREP(moduleGroupSettings);
-PREP(moduleSettings);
-PREP(receiverInit);
-PREP(transmit);
-PREP(transmitterInit);
+#include "XEH_PREP.hpp"
ADDON = true;
diff --git a/addons/map_gestures/XEH_preStart.sqf b/addons/map_gestures/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/map_gestures/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/map_gestures/XEH_serverPostInit.sqf b/addons/map_gestures/XEH_serverPostInit.sqf
index bde1cdc55b..1b70e24149 100644
--- a/addons/map_gestures/XEH_serverPostInit.sqf
+++ b/addons/map_gestures/XEH_serverPostInit.sqf
@@ -1,3 +1,3 @@
#include "script_component.hpp"
-[EVENT_PLAYER_HAS_NO_OWNER_ID, FUNC(assignClientIDOnServer)] call EFUNC(common,addEventHandler);
+[QGVAR(noOwnerID), FUNC(assignClientIDOnServer)] call CBA_fnc_addEventHandler;
diff --git a/addons/map_gestures/config.cpp b/addons/map_gestures/config.cpp
index 72e7f82078..52f333c717 100644
--- a/addons/map_gestures/config.cpp
+++ b/addons/map_gestures/config.cpp
@@ -6,8 +6,9 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
- author[] = {"Dslyecxi", "MikeMatrix"};
- authorUrl = "https://github.com/MikeMatrix";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"Dslyecxi", "MikeMatrix"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
diff --git a/addons/map_gestures/functions/fnc_drawMapGestures.sqf b/addons/map_gestures/functions/fnc_drawMapGestures.sqf
index b369686501..13c08a03fc 100644
--- a/addons/map_gestures/functions/fnc_drawMapGestures.sqf
+++ b/addons/map_gestures/functions/fnc_drawMapGestures.sqf
@@ -19,7 +19,7 @@
#define ICON_TEXT_ALIGN "left"
#define ICON_ANGLE 0
#define ICON_SHADOW 1
-#define TEXT_FONT "PuristaBold"
+#define TEXT_FONT "RobotoCondensedBold"
#define TEXT_ICON_RENDER_SIZE 20
#define TEXT_SIZE 0.030
#define TEXT_SHADOW 0
diff --git a/addons/map_gestures/functions/fnc_transmit.sqf b/addons/map_gestures/functions/fnc_transmit.sqf
index c9dc487db2..aacff9e679 100644
--- a/addons/map_gestures/functions/fnc_transmit.sqf
+++ b/addons/map_gestures/functions/fnc_transmit.sqf
@@ -31,7 +31,7 @@ if (!GVAR(EnableTransmit) || !visibleMap) exitWith {
{
_ownerID = _x getVariable QGVAR(owner_id);
if (isNil "_ownerID") then {
- [EVENT_PLAYER_HAS_NO_OWNER_ID, [name _x]] call EFUNC(common,serverEvent);
+ [QGVAR(noOwnerID), [name _x]] call CBA_fnc_serverEvent;
} else {
_playerOwnerID = ACE_player getVariable QGVAR(owner_id);
if (!isNil "_playerOwnerID" && _ownerID != _playerOwnerID) then {
diff --git a/addons/map_gestures/functions/fnc_transmitterInit.sqf b/addons/map_gestures/functions/fnc_transmitterInit.sqf
index 897855dc00..d115fb22c5 100644
--- a/addons/map_gestures/functions/fnc_transmitterInit.sqf
+++ b/addons/map_gestures/functions/fnc_transmitterInit.sqf
@@ -28,7 +28,7 @@ if (!isNil QGVAR(MouseMoveHandlerID)) then {
};
GVAR(MouseMoveHandlerID) = _mapCtrl ctrlAddEventHandler ["MouseMoving", {
// Don't transmit any data if we're using the map tools
- if (!GVAR(EnableTransmit) || EGVAR(maptools,drawing_isDrawing) || EGVAR(maptools,mapTool_isDragging) || EGVAR(maptools,mapTool_isRotating)) exitWith {};
+ if (!GVAR(EnableTransmit) || EGVAR(maptools,mapTool_isDragging) || EGVAR(maptools,mapTool_isRotating)) exitWith {};
params ["_control", "_posX", "_posY"];
diff --git a/addons/map_gestures/script_component.hpp b/addons/map_gestures/script_component.hpp
index 2bc9b212d0..bcf6a1a97c 100644
--- a/addons/map_gestures/script_component.hpp
+++ b/addons/map_gestures/script_component.hpp
@@ -15,5 +15,3 @@
#endif
#include "\z\ace\addons\main\script_macros.hpp"
-
-#define EVENT_PLAYER_HAS_NO_OWNER_ID "PlayerNameHasNoOwnerID"
diff --git a/addons/map_gestures/stringtable.xml b/addons/map_gestures/stringtable.xml
index fd832ecb41..e89d6c07a3 100644
--- a/addons/map_gestures/stringtable.xml
+++ b/addons/map_gestures/stringtable.xml
@@ -7,6 +7,10 @@
Gesty na mapie
Жесты на карте
Ukazování v mapě
+ Gesti Mappa
+ Kartenzeichen
+ Gestos en mapa
+ Gestes de carte
Enabled
@@ -14,6 +18,10 @@
Aktywne
Включено
Povolit
+ Abilita
+ Aktiviert
+ Activado
+ Activer
Map Gesture Max Range
@@ -21,6 +29,10 @@
Maks. zasięg gestów
Макс. дистанция жестов на карте
Max. vzdálenost pro ukazování v mapě
+ Distanza Massima Gesti Mappa
+ Maximale Reichweite der Kartenzeichen
+ Máx. dist. para gestos en mapa
+ Distance max. des gestes de carte
Max range between players to show the map gesture indicator [default: 7 meters]
@@ -28,6 +40,10 @@
Maksymalny zasięg, w obrębie którego gesty będą widoczne dla graczy [domyślnie: 7 metrów]
Макс. дистанция между игроками для отображения жестов на карте [по-умолчанию: 7 метров]
Maximální vzdálenost mezi hráči pro zobrazení indikátoru ukázání v mapě [výchozí: 7 metrů]
+ Distanza massima tra giocatori per mostrare i gesti in mappa [default: 7 metri]
+ Maximale Reichweite zwischen Spielern um Kartenzeichen anzuzeigen (Standard: 7 Meter)
+ Máxima distancia a la cual pueden verse el indicador de gestos [defecto: 7 m]
+ Distance max. entre les joueurs pour montrer le pointage sur carte. (Défaut : 7m)
Lead Default Color
@@ -35,12 +51,20 @@
Domyślny kolor lidera
Лид. цвет по-умолчанию
Výchozí barva velitele
+ Colore Default Caposquadra
+ Gruppenführer-Standardfarbe
+ Color por defecto para el lider
+ Couleur principale de commandement.
Fallback Color value for group leaders when there is no group setting. [Module: leave blank to not force on clients]
Valor de cor alternativa para líderes de grupo
Domyślny kolor dla liderów grup.
Значение цвета для лидеров групп.
+ Colore di riserva dei capisquadra quando non c'è nessuna impostazione gruppo. [Modulo: lascia vuoto per non forzare su clients]
+ Ersatz-Farbwert für Gruppenführer wenn keine Gruppeneinstellung vorhanden ist. [Modul: leer lassen um Anwendung bei Clients nicht zu erzwingen]
+ Color por defecto para líderes cuando no está configurado [Módulo: dejar en blanco para no forzar]
+ Couleur par défaut pour les chefs de groupe quand il n'y a pas de réglage pour le groupe. (Module : laisser vide pour ne pas forcer chez les clients)
Default Color
@@ -48,12 +72,20 @@
Kolor domyślny
Цвет по-умолчанию
Výchozí barva
+ Colore Default
+ Standardfarbe
+ Color por defecto
+ Couleur par défaut
Fallback Color value when there is no group setting. [Module: leave blank to not force on clients]
Valor alternativo de cor
Kolor domyślny
Значение цвета.
+ Colore di riserva quando non ci sono impostazioni gruppo. [Modulo: lascia vuto per non forzare sui clients]
+ Ersatz-Farbwert wenn keine Gruppeneinstellung vorhanden ist. [Modul: leer lassen um Anwendung bei Clients nicht zu erzwingen]
+ Color por defecto cuando no está configurado [Módulo: dejar en blanco para no forzar]
+ Couleur par défaut quand il n'y a pas de réglage pour le groupe. (Module : laisser vide pour ne pas forcer chez les clients)
Lead Color
@@ -61,12 +93,20 @@
Kolor lidera
Лид. цвет
Barva velitele
+ Colore Caposquadra
+ Gruppenführer-Farbe
+ Color para el líder
+ Couleur de commandement
Color value for group leaders of groups synced with this module.
Valor de cor para líderes de grupo sincronizados com este módulo.
Kolor dla liderów grup zsynchronizowanych z tym modułem.
Значение цвета для лидеров групп, которые [группы] синхронизированы с этим модулем.
+ Colore dei Caposquadra per gruppi sincronizzati con questo modulo.
+ Farbwert für Gruppenführer, die mit diesem Modul synchronisiert werden.
+ Color para los líderes de los grupos sincronizados al módulo.
+ Couleur pour les chefs de groupe des groupes synchronisés avec le module.
Color
@@ -74,12 +114,20 @@
Kolor
Цвет
Barva
+ Colore
+ Farbe
+ Color
+ Couleur
Color value for group members of groups synced with this module.
Valor de cor para membros de grupo sincronizados com este módulo.
Kolor dla członków grup zsynchronizowanych z tym modułem.
Значение цвета для членов групп, которые [группы] синхронизированы с этим модулем.
+ Colore per membri di gruppi sincronizzati con questo modulo.
+ Farbwert für Gruppenmitglieder, die mit diesem Modul synchronisiert werden.
+ Color para los miembros de los grupos sincronizados al módulo.
+ Couleur pour les membres du groupe synchronisé avec ce module.
Map Gestures - Group Settings
@@ -87,6 +135,10 @@
Gesty na mapie - ustawienia grup
Жесты на карте - настройки групп
Ukazování v mapě - nastavení skupiny
+ Gesti Mappa - Impostazioni Gruppi
+ Kartenzeichen - Gruppeneinstellungen
+ Gestos en mapas - Configuración de grupos
+ Gestes de carte - réglages de groupe
Update Interval
@@ -94,6 +146,10 @@
Interwał aktualizacji
Интервал обновления
Interval aktualizace
+ Intervallo Aggiornamento
+ Update-Intervall
+ Período de actualización
+ Intervalle de mise à jour
Time between data updates.
@@ -101,6 +157,10 @@
Odstęp pomiędzy aktualizacjami danych
Время между обновлениями данных.
Čas mezi aktualizacemi dat.
+ Intervallo tra aggiornamenti dati.
+ Zeit zwischen Datenupdates.
+ Tiempo entre actualizaciones sucesivas.
+ Temps entre les actualisations de données
Group color configurations
@@ -108,24 +168,40 @@
Konf. koloru grup
Конфигурация цвета групп
Konfigurace barvy pro skupinu
+ Configurazioni colori dei gruppi
+ Konfiguration der Gruppenfarbe
+ Configuración de color de grupo
+ Configuration des couleurs de groupe
Group color configuration containing arrays of color pairs ([leadColor, color]).
Configuração de cores de grupo contendo arrays com pares de cores ([leadColor, color]).
Konfiguracja kolorów grup zawierająca tablice par kolorów ([kolorLidera, kolor]).
Конфигурация цвета групп содержит массив цветовых пар ([лид. цвет, цвет]).
+ Configurazioni colori gruppi contenenti array di coppie di colori ([leadColor, color]).
+ Konfiguration der Gruppenfarbe mit zugeordneten Farbpaaren der Aufstellung ([leadColor, color]).
+ Configuración de color de grupo conteniendo una lista de pares de colores ([colorLider, colo]).
+ Configuration des couleurs de groupe contenant des tableaux de paires de couleurs ([couleurDeCommandement, couleur]).
Hash of Group ID mapped to the Group color configuration index.
Hashes de ID de grupos mapeados para o índice de configuração de cor de grupos.
Hasz ID grup zmapowanych w indeksie konfiguracji koloru grup.
Хеш ID групп, соответствующих индексам конфигурации цвета групп.
+ Hash degli ID Gruppi mappati nell'indice configurazioni colori gruppi.
+ Hashwert der Gruppen-ID, die dem Konfigurations-Index der Gruppenfarbe zugeordnet werden.
+ ID de Grupo mapeado al índice de la configuración de color de grupo.
+ Hash de l'identifiant du groupe mappé à l'index de la configuration de la couleur du groupe.
GroupID Color configuration mapping
Mapeamento de configuração para cores de GroupID
Mapowanie kolorów poprzez GroupID
Соответствие ID групп конфигурации цвета групп
+ Mappatura configurazioni colori GroupID
+ Gruppen-ID-Farbe Konfigurationszuordnung
+ Mapeado de ID de Grupo
+ Configuration du mappage de l'identifiant de la couleur du groupe.
Enables the Map Gestures.
@@ -133,6 +209,10 @@
Aktywuje gesty na mapie.
Включает указания на карте.
Povolit ukazování v mapě
+ Abilita i Gesti Mappa
+ Aktiviert die Kartenzeichen.
+ Activar Gestos en Mapa
+ Activer les gestes de carte
Name Text Color
@@ -140,12 +220,20 @@
Kolor nazw
Цвет текста имени
Barva textu pro jména
+ Colore Testo Nome
+ Farbe der Namenstexte.
+ Color de los nombres
+ Couleur du texte du nom
Color of the name tag text besides the map gestures mark.
Cor do texto da etiqueta de nome que fica embaixo da marcação de gestos no mapa.
Kolor nazwy gracza obok markera gestu mapy.
Цвет инмени игрока рядом с маркером жестов.
+ Colore del testo dei nametag oltre a quello dei Gesti Mappa
+ Farbe der Namenstexte neben der Kartenzeichen-Markierung.
+ Color de los nombres dibujados al lado del marcados de gestos.
+ Couleur des tags de nom à côté de marqueur de pointage sur carte.
Map Gestures
@@ -153,6 +241,10 @@
Gesty na mapie
Жесты на карте
Ukazovní v mapě
+ Gesti Mappa
+ Kartenzeichen
+ Gestos en mapa
+ Gestes de carte
-
\ No newline at end of file
+
diff --git a/addons/maptools/ACE_Settings.hpp b/addons/maptools/ACE_Settings.hpp
index 9c53a84a7c..0da43b64ca 100644
--- a/addons/maptools/ACE_Settings.hpp
+++ b/addons/maptools/ACE_Settings.hpp
@@ -1,6 +1,10 @@
class ACE_Settings {
- class GVAR(EveryoneCanDrawOnBriefing) {
+ class GVAR(rotateModifierKey) {
value = 1;
- typeName = "BOOL";
+ typeName = "SCALAR";
+ isClientSettable = 1;
+ displayName = CSTRING(rotateModifierKey_displayName);
+ description = CSTRING(rotateModifierKey_description);
+ values[] = {"$STR_A3_OPTIONS_DISABLED", "ALT", "CTRL", "SHIFT"};
};
};
diff --git a/addons/maptools/CfgEventHandlers.hpp b/addons/maptools/CfgEventHandlers.hpp
index 27bbf326d3..5c876708f2 100644
--- a/addons/maptools/CfgEventHandlers.hpp
+++ b/addons/maptools/CfgEventHandlers.hpp
@@ -1,3 +1,10 @@
+
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE( call COMPILE_FILE(XEH_preInit) );
diff --git a/addons/maptools/CfgVehicles.hpp b/addons/maptools/CfgVehicles.hpp
index 063f88f38b..6c9bdc74d9 100644
--- a/addons/maptools/CfgVehicles.hpp
+++ b/addons/maptools/CfgVehicles.hpp
@@ -3,9 +3,26 @@ class CfgVehicles {
class CAManBase: Man {
class ACE_SelfActions {
+ class ACE_MapGpsShow {
+ displayName = CSTRING(MapGpsShow);
+ condition = QUOTE((!GVAR(mapGpsShow)) && {call FUNC(canUseMapGPS)});
+ statement = QUOTE(GVAR(mapGpsShow) = true; [GVAR(mapGpsShow)] call FUNC(openMapGps));
+ exceptions[] = {"isNotDragging", "notOnMap", "isNotInside", "isNotSitting"};
+ showDisabled = 0;
+ priority = 0;
+ };
+ class ACE_MapGpsHide {
+ displayName = CSTRING(MapGpsHide);
+ condition = QUOTE((GVAR(mapGpsShow)) && {call FUNC(canUseMapGPS)});
+ statement = QUOTE(GVAR(mapGpsShow) = false; [GVAR(mapGpsShow)] call FUNC(openMapGps));
+ exceptions[] = {"isNotDragging", "notOnMap", "isNotInside", "isNotSitting"};
+ showDisabled = 0;
+ priority = 0;
+ };
+
class ACE_MapTools {
displayName = CSTRING(MapTools_Menu);
- condition = QUOTE((call FUNC(canUseMapTools) || {call FUNC(canUseMapGPS)}));
+ condition = QUOTE(call FUNC(canUseMapTools));
statement = "";
exceptions[] = {"isNotDragging", "notOnMap", "isNotInside", "isNotSitting"};
showDisabled = 0;
@@ -13,7 +30,7 @@ class CfgVehicles {
class ACE_MapToolsHide {
displayName = CSTRING(MapToolsHide);
- condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 0}));
+ condition = QUOTE(GVAR(mapTool_Shown) != 0);
statement = QUOTE(GVAR(mapTool_Shown) = 0;);
exceptions[] = {"isNotDragging", "notOnMap", "isNotInside", "isNotSitting"};
showDisabled = 1;
@@ -21,7 +38,7 @@ class CfgVehicles {
};
class ACE_MapToolsShowNormal {
displayName = CSTRING(MapToolsShowNormal);
- condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 1}));
+ condition = QUOTE(GVAR(mapTool_Shown) != 1);
statement = QUOTE(GVAR(mapTool_Shown) = 1;);
exceptions[] = {"isNotDragging", "notOnMap", "isNotInside", "isNotSitting"};
showDisabled = 1;
@@ -29,7 +46,7 @@ class CfgVehicles {
};
class ACE_MapToolsShowSmall {
displayName = CSTRING(MapToolsShowSmall);
- condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 2}));
+ condition = QUOTE(GVAR(mapTool_Shown) != 2);
statement = QUOTE(GVAR(mapTool_Shown) = 2;);
exceptions[] = {"isNotDragging", "notOnMap", "isNotInside", "isNotSitting"};
showDisabled = 1;
@@ -37,7 +54,7 @@ class CfgVehicles {
};
class ACE_MapToolsAlignNorth {
displayName = CSTRING(MapToolsAlignNorth);
- condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 0}));
+ condition = QUOTE(GVAR(mapTool_Shown) != 0);
statement = QUOTE(GVAR(mapTool_angle) = 0;);
exceptions[] = {"isNotDragging", "notOnMap", "isNotInside", "isNotSitting"};
showDisabled = 1;
@@ -45,40 +62,12 @@ class CfgVehicles {
};
class ACE_MapToolsAlignCompass {
displayName = CSTRING(MapToolsAlignCompass);
- condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 0} && {('ItemCompass' in assigneditems ACE_player) || {'ItemCompass' in assigneditems ACE_player}}));
+ condition = QUOTE((GVAR(mapTool_Shown) != 0) && {'ItemCompass' in assigneditems ACE_player});
statement = QUOTE(GVAR(mapTool_angle) = getDir ACE_player;);
exceptions[] = {"isNotDragging", "notOnMap", "isNotInside", "isNotSitting"};
showDisabled = 1;
priority = 1;
};
- class ACE_MapGpsShow {
- displayName = CSTRING(MapGpsShow);
- condition = QUOTE((call FUNC(canUseMapGPS) && {!GVAR(mapGpsShow)}));
- statement = QUOTE(GVAR(mapGpsShow) = true; [GVAR(mapGpsShow)] call FUNC(openMapGps));
- exceptions[] = {"isNotDragging", "notOnMap", "isNotInside", "isNotSitting"};
- showDisabled = 0;
- priority = 0;
- };
- class ACE_MapGpsHide {
- displayName = CSTRING(MapGpsHide);
- condition = QUOTE((call FUNC(canUseMapGPS) && {GVAR(mapGpsShow)}));
- statement = QUOTE(GVAR(mapGpsShow) = false; [GVAR(mapGpsShow)] call FUNC(openMapGps));
- exceptions[] = {"isNotDragging", "notOnMap", "isNotInside", "isNotSitting"};
- showDisabled = 0;
- priority = 0;
- };
- };
- };
-
- class ACE_Actions {
- class ACE_MainActions {
- class ACE_CopyMap {
- displayName = CSTRING(CopyMap);
- condition = QUOTE(([_target] call EFUNC(common,isPlayer) && {'ItemMap' in assigneditems _player} && {'ACE_MapTools' in items _player} && {'ItemMap' in assignedItems _target}));
- statement = QUOTE([ARR_2(_player,_target)] call FUNC(copyMapStart));
- showDisabled = 0;
- priority = -1;
- };
};
};
};
diff --git a/addons/maptools/CfgWeapons.hpp b/addons/maptools/CfgWeapons.hpp
index 5cec99bfb0..dc7a7046dd 100644
--- a/addons/maptools/CfgWeapons.hpp
+++ b/addons/maptools/CfgWeapons.hpp
@@ -5,8 +5,8 @@ class CfgWeapons {
class ACE_MapTools: ACE_ItemCore {
displayName = CSTRING(Name);
descriptionShort = CSTRING(Description);
- model = QUOTE(PATHTOF(data\ace_MapTools.p3d));
- picture = PATHTOF(UI\maptool_item.paa);
+ model = QPATHTOF(data\ace_MapTools.p3d);
+ picture = QPATHTOF(UI\maptool_item.paa);
scope = 2;
class ItemInfo: InventoryItem_Base_F {
mass = 1;
diff --git a/addons/maptools/MapControls.hpp b/addons/maptools/MapControls.hpp
deleted file mode 100644
index 409796a6b1..0000000000
--- a/addons/maptools/MapControls.hpp
+++ /dev/null
@@ -1,80 +0,0 @@
-class controls {
- class CA_PlayerName: RscText {
- x = "2 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
- };
- class ProfilePicture: RscPicture {
- x = "13.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
- };
- class ProfileBackground: RscText {
- x = "13.3 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
- };
- class Separator1: RscPicture {
- x = "14.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
- };
- class ColorBlack: RscButton {
- idc = 36732;
- x = "0 * (((safezoneW / safezoneH) min 1.2) / 40)";
- y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
- w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
- h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
- colorBackground[] = {0.2,0.2,0.2,1};
- colorBackgroundActive[] = {0,0,0,1};
- colorFocused[] = {0,0,0,1};
- onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QUOTE(QGVAR(drawing_drawColor)),'ColorBlack')]);
- };
- class ColorRed: RscButton {
- idc = 36733;
- x = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
- y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
- w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
- h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
- colorBackground[] = {0.8,0.2,0.2,1};
- colorBackgroundActive[] = {1,0,0,1};
- colorFocused[] = {1,0,0,1};
- onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QUOTE(QGVAR(drawing_drawColor)),'ColorRed')]);
- };
- class ColorGreen: RscButton {
- idc = 36734;
- x = "0.6 * (((safezoneW / safezoneH) min 1.2) / 40)";
- y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
- w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
- h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
- colorBackground[] = {0.2,0.8,0.2,1};
- colorBackgroundActive[] = {0,1,0,1};
- colorFocused[] = {0,1,0,1};
- onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QUOTE(QGVAR(drawing_drawColor)),'ColorGreen')]);
- };
- class ColorBlue: RscButton {
- idc = 36735;
- x = "0.9 * (((safezoneW / safezoneH) min 1.2) / 40)";
- y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
- w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
- h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
- colorBackground[] = {0.2,0.2,0.8,1};
- colorBackgroundActive[] = {0,0,1,1};
- colorFocused[] = {0,0,1,1};
- onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QUOTE(QGVAR(drawing_drawColor)),'ColorBlue')]);
- };
- class ColorYellow: RscButton {
- idc = 36736;
- x = "1.2 * (((safezoneW / safezoneH) min 1.2) / 40)";
- y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
- w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
- h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
- colorBackground[] = {0.8,0.8,0.2,1};
- colorBackgroundActive[] = {1,1,0,1};
- colorFocused[] = {1,1,0,1};
- onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QUOTE(QGVAR(drawing_drawColor)),'ColorYellow')]);
- };
- class ColorWhite: RscButton {
- idc = 36737;
- x = "1.5 * (((safezoneW / safezoneH) min 1.2) / 40)";
- y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
- w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
- h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
- colorBackground[] = {0.8,0.8,0.8,1};
- colorBackgroundActive[] = {1,1,1,1};
- colorFocused[] = {1,1,1,1};
- onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QUOTE(QGVAR(drawing_drawColor)),'ColorWhite')]);
- };
-};
diff --git a/addons/maptools/MapGpsUI.hpp b/addons/maptools/MapGpsUI.hpp
index 170f0d1620..c5b230f163 100644
--- a/addons/maptools/MapGpsUI.hpp
+++ b/addons/maptools/MapGpsUI.hpp
@@ -26,7 +26,7 @@ class RscTitles {
y = Y_gps;
w = W_gps;
h = H_gps;
- text = PATHTOF(UI\mapGps.paa);
+ text = QPATHTOF(UI\mapGps.paa);
colorBackground[] = {1, 1, 1, 1};
};
class heading: RscText{
diff --git a/addons/maptools/XEH_PREP.hpp b/addons/maptools/XEH_PREP.hpp
new file mode 100644
index 0000000000..1670c59593
--- /dev/null
+++ b/addons/maptools/XEH_PREP.hpp
@@ -0,0 +1,9 @@
+PREP(calculateMapScale);
+PREP(canUseMapGPS);
+PREP(canUseMapTools);
+PREP(handleMouseButton);
+PREP(handleMouseMove);
+PREP(isInsideMapTool);
+PREP(openMapGps);
+PREP(openMapGpsUpdate);
+PREP(updateMapToolMarkers);
diff --git a/addons/maptools/XEH_postInitClient.sqf b/addons/maptools/XEH_postInitClient.sqf
index 06cb8eda3d..388ffd6b81 100644
--- a/addons/maptools/XEH_postInitClient.sqf
+++ b/addons/maptools/XEH_postInitClient.sqf
@@ -5,7 +5,6 @@
if (!hasInterface) exitWith {};
// Init variables
-GVAR(mapVisableLastFrame) = false;
GVAR(mapGpsShow) = true;
GVAR(mapTool_Shown) = 0;
@@ -14,59 +13,16 @@ GVAR(mapTool_angle) = 0;
GVAR(mapTool_isDragging) = false;
GVAR(mapTool_isRotating) = false;
-GVAR(drawing_isDrawing) = false;
-GVAR(drawing_tempLineMarker) = [];
-GVAR(drawing_lineMarkers) = [];
-GVAR(drawing_drawColor) = "ColorBlack";
-GVAR(drawing_controls) = [36732, 36733, 36734, 36735, 36736, 36737];
+//Install the event handers for the map tools on the main in-game map
+[{!isNull findDisplay 12},
+{
+ ((findDisplay 12) displayCtrl 51) ctrlAddEventHandler ["MouseMoving", {_this call FUNC(handleMouseMove);}];
+ ((findDisplay 12) displayCtrl 51) ctrlAddEventHandler ["MouseButtonDown", {[1, _this] call FUNC(handleMouseButton);}];
+ ((findDisplay 12) displayCtrl 51) ctrlAddEventHandler ["MouseButtonUp", {[0, _this] call FUNC(handleMouseButton)}];
+ ((findDisplay 12) displayCtrl 51) ctrlAddEventHandler ["Draw", {_this call FUNC(updateMapToolMarkers);}];
+}, []] call CBA_fnc_waitUntilAndExecute;
-// This spawn is probably worth keeping, as pfh don't work natively on the briefing screen and IDK how reliable the hack we implemented for them is.
-// The thread dies as soon as the mission start, so it's not really compiting for scheduler space.
-[] spawn {
- _fnc_installMapEvents = {
- private "_d";
- _d = _this;
- ((findDisplay _d) displayCtrl 51) ctrlAddEventHandler ["MouseMoving", {_this call FUNC(handleMouseMove);}];
- ((findDisplay _d) displayCtrl 51) ctrlAddEventHandler ["MouseButtonDown", {[1, _this] call FUNC(handleMouseButton);}];
- ((findDisplay _d) displayCtrl 51) ctrlAddEventHandler ["MouseButtonUp", {[0, _this] call FUNC(handleMouseButton)}];
- ((findDisplay _d) displayCtrl 51) ctrlAddEventHandler ["Draw", {_this call FUNC(updateMapToolMarkers);}];
- (findDisplay _d) displayAddEventHandler ["KeyDown", {_this call FUNC(handleKeyDown);}];
- };
-
- // Wait until the briefing map is detected
- // display = 37 for SP
- // display = 52 for host server on MP;
- // display = 53 for MP clients)
- waitUntil {(!isNull findDisplay 37) || (!isNull findDisplay 52) || (!isNull findDisplay 53) || (!isNull findDisplay 12)};
-
- if (isNull findDisplay 12) then {
- // Install event handlers on the map control of the briefing screen (control = 51)
- GVAR(drawing_syncMarkers) = true;
- if (!isNull findDisplay 52) then {
- 52 call _fnc_installMapEvents;
- } else {
- if (!isNull findDisplay 53) then {
- 53 call _fnc_installMapEvents;
- } else {
- 37 call _fnc_installMapEvents;
- };
- };
- } else {
- // Briefing screen was skipped; the player is JIP, create the markers defined during the briefing
- GVAR(drawing_syncMarkers) = false;
- {
- _x call FUNC(addLineMarker);
- } forEach GVAR(drawing_serverLineMarkers);
- };
-
- // Wait until the main map display is detected (display = 12)
- waitUntil { !isNull findDisplay 12 };
- // Install event handlers on the map control and display (control = 51)
- GVAR(drawing_syncMarkers) = false;
- 12 call _fnc_installMapEvents;
-};
-
-["visibleMapChanged", {
+["ace_visibleMapChanged", {
params ["", "_mapOn"];
if (_mapOn) then {
// Show GPS if required
@@ -74,7 +30,5 @@ GVAR(drawing_controls) = [36732, 36733, 36734, 36735, 36736, 36737];
} else {
// Hide GPS
[false] call FUNC(openMapGps);
- // Cancel drawing
- call FUNC(cancelDrawing);
};
-}] call EFUNC(common,addEventHandler);
+}] call CBA_fnc_addEventHandler;
diff --git a/addons/maptools/XEH_preInit.sqf b/addons/maptools/XEH_preInit.sqf
index 2bcd68385a..a7feade1c3 100644
--- a/addons/maptools/XEH_preInit.sqf
+++ b/addons/maptools/XEH_preInit.sqf
@@ -2,36 +2,6 @@
ADDON = false;
-PREP(addLineMarker);
-PREP(calculateMapScale);
-PREP(cancelDrawing);
-PREP(canDraw);
-PREP(canUseMapTools);
-PREP(canUseMapGPS);
-PREP(copyMapReceiveMarkers);
-PREP(copyMapRemoteSend);
-PREP(copyMapStart);
-PREP(handleKeyDown);
-PREP(handleMouseButton);
-PREP(handleMouseMove);
-PREP(handleMouseZChanged);
-PREP(isInsideMapTool);
-PREP(openMapGps);
-PREP(openMapGpsUpdate);
-PREP(removeLineMarker);
-PREP(updateMapToolMarkers);
-PREP(updateLineMarker);
-
-if (isServer) then {
- GVAR(drawing_serverLineMarkers) = [];
- publicVariable QGVAR(drawing_serverLineMarkers);
-};
-
-//Add Event Handlers:
-["drawing_removeLineMarker", FUNC(removeLineMarker) ] call EFUNC(common,addEventHandler);
-["drawing_addLineMarker", FUNC(addLineMarker) ] call EFUNC(common,addEventHandler);
-
-["drawing_requestMarkers", FUNC(copyMapRemoteSend) ] call EFUNC(common,addEventHandler);
-["drawing_sendbackMarkers", FUNC(copyMapReceiveMarkers) ] call EFUNC(common,addEventHandler);
+#include "XEH_PREP.hpp"
ADDON = true;
diff --git a/addons/maptools/XEH_preStart.sqf b/addons/maptools/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/maptools/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/maptools/config.cpp b/addons/maptools/config.cpp
index 1e82cd2269..1b5e3359bd 100644
--- a/addons/maptools/config.cpp
+++ b/addons/maptools/config.cpp
@@ -6,14 +6,13 @@ class CfgPatches {
weapons[] = {"ACE_MapTools"};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_interaction"};
- author[] = {"esteldunedain"};
- authorUrl = "https://github.com/esteldunedain/";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"esteldunedain"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
-#include "ACE_Settings.hpp"
-
class RscControlsGroup;
class RscActiveText;
class RscPicture;
@@ -25,44 +24,8 @@ class RscButtonMenuCancel;
class RscButtonMenu;
class RscEdit;
+#include "ACE_Settings.hpp"
#include "MapGpsUI.hpp"
#include "CfgEventHandlers.hpp"
#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"
-
-
-// REGULAR MAP
-class RscDisplayMainMap {
- // Create the drawing color selector
- class controls {
- class TopRight: RscControlsGroup {
- #include "MapControls.hpp"
- };
- };
-};
-
-// BRIEFING SCREEN
-class RscDisplayGetReady: RscDisplayMainMap {
- // Create the drawing color selector
- class controls {
- class TopRight: RscControlsGroup {
- #include "MapControls.hpp"
- };
- };
-};
-class RscDisplayClientGetReady: RscDisplayGetReady {
- // Create the drawing color selector
- class controls {
- class TopRight: RscControlsGroup {
- #include "MapControls.hpp"
- };
- };
-};
-class RscDisplayServerGetReady: RscDisplayGetReady {
- // Create the drawing color selector
- class controls {
- class TopRight: RscControlsGroup {
- #include "MapControls.hpp"
- };
- };
-};
diff --git a/addons/maptools/functions/fnc_addLineMarker.sqf b/addons/maptools/functions/fnc_addLineMarker.sqf
deleted file mode 100644
index 017dc5b494..0000000000
--- a/addons/maptools/functions/fnc_addLineMarker.sqf
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Author: esteldunedain
- * Add the line marker
- *
- * Arguments:
- * 0: Marker Name
- * 1: Marker start pos
- * 2: Marker end pos
- * 3: Color index
- *
- * Return value:
- * None
- *
- * Public: No
- */
-#include "script_component.hpp"
-
-params ["_name", "_startPos", "_endPos", "_color"];
-
-private ["_marker", "_difPos", "_mag"];
-
-_difPos = _endPos vectorDiff _startPos;
-
-_marker = createMarkerLocal [_name, _startPos];
-_name setMarkerShapeLocal "RECTANGLE";
-_name setMarkerAlphaLocal 1;
-_name setMarkerColorLocal _color;
-_name setMarkerPosLocal (_startPos vectorAdd (_difPos vectorMultiply 0.5));
-_mag = vectorMagnitude _difPos;
-if (_mag > 0) then {
- _name setMarkerSizeLocal [5, _mag / 2];
- _name setMarkerDirLocal (180 + (_difPos select 0) atan2 (_difPos select 1) mod 360);
-} else {
- _name setMarkerSizeLocal [5, 5];
- _name setMarkerDirLocal 0;
-};
-
-GVAR(drawing_lineMarkers) pushBack (+_this);
-
-if (isServer && GVAR(drawing_syncMarkers)) then {
- GVAR(drawing_serverLineMarkers) pushBack (+_this);
- publicVariable QGVAR(drawing_serverLineMarkers);
-};
diff --git a/addons/maptools/functions/fnc_calculateMapScale.sqf b/addons/maptools/functions/fnc_calculateMapScale.sqf
index 78bfae43af..525955cdcd 100644
--- a/addons/maptools/functions/fnc_calculateMapScale.sqf
+++ b/addons/maptools/functions/fnc_calculateMapScale.sqf
@@ -12,9 +12,7 @@
*/
#include "script_component.hpp"
-private ["_screenOffset", "_pos"];
-
-_pos = ((findDisplay 12) displayCtrl 51) ctrlMapScreenToWorld [0.5, 0.5];
-_screenOffset = ((findDisplay 12) displayCtrl 51) posWorldToScreen [(_pos select 0) + 100, (_pos select 1)];
+private _pos = ((findDisplay 12) displayCtrl 51) ctrlMapScreenToWorld [0.5, 0.5];
+private _screenOffset = ((findDisplay 12) displayCtrl 51) posWorldToScreen [(_pos select 0) + 100, (_pos select 1)];
(_screenOffset select 0) - 0.5
diff --git a/addons/maptools/functions/fnc_canDraw.sqf b/addons/maptools/functions/fnc_canDraw.sqf
deleted file mode 100644
index da55043d85..0000000000
--- a/addons/maptools/functions/fnc_canDraw.sqf
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * Author: esteldunedain
- * canDraw
- *
- * Arguments:
- * None
- *
- * Return value:
- *
- *
- * Public: No
- */
-#include "script_component.hpp"
-
-(missionNameSpace getVariable [QGVAR(drawing_syncMarkers), true] && {GVAR(EveryoneCanDrawOnBriefing)}) ||
-{(!isNull ACE_player) && {"ACE_MapTools" in items ACE_player}}
diff --git a/addons/maptools/functions/fnc_cancelDrawing.sqf b/addons/maptools/functions/fnc_cancelDrawing.sqf
deleted file mode 100644
index bc80602cfc..0000000000
--- a/addons/maptools/functions/fnc_cancelDrawing.sqf
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Author: esteldunedain
- * Cancel the drawing of the current line marker
- *
- * Arguments:
- * None
- *
- * Return value:
- * None
- *
- * Public: No
- */
-#include "script_component.hpp"
-
-GVAR(drawing_isDrawing) = false;
-if (count GVAR(drawing_tempLineMarker) > 0) then {
- deleteMarkerLocal (GVAR(drawing_tempLineMarker) select 0);
-};
-GVAR(drawing_tempLineMarker) = [];
diff --git a/addons/maptools/functions/fnc_copyMapReceiveMarkers.sqf b/addons/maptools/functions/fnc_copyMapReceiveMarkers.sqf
deleted file mode 100644
index 6c3c706208..0000000000
--- a/addons/maptools/functions/fnc_copyMapReceiveMarkers.sqf
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Author: esteldunedain
- * Copy recieved markers to map
- *
- * Arguments:
- * 0: Array of markers to copy
- *
- * Return value:
- * None
- *
- * Public: No
- */
-#include "script_component.hpp"
-
-params ["_lineMarkers"];
-
-{
- private "_marker";
- _marker = _x;
- //Add marker if we don't already have it
- if (({(_x select 0) == (_marker select 0)} count GVAR(drawing_lineMarkers)) == 0) then {
- _marker call FUNC(addLineMarker);
- };
-} forEach _lineMarkers;
diff --git a/addons/maptools/functions/fnc_copyMapRemoteSend.sqf b/addons/maptools/functions/fnc_copyMapRemoteSend.sqf
deleted file mode 100644
index 551019f900..0000000000
--- a/addons/maptools/functions/fnc_copyMapRemoteSend.sqf
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * Author: esteldunedain
- *
- * Send Map markers to other player
- *
- * Argument:
- * 0: Target player (Unit)
- *
- * Return value:
- * Return
- */
-
-#include "script_component.hpp"
-
-params ["_requester"];
-
-["drawing_sendbackMarkers", _requester, [GVAR(drawing_lineMarkers)]] call EFUNC(common,targetEvent);
diff --git a/addons/maptools/functions/fnc_copyMapStart.sqf b/addons/maptools/functions/fnc_copyMapStart.sqf
deleted file mode 100644
index 7295f6f499..0000000000
--- a/addons/maptools/functions/fnc_copyMapStart.sqf
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Author: esteldunedain
- * Send request to remote player
- *
- * Arguments:
- * 0: Player
- * 0: Target player
- *
- * Code Chain:
- * START: copyMapStart: triggers event drawing_requestMarkers on remote
- * handeled by: copyMapRemoteSend: triggers event "drawing_sendbackMarkers" on origin
- * handeled by: copyMapReceiveMarkers
- *
- * Return value:
- * Return
- */
-
-#include "script_component.hpp"
-
-params ["_player", "_target"];
-
-["drawing_requestMarkers", _target, [_player]] call EFUNC(common,targetEvent);
diff --git a/addons/maptools/functions/fnc_handleKeyDown.sqf b/addons/maptools/functions/fnc_handleKeyDown.sqf
deleted file mode 100644
index a83522ac91..0000000000
--- a/addons/maptools/functions/fnc_handleKeyDown.sqf
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Author: esteldunedain
- * Handle key down on map.
- *
- * Arguments:
- * 0: Display (display)
- * 1: Key code (number)
- * 2: Shift Key (boolean)
- * 3: Ctrl Key (boolean)
- * 4: Alt Key (boolean)
- *
- * Return value:
- * Boolean, true if event was handled
- */
-
-#include "script_component.hpp"
-
-params ["", "_code"];
-TRACE_1("params",_code);
-
-private ["_handled", "_relPos", "_diffVector", "_magDiffVector", "_lambdaLong", "_lambdaTrasAbs"];
-
-_handled = false;
-
-#define DIK_ESCAPE 0x01
-#define DIK_DELETE 0xD3
-
-// If pressed Esc while drawing
-if (_code == DIK_ESCAPE) exitWith {
- if (GVAR(drawing_isDrawing)) then {
- call FUNC(cancelDrawing);
- _handled = true;
- };
- _handled
-};
-
-if (_code == DIK_DELETE) exitWith {
- if (GVAR(drawing_isDrawing)) then {
- call FUNC(cancelDrawing);
- _handled = true;
- } else {
-
- // Check if a line marker needs to be deleted
- {
- _relPos = GVAR(mousePosition) vectorDiff (_x select 1);
- _diffVector = (_x select 2) vectorDiff (_x select 1);
- _magDiffVector = vectorMagnitude _diffVector;
- if (_magDiffVector == 0) then {
- _diffVector = [10,0,0];
- _magDiffVector = vectorMagnitude _diffVector;
- };
- _diffVector = _diffVector vectorMultiply (1/_magDiffVector);
-
- // Projection of the relative position over the longitudinal axis
- _lambdaLong = _diffVector vectorDotProduct _relPos;
- // Projection of the relative position over the trasversal axis
- _lambdaTrasAbs = vectorMagnitude (_relPos vectorDiff (_diffVector vectorMultiply _lambdaLong));
- if (_lambdaLong >= 0 && _lambdaLong <= _magDiffVector && _lambdaTrasAbs <= 5) exitWith {
- // Delete the line marker
- if (GVAR(drawing_syncMarkers)) then {
- ["drawing_removeLineMarker", [_x select 0]] call EFUNC(common,globalEvent);
- } else {
- deleteMarkerLocal (_x select 0);
- GVAR(drawing_lineMarkers) = GVAR(drawing_lineMarkers) - [_x];
- };
- _handled = true;
- };
- } forEach GVAR(drawing_lineMarkers);
- };
- _handled
-};
-
-_handled
diff --git a/addons/maptools/functions/fnc_handleMouseButton.sqf b/addons/maptools/functions/fnc_handleMouseButton.sqf
index cb1a4598ad..29a8f8cbf0 100644
--- a/addons/maptools/functions/fnc_handleMouseButton.sqf
+++ b/addons/maptools/functions/fnc_handleMouseButton.sqf
@@ -9,16 +9,13 @@
* Return value:
* Boolean, true if event was handled
*/
-
#include "script_component.hpp"
params ["_dir", "_params"];
_params params ["_control", "_button", "_screenPosX", "_screenPosY", "_shiftKey", "_ctrlKey", "_altKey"];
TRACE_2("params",_dir,_params);
-private["_gui", "_handled", "_marker", "_pos"];
-
-_handled = false;
+private _handled = false;
// If it's not a left button event, exit
if (_button != 0) exitWith {_handled};
@@ -32,51 +29,32 @@ if (_dir != 1) then {
};
} else {
// If clicking
- if !(call FUNC(canDraw)) exitWith {_handled = false;};
+ if !(call FUNC(canUseMapTools)) exitWith {};
// Transform mouse screen position to coordinates
- _pos = _control ctrlMapScreenToWorld [_screenPosX, _screenPosY];
+ private _pos = _control ctrlMapScreenToWorld [_screenPosX, _screenPosY];
_pos set [count _pos, 0];
- if (GVAR(drawing_isDrawing)) exitWith {
- // Already drawing -> Add tempLineMarker to permanent list
- if (GVAR(drawing_syncMarkers)) then {
- deleteMarkerLocal (GVAR(drawing_tempLineMarker) select 0);
- ["drawing_addLineMarker", GVAR(drawing_tempLineMarker)] call EFUNC(common,globalEvent);
- // Log who drew on the briefing screen
- [ACE_INFOFORMAT_1("Player %1 drew on the briefing screen", profileName)] call EFUNC(common,serverLog);
- } else {
- GVAR(drawing_tempLineMarker) call FUNC(updateLineMarker);
- GVAR(drawing_lineMarkers) pushBack (+GVAR(drawing_tempLineMarker));
- };
- GVAR(drawing_tempLineMarker) = [];
- GVAR(drawing_isDrawing) = false;
- _handled = true;
- };
-
- if (_altKey) exitWith {
- // Start drawing
- GVAR(drawing_isDrawing) = true;
- // Create tempLineMarker
- _gui = format ["%1%2%3%4", random (100), random (100), random (100), random (100)];
- GVAR(drawing_tempLineMarker) = [_gui, + _pos, + _pos, GVAR(drawing_drawColor)];
- _marker = createMarkerLocal [_gui, [0,0]];
- GVAR(drawing_tempLineMarker) call FUNC(updateLineMarker);
- _handled = true;
- };
-
GVAR(mapTool_isDragging) = false;
GVAR(mapTool_isRotating) = false;
// If no map tool marker then exit
- if (GVAR(mapTool_Shown) == 0) exitWith {_handled = false;};
+ if (GVAR(mapTool_Shown) == 0) exitWith {};
// Check if clicking the maptool
if (_pos call FUNC(isInsideMapTool)) exitWith {
// Store data for dragging
GVAR(mapTool_startPos) = + GVAR(mapTool_pos);
GVAR(mapTool_startDragPos) = + _pos;
- if (_ctrlKey) then {
+
+ private _rotateKeyPressed = switch (GVAR(rotateModifierKey)) do {
+ case (1): {_altKey};
+ case (2): {_ctrlKey};
+ case (3): {_shiftKey};
+ default {false};
+ };
+
+ if (_rotateKeyPressed) then {
// Store data for rotating
GVAR(mapTool_startAngle) = + GVAR(mapTool_angle);
GVAR(mapTool_startDragAngle) = (180 + ((GVAR(mapTool_startDragPos) select 0) - (GVAR(mapTool_startPos) select 0)) atan2 ((GVAR(mapTool_startDragPos) select 1) - (GVAR(mapTool_startPos) select 1)) mod 360);
@@ -88,7 +66,6 @@ if (_dir != 1) then {
};
_handled = true;
};
- _handled
};
_handled
diff --git a/addons/maptools/functions/fnc_handleMouseMove.sqf b/addons/maptools/functions/fnc_handleMouseMove.sqf
index b27087290b..86c0c11212 100644
--- a/addons/maptools/functions/fnc_handleMouseMove.sqf
+++ b/addons/maptools/functions/fnc_handleMouseMove.sqf
@@ -15,44 +15,28 @@
params ["_control", "_mousePosX", "_mousePosY"];
TRACE_3("params",_control,_mousePosX,_mousePosY);
-private ["_control", "_pos"];
-
-GVAR(mousePosition) = _control ctrlMapScreenToWorld [_mousePosX, _mousePosY];
-GVAR(mousePosition) set [2, 0]; //convert 2d pos to 3d
-
-// If cannot draw then exit
-if !(call FUNC(canDraw)) exitWith {
- // If was drawing, cancel
- if (GVAR(drawing_isDrawing)) then {
- call FUNC(cancelDrawing);
- };
+// If have no map tools, then exit
+if (((isNull ACE_player) || {!("ACE_MapTools" in items ACE_player)})) exitWith {
false
};
-// Handle drawing
-if (GVAR(drawing_isDrawing)) exitWith {
- GVAR(drawing_tempLineMarker) set [2, GVAR(mousePosition)];
- TRACE_1("updating line pos",GVAR(mousePosition));
- GVAR(drawing_tempLineMarker) call FUNC(updateLineMarker);
- false
-};
-
-// Handle Map tools
+// If map tools not shown, then exit
if (GVAR(mapTool_Shown) == 0) exitWith {false};
+private _mousePosition = _control ctrlMapScreenToWorld [_mousePosX, _mousePosY];
+
// Translation
if (GVAR(mapTool_isDragging)) exitWith {
- GVAR(mapTool_pos) set [0, (GVAR(mapTool_startPos) select 0) + (GVAR(mousePosition) select 0) - (GVAR(mapTool_startDragPos) select 0)];
- GVAR(mapTool_pos) set [1, (GVAR(mapTool_startPos) select 1) + (GVAR(mousePosition) select 1) - (GVAR(mapTool_startDragPos) select 1)];
+ GVAR(mapTool_pos) set [0, (GVAR(mapTool_startPos) select 0) + (_mousePosition select 0) - (GVAR(mapTool_startDragPos) select 0)];
+ GVAR(mapTool_pos) set [1, (GVAR(mapTool_startPos) select 1) + (_mousePosition select 1) - (GVAR(mapTool_startDragPos) select 1)];
true
};
// Rotation
if (GVAR(mapTool_isRotating)) exitWith {
- private "_angle";
// Get new angle
- _angle = (180 + ((GVAR(mousePosition) select 0) - (GVAR(mapTool_startPos) select 0)) atan2 ((GVAR(mousePosition) select 1) - (GVAR(mapTool_startPos) select 1)) mod 360);
+ private _angle = (180 + ((_mousePosition select 0) - (GVAR(mapTool_startPos) select 0)) atan2 ((_mousePosition select 1) - (GVAR(mapTool_startPos) select 1)) mod 360);
GVAR(mapTool_angle) = GVAR(mapTool_startAngle) + _angle - GVAR(mapTool_startDragAngle);
true
diff --git a/addons/maptools/functions/fnc_handleMouseZChanged.sqf b/addons/maptools/functions/fnc_handleMouseZChanged.sqf
deleted file mode 100644
index 0af86a81c5..0000000000
--- a/addons/maptools/functions/fnc_handleMouseZChanged.sqf
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Author: esteldunedain
- *
- * Handle mouse wheel.
- *
- * Argument:
- * 0: Control
- * 1: Scroll Amount
- *
- * Return value:
- * Boolean, true if event was handled
- */
-
-#include "script_component.hpp"
-
-private ["_dir", "_params", "_control", "_button", "_screenPos", "_shiftKey", "_ctrlKey", "_handled", "_pos"];
-
-_control = _this select 0;
-_dir = _this select 1;
-_handled = false;
-
-_handled = true;
-// If drawing, change line color
-
-
-//@todo AGM bug:
-// ACE_Map_drawColors is never defined
-
-/* if (count GVAR(drawing_tempLineMarker) > 0) then {
-ACE_Map_drawColor = if (_dir > 0) then {ACE_Map_drawColor + 1} else {ACE_Map_drawColor - 1};
-if (ACE_Map_drawColor >= count ACE_Map_drawColors) then {
- ACE_Map_drawColor = ACE_Map_drawColor - count ACE_Map_drawColors;
-};
-if (ACE_Map_drawColor < 0) then {
- ACE_Map_drawColor = ACE_Map_drawColor + count ACE_Map_drawColors;
-};
-GVAR(drawing_tempLineMarker) set [3, ACE_Map_drawColor];
-GVAR(drawing_tempLineMarker) call ACE_Map_fnc_updateLineMarker;
-
-_handled = true;
-}; */
-_handled
diff --git a/addons/maptools/functions/fnc_isInsideMapTool.sqf b/addons/maptools/functions/fnc_isInsideMapTool.sqf
index eeaf8f346a..d86828ad07 100644
--- a/addons/maptools/functions/fnc_isInsideMapTool.sqf
+++ b/addons/maptools/functions/fnc_isInsideMapTool.sqf
@@ -16,21 +16,19 @@
#define DIST_TOP_TO_CENTER_PERC 0.65
#define DIST_LEFT_TO_CENTER_PERC 0.30
-private ["_textureWidth", "_relPos", "_dirVector", "_lambdaLong", "_lambdaTrasAbs", "_pos"];
-
if (GVAR(mapTool_Shown) == 0) exitWith {false};
-_textureWidth = [TEXTURE_WIDTH_IN_M, TEXTURE_WIDTH_IN_M / 2] select (GVAR(mapTool_Shown) - 1);
+private _textureWidth = [TEXTURE_WIDTH_IN_M, TEXTURE_WIDTH_IN_M / 2] select (GVAR(mapTool_Shown) - 1);
-_pos = [_this select 0, _this select 1, 0];
-_relPos = _pos vectorDiff [GVAR(mapTool_pos) select 0, GVAR(mapTool_pos) select 1, 0];
-_dirVector = [sin(GVAR(mapTool_angle)), cos(GVAR(mapTool_angle)), 0];
+private _pos = [_this select 0, _this select 1, 0];
+private _relPos = _pos vectorDiff [GVAR(mapTool_pos) select 0, GVAR(mapTool_pos) select 1, 0];
+private _dirVector = [sin(GVAR(mapTool_angle)), cos(GVAR(mapTool_angle)), 0];
// Projection of the relative position over the longitudinal axis of the map tool
-_lambdaLong = _dirVector vectorDotProduct _relPos;
+private _lambdaLong = _dirVector vectorDotProduct _relPos;
if (_lambdaLong < DIST_BOTTOM_TO_CENTER_PERC * _textureWidth) exitWith {false};
// Projection of the relative position over the trasversal axis of the map tool
-_lambdaTrasAbs = vectorMagnitude (_relPos vectorDiff (_dirVector vectorMultiply _lambdaLong));
+private _lambdaTrasAbs = vectorMagnitude (_relPos vectorDiff (_dirVector vectorMultiply _lambdaLong));
if (_lambdaLong > DIST_TOP_TO_CENTER_PERC * _textureWidth) exitWith {false};
if (_lambdaTrasAbs > DIST_LEFT_TO_CENTER_PERC * _textureWidth) exitWith {false};
diff --git a/addons/maptools/functions/fnc_openMapGps.sqf b/addons/maptools/functions/fnc_openMapGps.sqf
index dc2df07b57..0f4bb62c87 100644
--- a/addons/maptools/functions/fnc_openMapGps.sqf
+++ b/addons/maptools/functions/fnc_openMapGps.sqf
@@ -14,9 +14,7 @@
params ["_shouldOpenGps"];
-private ["_isOpen"];
-
-_isOpen = !(isNull (uiNamespace getVariable [QGVAR(ui_mapGpsDisplay), displayNull]));
+private _isOpen = !(isNull (uiNamespace getVariable [QGVAR(ui_mapGpsDisplay), displayNull]));
if (_shouldOpenGps && {"ItemGPS" in assignedItems ACE_player} && {!_isOpen}) then {
("RscACE_MapGps" call BIS_fnc_rscLayer) cutRsc ["RscACE_MapGps","PLAIN"];
diff --git a/addons/maptools/functions/fnc_openMapGpsUpdate.sqf b/addons/maptools/functions/fnc_openMapGpsUpdate.sqf
index 092f0720c2..719bf37763 100644
--- a/addons/maptools/functions/fnc_openMapGpsUpdate.sqf
+++ b/addons/maptools/functions/fnc_openMapGpsUpdate.sqf
@@ -3,18 +3,16 @@
#include "script_component.hpp"
-private ["_mapGpsDisplay", "_ctrl"];
-
if ((!("ItemGPS" in assigneditems ACE_player)) || {isNull (uiNamespace getVariable [QGVAR(ui_mapGpsDisplay), displayNull])}) exitWith {
- ("RscACE_MapGps" call BIS_fnc_rscLayer) cutText ["","PLAIN"]; //close GPS RSC
- [(_this select 1)] call CBA_fnc_removePerFrameHandler; //remove frameHandler
+ ("RscACE_MapGps" call BIS_fnc_rscLayer) cutText ["","PLAIN"]; // Close GPS RSC
+ [(_this select 1)] call CBA_fnc_removePerFrameHandler; // Remove frameHandler
};
disableSerialization;
-_mapGpsDisplay = uiNamespace getVariable [QGVAR(ui_mapGpsDisplay), displayNull];
-_ctrl = _mapGpsDisplay displayCtrl 913590;
-_ctrl ctrlSetText str(round(getDir ACE_player)); //set Heading
+private _mapGpsDisplay = uiNamespace getVariable [QGVAR(ui_mapGpsDisplay), displayNull];
+private _ctrl = _mapGpsDisplay displayCtrl 913590;
+_ctrl ctrlSetText str (round (getDir ACE_player)); // Set Heading
_ctrl = _mapGpsDisplay displayCtrl 913591;
-_ctrl ctrlSetText str(round((getPosASL ACE_player) select 2)); //set Altitude
+_ctrl ctrlSetText str (round ((getPosASL ACE_player) select 2) + EGVAR(common,mapAltitude)); // Set Altitude
_ctrl = _mapGpsDisplay displayCtrl 913592;
-_ctrl ctrlSetText mapGridPosition ACE_player; //set grid cords
+_ctrl ctrlSetText mapGridPosition ACE_player; // Set grid cords
diff --git a/addons/maptools/functions/fnc_removeLineMarker.sqf b/addons/maptools/functions/fnc_removeLineMarker.sqf
deleted file mode 100644
index bd0a16adb1..0000000000
--- a/addons/maptools/functions/fnc_removeLineMarker.sqf
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Author: esteldunedain
- * Remove the line marker
- *
- * Arguments:
- * 0: Marker Name
- *
- * Return value:
- * Return
- */
-
-#include "script_component.hpp"
-
-params ["_name"];
-
-deleteMarkerLocal _name;
-{
- if ((_x select 0) == _name) exitWith {
- GVAR(drawing_lineMarkers) = GVAR(drawing_lineMarkers) - [_x];
- };
-} forEach GVAR(drawing_lineMarkers);
-
-if (isServer && GVAR(drawing_syncMarkers)) then {
- {
- if ((_x select 0) == _name) exitWith {
- GVAR(drawing_serverLineMarkers) = GVAR(drawing_serverLineMarkers) - [_x];
- publicVariable QGVAR(drawing_serverLineMarkers);
- };
- } forEach GVAR(drawing_serverLineMarkers);
-};
diff --git a/addons/maptools/functions/fnc_updateLineMarker.sqf b/addons/maptools/functions/fnc_updateLineMarker.sqf
deleted file mode 100644
index 12aee5b1df..0000000000
--- a/addons/maptools/functions/fnc_updateLineMarker.sqf
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Author: esteldunedain
- * Updates the line marker position and scale
- *
- * Arguments:
- * 0: Marker Name
- * 1: Marker start pos
- * 2: Marker end pos
- * 3: Color index
- *
- * Return value:
- * None
- */
-#include "script_component.hpp"
-
-params ["_name", "_startPos", "_endPos", "_color"];
-TRACE_4("params",_name,_startPos,_endPos,_color);
-
-private ["_difPos", "_mag"];
-
-_difPos = _endPos vectorDiff _startPos;
-
-_name setMarkerShapeLocal "RECTANGLE";
-_name setMarkerAlphaLocal 1;
-_name setMarkerColorLocal GVAR(drawing_drawColor);
-_name setMarkerPosLocal (_startPos vectorAdd (_difPos vectorMultiply 0.5));
-_mag = vectorMagnitude _difPos;
-if (_mag > 0) then {
- _name setMarkerSizeLocal [5, _mag / 2];
- _name setMarkerDirLocal (180 + (_difPos select 0) atan2 (_difPos select 1) mod 360);
-} else {
- _name setMarkerSizeLocal [5, 5];
- _name setMarkerDirLocal 0;
-};
diff --git a/addons/maptools/functions/fnc_updateMapToolMarkers.sqf b/addons/maptools/functions/fnc_updateMapToolMarkers.sqf
index 5d11c6a6e9..5a3b0e0821 100644
--- a/addons/maptools/functions/fnc_updateMapToolMarkers.sqf
+++ b/addons/maptools/functions/fnc_updateMapToolMarkers.sqf
@@ -18,40 +18,28 @@
params ["_theMap"];
-private ["_rotatingTexture", "_textureWidth", "_scaleX", "_scaleY", "_xPos", "_yPos"];
+if ((GVAR(mapTool_Shown) == 0) || {!("ACE_MapTools" in items ACE_player)}) exitWith {};
-// Show/Hide draw buttons
-if ([] call FUNC(canDraw)) then {
- { ((findDisplay 12) displayCtrl _x) ctrlShow true; } forEach GVAR(drawing_controls);
-} else {
- { ((findDisplay 12) displayCtrl _x) ctrlShow false; } forEach GVAR(drawing_controls);
- if (GVAR(drawing_isDrawing)) then {
- call FUNC(cancelDrawing);
- };
-};
-
-if (!("ACE_MapTools" in items ACE_player)|| {GVAR(mapTool_Shown) == 0}) exitWith {};
-
-_rotatingTexture = "";
-_textureWidth = 0;
+private _rotatingTexture = "";
+private _textureWidth = 0;
if (GVAR(mapTool_Shown) == 1) then {
- _rotatingTexture = QUOTE(PATHTOF(data\mapToolRotatingNormal.paa));
+ _rotatingTexture = QPATHTOF(data\mapToolRotatingNormal.paa);
_textureWidth = TEXTURE_WIDTH_IN_M;
} else {
- _rotatingTexture = QUOTE(PATHTOF(data\mapToolRotatingSmall.paa));
+ _rotatingTexture = QPATHTOF(data\mapToolRotatingSmall.paa);
_textureWidth = TEXTURE_WIDTH_IN_M / 2;
};
// Update scale of both parts
getResolution params ["_resWidth", "_resHeight", "", "", "_aspectRatio"];
-_scaleX = 32 * _textureWidth * CONSTANT_SCALE * (call FUNC(calculateMapScale));
-_scaleY = _scaleX * ((_resWidth / _resHeight) / _aspectRatio); //handle bad aspect ratios
+private _scaleX = 32 * _textureWidth * CONSTANT_SCALE * (call FUNC(calculateMapScale));
+private _scaleY = _scaleX * ((_resWidth / _resHeight) / _aspectRatio); //handle bad aspect ratios
// Position of the fixed part
-_xPos = GVAR(mapTool_pos) select 0;
-_yPos = (GVAR(mapTool_pos) select 1) + _textureWidth * CENTER_OFFSET_Y_PERC;
+private _xPos = GVAR(mapTool_pos) select 0;
+private _yPos = (GVAR(mapTool_pos) select 1) + _textureWidth * CENTER_OFFSET_Y_PERC;
-_theMap drawIcon [QUOTE(PATHTOF(data\mapToolFixed.paa)), [1,1,1,1], [_xPos,_yPos], _scaleX, _scaleY, 0, "", 0];
+_theMap drawIcon [QPATHTOF(data\mapToolFixed.paa), [1,1,1,1], [_xPos,_yPos], _scaleX, _scaleY, 0, "", 0];
// Position and rotation of the rotating part
_xPos = (GVAR(mapTool_pos) select 0) + sin(GVAR(mapTool_angle)) * _textureWidth * CENTER_OFFSET_Y_PERC;
diff --git a/addons/maptools/stringtable.xml b/addons/maptools/stringtable.xml
index 3db0d4d972..67773353fa 100644
--- a/addons/maptools/stringtable.xml
+++ b/addons/maptools/stringtable.xml
@@ -121,18 +121,6 @@
Schovat GPS na mapě
Скрыть GPS на карте
-
- Copy Map
- Karte kopieren
- Copiar mapa
- Скопировать карту
- Kopiuj oznaczenia mapy
- Copier la carte
- Zkopírovat mapu
- Copiare Carta
- Térkép másolása
- Copiar Mapa
-
Direction: %1°
Drehung: %1°
@@ -145,5 +133,11 @@
Direzione: %1°
Direção: %1
+
+ Rotate Map Tools Key
+
+
+ Modifier key to allow rotating map tools
+
\ No newline at end of file
diff --git a/addons/markers/CfgEventHandlers.hpp b/addons/markers/CfgEventHandlers.hpp
index 0cd959a047..e1f9294767 100644
--- a/addons/markers/CfgEventHandlers.hpp
+++ b/addons/markers/CfgEventHandlers.hpp
@@ -1,4 +1,10 @@
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
@@ -10,3 +16,9 @@ class Extended_PostInit_EventHandlers {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
};
};
+
+class Extended_DisplayLoad_EventHandlers {
+ class RscDiary {
+ ADDON = QUOTE(_this call FUNC(mapDisplayInitEH));
+ };
+};
diff --git a/addons/markers/XEH_PREP.hpp b/addons/markers/XEH_PREP.hpp
new file mode 100644
index 0000000000..c6ad5c6ba2
--- /dev/null
+++ b/addons/markers/XEH_PREP.hpp
@@ -0,0 +1,13 @@
+
+PREP(getEnabledChannels);
+PREP(initInsertMarker);
+PREP(mapDisplayInitEH);
+PREP(mapDrawEH);
+PREP(onLBSelChangedChannel);
+PREP(onLBSelChangedColor);
+PREP(onLBSelChangedShape);
+PREP(onSliderPosChangedAngle);
+PREP(placeMarker);
+PREP(sendMarkersJIP);
+PREP(setMarkerJIP);
+PREP(setMarkerNetwork);
diff --git a/addons/markers/XEH_postInit.sqf b/addons/markers/XEH_postInit.sqf
index f7bf35093c..6e1af95a50 100644
--- a/addons/markers/XEH_postInit.sqf
+++ b/addons/markers/XEH_postInit.sqf
@@ -2,16 +2,15 @@
#include "script_component.hpp"
// recieve remote marker data
-[QGVAR(setMarkerNetwork), {_this call DFUNC(setMarkerNetwork)}] call EFUNC(common,addEventHandler);
+[QGVAR(setMarkerNetwork), {_this call DFUNC(setMarkerNetwork)}] call CBA_fnc_addEventHandler;
// recieve marker data for JIP
-[QGVAR(setMarkerJIP), {_this call DFUNC(setMarkerJIP)}] call EFUNC(common,addEventHandler);
+[QGVAR(setMarkerJIP), {_this call DFUNC(setMarkerJIP)}] call CBA_fnc_addEventHandler;
// request marker data for JIP
if (isMultiplayer && {!isServer} && {hasInterface}) then {
- private _logic = createGroup sideLogic createUnit ["Logic", [0,0,0], [], 0, "NONE"];
-
- [QGVAR(sendMarkersJIP), [_logic]] call EFUNC(common,serverEvent);
+ GVAR(localLogic) = (createGroup sideLogic) createUnit ["Logic", [0,0,0], [], 0, "NONE"];
+ [QGVAR(sendMarkersJIP), [GVAR(localLogic)]] call CBA_fnc_serverEvent;
};
GVAR(mapDisplaysWithDrawEHs) = [];
diff --git a/addons/markers/XEH_preInit.sqf b/addons/markers/XEH_preInit.sqf
index 477632d225..da62205b51 100644
--- a/addons/markers/XEH_preInit.sqf
+++ b/addons/markers/XEH_preInit.sqf
@@ -2,17 +2,7 @@
ADDON = false;
-PREP(getEnabledChannels);
-PREP(initInsertMarker);
-PREP(mapDrawEH);
-PREP(onLBSelChangedChannel);
-PREP(onLBSelChangedColor);
-PREP(onLBSelChangedShape);
-PREP(onSliderPosChangedAngle);
-PREP(placeMarker);
-PREP(sendMarkersJIP);
-PREP(setMarkerJIP);
-PREP(setMarkerNetwork);
+#include "XEH_PREP.hpp"
// init marker types
if (isNil QGVAR(MarkersCache)) then {
@@ -60,6 +50,6 @@ if (isNil QGVAR(MarkerColorsCache)) then {
};
//Server Sync JIP markers:
-[QGVAR(sendMarkersJIP), FUNC(sendMarkersJIP)] call EFUNC(common,addEventHandler);
+[QGVAR(sendMarkersJIP), FUNC(sendMarkersJIP)] call CBA_fnc_addEventHandler;
ADDON = true;
diff --git a/addons/markers/XEH_preStart.sqf b/addons/markers/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/markers/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/markers/config.cpp b/addons/markers/config.cpp
index 24d3c778d8..658a3ab370 100644
--- a/addons/markers/config.cpp
+++ b/addons/markers/config.cpp
@@ -6,8 +6,9 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
- author[] = {"commy2"};
- authorUrl = "https://github.com/commy2/";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"commy2"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
diff --git a/addons/markers/functions/fnc_initInsertMarker.sqf b/addons/markers/functions/fnc_initInsertMarker.sqf
index 08c078c4f5..549a89730d 100644
--- a/addons/markers/functions/fnc_initInsertMarker.sqf
+++ b/addons/markers/functions/fnc_initInsertMarker.sqf
@@ -22,7 +22,7 @@
disableserialization;
params ["_display"];
TRACE_1("params",_display);
-
+
//Can't place markers when can't interact
if !([ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {
_display closeDisplay 2; //emulate "Cancel" button
@@ -238,4 +238,4 @@
//Update now and add eventHandler:
[_aceAngleSlider, _curSelAngle] call FUNC(onSliderPosChangedAngle);
_aceAngleSlider ctrlAddEventHandler ["SliderPosChanged", {_this call FUNC(onSliderPosChangedAngle)}];
-}, _this] call EFUNC(common,execNextFrame);
+}, _this] call CBA_fnc_execNextFrame;
diff --git a/addons/markers/functions/fnc_mapDisplayInitEH.sqf b/addons/markers/functions/fnc_mapDisplayInitEH.sqf
new file mode 100644
index 0000000000..662f6f80c0
--- /dev/null
+++ b/addons/markers/functions/fnc_mapDisplayInitEH.sqf
@@ -0,0 +1,34 @@
+/*
+ * Author: PabstMirror
+ * Handles XEH DisplayLoad for the various map displays (RscDiary)
+ *
+ * Arguments:
+ * 0: Map Display (idd 12,37,52,53)
+ *
+ * Return Value:
+ * None
+ *
+ * Example:
+ * [display] call ace_markers_fnc_mapDisplayInitEH
+ *
+ * Public: No
+ */
+#include "script_component.hpp"
+
+disableSerialization;
+
+params ["_display"];
+TRACE_1("params",_display);
+
+private _bisShapeLB = _display displayctrl 1091;
+private _curSelShape = missionNamespace getVariable [QGVAR(curSelMarkerShape), 0];
+TRACE_2("shape",_bisShapeLB,_curSelShape);
+_bisShapeLB ctrlAddEventHandler ["LBSelChanged", {_this call FUNC(onLBSelChangedShape)}];
+_bisShapeLB lbSetCurSel _curSelShape;
+
+
+private _bisColorLB = _display displayctrl 1090;
+private _curSelColor = missionNamespace getVariable [QGVAR(curSelMarkerColor), 0];
+TRACE_2("color",_bisColorLB,_curSelColor);
+_bisColorLB ctrlAddEventHandler ["LBSelChanged", {_this call FUNC(onLBSelChangedColor)}];
+_bisColorLB lbSetCurSel _curSelColor;
diff --git a/addons/markers/functions/fnc_onLBSelChangedColor.sqf b/addons/markers/functions/fnc_onLBSelChangedColor.sqf
index 215cd72580..dc186a6c61 100644
--- a/addons/markers/functions/fnc_onLBSelChangedColor.sqf
+++ b/addons/markers/functions/fnc_onLBSelChangedColor.sqf
@@ -26,3 +26,15 @@ GVAR(curSelMarkerColor) = _index;
private _config = (configFile >> "CfgMarkerColors") select _data;
GVAR(currentMarkerColorConfigName) = configName _config;
+
+//Set map display to same color:
+private _bisColorLB = switch (false) do {
+ case (isNull findDisplay 12): {(findDisplay 12) displayCtrl 1090};
+ case (isNull findDisplay 52): {(findDisplay 52) displayCtrl 1090};
+ case (isNull findDisplay 53): {(findDisplay 53) displayCtrl 1090};
+ case (isNull findDisplay 37): {(findDisplay 37) displayCtrl 1090};
+ default {controlNull};
+};
+if (_ctrl != _bisColorLB) then { //Don't set what we got a EH from
+ _bisColorLB lbSetCurSel GVAR(curSelMarkerColor);
+};
diff --git a/addons/markers/functions/fnc_onLBSelChangedShape.sqf b/addons/markers/functions/fnc_onLBSelChangedShape.sqf
index 41f0f30a0d..6fd9aabd89 100644
--- a/addons/markers/functions/fnc_onLBSelChangedShape.sqf
+++ b/addons/markers/functions/fnc_onLBSelChangedShape.sqf
@@ -26,3 +26,15 @@ GVAR(curSelMarkerShape) = _index;
private _config = (configFile >> "CfgMarkers") select _data;
GVAR(currentMarkerConfigName) = configName _config;
+
+//Set map display to same shape:
+private _bisShapeLB = switch (false) do {
+ case (isNull findDisplay 12): {(findDisplay 12) displayCtrl 1091};
+ case (isNull findDisplay 52): {(findDisplay 52) displayCtrl 1091};
+ case (isNull findDisplay 53): {(findDisplay 53) displayCtrl 1091};
+ case (isNull findDisplay 37): {(findDisplay 37) displayCtrl 1091};
+ default {controlNull};
+};
+if (_ctrl != _bisShapeLB) then { //Don't set what we got a EH from
+ _bisShapeLB lbSetCurSel GVAR(curSelMarkerShape);
+};
diff --git a/addons/markers/functions/fnc_placeMarker.sqf b/addons/markers/functions/fnc_placeMarker.sqf
index 5b0783b454..281953e104 100644
--- a/addons/markers/functions/fnc_placeMarker.sqf
+++ b/addons/markers/functions/fnc_placeMarker.sqf
@@ -30,7 +30,7 @@ if (_closeNum == 1) then {
GETGVAR(currentMarkerPosition,[]),
GETGVAR(currentMarkerAngle,0)
]
- ]] call EFUNC(common,globalEvent);
+ ]] call CBA_fnc_globalEvent;
- }, []] call EFUNC(common,execNextFrame);
+ }, []] call CBA_fnc_execNextFrame;
};
diff --git a/addons/markers/functions/fnc_sendMarkersJIP.sqf b/addons/markers/functions/fnc_sendMarkersJIP.sqf
index 73a00519e3..e63a32b843 100644
--- a/addons/markers/functions/fnc_sendMarkersJIP.sqf
+++ b/addons/markers/functions/fnc_sendMarkersJIP.sqf
@@ -20,6 +20,6 @@ TRACE_1("params",_logic);
[
QGVAR(setMarkerJIP),
- [_logic],
- [GETGVAR(allMapMarkers,[]), GETGVAR(allMapMarkersProperties,[]), _logic]
-] call EFUNC(common,targetEvent);
+ [GETGVAR(allMapMarkers,[]), GETGVAR(allMapMarkersProperties,[])],
+ [_logic]
+] call CBA_fnc_targetEvent;
diff --git a/addons/markers/functions/fnc_setMarkerJIP.sqf b/addons/markers/functions/fnc_setMarkerJIP.sqf
index bd8832fb36..ccac7d2b7b 100644
--- a/addons/markers/functions/fnc_setMarkerJIP.sqf
+++ b/addons/markers/functions/fnc_setMarkerJIP.sqf
@@ -17,8 +17,8 @@
*/
#include "script_component.hpp"
-params ["_allMapMarkers", "_allMapMarkersProperties", "_logic"];
-TRACE_3("params",_allMapMarkers,_allMapMarkersProperties,_logic);
+params ["_allMapMarkers", "_allMapMarkersProperties"];
+TRACE_3("params",_allMapMarkers,_allMapMarkersProperties);
{
private _index = _allMapMarkers find _x;
@@ -51,4 +51,7 @@ TRACE_3("params",_allMapMarkers,_allMapMarkersProperties,_logic);
false
} count allMapMarkers;
-deleteVehicle _logic;
+private _group = group GVAR(localLogic);
+deleteVehicle GVAR(localLogic);
+GVAR(localLogic) = nil;
+deleteGroup _group;
diff --git a/addons/medical/ACE_Medical_Actions.hpp b/addons/medical/ACE_Medical_Actions.hpp
index 48cf6c87dc..900e6cb26c 100644
--- a/addons/medical/ACE_Medical_Actions.hpp
+++ b/addons/medical/ACE_Medical_Actions.hpp
@@ -6,7 +6,7 @@ class ACE_Head {
ACTION_CONDITION
modifierFunction = QUOTE([ARR_4(_target,_player,0,_this select 3)] call FUNC(modifyMedicalAction));
EXCEPTIONS
- icon = PATHTOF(UI\icons\medical_cross.paa);
+ icon = QPATHTOF(UI\icons\medical_cross.paa);
distance = MEDICAL_ACTION_DISTANCE;
class Bandage {
displayName = CSTRING(Bandage);
@@ -16,7 +16,7 @@ class ACE_Head {
EXCEPTIONS
showDisabled = 1;
priority = 2;
- icon = PATHTOF(UI\icons\bandage.paa);
+ icon = QPATHTOF(UI\icons\bandage.paa);
};
// Advanced medical
class FieldDressing {
@@ -27,28 +27,28 @@ class ACE_Head {
EXCEPTIONS
showDisabled = 0;
priority = 2;
- icon = PATHTOF(UI\icons\bandage.paa);
+ icon = QPATHTOF(UI\icons\bandage.paa);
};
class PackingBandage: fieldDressing {
displayName = CSTRING(Actions_PackingBandage);
condition = QUOTE([ARR_4(_player, _target, 'head', 'PackingBandage')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'head', 'PackingBandage')] call DFUNC(treatment));
EXCEPTIONS
- icon = PATHTOF(UI\icons\packingBandage.paa);
+ icon = QPATHTOF(UI\icons\packingBandage.paa);
};
class ElasticBandage: fieldDressing {
displayName = CSTRING(Actions_ElasticBandage);
condition = QUOTE([ARR_4(_player, _target, 'head', 'ElasticBandage')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'head', 'ElasticBandage')] call DFUNC(treatment));
EXCEPTIONS
- icon = PATHTOF(UI\icons\bandage.paa);
+ icon = QPATHTOF(UI\icons\bandage.paa);
};
class QuikClot: fieldDressing {
displayName = CSTRING(Actions_QuikClot);
condition = QUOTE([ARR_4(_player, _target, 'head', 'QuikClot')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'head', 'QuikClot')] call DFUNC(treatment));
EXCEPTIONS
- icon = PATHTOF(UI\icons\bandage.paa);
+ icon = QPATHTOF(UI\icons\bandage.paa);
};
class CheckPulse: fieldDressing {
displayName = CSTRING(Actions_CheckPulse);
@@ -83,7 +83,7 @@ class ACE_Torso {
ACTION_CONDITION
modifierFunction = QUOTE([ARR_4(_target,_player,1,_this select 3)] call FUNC(modifyMedicalAction));
EXCEPTIONS
- icon = PATHTOF(UI\icons\medical_cross.paa);
+ icon = QPATHTOF(UI\icons\medical_cross.paa);
distance = MEDICAL_ACTION_DISTANCE;
class Bandage {
displayName = CSTRING(Bandage);
@@ -94,7 +94,7 @@ class ACE_Torso {
showDisabled = 1;
priority = 2;
enableInside = 1;
- icon = PATHTOF(UI\icons\bandage.paa);
+ icon = QPATHTOF(UI\icons\bandage.paa);
};
class PlaceInBodyBag {
displayName = CSTRING(PlaceInBodyBag);
@@ -115,7 +115,7 @@ class ACE_Torso {
showDisabled = 1;
priority = 2;
enableInside = 1;
- icon = PATHTOF(UI\icons\triageCard.paa);
+ icon = QPATHTOF(UI\icons\triageCard.paa);
};
class Diagnose {
displayName = CSTRING(Actions_Diagnose);
@@ -138,35 +138,35 @@ class ACE_Torso {
showDisabled = 0;
priority = 2;
enableInside = 1;
- icon = PATHTOF(UI\icons\bandage.paa);
+ icon = QPATHTOF(UI\icons\bandage.paa);
};
class PackingBandage: fieldDressing {
displayName = CSTRING(Actions_PackingBandage);
condition = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(treatment));
EXCEPTIONS
- icon = PATHTOF(UI\icons\packingBandage.paa);
+ icon = QPATHTOF(UI\icons\packingBandage.paa);
};
class ElasticBandage: fieldDressing {
displayName = CSTRING(Actions_ElasticBandage);
condition = QUOTE([ARR_4(_player, _target, 'body', 'ElasticBandage')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'body', 'ElasticBandage')] call DFUNC(treatment));
EXCEPTIONS
- icon = PATHTOF(UI\icons\bandage.paa);
+ icon = QPATHTOF(UI\icons\bandage.paa);
};
class QuikClot: fieldDressing {
displayName = CSTRING(Actions_QuikClot);
condition = QUOTE([ARR_4(_player, _target, 'body', 'QuikClot')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'body', 'QuikClot')] call DFUNC(treatment));
EXCEPTIONS
- icon = PATHTOF(UI\icons\bandage.paa);
+ icon = QPATHTOF(UI\icons\bandage.paa);
};
class SurgicalKit: fieldDressing {
displayName = CSTRING(Use_SurgicalKit);
condition = QUOTE([ARR_4(_player, _target, 'body', 'SurgicalKit')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'body', 'SurgicalKit')] call DFUNC(treatment));
EXCEPTIONS
- icon = PATHTOF(UI\icons\surgicalKit.paa);
+ icon = QPATHTOF(UI\icons\surgicalKit.paa);
};
class PersonalAidKit: fieldDressing {
displayName = CSTRING(Use_Aid_Kit);
@@ -190,7 +190,7 @@ class ACE_ArmLeft {
ACTION_CONDITION
modifierFunction = QUOTE([ARR_4(_target,_player,2,_this select 3)] call FUNC(modifyMedicalAction));
EXCEPTIONS
- icon = PATHTOF(UI\icons\medical_cross.paa);
+ icon = QPATHTOF(UI\icons\medical_cross.paa);
distance = MEDICAL_ACTION_DISTANCE;
class Bandage {
@@ -201,7 +201,7 @@ class ACE_ArmLeft {
EXCEPTIONS
showDisabled = 1;
priority = 2;
- icon = PATHTOF(UI\icons\bandage.paa);
+ icon = QPATHTOF(UI\icons\bandage.paa);
};
// Advanced medical
@@ -213,63 +213,70 @@ class ACE_ArmLeft {
EXCEPTIONS
showDisabled = 0;
priority = 2;
- icon = PATHTOF(UI\icons\bandage.paa);
+ icon = QPATHTOF(UI\icons\bandage.paa);
};
class PackingBandage: fieldDressing {
displayName = CSTRING(Actions_PackingBandage);
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'PackingBandage')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'PackingBandage')] call DFUNC(treatment));
EXCEPTIONS
- icon = PATHTOF(UI\icons\packingBandage.paa);
+ icon = QPATHTOF(UI\icons\packingBandage.paa);
};
class ElasticBandage: fieldDressing {
displayName = CSTRING(Actions_ElasticBandage);
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'ElasticBandage')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'ElasticBandage')] call DFUNC(treatment));
EXCEPTIONS
- icon = PATHTOF(UI\icons\bandage.paa);
+ icon = QPATHTOF(UI\icons\bandage.paa);
};
class QuikClot: fieldDressing {
displayName = CSTRING(Actions_QuikClot);
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'QuikClot')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'QuikClot')] call DFUNC(treatment));
EXCEPTIONS
- icon = PATHTOF(UI\icons\bandage.paa);
+ icon = QPATHTOF(UI\icons\bandage.paa);
};
class Tourniquet: fieldDressing {
displayName = CSTRING(Actions_Tourniquet);
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Tourniquet')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Tourniquet')] call DFUNC(treatment));
EXCEPTIONS
- icon = PATHTOF(UI\icons\tourniquet.paa);
+ icon = QPATHTOF(UI\icons\tourniquet.paa);
};
class Morphine: fieldDressing {
displayName = CSTRING(Inject_Morphine);
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Morphine')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Morphine')] call DFUNC(treatment));
EXCEPTIONS
- icon = PATHTOF(UI\icons\autoInjector.paa);
+ icon = QPATHTOF(UI\icons\autoInjector.paa);
+ };
+ class Adenosine: Morphine {
+ displayName = CSTRING(Inject_Adenosine);
+ condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Adenosine')] call DFUNC(canTreatCached));
+ statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Adenosine')] call DFUNC(treatment));
+ EXCEPTIONS
+ icon = QPATHTOF(UI\icons\autoInjector.paa);
};
class Atropine: Morphine {
displayName = CSTRING(Inject_Atropine);
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Atropine')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Atropine')] call DFUNC(treatment));
EXCEPTIONS
- icon = PATHTOF(UI\icons\autoInjector.paa);
+ icon = QPATHTOF(UI\icons\autoInjector.paa);
};
class Epinephrine: Morphine {
displayName = CSTRING(Inject_Epinephrine);
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Epinephrine')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Epinephrine')] call DFUNC(treatment));
EXCEPTIONS
- icon = PATHTOF(UI\icons\autoInjector.paa);
+ icon = QPATHTOF(UI\icons\autoInjector.paa);
};
class BloodIV: fieldDressing {
displayName = CSTRING(Actions_Blood4_1000);
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV')] call DFUNC(treatment));
EXCEPTIONS
- icon = PATHTOF(UI\icons\iv.paa);
+ icon = QPATHTOF(UI\icons\iv.paa);
};
class BloodIV_500: BloodIV {
displayName = CSTRING(Actions_Blood4_500);
@@ -346,7 +353,7 @@ class ACE_ArmRight {
ACTION_CONDITION
modifierFunction = QUOTE([ARR_4(_target,_player,3,_this select 3)] call FUNC(modifyMedicalAction));
EXCEPTIONS
- icon = PATHTOF(UI\icons\medical_cross.paa);
+ icon = QPATHTOF(UI\icons\medical_cross.paa);
distance = MEDICAL_ACTION_DISTANCE;
class Bandage {
@@ -357,7 +364,7 @@ class ACE_ArmRight {
EXCEPTIONS
showDisabled = 1;
priority = 2;
- icon = PATHTOF(UI\icons\bandage.paa);
+ icon = QPATHTOF(UI\icons\bandage.paa);
};
// Advanced medical
@@ -369,14 +376,14 @@ class ACE_ArmRight {
EXCEPTIONS
showDisabled = 0;
priority = 2;
- icon = PATHTOF(UI\icons\bandage.paa);
+ icon = QPATHTOF(UI\icons\bandage.paa);
};
class PackingBandage: fieldDressing {
displayName = CSTRING(Actions_PackingBandage);
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'PackingBandage')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'PackingBandage')] call DFUNC(treatment));
EXCEPTIONS
- icon = PATHTOF(UI\icons\packingBandage.paa);
+ icon = QPATHTOF(UI\icons\packingBandage.paa);
};
class ElasticBandage: fieldDressing {
displayName = CSTRING(Actions_ElasticBandage);
@@ -395,14 +402,22 @@ class ACE_ArmRight {
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Tourniquet')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Tourniquet')] call DFUNC(treatment));
EXCEPTIONS
- icon = PATHTOF(UI\icons\tourniquet.paa);
+ icon = QPATHTOF(UI\icons\tourniquet.paa);
};
class Morphine: fieldDressing {
displayName = CSTRING(Inject_Morphine);
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Morphine')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Morphine')] call DFUNC(treatment));
EXCEPTIONS
- icon = PATHTOF(UI\icons\autoInjector.paa);
+ icon = QPATHTOF(UI\icons\autoInjector.paa);
+ };
+
+ class Adenosine: Morphine {
+ displayName = CSTRING(Inject_Adenosine);
+ condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Adenosine')] call DFUNC(canTreatCached));
+ statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Adenosine')] call DFUNC(treatment));
+ EXCEPTIONS
+ icon = QPATHTOF(UI\icons\autoInjector.paa);
};
class Atropine: Morphine {
displayName = CSTRING(Inject_Atropine);
@@ -421,7 +436,7 @@ class ACE_ArmRight {
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV')] call DFUNC(treatment));
EXCEPTIONS
- icon = PATHTOF(UI\icons\iv.paa);
+ icon = QPATHTOF(UI\icons\iv.paa);
};
class BloodIV_500: BloodIV {
displayName = CSTRING(Actions_Blood4_500);
@@ -499,7 +514,7 @@ class ACE_LegLeft {
ACTION_CONDITION
modifierFunction = QUOTE([ARR_4(_target,_player,4,_this select 3)] call FUNC(modifyMedicalAction));
EXCEPTIONS
- icon = PATHTOF(UI\icons\medical_cross.paa);
+ icon = QPATHTOF(UI\icons\medical_cross.paa);
distance = MEDICAL_ACTION_DISTANCE;
class Bandage {
@@ -510,7 +525,7 @@ class ACE_LegLeft {
EXCEPTIONS
showDisabled = 1;
priority = 2;
- icon = PATHTOF(UI\icons\bandage.paa);
+ icon = QPATHTOF(UI\icons\bandage.paa);
};
@@ -523,14 +538,14 @@ class ACE_LegLeft {
EXCEPTIONS
showDisabled = 0;
priority = 2;
- icon = PATHTOF(UI\icons\bandage.paa);
+ icon = QPATHTOF(UI\icons\bandage.paa);
};
class PackingBandage: fieldDressing {
displayName = CSTRING(Actions_PackingBandage);
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'PackingBandage')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'PackingBandage')] call DFUNC(treatment));
EXCEPTIONS
- icon = PATHTOF(UI\icons\packingBandage.paa);
+ icon = QPATHTOF(UI\icons\packingBandage.paa);
};
class ElasticBandage: fieldDressing {
displayName = CSTRING(Actions_ElasticBandage);
@@ -549,21 +564,28 @@ class ACE_LegLeft {
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Tourniquet')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Tourniquet')] call DFUNC(treatment));
EXCEPTIONS
- icon = PATHTOF(UI\icons\tourniquet.paa);
+ icon = QPATHTOF(UI\icons\tourniquet.paa);
};
class Morphine: fieldDressing {
displayName = CSTRING(Inject_Morphine);
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Morphine')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Morphine')] call DFUNC(treatment));
EXCEPTIONS
- icon = PATHTOF(UI\icons\autoInjector.paa);
+ icon = QPATHTOF(UI\icons\autoInjector.paa);
+ };
+ class Adenosine: Morphine {
+ displayName = CSTRING(Inject_Atropine);
+ condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Adenosine')] call DFUNC(canTreatCached));
+ statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Adenosine')] call DFUNC(treatment));
+ EXCEPTIONS
+ icon = QPATHTOF(UI\icons\autoInjector.paa);
};
class Atropine: Morphine {
displayName = CSTRING(Inject_Atropine);
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Atropine')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Atropine')] call DFUNC(treatment));
EXCEPTIONS
- icon = PATHTOF(UI\icons\autoInjector.paa);
+ icon = QPATHTOF(UI\icons\autoInjector.paa);
};
class Epinephrine: Morphine {
displayName = CSTRING(Inject_Epinephrine);
@@ -576,7 +598,7 @@ class ACE_LegLeft {
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV')] call DFUNC(treatment));
EXCEPTIONS
- icon = PATHTOF(UI\icons\iv.paa);
+ icon = QPATHTOF(UI\icons\iv.paa);
};
class BloodIV_500: BloodIV {
displayName = CSTRING(Actions_Blood4_500);
@@ -640,7 +662,7 @@ class ACE_LegRight {
ACTION_CONDITION
modifierFunction = QUOTE([ARR_4(_target,_player,5,_this select 3)] call FUNC(modifyMedicalAction));
EXCEPTIONS
- icon = PATHTOF(UI\icons\medical_cross.paa);
+ icon = QPATHTOF(UI\icons\medical_cross.paa);
distance = MEDICAL_ACTION_DISTANCE;
class Bandage {
@@ -651,7 +673,7 @@ class ACE_LegRight {
EXCEPTIONS
showDisabled = 1;
priority = 2;
- icon = PATHTOF(UI\icons\bandage.paa);
+ icon = QPATHTOF(UI\icons\bandage.paa);
};
@@ -664,14 +686,14 @@ class ACE_LegRight {
EXCEPTIONS
showDisabled = 0;
priority = 2;
- icon = PATHTOF(UI\icons\bandage.paa);
+ icon = QPATHTOF(UI\icons\bandage.paa);
};
class PackingBandage: fieldDressing {
displayName = CSTRING(Actions_PackingBandage);
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'PackingBandage')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'PackingBandage')] call DFUNC(treatment));
EXCEPTIONS
- icon = PATHTOF(UI\icons\packingBandage.paa);
+ icon = QPATHTOF(UI\icons\packingBandage.paa);
};
class ElasticBandage: fieldDressing {
displayName = CSTRING(Actions_ElasticBandage);
@@ -690,14 +712,21 @@ class ACE_LegRight {
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Tourniquet')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Tourniquet')] call DFUNC(treatment));
EXCEPTIONS
- icon = PATHTOF(UI\icons\tourniquet.paa);
+ icon = QPATHTOF(UI\icons\tourniquet.paa);
};
class Morphine: fieldDressing {
displayName = CSTRING(Inject_Morphine);
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Morphine')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Morphine')] call DFUNC(treatment));
EXCEPTIONS
- icon = PATHTOF(UI\icons\autoInjector.paa);
+ icon = QPATHTOF(UI\icons\autoInjector.paa);
+ };
+ class Adenosine: Morphine {
+ displayName = CSTRING(Inject_Atropine);
+ condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Adenosine')] call DFUNC(canTreatCached));
+ statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Adenosine')] call DFUNC(treatment));
+ EXCEPTIONS
+ icon = QPATHTOF(UI\icons\autoInjector.paa);
};
class Atropine: Morphine {
displayName = CSTRING(Inject_Atropine);
@@ -716,7 +745,7 @@ class ACE_LegRight {
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV')] call DFUNC(treatment));
EXCEPTIONS
- icon = PATHTOF(UI\icons\iv.paa);
+ icon = QPATHTOF(UI\icons\iv.paa);
};
class BloodIV_500: BloodIV {
displayName = CSTRING(Actions_Blood4_500);
diff --git a/addons/medical/ACE_Medical_SelfActions.hpp b/addons/medical/ACE_Medical_SelfActions.hpp
index 4217e43e91..fca025adcb 100644
--- a/addons/medical/ACE_Medical_SelfActions.hpp
+++ b/addons/medical/ACE_Medical_SelfActions.hpp
@@ -4,11 +4,11 @@ class Medical {
exceptions[] = {"isNotInside", "isNotSitting"};
statement = QUOTE([ARR_3(_target, true, 0)] call DFUNC(displayPatientInformation));
condition = "true";
- icon = PATHTOF(UI\icons\medical_cross.paa);
+ icon = QPATHTOF(UI\icons\medical_cross.paa);
class ACE_Head {
displayName = CSTRING(Head);
- icon = PATHTOF(UI\icons\medical_cross.paa);
+ icon = QPATHTOF(UI\icons\medical_cross.paa);
exceptions[] = {"isNotInside", "isNotSitting"};
statement = QUOTE([ARR_3(_target, true, 0)] call DFUNC(displayPatientInformation));
modifierFunction = QUOTE([ARR_4(_target,_player,0,_this select 3)] call FUNC(modifyMedicalAction));
@@ -23,7 +23,7 @@ class Medical {
statement = QUOTE([ARR_4(_player, _target, 'head', 'Bandage')] call DFUNC(treatment));
showDisabled = 1;
priority = 2;
- icon = PATHTOF(UI\icons\bandage.paa);
+ icon = QPATHTOF(UI\icons\bandage.paa);
};
// Advanced medical
class FieldDressing {
@@ -34,28 +34,28 @@ class Medical {
statement = QUOTE([ARR_4(_player, _target, 'head', 'FieldDressing')] call DFUNC(treatment));
showDisabled = 0;
priority = 2;
- icon = PATHTOF(UI\icons\bandage.paa);
+ icon = QPATHTOF(UI\icons\bandage.paa);
};
class PackingBandage: fieldDressing {
displayName = CSTRING(Actions_PackingBandage);
condition = QUOTE([ARR_4(_player, _target, 'head', 'PackingBandage')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"};
statement = QUOTE([ARR_4(_player, _target, 'head', 'PackingBandage')] call DFUNC(treatment));
- icon = PATHTOF(UI\icons\packingBandage.paa);
+ icon = QPATHTOF(UI\icons\packingBandage.paa);
};
class ElasticBandage: fieldDressing {
displayName = CSTRING(Actions_ElasticBandage);
condition = QUOTE([ARR_4(_player, _target, 'head', 'ElasticBandage')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"};
statement = QUOTE([ARR_4(_player, _target, 'head', 'ElasticBandage')] call DFUNC(treatment));
- icon = PATHTOF(UI\icons\bandage.paa);
+ icon = QPATHTOF(UI\icons\bandage.paa);
};
class QuikClot: fieldDressing {
displayName = CSTRING(Actions_QuikClot);
condition = QUOTE([ARR_4(_player, _target, 'head', 'QuikClot')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"};
statement = QUOTE([ARR_4(_player, _target, 'head', 'QuikClot')] call DFUNC(treatment));
- icon = PATHTOF(UI\icons\bandage.paa);
+ icon = QPATHTOF(UI\icons\bandage.paa);
};
class CheckPulse: fieldDressing {
displayName = CSTRING(Actions_CheckPulse);
@@ -81,7 +81,7 @@ class Medical {
modifierFunction = QUOTE([ARR_4(_target,_player,1,_this select 3)] call FUNC(modifyMedicalAction));
showDisabled = 1;
priority = 2;
- icon = PATHTOF(UI\icons\medical_cross.paa);
+ icon = QPATHTOF(UI\icons\medical_cross.paa);
class Bandage {
displayName = CSTRING(Bandage);
@@ -91,7 +91,7 @@ class Medical {
statement = QUOTE([ARR_4(_player, _target, 'body', 'Bandage')] call DFUNC(treatment));
showDisabled = 1;
priority = 2;
- icon = PATHTOF(UI\icons\bandage.paa);
+ icon = QPATHTOF(UI\icons\bandage.paa);
};
class TriageCard {
@@ -102,7 +102,7 @@ class Medical {
statement = QUOTE([ARR_2(_target, true)] call DFUNC(displayTriageCard));
showDisabled = 1;
priority = 2;
- icon = PATHTOF(UI\icons\triageCard.paa);
+ icon = QPATHTOF(UI\icons\triageCard.paa);
};
// Advanced medical
@@ -114,28 +114,28 @@ class Medical {
statement = QUOTE([ARR_4(_player, _target, 'body', 'FieldDressing')] call DFUNC(treatment));
showDisabled = 0;
priority = 2;
- icon = PATHTOF(UI\icons\bandage.paa);
+ icon = QPATHTOF(UI\icons\bandage.paa);
};
class PackingBandage: fieldDressing {
displayName = CSTRING(Actions_PackingBandage);
condition = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"};
statement = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(treatment));
- icon = PATHTOF(UI\icons\packingBandage.paa);
+ icon = QPATHTOF(UI\icons\packingBandage.paa);
};
class ElasticBandage: fieldDressing {
displayName = CSTRING(Actions_ElasticBandage);
condition = QUOTE([ARR_4(_player, _target, 'body', 'ElasticBandage')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"};
statement = QUOTE([ARR_4(_player, _target, 'body', 'ElasticBandage')] call DFUNC(treatment));
- icon = PATHTOF(UI\icons\bandage.paa);
+ icon = QPATHTOF(UI\icons\bandage.paa);
};
class QuikClot: fieldDressing {
displayName = CSTRING(Actions_QuikClot);
condition = QUOTE([ARR_4(_player, _target, 'body', 'QuikClot')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"};
statement = QUOTE([ARR_4(_player, _target, 'body', 'QuikClot')] call DFUNC(treatment));
- icon = PATHTOF(UI\icons\bandage.paa);
+ icon = QPATHTOF(UI\icons\bandage.paa);
};
};
class ACE_ArmLeft {
@@ -145,7 +145,7 @@ class Medical {
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);
+ icon = QPATHTOF(UI\icons\medical_cross.paa);
class Bandage {
displayName = CSTRING(Bandage);
@@ -155,7 +155,7 @@ class Medical {
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Bandage')] call DFUNC(treatment));
showDisabled = 1;
priority = 2;
- icon = PATHTOF(UI\icons\bandage.paa);
+ icon = QPATHTOF(UI\icons\bandage.paa);
};
// Advanced medical
@@ -167,56 +167,63 @@ class Medical {
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'FieldDressing')] call DFUNC(treatment));
showDisabled = 0;
priority = 2;
- icon = PATHTOF(UI\icons\bandage.paa);
+ icon = QPATHTOF(UI\icons\bandage.paa);
};
class PackingBandage: fieldDressing {
displayName = CSTRING(Actions_PackingBandage);
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'PackingBandage')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"};
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'PackingBandage')] call DFUNC(treatment));
- icon = PATHTOF(UI\icons\packingBandage.paa);
+ icon = QPATHTOF(UI\icons\packingBandage.paa);
};
class ElasticBandage: fieldDressing {
displayName = CSTRING(Actions_ElasticBandage);
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'ElasticBandage')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"};
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'ElasticBandage')] call DFUNC(treatment));
- icon = PATHTOF(UI\icons\bandage.paa);
+ icon = QPATHTOF(UI\icons\bandage.paa);
};
class QuikClot: fieldDressing {
displayName = CSTRING(Actions_QuikClot);
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'QuikClot')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"};
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'QuikClot')] call DFUNC(treatment));
- icon = PATHTOF(UI\icons\bandage.paa);
+ icon = QPATHTOF(UI\icons\bandage.paa);
};
class Tourniquet: fieldDressing {
displayName = CSTRING(Actions_Tourniquet);
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Tourniquet')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"};
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Tourniquet')] call DFUNC(treatment));
- icon = PATHTOF(UI\icons\tourniquet.paa);
+ icon = QPATHTOF(UI\icons\tourniquet.paa);
};
class Morphine: fieldDressing {
displayName = CSTRING(Inject_Morphine);
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Morphine')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"};
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Morphine')] call DFUNC(treatment));
- icon = PATHTOF(UI\icons\autoInjector.paa);
+ icon = QPATHTOF(UI\icons\autoInjector.paa);
+ };
+ class Adenosine: Morphine {
+ displayName = CSTRING(Inject_Atropine);
+ condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Adenosine')] call DFUNC(canTreatCached));
+ exceptions[] = {"isNotInside"};
+ statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Adenosine')] call DFUNC(treatment));
+ icon = QPATHTOF(UI\icons\autoInjector.paa);
};
class Atropine: Morphine {
displayName = CSTRING(Inject_Atropine);
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Atropine')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"};
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Atropine')] call DFUNC(treatment));
- icon = PATHTOF(UI\icons\autoInjector.paa);
+ icon = QPATHTOF(UI\icons\autoInjector.paa);
};
class Epinephrine: Morphine {
displayName = CSTRING(Inject_Epinephrine);
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Epinephrine')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"};
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Epinephrine')] call DFUNC(treatment));
- icon = PATHTOF(UI\icons\autoInjector.paa);
+ icon = QPATHTOF(UI\icons\autoInjector.paa);
};
class CheckPulse: fieldDressing {
displayName = CSTRING(Actions_CheckPulse);
@@ -245,7 +252,7 @@ class Medical {
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);
+ icon = QPATHTOF(UI\icons\medical_cross.paa);
class Bandage {
displayName = CSTRING(Bandage);
@@ -255,7 +262,7 @@ class Medical {
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Bandage')] call DFUNC(treatment));
showDisabled = 1;
priority = 2;
- icon = PATHTOF(UI\icons\bandage.paa);
+ icon = QPATHTOF(UI\icons\bandage.paa);
};
// Advanced medical
@@ -267,14 +274,14 @@ class Medical {
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'FieldDressing')] call DFUNC(treatment));
showDisabled = 0;
priority = 2;
- icon = PATHTOF(UI\icons\bandage.paa);
+ icon = QPATHTOF(UI\icons\bandage.paa);
};
class PackingBandage: fieldDressing {
displayName = CSTRING(Actions_PackingBandage);
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'PackingBandage')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"};
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'PackingBandage')] call DFUNC(treatment));
- icon = PATHTOF(UI\icons\packingBandage.paa);
+ icon = QPATHTOF(UI\icons\packingBandage.paa);
};
class ElasticBandage: fieldDressing {
displayName = CSTRING(Actions_ElasticBandage);
@@ -293,14 +300,21 @@ class Medical {
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Tourniquet')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"};
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Tourniquet')] call DFUNC(treatment));
- icon = PATHTOF(UI\icons\tourniquet.paa);
+ icon = QPATHTOF(UI\icons\tourniquet.paa);
};
class Morphine: fieldDressing {
displayName = CSTRING(Inject_Morphine);
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Morphine')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"};
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Morphine')] call DFUNC(treatment));
- icon = PATHTOF(UI\icons\autoInjector.paa);
+ icon = QPATHTOF(UI\icons\autoInjector.paa);
+ };
+ class Adenosine: Morphine {
+ displayName = CSTRING(Inject_Atropine);
+ condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Adenosine')] call DFUNC(canTreatCached));
+ exceptions[] = {"isNotInside"};
+ statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Adenosine')] call DFUNC(treatment));
+ icon = QPATHTOF(UI\icons\autoInjector.paa);
};
class Atropine: Morphine {
displayName = CSTRING(Inject_Atropine);
@@ -341,7 +355,7 @@ class Medical {
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);
+ icon = QPATHTOF(UI\icons\medical_cross.paa);
class Bandage {
displayName = CSTRING(Bandage);
@@ -351,7 +365,7 @@ class Medical {
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Bandage')] call DFUNC(treatment));
showDisabled = 1;
priority = 2;
- icon = PATHTOF(UI\icons\bandage.paa);
+ icon = QPATHTOF(UI\icons\bandage.paa);
};
@@ -364,14 +378,14 @@ class Medical {
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'FieldDressing')] call DFUNC(treatment));
showDisabled = 0;
priority = 2;
- icon = PATHTOF(UI\icons\bandage.paa);
+ icon = QPATHTOF(UI\icons\bandage.paa);
};
class PackingBandage: fieldDressing {
displayName = CSTRING(Actions_PackingBandage);
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'PackingBandage')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"};
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'PackingBandage')] call DFUNC(treatment));
- icon = PATHTOF(UI\icons\packingBandage.paa);
+ icon = QPATHTOF(UI\icons\packingBandage.paa);
};
class ElasticBandage: fieldDressing {
displayName = CSTRING(Actions_ElasticBandage);
@@ -390,21 +404,28 @@ class Medical {
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Tourniquet')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"};
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Tourniquet')] call DFUNC(treatment));
- icon = PATHTOF(UI\icons\tourniquet.paa);
+ icon = QPATHTOF(UI\icons\tourniquet.paa);
};
class Morphine: fieldDressing {
displayName = CSTRING(Inject_Morphine);
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Morphine')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"};
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Morphine')] call DFUNC(treatment));
- icon = PATHTOF(UI\icons\autoInjector.paa);
+ icon = QPATHTOF(UI\icons\autoInjector.paa);
+ };
+ class Adenosine: Morphine {
+ displayName = CSTRING(Inject_Atropine);
+ condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Adenosine')] call DFUNC(canTreatCached));
+ exceptions[] = {"isNotInside"};
+ statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Adenosine')] call DFUNC(treatment));
+ icon = QPATHTOF(UI\icons\autoInjector.paa);
};
class Atropine: Morphine {
displayName = CSTRING(Inject_Atropine);
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Atropine')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"};
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Atropine')] call DFUNC(treatment));
- icon = PATHTOF(UI\icons\autoInjector.paa);
+ icon = QPATHTOF(UI\icons\autoInjector.paa);
};
class Epinephrine: Morphine {
displayName = CSTRING(Inject_Epinephrine);
@@ -426,7 +447,7 @@ class Medical {
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);
+ icon = QPATHTOF(UI\icons\medical_cross.paa);
class Bandage {
displayName = CSTRING(Bandage);
@@ -436,7 +457,7 @@ class Medical {
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Bandage')] call DFUNC(treatment));
showDisabled = 1;
priority = 2;
- icon = PATHTOF(UI\icons\bandage.paa);
+ icon = QPATHTOF(UI\icons\bandage.paa);
};
@@ -449,14 +470,14 @@ class Medical {
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'FieldDressing')] call DFUNC(treatment));
showDisabled = 0;
priority = 2;
- icon = PATHTOF(UI\icons\bandage.paa);
+ icon = QPATHTOF(UI\icons\bandage.paa);
};
class PackingBandage: fieldDressing {
displayName = CSTRING(Actions_PackingBandage);
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'PackingBandage')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"};
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'PackingBandage')] call DFUNC(treatment));
- icon = PATHTOF(UI\icons\packingBandage.paa);
+ icon = QPATHTOF(UI\icons\packingBandage.paa);
};
class ElasticBandage: fieldDressing {
displayName = CSTRING(Actions_ElasticBandage);
@@ -475,14 +496,21 @@ class Medical {
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Tourniquet')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"};
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Tourniquet')] call DFUNC(treatment));
- icon = PATHTOF(UI\icons\tourniquet.paa);
+ icon = QPATHTOF(UI\icons\tourniquet.paa);
};
class Morphine: fieldDressing {
displayName = CSTRING(Inject_Morphine);
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Morphine')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"};
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Morphine')] call DFUNC(treatment));
- icon = PATHTOF(UI\icons\autoInjector.paa);
+ icon = QPATHTOF(UI\icons\autoInjector.paa);
+ };
+ class Adenosine: Morphine {
+ displayName = CSTRING(Inject_Atropine);
+ condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Adenosine')] call DFUNC(canTreatCached));
+ exceptions[] = {"isNotInside"};
+ statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Adenosine')] call DFUNC(treatment));
+ icon = QPATHTOF(UI\icons\autoInjector.paa);
};
class Atropine: Morphine {
displayName = CSTRING(Inject_Atropine);
diff --git a/addons/medical/ACE_Medical_Treatments.hpp b/addons/medical/ACE_Medical_Treatments.hpp
index ed6a0a8257..059a5d3605 100644
--- a/addons/medical/ACE_Medical_Treatments.hpp
+++ b/addons/medical/ACE_Medical_Treatments.hpp
@@ -50,12 +50,13 @@ class ACE_Medical_Actions {
allowedSelections[] = {"hand_l", "hand_r", "leg_l", "leg_r"};
allowSelfTreatment = 1;
category = "medication";
- requiredMedic = 1;
+ requiredMedic = QGVAR(medicSetting_basicEpi);
treatmentTime = 3;
items[] = {"ACE_epinephrine"};
callbackSuccess = QUOTE(DFUNC(treatmentBasic_epipen));
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
litter[] = { {"All", "", {"ACE_MedicalLitter_epinephrine"}} };
+ treatmentLocations[] = {QGVAR(useLocation_basicEpi)};
};
class BloodIV: Bandage {
displayName = CSTRING(Transfuse_Blood);
@@ -214,6 +215,12 @@ class ACE_Medical_Actions {
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
litter[] = { {"All", "", {"ACE_MedicalLitter_morphine"}} };
};
+ class Adenosine: Morphine {
+ displayName = CSTRING(Inject_Adenosine);
+ displayNameProgress = CSTRING(Injecting_Adenosine);
+ items[] = {"ACE_adenosine"};
+ litter[] = { {"All", "", {"ACE_MedicalLitter_adenosine"}} };
+ };
class Atropine: Morphine {
displayName = CSTRING(Inject_Atropine);
displayNameProgress = CSTRING(Injecting_Atropine);
@@ -431,7 +438,6 @@ class ACE_Medical_Advanced {
bleedingRate = 0.0002;
};
};
-
// Occur when an entire structure or part of it is forcibly pulled away, such as the loss of a permanent tooth or an ear lobe. Explosions, gunshots, and animal bites may cause avulsions.
class Avulsions {
name = CSTRING(Wounds_Avulsion);
@@ -458,7 +464,6 @@ class ACE_Medical_Advanced {
bleedingRate = 0.05;
};
};
-
// Also called bruises, these are the result of a forceful trauma that injures an internal structure without breaking the skin. Blows to the chest, abdomen, or head with a blunt instrument (e.g. a football or a fist) can cause contusions.
class Contusion {
name = CSTRING(Wounds_Contusion);
@@ -484,7 +489,6 @@ class ACE_Medical_Advanced {
maxDamage = 0.2;
};
};
-
// Occur when a heavy object falls onto a person, splitting the skin and shattering or tearing underlying structures.
class CrushWound {
name = CSTRING(Wounds_Crush);
@@ -511,7 +515,6 @@ class ACE_Medical_Advanced {
bleedingRate = 0.0095;
};
};
-
// Slicing wounds made with a sharp instrument, leaving even edges. They may be as minimal as a paper cut or as significant as a surgical incision.
class Cut {
name = CSTRING(Wounds_Cut);
@@ -538,7 +541,6 @@ class ACE_Medical_Advanced {
bleedingRate = 0.05;
};
};
-
// Also called tears, these are separating wounds that produce ragged edges. They are produced by a tremendous force against the body, either from an internal source as in childbirth, or from an external source like a punch.
class Laceration {
name = CSTRING(Wounds_Laceration);
@@ -565,7 +567,6 @@ class ACE_Medical_Advanced {
bleedingRate = 0.03;
};
};
-
// Also called velocity wounds, they are caused by an object entering the body at a high speed, typically a bullet or small peices of shrapnel.
class velocityWound {
name = CSTRING(Wounds_VelocityWound);
@@ -583,6 +584,7 @@ class ACE_Medical_Advanced {
class Medium {
name = CSTRING(Wounds_VelocityWound_Medium);
minDamage = 0.3;
+ maxDamage = 0.75;
bleedingRate = 0.05;
};
class Large {
@@ -591,7 +593,6 @@ class ACE_Medical_Advanced {
bleedingRate = 0.1;
};
};
-
// Deep, narrow wounds produced by sharp objects such as nails, knives, and broken glass.
class punctureWound {
name = CSTRING(Wounds_PunctureWound);
@@ -684,6 +685,11 @@ class ACE_Medical_Advanced {
};
class Treatment {
class Bandaging {
+ // Field dressing is normal average treatment
+ // packing bandage is average treatment, higher reopen change, longer reopening delay
+ // elastic bandage is higher treatment, higher reopen change, shorter reopen delay
+ // quickclot is lower treatment, lower reopen change, longer reopening delay
+
class FieldDressing {
// How effect is the bandage for treating one wounds type injury
effectiveness = 1;
@@ -691,24 +697,41 @@ class ACE_Medical_Advanced {
reopeningChance = 0.1;
reopeningMinDelay = 120;
reopeningMaxDelay = 200;
+
class Abrasion {
- effectiveness = 1;
- reopeningChance = 0;
- reopeningMinDelay = 0;
- reopeningMaxDelay = 0;
+ effectiveness = 3;
+ reopeningChance = 0.3;
+ reopeningMinDelay = 200;
+ reopeningMaxDelay = 1000;
};
- class AbrasionMinor: Abrasion {};
- class AbrasionMedium: Abrasion {};
- class AbrasionLarge: Abrasion {};
+ class AbrasionMinor: Abrasion {
+ effectiveness = 3;
+ };
+ class AbrasionMedium: Abrasion {
+ effectiveness = 2.5;
+ reopeningChance = 0.7;
+ };
+ class AbrasionLarge: Abrasion {
+ effectiveness = 2;
+ reopeningChance = 0.9;
+ };
+
class Avulsions: Abrasion {
- effectiveness = 0.3;
+ effectiveness = 1;
reopeningChance = 0.5;
reopeningMinDelay = 120;
reopeningMaxDelay = 200;
};
- class AvulsionsMinor: Avulsions {};
- class AvulsionsMedium: Avulsions {};
- class AvulsionsLarge: Avulsions {};
+ class AvulsionsMinor: Avulsions {
+ effectiveness = 1;
+ };
+ class AvulsionsMedium: Avulsions {
+ effectiveness = 0.9;
+ };
+ class AvulsionsLarge: Avulsions {
+ effectiveness = 0.75;
+ };
+
class Contusion: Abrasion {
effectiveness = 1;
reopeningChance = 0;
@@ -718,223 +741,134 @@ class ACE_Medical_Advanced {
class ContusionMinor: Contusion {};
class ContusionMedium: Contusion {};
class ContusionLarge: Contusion {};
- class CrushWound: Abrasion {
- effectiveness = 0.6;
- reopeningChance = 0.2;
- reopeningMinDelay = 120;
- reopeningMaxDelay = 200;
- };
- class CrushWoundMinor: CrushWound {};
- class CrushWoundMedium: CrushWound {};
- class CrushWoundLarge: CrushWound {};
- class Cut: Abrasion {
- effectiveness = 0.4;
- reopeningChance = 0.5;
- reopeningMinDelay = 220;
- reopeningMaxDelay = 260;
- };
- class CutMinor: Cut {};
- class CutMedium: Cut {};
- class CutLarge: Cut {};
- class Laceration: Abrasion {
+ class CrushWound: Abrasion {
+ effectiveness = 1;
+ reopeningChance = 0.2;
+ reopeningMinDelay = 20;
+ reopeningMaxDelay = 1000;
+ };
+ class CrushWoundMinor: CrushWound {
+ effectiveness = 1;
+ reopeningChance = 0.2;
+ };
+ class CrushWoundMedium: CrushWound {
effectiveness = 0.7;
reopeningChance = 0.3;
- reopeningMinDelay = 120;
- reopeningMaxDelay = 260;
};
- class LacerationMinor: Laceration {};
- class LacerationMedium: Laceration {};
- class LacerationLarge: Laceration {};
-
- class velocityWound: Abrasion {
- effectiveness = 0.3;
- reopeningChance = 0.8;
- reopeningMinDelay = 20;
- reopeningMaxDelay = 300;
- };
- class velocityWoundMinor: velocityWound {};
- class velocityWoundMedium: velocityWound {};
- class velocityWoundLarge: velocityWound {};
- class punctureWound: Abrasion {
- effectiveness = 0.5;
- reopeningChance = 0.8;
- reopeningMinDelay = 20;
- reopeningMaxDelay = 300;
- };
- class punctureWoundMinor: punctureWound {};
- class punctureWoundMedium: punctureWound {};
- class punctureWoundLarge: punctureWound {};
- };
- class PackingBandage: fieldDressing {
- class Abrasion {
- effectiveness = 1;
- reopeningChance = 0;
- reopeningMinDelay = 0;
- reopeningMaxDelay = 0;
- };
- class AbrasionMinor: Abrasion {};
- class AbrasionMedium: Abrasion {};
- class AbrasionLarge: Abrasion {};
- class Avulsions: Abrasion {
- effectiveness = 1;
- reopeningChance = 0.3;
- reopeningMinDelay = 120;
- reopeningMaxDelay = 200;
- };
- class AvulsionsMinor: Avulsions {};
- class AvulsionsMedium: Avulsions {};
- class AvulsionsLarge: Avulsions {};
- class Contusion: Abrasion {
- effectiveness = 1;
- reopeningChance = 0;
- reopeningMinDelay = 0;
- reopeningMaxDelay = 0;
- };
- class ContusionMinor: Contusion {};
- class ContusionMedium: Contusion {};
- class ContusionLarge: Contusion {};
- class CrushWound: Abrasion {
+ class CrushWoundLarge: CrushWound {
effectiveness = 0.6;
- reopeningChance = 0.2;
- reopeningMinDelay = 120;
- reopeningMaxDelay = 200;
- };
- class CrushWoundMinor: CrushWound {};
- class CrushWoundMedium: CrushWound {};
- class CrushWoundLarge: CrushWound {};
- class Cut: Abrasion {
- effectiveness = 0.2;
- reopeningChance = 0.6;
- reopeningMinDelay = 30;
- reopeningMaxDelay = 260;
- };
- class CutMinor: Cut {};
- class CutMedium: Cut {};
- class CutLarge: Cut {};
- class Laceration: Abrasion {
- effectiveness = 0.3;
- reopeningChance = 0.3;
- reopeningMinDelay = 120;
- reopeningMaxDelay = 260;
- };
- class LacerationMinor: Laceration {};
- class LacerationMedium: Laceration {};
- class LacerationLarge: Laceration {};
- class velocityWound: Abrasion {
- effectiveness = 1;
- reopeningChance = 0.5;
- reopeningMinDelay = 20;
- reopeningMaxDelay = 300;
- };
- class velocityWoundMinor: velocityWound {};
- class velocityWoundMedium: velocityWound {};
- class velocityWoundLarge: velocityWound {};
- class punctureWound: Abrasion {
- effectiveness = 0.3;
- reopeningChance = 0.5;
- reopeningMinDelay = 20;
- reopeningMaxDelay = 300;
- };
- class punctureWoundMinor: punctureWound {};
- class punctureWoundMedium: punctureWound {};
- class punctureWoundLarge: punctureWound {};
- };
- class ElasticBandage: fieldDressing {
- class Abrasion {
- effectiveness = 1;
- reopeningChance = 0;
- reopeningMinDelay = 0;
- reopeningMaxDelay = 0;
- };
- class AbrasionMinor: Abrasion {};
- class AbrasionMedium: Abrasion {};
- class AbrasionLarge: Abrasion {};
- class Avulsions: Abrasion {
- effectiveness = 0.3;
reopeningChance = 0.4;
- reopeningMinDelay = 120;
- reopeningMaxDelay = 200;
};
- class AvulsionsMinor: Avulsions {};
- class AvulsionsMedium: Avulsions {};
- class AvulsionsLarge: Avulsions {};
- class Contusion: Abrasion {
- effectiveness = 1;
- reopeningChance = 0;
- reopeningMinDelay = 0;
- reopeningMaxDelay = 0;
- };
- class ContusionMinor: Contusion {};
- class ContusionMedium: Contusion {};
- class ContusionLarge: Contusion {};
- class CrushWound: Abrasion {
- effectiveness = 1;
- reopeningChance = 0;
- reopeningMinDelay = 0;
- reopeningMaxDelay = 0;
- };
- class CrushWoundMinor: CrushWound {};
- class CrushWoundMedium: CrushWound {};
- class CrushWoundLarge: CrushWound {};
+
class Cut: Abrasion {
- effectiveness = 1;
- reopeningChance = 0.2;
- reopeningMinDelay = 10;
- reopeningMaxDelay = 400;
- };
- class CutMinor: Cut {};
- class CutMedium: Cut {};
- class CutLarge: Cut {};
- class Laceration: Abrasion {
- effectiveness = 1;
- reopeningChance = 0.3;
- reopeningMinDelay = 120;
- reopeningMaxDelay = 260;
- };
- class LacerationMinor: Laceration {};
- class LacerationMedium: Laceration {};
- class LacerationLarge: Laceration {};
- class velocityWound: Abrasion {
- effectiveness = 0.5;
- reopeningChance = 0.5;
- reopeningMinDelay = 20;
- reopeningMaxDelay = 300;
- };
- class velocityWoundMinor: velocityWound {};
- class velocityWoundMedium: velocityWound {};
- class velocityWoundLarge: velocityWound {};
- class punctureWound: Abrasion {
- effectiveness = 0.85;
- reopeningChance = 0.5;
- reopeningMinDelay = 20;
- reopeningMaxDelay = 300;
- };
- class punctureWoundMinor: punctureWound {};
- class punctureWoundMedium: punctureWound {};
- class punctureWoundLarge: punctureWound {};
- };
- class QuikClot: fieldDressing {
- class Abrasion {
- effectiveness = 0.7;
- reopeningChance = 0;
- reopeningMinDelay = 0;
- reopeningMaxDelay = 0;
- };
- class AbrasionMinor: Abrasion {};
- class AbrasionMedium: Abrasion {};
- class AbrasionLarge: Abrasion {};
- class Avulsions: Abrasion {
- effectiveness = 0.2;
+ effectiveness = 4;
reopeningChance = 0.1;
reopeningMinDelay = 300;
- reopeningMaxDelay = 350;
+ reopeningMaxDelay = 1000;
};
- class AvulsionsMinor: Avulsions {};
- class AvulsionsMedium: Avulsions {};
- class AvulsionsLarge: Avulsions {};
- class Contusion: Abrasion {
+ class CutMinor: Cut {
+ effectiveness = 4;
+ reopeningChance = 0.1;
+ };
+ class CutMedium: Cut {
+ effectiveness = 3;
+ reopeningChance = 0.3;
+ };
+ class CutLarge: Cut {
+ effectiveness = 1;
+ reopeningChance = 0.5;
+ };
+
+ class Laceration: Abrasion {
+ effectiveness = 0.95;
+ reopeningChance = 0.3;
+ reopeningMinDelay = 100;
+ reopeningMaxDelay = 800;
+ };
+ class LacerationMinor: Laceration {
+ effectiveness = 0.95;
+ reopeningChance = 0.3;
+ };
+ class LacerationMedium: Laceration {
effectiveness = 0.7;
+ reopeningChance = 0.5;
+ };
+ class LacerationLarge: Laceration {
+ effectiveness = 0.5;
+ reopeningChance = 0.6;
+ };
+
+ class velocityWound: Abrasion {
+ effectiveness = 2;
+ reopeningChance = 0.7;
+ reopeningMinDelay = 100;
+ reopeningMaxDelay = 500;
+ };
+ class velocityWoundMinor: velocityWound {
+ effectiveness = 2;
+ };
+ class velocityWoundMedium: velocityWound {
+ effectiveness = 1.5;
+ };
+ class velocityWoundLarge: velocityWound {
+ effectiveness = 1;
+ };
+
+ class punctureWound: Abrasion {
+ effectiveness = 2;
+ reopeningChance = 0.5;
+ reopeningMinDelay = 200;
+ reopeningMaxDelay = 850;
+ };
+ class punctureWoundMinor: punctureWound {
+ effectiveness = 2;
+ };
+ class punctureWoundMedium: punctureWound {
+ effectiveness = 1.3;
+ };
+ class punctureWoundLarge: punctureWound {
+ effectiveness = 0.9;
+ };
+ };
+
+ class PackingBandage: fieldDressing {
+ class Abrasion {
+ effectiveness = 3;
+ reopeningChance = 0.6;
+ reopeningMinDelay = 800;
+ reopeningMaxDelay = 1500;
+ };
+ class AbrasionMinor: Abrasion {
+ effectiveness = 3;
+ };
+ class AbrasionMedium: Abrasion {
+ effectiveness = 2.5;
+ reopeningChance = 0.9;
+ };
+ class AbrasionLarge: Abrasion {
+ effectiveness = 2;
+ reopeningChance = 1;
+ };
+
+ class Avulsions: Abrasion {
+ effectiveness = 1;
+ reopeningChance = 0.7;
+ reopeningMinDelay = 1000;
+ reopeningMaxDelay = 1600;
+ };
+ class AvulsionsMinor: Avulsions {
+ effectiveness = 1;
+ };
+ class AvulsionsMedium: Avulsions {
+ effectiveness = 0.9;
+ };
+ class AvulsionsLarge: Avulsions {
+ effectiveness = 0.75;
+ };
+
+ class Contusion: Abrasion {
+ effectiveness = 1;
reopeningChance = 0;
reopeningMinDelay = 0;
reopeningMaxDelay = 0;
@@ -942,54 +876,362 @@ class ACE_Medical_Advanced {
class ContusionMinor: Contusion {};
class ContusionMedium: Contusion {};
class ContusionLarge: Contusion {};
+
class CrushWound: Abrasion {
- effectiveness = 0.7;
- reopeningChance = 0;
- reopeningMinDelay = 0;
- reopeningMaxDelay = 0;
+ effectiveness = 1;
+ reopeningChance = 0.5;
+ reopeningMinDelay = 600;
+ reopeningMaxDelay = 1000;
};
- class CrushWoundMinor: CrushWound {};
- class CrushWoundMedium: CrushWound {};
- class CrushWoundLarge: CrushWound {};
+ class CrushWoundMinor: CrushWound {
+ effectiveness = 1;
+ reopeningChance = 0.6;
+ };
+ class CrushWoundMedium: CrushWound {
+ effectiveness = 0.7;
+ reopeningChance = 0.7;
+ };
+ class CrushWoundLarge: CrushWound {
+ effectiveness = 0.6;
+ reopeningChance = 0.8;
+ };
+
class Cut: Abrasion {
- effectiveness = 0.7;
- reopeningChance = 0.2;
- reopeningMinDelay = 100;
- reopeningMaxDelay = 400;
+ effectiveness = 4;
+ reopeningChance = 0.4;
+ reopeningMinDelay = 700;
+ reopeningMaxDelay = 1000;
};
- class CutMinor: Cut {};
- class CutMedium: Cut {};
- class CutLarge: Cut {};
+ class CutMinor: Cut {
+ effectiveness = 4;
+ reopeningChance = 0.6;
+ };
+ class CutMedium: Cut {
+ effectiveness = 3;
+ reopeningChance = 0.7;
+ };
+ class CutLarge: Cut {
+ effectiveness = 1;
+ reopeningChance = 0.8;
+ };
+
class Laceration: Abrasion {
- effectiveness = 0.7;
- reopeningChance = 0;
- reopeningMinDelay = 0;
- reopeningMaxDelay = 0;
+ effectiveness = 0.95;
+ reopeningChance = 0.65;
+ reopeningMinDelay = 500;
+ reopeningMaxDelay = 2000;
};
- class LacerationMinor: Laceration {};
- class LacerationMedium: Laceration {};
- class LacerationLarge: Laceration {};
- class velocityWound: Abrasion {
- effectiveness = 0.7;
- reopeningChance = 0.1;
- reopeningMinDelay = 200;
- reopeningMaxDelay = 300;
+ class LacerationMinor: Laceration {
+ effectiveness = 0.95;
+ reopeningChance = 0.65;
};
- class velocityWoundMinor: velocityWound {};
- class velocityWoundMedium: velocityWound {};
- class velocityWoundLarge: velocityWound {};
- class punctureWound: Abrasion {
+ class LacerationMedium: Laceration {
+ effectiveness = 0.7;
+ reopeningChance = 0.8;
+ };
+ class LacerationLarge: Laceration {
effectiveness = 0.5;
- reopeningChance = 0.1;
- reopeningMinDelay = 200;
- reopeningMaxDelay = 300;
+ reopeningChance = 0.9;
+ };
+
+ class velocityWound: Abrasion {
+ effectiveness = 2;
+ reopeningChance = 1;
+ reopeningMinDelay = 800;
+ reopeningMaxDelay = 2000;
+ };
+ class velocityWoundMinor: velocityWound {
+ effectiveness = 2;
+ };
+ class velocityWoundMedium: velocityWound {
+ effectiveness = 1.5;
+ };
+ class velocityWoundLarge: velocityWound {
+ effectiveness = 1;
+ };
+
+ class punctureWound: Abrasion {
+ effectiveness = 2;
+ reopeningChance = 1;
+ reopeningMinDelay = 1000;
+ reopeningMaxDelay = 3000;
+ };
+ class punctureWoundMinor: punctureWound {
+ effectiveness = 2;
+ };
+ class punctureWoundMedium: punctureWound {
+ effectiveness = 1.3;
+ };
+ class punctureWoundLarge: punctureWound {
+ effectiveness = 0.9;
};
- class punctureWoundMinor: punctureWound {};
- class punctureWoundMedium: punctureWound {};
- class punctureWoundLarge: punctureWound {};
};
+ class ElasticBandage: fieldDressing {
+ class Abrasion {
+ effectiveness = 4;
+ reopeningChance = 0.6;
+ reopeningMinDelay = 80;
+ reopeningMaxDelay = 150;
+ };
+ class AbrasionMinor: Abrasion {
+ effectiveness = 43;
+ };
+ class AbrasionMedium: Abrasion {
+ effectiveness = 3;
+ reopeningChance = 0.9;
+ };
+ class AbrasionLarge: Abrasion {
+ effectiveness = 2.5;
+ reopeningChance = 1;
+ };
+
+ class Avulsions: Abrasion {
+ effectiveness = 2;
+ reopeningChance = 0.7;
+ reopeningMinDelay = 100;
+ reopeningMaxDelay = 160;
+ };
+ class AvulsionsMinor: Avulsions {
+ effectiveness = 2;
+ };
+ class AvulsionsMedium: Avulsions {
+ effectiveness = 1.4;
+ };
+ class AvulsionsLarge: Avulsions {
+ effectiveness = 1;
+ };
+
+ class Contusion: Abrasion {
+ effectiveness = 2;
+ reopeningChance = 0;
+ reopeningMinDelay = 0;
+ reopeningMaxDelay = 0;
+ };
+ class ContusionMinor: Contusion {};
+ class ContusionMedium: Contusion {};
+ class ContusionLarge: Contusion {};
+
+ class CrushWound: Abrasion {
+ effectiveness = 2;
+ reopeningChance = 0.5;
+ reopeningMinDelay = 60;
+ reopeningMaxDelay = 100;
+ };
+ class CrushWoundMinor: CrushWound {
+ effectiveness = 2;
+ reopeningChance = 0.6;
+ };
+ class CrushWoundMedium: CrushWound {
+ effectiveness = 1.7;
+ reopeningChance = 0.7;
+ };
+ class CrushWoundLarge: CrushWound {
+ effectiveness = 1.6;
+ reopeningChance = 0.8;
+ };
+
+ class Cut: Abrasion {
+ effectiveness = 5;
+ reopeningChance = 0.4;
+ reopeningMinDelay = 70;
+ reopeningMaxDelay = 100;
+ };
+ class CutMinor: Cut {
+ effectiveness = 5;
+ reopeningChance = 0.6;
+ };
+ class CutMedium: Cut {
+ effectiveness = 3.5;
+ reopeningChance = 0.7;
+ };
+ class CutLarge: Cut {
+ effectiveness = 2;
+ reopeningChance = 0.8;
+ };
+
+ class Laceration: Abrasion {
+ effectiveness = 2;
+ reopeningChance = 0.65;
+ reopeningMinDelay = 50;
+ reopeningMaxDelay = 200;
+ };
+ class LacerationMinor: Laceration {
+ effectiveness = 2;
+ reopeningChance = 0.65;
+ };
+ class LacerationMedium: Laceration {
+ effectiveness = 1.5;
+ reopeningChance = 0.8;
+ };
+ class LacerationLarge: Laceration {
+ effectiveness = 1;
+ reopeningChance = 0.9;
+ };
+
+ class velocityWound: Abrasion {
+ effectiveness = 2.2;
+ reopeningChance = 1;
+ reopeningMinDelay = 80;
+ reopeningMaxDelay = 200;
+ };
+ class velocityWoundMinor: velocityWound {
+ effectiveness = 2.2;
+ };
+ class velocityWoundMedium: velocityWound {
+ effectiveness = 1.75;
+ };
+ class velocityWoundLarge: velocityWound {
+ effectiveness = 1.5;
+ };
+
+ class punctureWound: Abrasion {
+ effectiveness = 2.5;
+ reopeningChance = 1;
+ reopeningMinDelay = 100;
+ reopeningMaxDelay = 300;
+ };
+ class punctureWoundMinor: punctureWound {
+ effectiveness = 2.5;
+ };
+ class punctureWoundMedium: punctureWound {
+ effectiveness = 2;
+ };
+ class punctureWoundLarge: punctureWound {
+ effectiveness = 1.5;
+ };
+ };
+
+ class QuikClot: fieldDressing {
+ class Abrasion {
+ effectiveness = 2;
+ reopeningChance = 0.3;
+ reopeningMinDelay = 800;
+ reopeningMaxDelay = 1500;
+ };
+ class AbrasionMinor: Abrasion {
+ effectiveness = 2;
+ };
+ class AbrasionMedium: Abrasion {
+ effectiveness = 1;
+ reopeningChance = 0.4;
+ };
+ class AbrasionLarge: Abrasion {
+ effectiveness = 0.7;
+ reopeningChance = 5;
+ };
+
+ class Avulsions: Abrasion {
+ effectiveness = 0.7;
+ reopeningChance = 0.2;
+ reopeningMinDelay = 1000;
+ reopeningMaxDelay = 1600;
+ };
+ class AvulsionsMinor: Avulsions {
+ effectiveness = 0.7;
+ };
+ class AvulsionsMedium: Avulsions {
+ effectiveness = 0.65;
+ };
+ class AvulsionsLarge: Avulsions {
+ effectiveness = 0.5;
+ };
+
+ class Contusion: Abrasion {
+ effectiveness = 1;
+ reopeningChance = 0;
+ reopeningMinDelay = 0;
+ reopeningMaxDelay = 0;
+ };
+ class ContusionMinor: Contusion {};
+ class ContusionMedium: Contusion {};
+ class ContusionLarge: Contusion {};
+
+ class CrushWound: Abrasion {
+ effectiveness = 0.6;
+ reopeningChance = 0.5;
+ reopeningMinDelay = 600;
+ reopeningMaxDelay = 1000;
+ };
+ class CrushWoundMinor: CrushWound {
+ effectiveness = 0.6;
+ reopeningChance = 0.3;
+ };
+ class CrushWoundMedium: CrushWound {
+ effectiveness = 0.5;
+ };
+ class CrushWoundLarge: CrushWound {
+ effectiveness = 0.4;
+ };
+
+ class Cut: Abrasion {
+ effectiveness = 2;
+ reopeningChance = 0.2;
+ reopeningMinDelay = 700;
+ reopeningMaxDelay = 1000;
+ };
+ class CutMinor: Cut {
+ effectiveness = 2;
+ reopeningChance = 0.3;
+ };
+ class CutMedium: Cut {
+ effectiveness = 1;
+ };
+ class CutLarge: Cut {
+ effectiveness = 0.6;
+ };
+
+ class Laceration: Abrasion {
+ effectiveness = 0.7;
+ reopeningChance = 0.4;
+ reopeningMinDelay = 500;
+ reopeningMaxDelay = 2000;
+ };
+ class LacerationMinor: Laceration {
+ effectiveness = 0.7;
+ reopeningChance = 0.4;
+ };
+ class LacerationMedium: Laceration {
+ effectiveness = 0.7;
+ };
+ class LacerationLarge: Laceration {
+ effectiveness = 0.5;
+ };
+
+ class velocityWound: Abrasion {
+ effectiveness = 1;
+ reopeningChance = 0.5;
+ reopeningMinDelay = 800;
+ reopeningMaxDelay = 2000;
+ };
+ class velocityWoundMinor: velocityWound {
+ effectiveness = 1;
+ };
+ class velocityWoundMedium: velocityWound {
+ effectiveness = 0.75;
+ };
+ class velocityWoundLarge: velocityWound {
+ effectiveness = 0.5;
+ };
+
+ class punctureWound: Abrasion {
+ effectiveness = 1;
+ reopeningChance = 0.5;
+ reopeningMinDelay = 1000;
+ reopeningMaxDelay = 3000;
+ };
+ class punctureWoundMinor: punctureWound {
+ effectiveness = 1;
+ };
+ class punctureWoundMedium: punctureWound {
+ effectiveness = 0.7;
+ };
+ class punctureWoundLarge: punctureWound {
+ effectiveness = 0.4;
+ };
+ };
};
+
class Medication {
// How much does the pain get reduced?
painReduce = 0;
@@ -1018,22 +1260,31 @@ class ACE_Medical_Advanced {
timeInSystem = 900;
maxDose = 4;
inCompatableMedication[] = {};
- viscosityChange = 10;
+ viscosityChange = -10;
};
class Epinephrine {
painReduce = 0;
- hrIncreaseLow[] = {10, 20, 30};
- hrIncreaseNormal[] = {10, 50, 20};
- hrIncreaseHigh[] = {10, 40, 10};
+ hrIncreaseLow[] = {10, 20, 15};
+ hrIncreaseNormal[] = {10, 50, 10};
+ hrIncreaseHigh[] = {10, 40, 5};
timeInSystem = 120;
maxDose = 10;
inCompatableMedication[] = {};
};
+ class Adenosine {
+ painReduce = 0;
+ hrIncreaseLow[] = {-7, -10, 15};
+ hrIncreaseNormal[] = {-15, -30, 20};
+ hrIncreaseHigh[] = {-15, -35, 10};
+ timeInSystem = 120;
+ maxDose = 6;
+ inCompatableMedication[] = {};
+ };
class Atropine {
painReduce = 0;
- hrIncreaseLow[] = {-5, -7, 15};
- hrIncreaseNormal[] = {-10, -30, 20};
- hrIncreaseHigh[] = {-10, -20, 10};
+ hrIncreaseLow[] = {-2, -5, 15};
+ hrIncreaseNormal[] = {-10, -15, 20};
+ hrIncreaseHigh[] = {-5, -20, 10};
timeInSystem = 120;
maxDose = 6;
inCompatableMedication[] = {};
diff --git a/addons/medical/ACE_Settings.hpp b/addons/medical/ACE_Settings.hpp
index 5c3ba86b12..a785c2cad5 100644
--- a/addons/medical/ACE_Settings.hpp
+++ b/addons/medical/ACE_Settings.hpp
@@ -1,12 +1,16 @@
class ACE_Settings {
class GVAR(level) {
category = CSTRING(Category_Medical);
+ displayName = CSTRING(MedicalSettings_level_DisplayName);
+ description = CSTRING(MedicalSettings_level_Description);
value = 1;
typeName = "SCALAR";
values[] = {"Disabled", "Basic", "Advanced"};
};
class GVAR(medicSetting) {
category = CSTRING(Category_Medical);
+ displayName = CSTRING(MedicalSettings_medicSetting_DisplayName);
+ description = CSTRING(MedicalSettings_medicSetting_Description);
value = 1;
typeName = "SCALAR";
values[] = {"Disabled", "Normal", "Advanced"};
@@ -20,6 +24,8 @@ class ACE_Settings {
};
class GVAR(enableFor) {
category = CSTRING(Category_Medical);
+ displayName = CSTRING(AdvancedMedicalSettings_enableFor_DisplayName);
+ description = CSTRING(AdvancedMedicalSettings_enableFor_Description);
value = 0;
typeName = "SCALAR";
values[] = {"Players only", "Players and AI"};
@@ -31,11 +37,15 @@ class ACE_Settings {
};
class GVAR(bleedingCoefficient) {
category = CSTRING(Category_Medical);
+ displayName = CSTRING(MedicalSettings_bleedingCoefficient_DisplayName);
+ description = CSTRING(MedicalSettings_bleedingCoefficient_Description);
typeName = "SCALAR";
value = 1;
};
class GVAR(painCoefficient) {
category = CSTRING(Category_Medical);
+ displayName = CSTRING(MedicalSettings_painCoefficient_DisplayName);
+ description = CSTRING(MedicalSettings_painCoefficient_Description);
typeName = "SCALAR";
value = 1;
};
@@ -51,58 +61,80 @@ class ACE_Settings {
};
class GVAR(enableAdvancedWounds) {
category = CSTRING(Category_Medical);
+ displayName = CSTRING(AdvancedMedicalSettings_enableAdvancedWounds_DisplayName);
+ description = CSTRING(AdvancedMedicalSettings_enableAdvancedWounds_Description);
typeName = "BOOL";
value = false;
};
class GVAR(enableVehicleCrashes) {
category = CSTRING(Category_Medical);
+ displayName = CSTRING(AdvancedMedicalSettings_enableVehicleCrashes_DisplayName);
+ description = CSTRING(AdvancedMedicalSettings_enableVehicleCrashes_Description);
typeName = "BOOL";
value = 1;
};
class GVAR(enableScreams) {
category = CSTRING(Category_Medical);
+ displayName = CSTRING(MedicalSettings_enableScreams_DisplayName);
+ description = CSTRING(MedicalSettings_enableScreams_Description);
typeName = "BOOL";
value = 1;
};
class GVAR(playerDamageThreshold) {
category = CSTRING(Category_Medical);
+ displayName = CSTRING(MedicalSettings_playerDamageThreshold_DisplayName);
+ description = CSTRING(MedicalSettings_playerDamageThreshold_Description);
typeName = "SCALAR";
value = 1;
};
class GVAR(AIDamageThreshold) {
category = CSTRING(Category_Medical);
+ displayName = CSTRING(MedicalSettings_AIDamageThreshold_DisplayName);
+ description = CSTRING(MedicalSettings_AIDamageThreshold_Description);
typeName = "SCALAR";
value = 1;
};
class GVAR(enableUnconsciousnessAI) {
category = CSTRING(Category_Medical);
+ displayName = CSTRING(MedicalSettings_enableUnconsciousnessAI_DisplayName);
+ description = CSTRING(MedicalSettings_enableUnconsciousnessAI_Description);
value = 1;
typeName = "SCALAR";
values[] = {"Disabled", "50/50", "Enabled"};
};
class GVAR(remoteControlledAI) {
category = CSTRING(Category_Medical);
+ displayName = CSTRING(MedicalSettings_remoteControlledAI_DisplayName);
+ description = CSTRING(MedicalSettings_remoteControlledAI_Description);
typeName = "BOOL";
value = 1;
};
class GVAR(preventInstaDeath) {
category = CSTRING(Category_Medical);
+ displayName = CSTRING(MedicalSettings_preventInstaDeath_DisplayName);
+ description = CSTRING(MedicalSettings_preventInstaDeath_Description);
typeName = "BOOL";
value = 0;
};
class GVAR(enableRevive) {
category = CSTRING(Category_Medical);
+ displayName = CSTRING(ReviveSettings_enableRevive_DisplayName);
+ description = CSTRING(ReviveSettings_enableRevive_Description);
typeName = "SCALAR";
value = 0;
values[] = {"Disabled", "Players only", "Players and AI"};
};
class GVAR(maxReviveTime) {
category = CSTRING(Category_Medical);
+ displayName = CSTRING(ReviveSettings_maxReviveTime_DisplayName);
+ description = CSTRING(ReviveSettings_maxReviveTime_Description);
typeName = "SCALAR";
value = 120;
};
class GVAR(amountOfReviveLives) {
category = CSTRING(Category_Medical);
+ displayName = CSTRING(ReviveSettings_amountOfReviveLives_DisplayName);
+ description = CSTRING(ReviveSettings_amountOfReviveLives_Description);
typeName = "SCALAR";
value = -1;
};
@@ -113,6 +145,8 @@ class ACE_Settings {
};
class GVAR(allowLitterCreation) {
category = CSTRING(Category_Medical);
+ displayName = CSTRING(MedicalSettings_allowLitterCreation_DisplayName);
+ description = CSTRING(MedicalSettings_allowLitterCreation_Description);
typeName = "BOOL";
value = 1;
};
@@ -130,41 +164,71 @@ class ACE_Settings {
};
class GVAR(litterCleanUpDelay) {
category = CSTRING(Category_Medical);
+ displayName = CSTRING(MedicalSettings_litterCleanUpDelay_DisplayName);
+ description = CSTRING(MedicalSettings_litterCleanUpDelay_Description);
typeName = "SCALAR";
value = 0;
};
+ class GVAR(medicSetting_basicEpi) {
+ category = CSTRING(Category_Medical);
+ displayName = CSTRING(BasicMedicalSettings_medicSetting_basicEpi_DisplayName);
+ description = CSTRING(BasicMedicalSettings_medicSetting_basicEpi_Description);
+ typeName = "SCALAR";
+ value = 1;
+ values[] = {"Anyone", "Medics only", "Doctors only"};
+ };
class GVAR(medicSetting_PAK) {
category = CSTRING(Category_Medical);
+ displayName = CSTRING(AdvancedMedicalSettings_medicSetting_PAK_DisplayName);
+ description = CSTRING(AdvancedMedicalSettings_medicSetting_PAK_Description);
typeName = "SCALAR";
value = 1;
values[] = {"Anyone", "Medics only", "Doctors only"};
};
class GVAR(medicSetting_SurgicalKit) {
category = CSTRING(Category_Medical);
+ displayName = CSTRING(AdvancedMedicalSettings_medicSetting_SurgicalKit_DisplayName);
+ description = CSTRING(AdvancedMedicalSettings_medicSetting_SurgicalKit_Description);
typeName = "SCALAR";
value = 1;
values[] = {"Anyone", "Medics only", "Doctors only"};
};
class GVAR(consumeItem_PAK) {
category = CSTRING(Category_Medical);
+ displayName = CSTRING(AdvancedMedicalSettings_consumeItem_PAK_DisplayName);
+ description = CSTRING(AdvancedMedicalSettings_consumeItem_PAK_Description);
typeName = "SCALAR";
value = 0;
values[] = {"No", "Yes"};
};
class GVAR(consumeItem_SurgicalKit) {
category = CSTRING(Category_Medical);
+ displayName = CSTRING(AdvancedMedicalSettings_consumeItem_SurgicalKit_DisplayName);
+ description = CSTRING(AdvancedMedicalSettings_consumeItem_SurgicalKit_Description);
typeName = "SCALAR";
value = 0;
values[] = {"No", "Yes"};
};
+ class GVAR(useLocation_basicEpi) {
+ category = CSTRING(Category_Medical);
+ displayName = CSTRING(BasicMedicalSettings_useLocation_basicEpi_DisplayName);
+ description = CSTRING(BasicMedicalSettings_useLocation_basicEpi_Description);
+ typeName = "SCALAR";
+ value = 0;
+ values[] = {CSTRING(AdvancedMedicalSettings_anywhere), CSTRING(AdvancedMedicalSettings_vehicle), CSTRING(AdvancedMedicalSettings_facility), CSTRING(AdvancedMedicalSettings_vehicleAndFacility), ECSTRING(common,Disabled)};
+ };
class GVAR(useLocation_PAK) {
category = CSTRING(Category_Medical);
+ displayName = CSTRING(AdvancedMedicalSettings_useLocation_PAK_DisplayName);
+ description = CSTRING(AdvancedMedicalSettings_useLocation_PAK_Description);
typeName = "SCALAR";
value = 3;
values[] = {CSTRING(AdvancedMedicalSettings_anywhere), CSTRING(AdvancedMedicalSettings_vehicle), CSTRING(AdvancedMedicalSettings_facility), CSTRING(AdvancedMedicalSettings_vehicleAndFacility), ECSTRING(common,Disabled)};
};
class GVAR(useLocation_SurgicalKit) {
category = CSTRING(Category_Medical);
+ displayName = CSTRING(AdvancedMedicalSettings_useLocation_SurgicalKit_DisplayName);
+ description = CSTRING(AdvancedMedicalSettings_useLocation_SurgicalKit_Description);
typeName = "SCALAR";
value = 2;
values[] = {CSTRING(AdvancedMedicalSettings_anywhere), CSTRING(AdvancedMedicalSettings_vehicle), CSTRING(AdvancedMedicalSettings_facility), CSTRING(AdvancedMedicalSettings_vehicleAndFacility), ECSTRING(common,Disabled)};
@@ -187,18 +251,22 @@ class ACE_Settings {
};
class GVAR(keepLocalSettingsSynced) {
category = CSTRING(Category_Medical);
+ displayName = CSTRING(MedicalSettings_keepLocalSettingsSynced_DisplayName);
+ description = CSTRING(MedicalSettings_keepLocalSettingsSynced_Description);
typeName = "BOOL";
value = 1;
};
class GVAR(healHitPointAfterAdvBandage) {
category = CSTRING(Category_Medical);
- displayName = CSTRING(healHitPointAfterAdvBandage);
+ displayName = CSTRING(AdvancedMedicalSettings_healHitPointAfterAdvBandage_DisplayName);
+ description = CSTRING(AdvancedMedicalSettings_healHitPointAfterAdvBandage_Description);
typeName = "BOOL";
value = 0;
};
class GVAR(painIsOnlySuppressed) {
category = CSTRING(Category_Medical);
- displayName = CSTRING(painIsOnlySuppressed);
+ displayName = CSTRING(AdvancedMedicalSettings_painIsOnlySuppressed_DisplayName);
+ description = CSTRING(AdvancedMedicalSettings_painIsOnlySuppressed_Description);
typeName = "BOOL";
value = 1;
};
@@ -220,7 +288,6 @@ class ACE_Settings {
typeName = "BOOL";
value = 0;
};
-
class GVAR(menuTypeStyle) {
category = CSTRING(Category_Medical);
displayName = CSTRING(menuTypeDisplay);
@@ -230,4 +297,11 @@ class ACE_Settings {
values[] = {CSTRING(useSelection), CSTRING(useRadial), "Disabled"};
isClientSettable = 1;
};
+ class GVAR(delayUnconCaptive) {
+ category = CSTRING(Category_Medical);
+ displayName = CSTRING(MedicalSettings_delayUnconCaptive_DisplayName);
+ description = CSTRING(MedicalSettings_delayUnconCaptive_Description);
+ typeName = "SCALAR";
+ value = 3;
+ };
};
diff --git a/addons/medical/CfgEden.hpp b/addons/medical/CfgEden.hpp
new file mode 100644
index 0000000000..a9b4594b66
--- /dev/null
+++ b/addons/medical/CfgEden.hpp
@@ -0,0 +1,70 @@
+class ctrlToolbox;
+
+class Cfg3DEN {
+ class Attributes {
+ class Default;
+ class Title: Default {
+ class Controls {
+ class Title;
+ };
+ };
+ class GVAR(isMedicControl): Title {
+ attributeLoad = "(_this controlsGroupCtrl 100) lbsetcursel (((_value + 1) min 3) max 0);";
+ attributeSave = "(missionnamespace getvariable ['ace_isMeidc_temp',0]) - 1;";
+ class Controls: Controls {
+ class Title: Title{};
+ class Value: ctrlToolbox {
+ idc = 100;
+ style = "0x02";
+ x = "48 * (pixelW * pixelGrid * 0.25)";
+ w = "82 * (pixelW * pixelGrid * 0.25)";
+ h = "5 * (pixelH * pixelGrid * 0.25)";
+ rows = 1;
+ columns = 4;
+ strings[] = {"$STR_3DEN_Attributes_Lock_Default_text", CSTRING(AssignMedicRoles_role_none), CSTRING(AssignMedicRoles_role_medic), CSTRING(AssignMedicRoles_role_doctorShort)};
+ onToolboxSelChanged = "missionnamespace setvariable ['ace_isMeidc_temp',_this select 1];";
+ };
+ };
+ };
+ };
+ class Object {
+ class AttributeCategories {
+ class ace_attributes {
+ class Attributes {
+ class ace_isMedic {
+ property = QUOTE(ace_isMedic);
+ control = QGVAR(isMedicControl);
+ displayName = CSTRING(AssignMedicRoles_role_DisplayName);
+ tooltip = CSTRING(Attributes_isMedic_Description);
+ expression = QUOTE(if (_value != -1) then {_this setVariable [ARR_3(QUOTE(QGVAR(medicClass)),_value, true)];};);
+ typeName = "NUMBER";
+ condition = "objectBrain";
+ defaultValue = "-1";
+ };
+ class ace_isMedicalVehicle {
+ property = QUOTE(ace_isMedicalVehicle);
+ value = 0;
+ control = "CheckboxNumber";
+ displayName = CSTRING(AssignMedicVehicle_enabled_DisplayName);
+ tooltip = CSTRING(Attributes_isMedicalVehicle_Description);
+ expression = QUOTE(_this setVariable [ARR_3(QUOTE(QGVAR(medicClass)),_value, true)];);
+ typeName = "NUMBER";
+ condition = "objectVehicle";
+ defaultValue = 0;
+ };
+ class ace_isMedicalFacility {
+ property = QUOTE(ace_isMedicalFacility);
+ value = 0;
+ control = "Checkbox";
+ displayName = CSTRING(AssignMedicalFacility_enabled_DisplayName);
+ tooltip = CSTRING(AssignMedicalFacility_enabled_Description);
+ expression = QUOTE(_this setVariable [ARR_3(QUOTE(QGVAR(isMedicalFacility)),_value, true)];);
+ typeName = "BOOL";
+ condition = "(1 - objectBrain) * (1 - objectVehicle)";
+ defaultValue = "false";
+ };
+ };
+ };
+ };
+ };
+};
diff --git a/addons/medical/CfgEventHandlers.hpp b/addons/medical/CfgEventHandlers.hpp
index 2fe5d0a9e5..ab7c1868ab 100644
--- a/addons/medical/CfgEventHandlers.hpp
+++ b/addons/medical/CfgEventHandlers.hpp
@@ -1,4 +1,10 @@
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
diff --git a/addons/medical/CfgSounds.hpp b/addons/medical/CfgSounds.hpp
index 6b5fa48344..9cc5faedf9 100644
--- a/addons/medical/CfgSounds.hpp
+++ b/addons/medical/CfgSounds.hpp
@@ -1,37 +1,37 @@
class CfgSounds {
class ACE_heartbeat_fast_1 {
name = "ACE_heartbeat_fast_1";
- sound[] = {QUOTE(PATHTOF(sounds\heart_beats\fast_1.wav)), "db+1", 1};
+ sound[] = {QPATHTOF(sounds\heart_beats\fast_1.wav), "db+1", 1};
titles[] = {};
};
class ACE_heartbeat_fast_2 {
name = "ACE_heartbeat_fast_2";
- sound[] = {QUOTE(PATHTOF(sounds\heart_beats\fast_2.wav)), "db+1", 1};
+ sound[] = {QPATHTOF(sounds\heart_beats\fast_2.wav), "db+1", 1};
titles[] = {};
};
class ACE_heartbeat_fast_3 {
name = "ACE_heartbeat_fast_3";
- sound[] = {QUOTE(PATHTOF(sounds\heart_beats\fast_3.wav)), "db+1", 1};
+ sound[] = {QPATHTOF(sounds\heart_beats\fast_3.wav), "db+1", 1};
titles[] = {};
};
class ACE_heartbeat_norm_1 {
name = "ACE_heartbeat_norm_1";
- sound[] = {QUOTE(PATHTOF(sounds\heart_beats\norm_1.wav)), "db+1", 1};
+ sound[] = {QPATHTOF(sounds\heart_beats\norm_1.wav), "db+1", 1};
titles[] = {};
};
class ACE_heartbeat_norm_2 {
name = "ACE_heartbeat_norm_2";
- sound[] = {QUOTE(PATHTOF(sounds\heart_beats\norm_2.wav)), "db+1", 1};
+ sound[] = {QPATHTOF(sounds\heart_beats\norm_2.wav), "db+1", 1};
titles[] = {};
};
class ACE_heartbeat_slow_1 {
name = "ACE_heartbeat_slow_1";
- sound[] = {QUOTE(PATHTOF(sounds\heart_beats\slow_1.wav)), "db+1", 1};
+ sound[] = {QPATHTOF(sounds\heart_beats\slow_1.wav), "db+1", 1};
titles[] = {};
};
class ACE_heartbeat_slow_2 {
name = "ACE_heartbeat_slow_2";
- sound[] = {QUOTE(PATHTOF(sounds\heart_beats\slow_2.wav)), "db+1", 1};
+ sound[] = {QPATHTOF(sounds\heart_beats\slow_2.wav), "db+1", 1};
titles[] = {};
};
};
diff --git a/addons/medical/CfgVehicles.hpp b/addons/medical/CfgVehicles.hpp
index bb98c7f1fa..3425fa9ad3 100644
--- a/addons/medical/CfgVehicles.hpp
+++ b/addons/medical/CfgVehicles.hpp
@@ -1,6 +1,8 @@
#define MEDICAL_ACTION_DISTANCE 1.75
+class CBA_Extended_EventHandlers;
+
class CfgVehicles {
class Logic;
class Module_F: Logic {
@@ -12,7 +14,7 @@ class CfgVehicles {
class ACE_moduleMedicalSettings: ACE_Module {
scope = 2;
displayName = CSTRING(MedicalSettings_Module_DisplayName);
- icon = QUOTE(PATHTOF(UI\Icon_Module_Medical_ca.paa));
+ icon = QPATHTOF(UI\Icon_Module_Medical_ca.paa);
category = "ACE_medical";
function = QUOTE(DFUNC(moduleMedicalSettings));
functionPriority = 1;
@@ -151,13 +153,54 @@ class CfgVehicles {
sync[] = {};
};
};
+ class ACE_moduleBasicMedicalSettings: ACE_Module {
+ scope = 2;
+ displayName = CSTRING(BasicMedicalSettings_Module_DisplayName);
+ icon = QPATHTOF(UI\Icon_Module_Medical_ca.paa);
+ category = "ACE_medical";
+ function = QFUNC(moduleBasicMedicalSettings);
+ functionPriority = 10;
+ isGlobal = 2;
+ isSingular = 1;
+ isTriggerActivated = 0;
+ isDisposable = 0;
+ author = ECSTRING(common,ACETeam);
+ class Arguments {
+ class medicSetting_basicEpi {
+ displayName = CSTRING(BasicMedicalSettings_medicSetting_basicEpi_DisplayName);
+ description = CSTRING(BasicMedicalSettings_medicSetting_basicEpi_Description);
+ typeName = "NUMBER";
+ class values {
+ class anyone { name = CSTRING(AdvancedMedicalSettings_anyone); value = 0; };
+ class Medic { name = CSTRING(AdvancedMedicalSettings_Medic); value = 1; default = 1; };
+ class Special { name = CSTRING(AdvancedMedicalSettings_Special); value = 2; };
+ };
+ };
+ class useLocation_basicEpi {
+ displayName = CSTRING(BasicMedicalSettings_useLocation_basicEpi_DisplayName);
+ description = CSTRING(BasicMedicalSettings_useLocation_basicEpi_Description);
+ typeName = "NUMBER";
+ class values {
+ class anywhere { name = CSTRING(AdvancedMedicalSettings_anywhere); value = 0; default = 1; };
+ class vehicle { name = CSTRING(AdvancedMedicalSettings_vehicle); value = 1; };
+ class facility { name = CSTRING(AdvancedMedicalSettings_facility); value = 2; };
+ class vehicleAndFacility { name = CSTRING(AdvancedMedicalSettings_vehicleAndFacility); value = 3; };
+ class disabled { name = ECSTRING(common,Disabled); value = 4;};
+ };
+ };
+ };
+ class ModuleDescription {
+ description = CSTRING(BasicMedicalSettings_Module_Description);
+ sync[] = {};
+ };
+ };
class ACE_moduleAdvancedMedicalSettings: ACE_Module {
scope = 2;
displayName = CSTRING(AdvancedMedicalSettings_Module_DisplayName);
- icon = QUOTE(PATHTOF(UI\Icon_Module_Medical_ca.paa));
+ icon = QPATHTOF(UI\Icon_Module_Medical_ca.paa);
category = "ACE_medical";
- function = QUOTE(FUNC(moduleAdvancedMedicalSettings));
+ function = QFUNC(moduleAdvancedMedicalSettings);
functionPriority = 10;
isGlobal = 2;
isSingular = 1;
@@ -277,7 +320,7 @@ class CfgVehicles {
class ACE_moduleReviveSettings: ACE_Module {
scope = 2;
displayName = CSTRING(ReviveSettings_Module_DisplayName);
- icon = QUOTE(PATHTOF(UI\Icon_Module_Medical_ca.paa));
+ icon = QPATHTOF(UI\Icon_Module_Medical_ca.paa);
category = "ACE_medical";
function = QUOTE(DFUNC(moduleReviveSettings));
functionPriority = 1;
@@ -321,9 +364,9 @@ class CfgVehicles {
class ACE_moduleAssignMedicRoles: Module_F {
scope = 2;
displayName = CSTRING(AssignMedicRoles_Module_DisplayName);
- icon = QUOTE(PATHTOF(UI\Icon_Module_Medical_ca.paa));
+ icon = QPATHTOF(UI\Icon_Module_Medical_ca.paa);
category = "ACE_medical";
- function = QUOTE(FUNC(moduleAssignMedicRoles));
+ function = QFUNC(moduleAssignMedicRoles);
functionPriority = 10;
isGlobal = 2;
isTriggerActivated = 0;
@@ -368,9 +411,9 @@ class CfgVehicles {
class ACE_moduleAssignMedicVehicle: Module_F {
scope = 2;
displayName = CSTRING(AssignMedicVehicle_Module_DisplayName);
- icon = QUOTE(PATHTOF(UI\Icon_Module_Medical_ca.paa));
+ icon = QPATHTOF(UI\Icon_Module_Medical_ca.paa);
category = "ACE_medical";
- function = QUOTE(FUNC(moduleAssignMedicalVehicle));
+ function = QFUNC(moduleAssignMedicalVehicle);
functionPriority = 10;
isGlobal = 2;
isTriggerActivated = 0;
@@ -412,9 +455,9 @@ class CfgVehicles {
class ACE_moduleAssignMedicalFacility: Module_F {
scope = 2;
displayName = CSTRING(AssignMedicalFacility_Module_DisplayName);
- icon = QUOTE(PATHTOF(UI\Icon_Module_Medical_ca.paa));
+ icon = QPATHTOF(UI\Icon_Module_Medical_ca.paa);
category = "ACE_medical";
- function = QUOTE(FUNC(moduleAssignMedicalFacility));
+ function = QFUNC(moduleAssignMedicalFacility);
functionPriority = 10;
isGlobal = 2;
isTriggerActivated = 0;
@@ -491,7 +534,7 @@ class CfgVehicles {
exceptions[] = {"isNotInside"};
condition = QUOTE((vehicle _target != _target && vehicle _target == vehicle _player) || GVAR(menuTypeStyle) == 1);
statement = QUOTE([ARR_3(_target, true, 0)] call DFUNC(displayPatientInformation));
- icon = PATHTOF(UI\icons\medical_cross.paa);
+ icon = QPATHTOF(UI\icons\medical_cross.paa);
#undef EXCEPTIONS
#undef ACTION_CONDITION
@@ -506,7 +549,7 @@ class CfgVehicles {
statement = QUOTE([ARR_2(_player, _target)] call DFUNC(actionLoadUnit));
showDisabled = 0;
priority = 2;
- icon = PATHTOF(UI\icons\medical_cross.paa);
+ icon = QPATHTOF(UI\icons\medical_cross.paa);
exceptions[] = {"isNotDragging", "isNotCarrying"};
};
class GVAR(UnLoadPatient) {
@@ -516,7 +559,7 @@ class CfgVehicles {
statement = QUOTE([ARR_2(_player, _target)] call DFUNC(actionUnloadUnit));
showDisabled = 0;
priority = 2;
- icon = PATHTOF(UI\icons\medical_cross.paa);
+ icon = QPATHTOF(UI\icons\medical_cross.paa);
exceptions[] = {"isNotDragging", "isNotCarrying", "isNotInside"};
};
};
@@ -609,15 +652,18 @@ class CfgVehicles {
class MapBoard_altis_F;
class ACE_bodyBagObject: MapBoard_altis_F {
- XEH_ENABLED;
+ class EventHandlers {
+ class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
+ };
+
scope = 1;
scopeCurator = 2;
side = -1;
- model = QUOTE(PATHTOEF(apl,bodybag.p3d));
+ model = QPATHTOEF(apl,bodybag.p3d);
icon = "";
displayName = CSTRING(Bodybag_Display);
EGVAR(dragging,canDrag) = 1;
- EGVAR(dragging,dragPosition[]) = {0,1.2,0};
+ EGVAR(dragging,dragPosition)[] = {0,1.2,0};
EGVAR(dragging,dragDirection) = 0;
EGVAR(cargo,size) = 1;
EGVAR(cargo,canLoad) = 1;
@@ -640,37 +686,40 @@ class CfgVehicles {
scopeCurator = 0;
displayName = " ";
destrType = "DestructNo";
- model = QUOTE(PATHTOF(data\littergeneric.p3d));
+ model = QPATHTOF(data\littergeneric.p3d);
};
class ACE_MedicalLitter_clean: ACE_MedicalLitterBase {
- model = QUOTE(PATHTOF(data\littergeneric_clean.p3d));
+ model = QPATHTOF(data\littergeneric_clean.p3d);
};
class ACE_MedicalLitter_bandage1: ACE_MedicalLitterBase {
- model = QUOTE(PATHTOF(data\littergeneric_bandages1.p3d));
+ model = QPATHTOF(data\littergeneric_bandages1.p3d);
};
class ACE_MedicalLitter_bandage2: ACE_MedicalLitterBase {
- model = QUOTE(PATHTOF(data\littergeneric_bandages2.p3d));
+ model = QPATHTOF(data\littergeneric_bandages2.p3d);
};
class ACE_MedicalLitter_bandage3: ACE_MedicalLitterBase {
- model = QUOTE(PATHTOF(data\littergeneric_bandages3.p3d));
+ model = QPATHTOF(data\littergeneric_bandages3.p3d);
};
class ACE_MedicalLitter_packingBandage: ACE_MedicalLitterBase {
- model = QUOTE(PATHTOF(data\littergeneric_packingBandage.p3d));
+ model = QPATHTOF(data\littergeneric_packingBandage.p3d);
};
class ACE_MedicalLitter_gloves: ACE_MedicalLitterBase {
- model = QUOTE(PATHTOF(data\littergeneric_gloves.p3d));
+ model = QPATHTOF(data\littergeneric_gloves.p3d);
+ };
+ class ACE_MedicalLitter_adenosine: ACE_MedicalLitterBase {
+ model = QPATHTOF(data\littergeneric_adenosine.p3d);
};
class ACE_MedicalLitter_atropine: ACE_MedicalLitterBase {
- model = QUOTE(PATHTOF(data\littergeneric_atropine.p3d));
+ model = QPATHTOF(data\littergeneric_atropine.p3d);
};
class ACE_MedicalLitter_epinephrine: ACE_MedicalLitterBase {
- model = QUOTE(PATHTOF(data\littergeneric_epinephrine.p3d));
+ model = QPATHTOF(data\littergeneric_epinephrine.p3d);
};
class ACE_MedicalLitter_morphine: ACE_MedicalLitterBase {
- model = QUOTE(PATHTOF(data\littergeneric_morphine.p3d));
+ model = QPATHTOF(data\littergeneric_morphine.p3d);
};
class ACE_MedicalLitter_QuickClot: ACE_MedicalLitterBase {
- model = QUOTE(PATHTOF(data\littergeneric_Quikclot.p3d));
+ model = QPATHTOF(data\littergeneric_Quikclot.p3d);
};
class Item_Base_F;
class ACE_fieldDressingItem: Item_Base_F {
@@ -723,6 +772,16 @@ class CfgVehicles {
MACRO_ADDITEM(ACE_morphine,1);
};
};
+ class ACE_adenosineItem: Item_Base_F {
+ scope = 2;
+ scopeCurator = 2;
+ displayName = CSTRING(Adenosine_Display);
+ author = ECSTRING(common,ACETeam);
+ vehicleClass = "Items";
+ class TransportItems {
+ MACRO_ADDITEM(ACE_adenosine,1);
+ };
+ };
class ACE_atropineItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
@@ -821,7 +880,7 @@ class CfgVehicles {
scopeCurator = 2;
accuracy = 1000;
displayName = CSTRING(medicalSupplyCrate);
- model = PATHTOF(data\ace_medcrate.p3d);
+ model = QPATHTOF(data\ace_medcrate.p3d);
author = ECSTRING(common,ACETeam);
class TransportItems {
MACRO_ADDITEM(ACE_fieldDressing,50);
@@ -841,6 +900,7 @@ class CfgVehicles {
MACRO_ADDITEM(ACE_elasticBandage,25);
MACRO_ADDITEM(ACE_tourniquet,15);
MACRO_ADDITEM(ACE_morphine,15);
+ MACRO_ADDITEM(ACE_adenosine,15);
MACRO_ADDITEM(ACE_atropine,15);
MACRO_ADDITEM(ACE_epinephrine,15);
MACRO_ADDITEM(ACE_plasmaIV,7);
diff --git a/addons/medical/CfgWeapons.hpp b/addons/medical/CfgWeapons.hpp
index 6de00eff22..df9a756a34 100644
--- a/addons/medical/CfgWeapons.hpp
+++ b/addons/medical/CfgWeapons.hpp
@@ -22,8 +22,8 @@ class CfgWeapons {
class ACE_ItemCore;
class ACE_fieldDressing: ACE_ItemCore {
scope = 2;
- model = QUOTE(PATHTOF(data\bandage.p3d));
- picture = QUOTE(PATHTOF(ui\items\fieldDressing_x_ca.paa));
+ model = QPATHTOF(data\bandage.p3d);
+ picture = QPATHTOF(ui\items\fieldDressing_x_ca.paa);
displayName = CSTRING(Bandage_Basic_Display);
descriptionShort = CSTRING(Bandage_Basic_Desc_Short);
descriptionUse = CSTRING(Bandage_Basic_Desc_Use);
@@ -34,8 +34,8 @@ class CfgWeapons {
class ACE_packingBandage: ACE_ItemCore {
scope = 2;
displayName = CSTRING(Packing_Bandage_Display);
- picture = QUOTE(PATHTOF(ui\items\packingBandage_x_ca.paa));
- model = QUOTE(PATHTOF(data\packingbandage.p3d));
+ picture = QPATHTOF(ui\items\packingBandage_x_ca.paa);
+ model = QPATHTOF(data\packingbandage.p3d);
descriptionShort = CSTRING(Packing_Bandage_Desc_Short);
descriptionUse = CSTRING(Packing_Bandage_Desc_Use);
class ItemInfo: InventoryItem_Base_F {
@@ -45,7 +45,7 @@ class CfgWeapons {
class ACE_elasticBandage: ACE_ItemCore {
scope = 2;
displayName = CSTRING(Bandage_Elastic_Display);
- picture = QUOTE(PATHTOF(ui\items\elasticBandage_x_ca.paa));
+ picture = QPATHTOF(ui\items\elasticBandage_x_ca.paa);
model = "\A3\Structures_F_EPA\Items\Medical\Bandage_F.p3d";
descriptionShort = CSTRING(Bandage_Elastic_Desc_Short);
descriptionUse = CSTRING(Bandage_Elastic_Desc_Use);
@@ -56,8 +56,8 @@ class CfgWeapons {
class ACE_tourniquet: ACE_ItemCore {
scope = 2;
displayName = CSTRING(Tourniquet_Display);
- picture = QUOTE(PATHTOF(ui\items\tourniquet_x_ca.paa));
- model = QUOTE(PATHTOF(data\tourniquet.p3d));
+ picture = QPATHTOF(ui\items\tourniquet_x_ca.paa);
+ model = QPATHTOF(data\tourniquet.p3d);
descriptionShort = CSTRING(Tourniquet_Desc_Short);
descriptionUse = CSTRING(Tourniquet_Desc_Use);
class ItemInfo: InventoryItem_Base_F {
@@ -67,31 +67,41 @@ class CfgWeapons {
class ACE_morphine: ACE_ItemCore {
scope = 2;
displayName = CSTRING(Morphine_Display);
- picture = QUOTE(PATHTOF(ui\items\morphine_x_ca.paa));
- model = QUOTE(PATHTOF(data\morphine.p3d));
+ picture = QPATHTOF(ui\items\morphine_x_ca.paa);
+ model = QPATHTOF(data\morphine.p3d);
descriptionShort = CSTRING(Morphine_Desc_Short);
descriptionUse = CSTRING(Morphine_Desc_Use);
class ItemInfo: InventoryItem_Base_F {
mass = 1;
};
};
+ class ACE_adenosine: ACE_ItemCore {
+ scope = 2;
+ displayName = CSTRING(Adenosine_Display);
+ picture = QPATHTOF(ui\items\adenosine_x_ca.paa);
+ model = QPATHTOF(data\adenosine.p3d);
+ descriptionShort = CSTRING(adenosine_Desc_Short);
+ descriptionUse = CSTRING(adenosine_Desc_Use);
+ class ItemInfo: InventoryItem_Base_F {
+ mass = 1;
+ };
+ };
class ACE_atropine: ACE_ItemCore {
scope = 2;
displayName = CSTRING(Atropine_Display);
- picture = QUOTE(PATHTOF(ui\items\atropine_x_ca.paa));
- model = QUOTE(PATHTOF(data\atropine.p3d));
+ picture = QPATHTOF(ui\items\atropine_x_ca.paa);
+ model = QPATHTOF(data\atropine.p3d);
descriptionShort = CSTRING(Atropine_Desc_Short);
descriptionUse = CSTRING(Atropine_Desc_Use);
class ItemInfo: InventoryItem_Base_F {
mass = 1;
-
};
};
class ACE_epinephrine: ACE_ItemCore {
scope = 2;
displayName = CSTRING(Epinephrine_Display);
- picture = QUOTE(PATHTOF(ui\items\epinephrine_x_ca.paa));
- model = QUOTE(PATHTOF(data\epinephrine.p3d));
+ picture = QPATHTOF(ui\items\epinephrine_x_ca.paa);
+ model = QPATHTOF(data\epinephrine.p3d);
descriptionShort = CSTRING(Epinephrine_Desc_Short);
descriptionUse = CSTRING(Epinephrine_Desc_Use);
class ItemInfo: InventoryItem_Base_F {
@@ -102,10 +112,10 @@ class CfgWeapons {
class ACE_plasmaIV: ACE_ItemCore {
scope = 2;
displayName = CSTRING(Plasma_IV);
- model = QUOTE(PATHTOF(data\IVBag_1000ml.p3d));
+ model = QPATHTOF(data\IVBag_1000ml.p3d);
hiddenSelections[] = {"camo"};
- hiddenSelectionsTextures[] = { QUOTE(PATHTOF(data\IVBag_plasma_1000ml_ca.paa)) };
- picture = QUOTE(PATHTOF(ui\items\plasmaIV_x_ca.paa));
+ hiddenSelectionsTextures[] = { QPATHTOF(data\IVBag_plasma_1000ml_ca.paa) };
+ picture = QPATHTOF(ui\items\plasmaIV_x_ca.paa);
descriptionShort = CSTRING(Plasma_IV_Desc_Short);
descriptionUse = CSTRING(Plasma_IV_Desc_Use);
class ItemInfo: InventoryItem_Base_F {
@@ -114,27 +124,27 @@ class CfgWeapons {
};
class ACE_plasmaIV_500: ACE_plasmaIV {
displayName = CSTRING(Plasma_IV_500);
- model = QUOTE(PATHTOF(data\IVBag_500ml.p3d));
- hiddenSelectionsTextures[] = { QUOTE(PATHTOF(data\IVBag_plasma_500ml_ca.paa)) };
+ model = QPATHTOF(data\IVBag_500ml.p3d);
+ hiddenSelectionsTextures[] = { QPATHTOF(data\IVBag_plasma_500ml_ca.paa) };
class ItemInfo: InventoryItem_Base_F {
mass = 5;
};
};
class ACE_plasmaIV_250: ACE_plasmaIV {
displayName = CSTRING(Plasma_IV_250);
- model = QUOTE(PATHTOF(data\IVBag_250ml.p3d));
- hiddenSelectionsTextures[] = { QUOTE(PATHTOF(data\IVBag_plasma_250ml_ca.paa)) };
+ model = QPATHTOF(data\IVBag_250ml.p3d);
+ hiddenSelectionsTextures[] = { QPATHTOF(data\IVBag_plasma_250ml_ca.paa) };
class ItemInfo: InventoryItem_Base_F {
mass = 2.5;
};
};
class ACE_bloodIV: ACE_ItemCore {
scope = 2;
- model = QUOTE(PATHTOF(data\IVBag_1000ml.p3d));
+ model = QPATHTOF(data\IVBag_1000ml.p3d);
displayName = CSTRING(Blood_IV);
- picture = QUOTE(PATHTOF(ui\items\bloodIV_x_ca.paa));
+ picture = QPATHTOF(ui\items\bloodIV_x_ca.paa);
hiddenSelections[] = {"camo"};
- hiddenSelectionsTextures[] = { QUOTE(PATHTOF(data\IVBag_blood_1000ml_ca.paa)) };
+ hiddenSelectionsTextures[] = { QPATHTOF(data\IVBag_blood_1000ml_ca.paa) };
descriptionShort = CSTRING(Blood_IV_Desc_Short);
descriptionUse = CSTRING(Blood_IV_Desc_Use);
class ItemInfo: InventoryItem_Base_F {
@@ -143,16 +153,16 @@ class CfgWeapons {
};
class ACE_bloodIV_500: ACE_bloodIV {
displayName = CSTRING(Blood_IV_500);
- model = QUOTE(PATHTOF(data\IVBag_500ml.p3d));
- hiddenSelectionsTextures[] = { QUOTE(PATHTOF(data\IVBag_blood_500ml_ca.paa)) };
+ model = QPATHTOF(data\IVBag_500ml.p3d);
+ hiddenSelectionsTextures[] = { QPATHTOF(data\IVBag_blood_500ml_ca.paa) };
class ItemInfo: InventoryItem_Base_F {
mass = 5;
};
};
class ACE_bloodIV_250: ACE_bloodIV {
displayName = CSTRING(Blood_IV_250);
- model = QUOTE(PATHTOF(data\IVBag_250ml.p3d));
- hiddenSelectionsTextures[] = { QUOTE(PATHTOF(data\IVBag_blood_250ml_ca.paa)) };
+ model = QPATHTOF(data\IVBag_250ml.p3d);
+ hiddenSelectionsTextures[] = { QPATHTOF(data\IVBag_blood_250ml_ca.paa) };
class ItemInfo: InventoryItem_Base_F {
mass = 2.5;
};
@@ -160,10 +170,10 @@ class CfgWeapons {
class ACE_salineIV: ACE_ItemCore {
scope = 2;
displayName = CSTRING(Saline_IV);
- model = QUOTE(PATHTOF(data\IVBag_1000ml.p3d));
+ model = QPATHTOF(data\IVBag_1000ml.p3d);
hiddenSelections[] = {"camo"};
- hiddenSelectionsTextures[] = { QUOTE(PATHTOF(data\IVBag_saline_1000ml_ca.paa)) };
- picture = QUOTE(PATHTOF(ui\items\salineIV_x_ca.paa));
+ hiddenSelectionsTextures[] = { QPATHTOF(data\IVBag_saline_1000ml_ca.paa) };
+ picture = QPATHTOF(ui\items\salineIV_x_ca.paa);
descriptionShort = CSTRING(Saline_IV_Desc_Short);
descriptionUse = CSTRING(Saline_IV_Desc_Use);
class ItemInfo: InventoryItem_Base_F {
@@ -172,16 +182,16 @@ class CfgWeapons {
};
class ACE_salineIV_500: ACE_salineIV {
displayName = CSTRING(Saline_IV_500);
- model = QUOTE(PATHTOF(data\IVBag_500ml.p3d));
- hiddenSelectionsTextures[] = { QUOTE(PATHTOF(data\IVBag_saline_500ml_ca.paa)) };
+ model = QPATHTOF(data\IVBag_500ml.p3d);
+ hiddenSelectionsTextures[] = { QPATHTOF(data\IVBag_saline_500ml_ca.paa) };
class ItemInfo: InventoryItem_Base_F {
mass = 5;
};
};
class ACE_salineIV_250: ACE_salineIV {
displayName = CSTRING(Saline_IV_250);
- model = QUOTE(PATHTOF(data\IVBag_250ml.p3d));
- hiddenSelectionsTextures[] = { QUOTE(PATHTOF(data\IVBag_saline_250ml_ca.paa)) };
+ model = QPATHTOF(data\IVBag_250ml.p3d);
+ hiddenSelectionsTextures[] = { QPATHTOF(data\IVBag_saline_250ml_ca.paa) };
class ItemInfo: InventoryItem_Base_F {
mass = 2.5;
};
@@ -189,8 +199,8 @@ class CfgWeapons {
class ACE_quikclot: ACE_ItemCore {
scope = 2;
displayName = CSTRING(QuikClot_Display);
- model = QUOTE(PATHTOF(data\QuikClot.p3d));
- picture = QUOTE(PATHTOF(ui\items\quickclot_x_ca.paa));
+ model = QPATHTOF(data\QuikClot.p3d);
+ picture = QPATHTOF(ui\items\quickclot_x_ca.paa);
descriptionShort = CSTRING(QuikClot_Desc_Short);
descriptionUse = CSTRING(QuikClot_Desc_Use);
class ItemInfo: InventoryItem_Base_F {
@@ -200,7 +210,7 @@ class CfgWeapons {
class ACE_personalAidKit: ACE_ItemCore {
scope = 2;
displayName = CSTRING(Aid_Kit_Display);
- picture = QUOTE(PATHTOF(ui\items\personal_aid_kit_x_ca.paa));
+ picture = QPATHTOF(ui\items\personal_aid_kit_x_ca.paa);
descriptionShort = CSTRING(Aid_Kit_Desc_Short);
descriptionUse = CSTRING(Aid_Kit_Desc_Use);
class ItemInfo: InventoryItem_Base_F {
@@ -210,8 +220,8 @@ class CfgWeapons {
class ACE_surgicalKit: ACE_ItemCore {
scope=2;
displayName= CSTRING(SurgicalKit_Display);
- model = QUOTE(PATHTOF(data\surgical_kit.p3d));
- picture = QUOTE(PATHTOF(ui\items\surgicalKit_x_ca.paa));
+ model = QPATHTOF(data\surgical_kit.p3d);
+ picture = QPATHTOF(ui\items\surgicalKit_x_ca.paa);
descriptionShort = CSTRING(SurgicalKit_Desc_Short);
descriptionUse = CSTRING(SurgicalKit_Desc_Use);
class ItemInfo: InventoryItem_Base_F {
@@ -221,12 +231,12 @@ class CfgWeapons {
class ACE_bodyBag: ACE_ItemCore {
scope=2;
displayName= CSTRING(Bodybag_Display);
- model = QUOTE(PATHTOF(data\bodybagItem.p3d));
- picture = QUOTE(PATHTOF(ui\items\bodybag_x_ca.paa));
+ model = QPATHTOF(data\bodybagItem.p3d);
+ picture = QPATHTOF(ui\items\bodybag_x_ca.paa);
descriptionShort = CSTRING(Bodybag_Desc_Short);
descriptionUse = CSTRING(Bodybag_Desc_Use);
class ItemInfo: InventoryItem_Base_F {
- mass = 20;
+ mass = 7;
};
};
};
diff --git a/addons/medical/XEH_PREP.hpp b/addons/medical/XEH_PREP.hpp
new file mode 100644
index 0000000000..1b5c752653
--- /dev/null
+++ b/addons/medical/XEH_PREP.hpp
@@ -0,0 +1,122 @@
+
+PREP(actionCheckBloodPressure);
+PREP(actionCheckBloodPressureLocal);
+PREP(actionCheckPulse);
+PREP(actionCheckPulseLocal);
+PREP(actionCheckResponse);
+PREP(actionDiagnose);
+PREP(actionPlaceInBodyBag);
+PREP(actionRemoveTourniquet);
+PREP(actionLoadUnit);
+PREP(actionUnloadUnit);
+PREP(addDamageToUnit);
+PREP(addHeartRateAdjustment);
+PREP(addToInjuredCollection);
+PREP(addToLog);
+PREP(addToTriageCard);
+PREP(addUnconsciousCondition);
+PREP(addUnloadPatientActions);
+PREP(addVitalLoop);
+PREP(adjustPainLevel);
+PREP(bodyCleanupLoop);
+PREP(canAccessMedicalEquipment);
+PREP(canTreat);
+PREP(canTreatCached);
+PREP(determineIfFatal);
+PREP(getBloodLoss);
+PREP(getBloodPressure);
+PREP(getBloodVolumeChange);
+PREP(getCardiacOutput);
+PREP(getTypeOfDamage);
+PREP(getHeartRateChange);
+PREP(getTriageStatus);
+PREP(getUnconsciousCondition);
+PREP(handleDamage);
+PREP(handleDamage_advanced);
+PREP(handleDamage_advancedSetDamage);
+PREP(handleDamage_airway);
+PREP(handleDamage_basic);
+PREP(handleDamage_caching);
+PREP(handleDamage_fractures);
+PREP(handleDamage_internalInjuries);
+PREP(handleDamage_wounds);
+PREP(handleDamage_woundsOld);
+PREP(handleUnitVitals);
+PREP(handleKilled);
+PREP(handleLocal);
+PREP(handleBandageOpening);
+PREP(hasItem);
+PREP(hasItems);
+PREP(hasMedicalEnabled);
+PREP(hasTourniquetAppliedTo);
+PREP(init);
+PREP(isBeingCarried);
+PREP(isBeingDragged);
+PREP(isInMedicalFacility);
+PREP(isInMedicalVehicle);
+PREP(isMedic);
+PREP(isMedicalVehicle);
+PREP(isInStableCondition);
+PREP(itemCheck);
+PREP(medicationEffectLoop);
+PREP(modifyMedicalAction);
+PREP(onMedicationUsage);
+PREP(onWoundUpdateRequest);
+PREP(onPropagateWound);
+PREP(parseConfigForInjuries);
+PREP(playInjuredSound);
+PREP(reviveStateLoop);
+PREP(selectionNameToNumber);
+PREP(serverRemoveBody);
+PREP(setCardiacArrest);
+PREP(setDead);
+PREP(setHitPointDamage);
+PREP(setStructuralDamage);
+PREP(setUnconscious);
+PREP(showBloodEffect);
+PREP(translateSelections);
+PREP(treatment);
+PREP(treatment_failure);
+PREP(treatment_success);
+PREP(treatmentAdvanced_bandage);
+PREP(treatmentAdvanced_bandageLocal);
+PREP(treatmentAdvanced_CPR);
+PREP(treatmentAdvanced_CPRLocal);
+PREP(treatmentAdvanced_fullHeal);
+PREP(treatmentAdvanced_fullHealLocal);
+PREP(treatmentAdvanced_fullHealTreatmentTime);
+PREP(treatmentAdvanced_medication);
+PREP(treatmentAdvanced_medicationLocal);
+PREP(treatmentAdvanced_surgicalKit_onProgress);
+PREP(treatmentBasic_bandage);
+PREP(treatmentBasic_bandageLocal);
+PREP(treatmentBasic_bloodbag);
+PREP(treatmentBasic_bloodbagLocal);
+PREP(treatmentBasic_epipen);
+PREP(treatmentBasic_morphine);
+PREP(treatmentBasic_morphineLocal);
+PREP(treatmentIV);
+PREP(treatmentIVLocal);
+PREP(treatmentTourniquet);
+PREP(treatmentTourniquetLocal);
+PREP(useItem);
+PREP(useItems);
+PREP(vitalLoop);
+PREP(displayPatientInformation);
+PREP(displayTriageCard);
+PREP(dropDownTriageCard);
+PREP(moduleMedicalSettings);
+PREP(moduleBasicMedicalSettings);
+PREP(moduleAdvancedMedicalSettings);
+PREP(moduleReviveSettings);
+PREP(moduleAssignMedicRoles);
+PREP(moduleAssignMedicalVehicle);
+PREP(moduleAssignMedicalFacility);
+PREP(copyDeadBody);
+PREP(requestWoundSync);
+PREP(unconsciousPFH);
+
+// Networked litter
+PREP(createLitter);
+PREP(handleCreateLitter);
+PREP(litterCleanupLoop);
diff --git a/addons/medical/XEH_postInit.sqf b/addons/medical/XEH_postInit.sqf
index 7345c2a54e..194292de27 100644
--- a/addons/medical/XEH_postInit.sqf
+++ b/addons/medical/XEH_postInit.sqf
@@ -6,34 +6,47 @@ GVAR(heartBeatSounds_Fast) = ["ACE_heartbeat_fast_1", "ACE_heartbeat_fast_2", "A
GVAR(heartBeatSounds_Normal) = ["ACE_heartbeat_norm_1", "ACE_heartbeat_norm_2"];
GVAR(heartBeatSounds_Slow) = ["ACE_heartbeat_slow_1", "ACE_heartbeat_slow_2"];
-["medical_propagateWound", FUNC(onPropagateWound)] call EFUNC(common,addEventHandler);
-["medical_woundUpdateRequest", FUNC(onWoundUpdateRequest)] call EFUNC(common,addEventHandler);
-["interactMenuClosed", {[objNull, false] call FUNC(displayPatientInformation); }] call EFUNC(common,addEventHandler);
+["ace_interactMenuClosed", {[objNull, false] call FUNC(displayPatientInformation); }] call CBA_fnc_addEventHandler;
//Treatment EventHandlers:
-["medical_advMedication", FUNC(treatmentAdvanced_medicationLocal)] call EFUNC(common,addEventHandler);
+[QGVAR(actionCheckBloodPressureLocal), DFUNC(actionCheckBloodPressureLocal)] call CBA_fnc_addEventHandler;
+[QGVAR(actionCheckPulseLocal), DFUNC(actionCheckPulseLocal)] call CBA_fnc_addEventHandler;
+[QGVAR(addVitalLoop), DFUNC(addVitalLoop)] call CBA_fnc_addEventHandler;
+[QGVAR(addToMedicalLog), DFUNC(addToLog)] call CBA_fnc_addEventHandler;
+[QGVAR(addToTriageCard), DFUNC(addToTriageCard)] call CBA_fnc_addEventHandler;
+[QGVAR(setDead), DFUNC(setDead)] call CBA_fnc_addEventHandler;
+[QGVAR(setHitPointDamage), DFUNC(setHitPointDamage)] call CBA_fnc_addEventHandler;
+[QGVAR(setUnconscious), DFUNC(setUnconscious)] call CBA_fnc_addEventHandler;
+[QGVAR(treatmentAdvanced_bandageLocal), DFUNC(treatmentAdvanced_bandageLocal)] call CBA_fnc_addEventHandler;
+[QGVAR(treatmentAdvanced_CPRLocal), DFUNC(treatmentAdvanced_CPRLocal)] call CBA_fnc_addEventHandler;
+[QGVAR(treatmentAdvanced_fullHealLocal), DFUNC(treatmentAdvanced_fullHealLocal)] call CBA_fnc_addEventHandler;
+[QGVAR(treatmentAdvanced_medicationLocal), DFUNC(treatmentAdvanced_medicationLocal)] call CBA_fnc_addEventHandler;
+[QGVAR(treatmentBasic_bandageLocal), DFUNC(treatmentBasic_bandageLocal)] call CBA_fnc_addEventHandler;
+[QGVAR(treatmentBasic_bloodbagLocal), DFUNC(treatmentBasic_bloodbagLocal)] call CBA_fnc_addEventHandler;
+[QGVAR(treatmentBasic_morphineLocal), DFUNC(treatmentBasic_morphineLocal)] call CBA_fnc_addEventHandler;
+[QGVAR(treatmentIVLocal), DFUNC(treatmentIVLocal)] call CBA_fnc_addEventHandler;
+[QGVAR(treatmentTourniquetLocal), DFUNC(treatmentTourniquetLocal)] call CBA_fnc_addEventHandler;
+[QGVAR(actionPlaceInBodyBag), FUNC(actionPlaceInBodyBag)] call CBA_fnc_addEventHandler;
+//Handle Deleting Bodies on Server:
+if (isServer) then {["ace_placedInBodyBag", FUNC(serverRemoveBody)] call CBA_fnc_addEventHandler;};
-["medical_onUnconscious", {
+["ace_unconscious", {
params ["_unit", "_status"];
if (local _unit) then {
if (_status) then {
- _unit setVariable ["tf_globalVolume", 0.4];
_unit setVariable ["tf_voiceVolume", 0, true];
_unit setVariable ["tf_unable_to_use_radio", true, true];
_unit setVariable ["acre_sys_core_isDisabled", true, true];
- if (!isNil "acre_api_fnc_setGlobalVolume") then { [0.4^0.33] call acre_api_fnc_setGlobalVolume; };
} else {
- _unit setVariable ["tf_globalVolume", 1];
_unit setVariable ["tf_voiceVolume", 1, true];
_unit setVariable ["tf_unable_to_use_radio", false, true];
_unit setVariable ["acre_sys_core_isDisabled", false, true];
- if (!isNil "acre_api_fnc_setGlobalVolume") then { [1] call acre_api_fnc_setGlobalVolume; };
};
};
-}] call EFUNC(common,addEventHandler);
+}] call CBA_fnc_addEventHandler;
// Initialize all effects
@@ -89,7 +102,7 @@ GVAR(effectPainCC) = [
// Initialize Other Variables
GVAR(effectBlind) = false;
-GVAR(effectTimeBlood) = ACE_time;
+GVAR(effectTimeBlood) = CBA_missionTime;
// MAIN EFFECTS LOOP
[{
@@ -124,11 +137,11 @@ GVAR(effectTimeBlood) = ACE_time;
[{
GVAR(effectBlindingCC) ppEffectAdjust [1,1,0, [1,1,1,0], [0,0,0,1], [0,0,0,0]];
GVAR(effectBlindingCC) ppEffectCommit ((_this select 0) * 2);
- }, [_strength], 0.01, 0] call EFUNC(common,waitAndExecute);
+ }, [_strength], 0.01, 0] call CBA_fnc_waitAndExecute;
[{
GVAR(effectBlindingCC) ppEffectEnable false;
- }, [], (_strength * 2) + 0.5, 0] call EFUNC(common,waitAndExecute);
+ }, [], (_strength * 2) + 0.5, 0] call CBA_fnc_waitAndExecute;
GVAR(effectBlind) = false;
};
@@ -136,8 +149,8 @@ GVAR(effectTimeBlood) = ACE_time;
_bleeding = [ACE_player] call FUNC(getBloodLoss);
// Bleeding Indicator
- if (_bleeding > 0 and GVAR(effectTimeBlood) + 3.5 < ACE_time) then {
- GVAR(effectTimeBlood) = ACE_time;
+ if (_bleeding > 0 and GVAR(effectTimeBlood) + 3.5 < CBA_missionTime) then {
+ GVAR(effectTimeBlood) = CBA_missionTime;
[600 * _bleeding] call BIS_fnc_bloodEffect;
};
@@ -153,8 +166,8 @@ GVAR(effectTimeBlood) = ACE_time;
}, 0.5, []] call CBA_fnc_addPerFrameHandler;
-GVAR(lastHeartBeat) = ACE_time;
-GVAR(lastHeartBeatSound) = ACE_time;
+GVAR(lastHeartBeat) = CBA_missionTime;
+GVAR(lastHeartBeatSound) = CBA_missionTime;
// HEARTRATE BASED EFFECTS
[{
@@ -174,8 +187,8 @@ GVAR(lastHeartBeatSound) = ACE_time;
GVAR(effectPainCC) ppEffectEnable false;
};
} else {
- if ((ACE_time > GVAR(lastHeartBeat) + _interval)) then {
- GVAR(lastHeartBeat) = ACE_time;
+ if ((CBA_missionTime > GVAR(lastHeartBeat) + _interval)) then {
+ GVAR(lastHeartBeat) = CBA_missionTime;
// Pain effect, no pain effect in zeus camera
if (isNull curatorCamera) then {
@@ -191,15 +204,15 @@ GVAR(lastHeartBeatSound) = ACE_time;
[{
GVAR(effectPainCA) ppEffectAdjust [(_this select 0), (_this select 0), false];
GVAR(effectPainCA) ppEffectCommit (_this select 1);
- }, [_strength * 0.1, _interval * 0.2], _interval * 0.05, 0] call EFUNC(common,waitAndExecute);
+ }, [_strength * 0.1, _interval * 0.2], _interval * 0.05, 0] call CBA_fnc_waitAndExecute;
[{
GVAR(effectPainCA) ppEffectAdjust [(_this select 0), (_this select 0), false];
GVAR(effectPainCA) ppEffectCommit 0.01;
- }, [_strength * 0.7], _interval * 0.3, 0] call EFUNC(common,waitAndExecute);
+ }, [_strength * 0.7], _interval * 0.3, 0] call CBA_fnc_waitAndExecute;
[{
GVAR(effectPainCA) ppEffectAdjust [(_this select 0), (_this select 0), false];
GVAR(effectPainCA) ppEffectCommit (_this select 1);
- }, [_strength * 0.1, _interval * 0.55], _interval * 0.4, 0] call EFUNC(common,waitAndExecute);
+ }, [_strength * 0.1, _interval * 0.55], _interval * 0.4, 0] call CBA_fnc_waitAndExecute;
} else {
GVAR(effectPainCA) ppEffectEnable false;
};
@@ -213,15 +226,15 @@ GVAR(lastHeartBeatSound) = ACE_time;
[{
GVAR(effectPainCC) ppEffectAdjust [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1 - (_this select 0),1 - (_this select 0),0,0,0,0.2,2]];
GVAR(effectPainCC) ppEffectCommit (_this select 1);
- }, [_strength * 0.1, _interval * 0.2], _interval * 0.05, 0] call EFUNC(common,waitAndExecute);
+ }, [_strength * 0.1, _interval * 0.2], _interval * 0.05, 0] call CBA_fnc_waitAndExecute;
[{
GVAR(effectPainCC) ppEffectAdjust [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1 - (_this select 0),1 - (_this select 0),0,0,0,0.2,2]];
GVAR(effectPainCC) ppEffectCommit 0.01;
- }, [_strength * 0.7], _interval * 0.3, 0] call EFUNC(common,waitAndExecute);
+ }, [_strength * 0.7], _interval * 0.3, 0] call CBA_fnc_waitAndExecute;
[{
GVAR(effectPainCC) ppEffectAdjust [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1 - (_this select 0),1 - (_this select 0),0,0,0,0.2,2]];
GVAR(effectPainCC) ppEffectCommit (_this select 1);
- }, [_strength * 0.1, _interval * 0.55], _interval * 0.4, 0] call EFUNC(common,waitAndExecute);
+ }, [_strength * 0.1, _interval * 0.55], _interval * 0.4, 0] call CBA_fnc_waitAndExecute;
} else {
GVAR(effectPainCC) ppEffectEnable false;
};
@@ -232,8 +245,8 @@ GVAR(lastHeartBeatSound) = ACE_time;
if (GVAR(level) >= 2 && {_heartRate > 0}) then {
_minTime = 60 / _heartRate;
- if (ACE_time - GVAR(lastHeartBeatSound) > _minTime) then {
- GVAR(lastHeartBeatSound) = ACE_time;
+ if (CBA_missionTime - GVAR(lastHeartBeatSound) > _minTime) then {
+ GVAR(lastHeartBeatSound) = CBA_missionTime;
// Heart rate sound effect
if (_heartRate < 60) then {
_sound = GVAR(heartBeatSounds_Normal) select (random((count GVAR(heartBeatSounds_Normal)) -1));
@@ -249,7 +262,7 @@ GVAR(lastHeartBeatSound) = ACE_time;
}, 0, []] call CBA_fnc_addPerFrameHandler;
};
-["SettingsInitialized", {
+["ace_settingsInitialized", {
// Networked litter (need to wait for GVAR(litterCleanUpDelay) to be set)
[QGVAR(createLitter), FUNC(handleCreateLitter), GVAR(litterCleanUpDelay)] call EFUNC(common,addSyncedEventHandler);
@@ -272,20 +285,18 @@ GVAR(lastHeartBeatSound) = ACE_time;
{((_this select 0) getVariable [QGVAR(inReviveState), false])},
{((_this select 0) getVariable ["ACE_isDead", false])}
] call FUNC(addUnconsciousCondition);
-}] call EFUNC(common,addEventHandler);
+}] call CBA_fnc_addEventHandler;
// Prevent all types of interaction while unconscious
// @todo: probably remove this when CBA keybind hold key works properly
["isNotUnconscious", {!((_this select 0) getVariable ["ACE_isUnconscious", false])}] call EFUNC(common,addCanInteractWithCondition);
// Item Event Handler
-["playerInventoryChanged", {
- [ACE_player] call FUNC(itemCheck);
-}] call EFUNC(common,addEventHandler);
+["ace_playerInventoryChanged", FUNC(itemCheck)] call CBA_fnc_addEventHandler;
if (hasInterface) then {
- ["PlayerJip", {
+ ["ace_playerJIP", {
ACE_LOGINFO("JIP Medical init for player.");
[player] call FUNC(init);
- }] call EFUNC(common,addEventHandler);
+ }] call CBA_fnc_addEventHandler;
};
diff --git a/addons/medical/XEH_preInit.sqf b/addons/medical/XEH_preInit.sqf
index 769e24b7a4..a5dc596ba2 100644
--- a/addons/medical/XEH_preInit.sqf
+++ b/addons/medical/XEH_preInit.sqf
@@ -2,118 +2,7 @@
ADDON = false;
-PREP(actionCheckBloodPressure);
-PREP(actionCheckBloodPressureLocal);
-PREP(actionCheckPulse);
-PREP(actionCheckPulseLocal);
-PREP(actionCheckResponse);
-PREP(actionDiagnose);
-PREP(actionPlaceInBodyBag);
-PREP(actionRemoveTourniquet);
-PREP(actionLoadUnit);
-PREP(actionUnloadUnit);
-PREP(addDamageToUnit);
-PREP(addHeartRateAdjustment);
-PREP(addToInjuredCollection);
-PREP(addToLog);
-PREP(addToTriageCard);
-PREP(addUnconsciousCondition);
-PREP(addUnloadPatientActions);
-PREP(adjustPainLevel);
-PREP(canAccessMedicalEquipment);
-PREP(canTreat);
-PREP(canTreatCached);
-PREP(determineIfFatal);
-PREP(getBloodLoss);
-PREP(getBloodPressure);
-PREP(getBloodVolumeChange);
-PREP(getCardiacOutput);
-PREP(getTypeOfDamage);
-PREP(getHeartRateChange);
-PREP(getTriageStatus);
-PREP(getUnconsciousCondition);
-PREP(handleDamage);
-PREP(handleDamage_advanced);
-PREP(handleDamage_advancedSetDamage);
-PREP(handleDamage_airway);
-PREP(handleDamage_basic);
-PREP(handleDamage_caching);
-PREP(handleDamage_fractures);
-PREP(handleDamage_internalInjuries);
-PREP(handleDamage_wounds);
-PREP(handleDamage_woundsOld);
-PREP(handleUnitVitals);
-PREP(handleKilled);
-PREP(handleLocal);
-PREP(handleBandageOpening);
-PREP(hasItem);
-PREP(hasItems);
-PREP(hasMedicalEnabled);
-PREP(hasTourniquetAppliedTo);
-PREP(init);
-PREP(isBeingCarried);
-PREP(isBeingDragged);
-PREP(isInMedicalFacility);
-PREP(isInMedicalVehicle);
-PREP(isMedic);
-PREP(isMedicalVehicle);
-PREP(isInStableCondition);
-PREP(itemCheck);
-PREP(modifyMedicalAction);
-PREP(onMedicationUsage);
-PREP(onWoundUpdateRequest);
-PREP(onPropagateWound);
-PREP(parseConfigForInjuries);
-PREP(playInjuredSound);
-PREP(selectionNameToNumber);
-PREP(setCardiacArrest);
-PREP(setDead);
-PREP(setHitPointDamage);
-PREP(setStructuralDamage);
-PREP(setUnconscious);
-PREP(translateSelections);
-PREP(treatment);
-PREP(treatment_failure);
-PREP(treatment_success);
-PREP(treatmentAdvanced_bandage);
-PREP(treatmentAdvanced_bandageLocal);
-PREP(treatmentAdvanced_CPR);
-PREP(treatmentAdvanced_CPRLocal);
-PREP(treatmentAdvanced_fullHeal);
-PREP(treatmentAdvanced_fullHealLocal);
-PREP(treatmentAdvanced_fullHealTreatmentTime);
-PREP(treatmentAdvanced_medication);
-PREP(treatmentAdvanced_medicationLocal);
-PREP(treatmentAdvanced_surgicalKit_onProgress);
-PREP(treatmentBasic_bandage);
-PREP(treatmentBasic_bandageLocal);
-PREP(treatmentBasic_bloodbag);
-PREP(treatmentBasic_bloodbagLocal);
-PREP(treatmentBasic_epipen);
-PREP(treatmentBasic_morphine);
-PREP(treatmentBasic_morphineLocal);
-PREP(treatmentIV);
-PREP(treatmentIVLocal);
-PREP(treatmentTourniquet);
-PREP(treatmentTourniquetLocal);
-PREP(useItem);
-PREP(useItems);
-PREP(displayPatientInformation);
-PREP(displayTriageCard);
-PREP(dropDownTriageCard);
-PREP(moduleMedicalSettings);
-PREP(moduleAdvancedMedicalSettings);
-PREP(moduleReviveSettings);
-PREP(moduleAssignMedicRoles);
-PREP(moduleAssignMedicalVehicle);
-PREP(moduleAssignMedicalFacility);
-PREP(copyDeadBody);
-PREP(requestWoundSync);
-PREP(unconsciousPFH);
-
-// Networked litter
-PREP(createLitter);
-PREP(handleCreateLitter);
+#include "XEH_PREP.hpp"
GVAR(injuredUnitCollection) = [];
GVAR(IVBags) = [];
@@ -146,7 +35,7 @@ private _fixStatic = {
1 preloadObject (_this select 0);
}, {
TRACE_1("preload done",_this);
- }, [_vehType]] call EFUNC(common,waitUntilAndExecute);
+ }, [_vehType]] call CBA_fnc_waitUntilAndExecute;
};
};
["StaticWeapon", "init", _fixStatic] call CBA_fnc_addClassEventHandler;
@@ -158,7 +47,7 @@ addMissionEventHandler ["Loaded",{
1 preloadObject (_this select 0);
}, {
TRACE_1("preload done",_this);
- }, [_x]] call EFUNC(common,waitUntilAndExecute);
+ }, [_x]] call CBA_fnc_waitUntilAndExecute;
} forEach GVAR(fixedStatics);
}];
diff --git a/addons/medical/XEH_preStart.sqf b/addons/medical/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/medical/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/medical/XEH_respawn.sqf b/addons/medical/XEH_respawn.sqf
index 7d48672972..1d1c34d6c7 100644
--- a/addons/medical/XEH_respawn.sqf
+++ b/addons/medical/XEH_respawn.sqf
@@ -7,7 +7,7 @@ params ["_unit"];
// Reset captive status for respawning unit
if (!(_unit getVariable ["ACE_isUnconscious", false])) then {
- [_unit, "setCaptive", QGVAR(unconscious), false] call EFUNC(common,statusEffect_set);
+ [_unit, "setCaptive", "ace_unconscious", false] call EFUNC(common,statusEffect_set);
};
// Remove maximum unconsciousness time handler
diff --git a/addons/medical/config.cpp b/addons/medical/config.cpp
index 910a086364..1bc006471e 100644
--- a/addons/medical/config.cpp
+++ b/addons/medical/config.cpp
@@ -6,8 +6,9 @@ class CfgPatches {
weapons[] = {"ACE_fieldDressing", "ACE_packingBandage", "ACE_elasticBandage", "ACE_tourniquet", "ACE_morphine", "ACE_atropine", "ACE_epinephrine", "ACE_plasmaIV", "ACE_plasmaIV_500", "ACE_plasmaIV_250", "ACE_bloodIV", "ACE_bloodIV_500", "ACE_bloodIV_250", "ACE_salineIV", "ACE_salineIV_500", "ACE_salineIV_250", "ACE_quikclot", "ACE_personalAidKit", "ACE_surgicalKit", "ACE_bodyBag"};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_interaction", "ace_apl"};
- author[] = {"Glowbal", "KoffeinFlummi"};
- authorUrl = "";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"Glowbal", "KoffeinFlummi"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
@@ -18,8 +19,38 @@ class CfgPatches {
#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"
#include "CfgSounds.hpp"
+#include "CfgEden.hpp"
#include "ACE_Medical_Treatments.hpp"
#include "ACE_Settings.hpp"
+#include "UI\CfgInGameUI.hpp"
#include "UI\RscTitles.hpp"
#include "UI\triagecard.hpp"
+class ACE_newEvents {
+ medical_onUnconscious = "ace_unconscious";
+ medical_treatmentSuccess = "ace_treatmentSuccess";
+ medical_onSetDead = "ace_killed";
+ Medical_onEnteredCardiacArrest = "ace_enteredCardiacArrest";
+ Medical_onItemAddedToTriageCard = "ace_itemAddedToTriageCard";
+ medical_onLogEntryAdded = "ace_medicalLogEntryAdded";
+ Medical_onHeartRateAdjustmentAdded = "ace_addedHeartRateAdjustment";
+ placedInBodyBag = "ace_placedInBodyBag";
+ actionPlaceInBodyBag = QGVAR(actionPlaceInBodyBag);
+ treatmentTourniquetLocal = QGVAR(treatmentTourniquetLocal);
+ treatmentIVLocal = QGVAR(treatmentIVLocal);
+ treatmentBasic_morphineLocal = QGVAR(treatmentBasic_morphineLocal);
+ treatmentBasic_bloodbagLocal = QGVAR(treatmentBasic_bloodbagLocal);
+ treatmentBasic_bandageLocal = QGVAR(treatmentBasic_bandageLocal);
+ treatmentAdvanced_medicationLocal = QGVAR(treatmentAdvanced_medicationLocal);
+ treatmentAdvanced_fullHealLocal = QGVAR(treatmentAdvanced_fullHealLocal);
+ treatmentAdvanced_CPRLocal = QGVAR(treatmentAdvanced_CPRLocal);
+ treatmentAdvanced_bandageLocal = QGVAR(treatmentAdvanced_bandageLocal);
+ setUnconscious = QGVAR(setUnconscious);
+ setHitPointDamage = QGVAR(setHitPointDamage);
+ setDead = QGVAR(setDead);
+ addToTriageCard = QGVAR(addToTriageCard);
+ addToMedicalLog = QGVAR(addToMedicalLog);
+ actionCheckPulseLocal = QGVAR(actionCheckPulseLocal);
+ actionCheckBloodPressureLocal = QGVAR(actionCheckBloodPressureLocal);
+ addVitalLoop = QGVAR(addVitalLoop);
+};
diff --git a/addons/medical/data/adenosine.p3d b/addons/medical/data/adenosine.p3d
new file mode 100644
index 0000000000..fa9fb72c84
Binary files /dev/null and b/addons/medical/data/adenosine.p3d differ
diff --git a/addons/medical/data/littergeneric_adenosine.p3d b/addons/medical/data/littergeneric_adenosine.p3d
new file mode 100644
index 0000000000..4490a11c0e
Binary files /dev/null and b/addons/medical/data/littergeneric_adenosine.p3d differ
diff --git a/addons/medical/functions/fnc_actionCheckBloodPressure.sqf b/addons/medical/functions/fnc_actionCheckBloodPressure.sqf
index 889cc90de9..9e66eda263 100644
--- a/addons/medical/functions/fnc_actionCheckBloodPressure.sqf
+++ b/addons/medical/functions/fnc_actionCheckBloodPressure.sqf
@@ -15,4 +15,8 @@
#include "script_component.hpp"
params ["_caller", "_target", "_selectionName"];
-[[_caller, _target, _selectionName], QUOTE(DFUNC(actionCheckBloodPressureLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
+if (local _target) then {
+ [QGVAR(actionCheckBloodPressureLocal), [_caller, _target, _selectionName]] call CBA_fnc_localEvent;
+} else {
+ [QGVAR(actionCheckBloodPressureLocal), [_caller, _target, _selectionName], _target] call CBA_fnc_targetEvent;
+};
diff --git a/addons/medical/functions/fnc_actionCheckBloodPressureLocal.sqf b/addons/medical/functions/fnc_actionCheckBloodPressureLocal.sqf
index 0fd9394f92..184110265a 100644
--- a/addons/medical/functions/fnc_actionCheckBloodPressureLocal.sqf
+++ b/addons/medical/functions/fnc_actionCheckBloodPressureLocal.sqf
@@ -14,17 +14,16 @@
#include "script_component.hpp"
-private ["_bloodPressure", "_logOutPut", "_output"];
params ["_caller", "_target", "_selectionName"];
-_bloodPressure = if (!alive _target) then {
+private _bloodPressure = if (!alive _target) then {
[0,0]
} else {
[_target] call FUNC(getBloodPressure)
};
_bloodPressure params [ "_bloodPressureLow", "_bloodPressureHigh"];
-_output = "";
-_logOutPut = "";
+private _output = "";
+private _logOutPut = "";
if ([_caller] call FUNC(isMedic)) then {
_output = LSTRING(Check_Bloodpressure_Output_1);
_logOutPut = format["%1/%2",round(_bloodPressureHigh),round(_bloodPressureLow)];
@@ -57,7 +56,7 @@ if (_selectionName in ["hand_l","hand_r"] && {[_unit, _selectionName] call FUNC(
_logOutPut = "";
};
-["displayTextStructured", [_caller], [[_output, [_target] call EFUNC(common,getName), round(_bloodPressureHigh),round(_bloodPressureLow)], 1.75, _caller]] call EFUNC(common,targetEvent);
+[QEGVAR(common,displayTextStructured), [[_output, [_target] call EFUNC(common,getName), round(_bloodPressureHigh),round(_bloodPressureLow)], 1.75, _caller], [_caller]] call CBA_fnc_targetEvent;
if (_logOutPut != "") then {
[_target,"activity", LSTRING(Check_Bloodpressure_Log), [[_caller, false, true] call EFUNC(common,getName), _logOutPut]] call FUNC(addToLog);
diff --git a/addons/medical/functions/fnc_actionCheckPulse.sqf b/addons/medical/functions/fnc_actionCheckPulse.sqf
index 8c2c6cf109..39f196a0a5 100644
--- a/addons/medical/functions/fnc_actionCheckPulse.sqf
+++ b/addons/medical/functions/fnc_actionCheckPulse.sqf
@@ -15,5 +15,8 @@
#include "script_component.hpp"
params ["_caller","_target", "_selectionName"];
-[[_caller, _target, _selectionName], QUOTE(DFUNC(actionCheckPulseLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
-
+if (local _target) then {
+ [QGVAR(actionCheckPulseLocal), [_caller, _target, _selectionName]] call CBA_fnc_localEvent;
+} else {
+ [QGVAR(actionCheckPulseLocal), [_caller, _target, _selectionName], _target] call CBA_fnc_targetEvent;
+};
diff --git a/addons/medical/functions/fnc_actionCheckPulseLocal.sqf b/addons/medical/functions/fnc_actionCheckPulseLocal.sqf
index 83852f8042..cf84df075e 100644
--- a/addons/medical/functions/fnc_actionCheckPulseLocal.sqf
+++ b/addons/medical/functions/fnc_actionCheckPulseLocal.sqf
@@ -14,15 +14,14 @@
#include "script_component.hpp"
-private ["_heartRateOutput", "_heartRate", "_logOutPut"];
params ["_caller", "_unit", "_selectionName"];
-_heartRate = _unit getVariable [QGVAR(heartRate), 80];
+private _heartRate = _unit getVariable [QGVAR(heartRate), 80];
if (!alive _unit) then {
_heartRate = 0;
};
-_heartRateOutput = LSTRING(Check_Pulse_Output_5);
-_logOutPut = LSTRING(Check_Pulse_None);
+private _heartRateOutput = LSTRING(Check_Pulse_Output_5);
+private _logOutPut = LSTRING(Check_Pulse_None);
if (_heartRate > 1.0) then {
if ([_caller] call FUNC(isMedic)) then {
@@ -49,7 +48,7 @@ if (_selectionName in ["hand_l","hand_r"] && {[_unit, _selectionName] call FUNC(
_logOutPut = LSTRING(Check_Pulse_None);
};
-["displayTextStructured", [_caller], [[_heartRateOutput, [_unit] call EFUNC(common,getName), round(_heartRate)], 1.5, _caller]] call EFUNC(common,targetEvent);
+[QEGVAR(common,displayTextStructured), [[_heartRateOutput, [_unit] call EFUNC(common,getName), round(_heartRate)], 1.5, _caller], [_caller]] call CBA_fnc_targetEvent;
if (_logOutPut != "") then {
[_unit,"activity", LSTRING(Check_Pulse_Log),[[_caller] call EFUNC(common,getName),_logOutPut]] call FUNC(addToLog);
diff --git a/addons/medical/functions/fnc_actionCheckResponse.sqf b/addons/medical/functions/fnc_actionCheckResponse.sqf
index d69fa90c86..c47dc5dd64 100644
--- a/addons/medical/functions/fnc_actionCheckResponse.sqf
+++ b/addons/medical/functions/fnc_actionCheckResponse.sqf
@@ -14,12 +14,11 @@
#include "script_component.hpp"
-private ["_output"];
params ["_caller", "_target"];
-_output = [LSTRING(Check_Response_Unresponsive), LSTRING(Check_Response_Responsive)] select ([_target] call EFUNC(common,isAwake));
+private _output = [LSTRING(Check_Response_Unresponsive), LSTRING(Check_Response_Responsive)] select ([_target] call EFUNC(common,isAwake));
-["displayTextStructured", [_caller], [[_output, [_target] call EFUNC(common,getName)], 2, _caller]] call EFUNC(common,targetEvent);
+[QEGVAR(common,displayTextStructured), [[_output, [_target] call EFUNC(common,getName)], 2, _caller], [_caller]] call CBA_fnc_targetEvent;
-[_target,"activity",_output, [[_target, false, true] call EFUNC(common,getName)]] call FUNC(addToLog);
-[_target,"quick_view",_output, [[_target, false, true] call EFUNC(common,getName)]] call FUNC(addToLog);
+[_target ,"activity", _output, [[_target, false, true] call EFUNC(common,getName)]] call FUNC(addToLog);
+[_target, "quick_view", _output, [[_target, false, true] call EFUNC(common,getName)]] call FUNC(addToLog);
diff --git a/addons/medical/functions/fnc_actionDiagnose.sqf b/addons/medical/functions/fnc_actionDiagnose.sqf
index ffb2583a15..3a611a116d 100644
--- a/addons/medical/functions/fnc_actionDiagnose.sqf
+++ b/addons/medical/functions/fnc_actionDiagnose.sqf
@@ -17,14 +17,14 @@
private "_genericMessages";
params ["_caller", "_target"];
-_genericMessages = [LSTRING(diagnoseMessage)];
+private _genericMessages = [LSTRING(diagnoseMessage), [_target] call EFUNC(common,getName)];
-_genericMessages pushBack ([_target] call EFUNC(common,getName));
if (alive _target) then {
_genericMessages pushBack LSTRING(diagnoseAlive);
} else {
_genericMessages pushBack LSTRING(diagnoseDead);
};
+
if (_target getVariable[QGVAR(hasLostBlood), 0] > 0) then {
if (_target getVariable[QGVAR(hasLostBlood), 0] > 1) then {
_genericMessages pushBack LSTRING(lostBloodALot);
@@ -43,4 +43,4 @@ if (alive _target) then {
};
};
-["displayTextStructured", [_caller], [_genericMessages, 3.0, _caller]] call EFUNC(common,targetEvent);
+[QEGVAR(common,displayTextStructured), [_genericMessages, 3.0, _caller], [_caller]] call CBA_fnc_targetEvent;
diff --git a/addons/medical/functions/fnc_actionLoadUnit.sqf b/addons/medical/functions/fnc_actionLoadUnit.sqf
index 41970e23d2..35ebfefebc 100644
--- a/addons/medical/functions/fnc_actionLoadUnit.sqf
+++ b/addons/medical/functions/fnc_actionLoadUnit.sqf
@@ -18,7 +18,7 @@ private "_vehicle";
params ["_caller", "_target"];
if ([_target] call EFUNC(common,isAwake)) exitWith {
- ["displayTextStructured", [_caller], [[LSTRING(CanNotLoaded), [_target] call EFUNC(common,getName)], 1.5, _caller]] call EFUNC(common,targetEvent);
+ [QEGVAR(common,displayTextStructured), [[LSTRING(CanNotLoaded), [_target] call EFUNC(common,getName)], 1.5, _caller], [_caller]] call CBA_fnc_targetEvent;
};
if ([_target] call FUNC(isBeingCarried)) then {
[_caller, _target] call EFUNC(dragging,dropObject_carry);
diff --git a/addons/medical/functions/fnc_actionPlaceInBodyBag.sqf b/addons/medical/functions/fnc_actionPlaceInBodyBag.sqf
index bf8bc0289f..1ae1dfdc6d 100644
--- a/addons/medical/functions/fnc_actionPlaceInBodyBag.sqf
+++ b/addons/medical/functions/fnc_actionPlaceInBodyBag.sqf
@@ -7,35 +7,46 @@
* 1: The patient
*
* Return Value:
- * body bag
+ * body bag (will return objNull when run where target is not local)
+ *
+ * Example:
+ * [player, cursorTarget] call ace_medical_fnc_actionPlaceInBodyBag
*
* Public: Yes
*/
#include "script_component.hpp"
-private ["_position", "_headPos", "_spinePos", "_dirVect", "_direction", "_bodyBag"];
params ["_caller", "_target"];
+TRACE_2("params",_caller,_target);
+
+if (!local _target) exitWith {
+ TRACE_1("running where local",local _target);
+ [QGVAR(actionPlaceInBodyBag), [_caller, _target], [_target]] call CBA_fnc_targetEvent;
+ objNull
+};
if (alive _target) then {
+ TRACE_1("manually killing with setDead",_target);
[_target, true] call FUNC(setDead);
};
-_position = (getPosASL _target) vectorAdd [0, 0, 0.2];
+private _position = (getPosASL _target) vectorAdd [0, 0, 0.2];
-_headPos = _target modelToWorldVisual (_target selectionPosition "head");
-_spinePos = _target modelToWorldVisual (_target selectionPosition "Spine3");
-_dirVect = _headPos vectorFromTo _spinePos;
-_direction = _dirVect call CBA_fnc_vectDir;
+private _headPos = _target modelToWorldVisual (_target selectionPosition "head");
+private _spinePos = _target modelToWorldVisual (_target selectionPosition "Spine3");
+private _dirVect = _headPos vectorFromTo _spinePos;
+private _direction = _dirVect call CBA_fnc_vectDir;
-_bodyBag = createVehicle ["ACE_bodyBagObject", _position, [], 0, "CAN_COLLIDE"];
+//move the body away now, so it won't physX the bodyBag object (this setPos seems to need to be called where object is local)
+_target setPosASL [-5000, -5000, 0];
-["placedInBodyBag", [_target, _bodyBag]] call EFUNC(common,globalEvent);
-
-deleteVehicle _target;
+private _bodyBag = createVehicle ["ACE_bodyBagObject", _position, [], 0, ""];
// prevent body bag from flipping
_bodyBag setPosASL _position;
_bodyBag setDir _direction;
+["ace_placedInBodyBag", [_target, _bodyBag]] call CBA_fnc_globalEvent; //hide and delete body on server
+
_bodyBag
diff --git a/addons/medical/functions/fnc_actionRemoveTourniquet.sqf b/addons/medical/functions/fnc_actionRemoveTourniquet.sqf
index 84df1acbd8..bf0a3e5ae4 100644
--- a/addons/medical/functions/fnc_actionRemoveTourniquet.sqf
+++ b/addons/medical/functions/fnc_actionRemoveTourniquet.sqf
@@ -15,22 +15,20 @@
#include "script_component.hpp"
-private ["_part", "_tourniquets", "_output"];
params ["_caller", "_target", "_selectionName"];
TRACE_3("params",_caller,_target,_selectionName);
// grab the required data
-_part = [_selectionName] call FUNC(selectionNameToNumber);
-_tourniquets = _target getVariable [QGVAR(tourniquets), [0,0,0,0,0,0]];
+private _part = [_selectionName] call FUNC(selectionNameToNumber);
+private _tourniquets = _target getVariable [QGVAR(tourniquets), [0,0,0,0,0,0]];
// Check if there is a tourniquet on this bodypart
if ((_tourniquets select _part) == 0) exitWith {
- _output = LSTRING(noTourniquetOnBodyPart);
- ["displayTextStructured", [_caller], [_output, 1.5, _caller]] call EFUNC(common,targetEvent);
+ [QEGVAR(common,displayTextStructured), [LSTRING(noTourniquetOnBodyPart), 1.5, _caller], [_caller]] call CBA_fnc_targetEvent;
};
// Removing the tourniquet
-_tourniquets set[_part, 0];
+_tourniquets set [_part, 0];
_target setVariable [QGVAR(tourniquets), _tourniquets, true];
// Adding the tourniquet item to the caller
@@ -44,11 +42,12 @@ TRACE_2("meds",_part,_delayedMedications);
_x params ["", "", "_medPartNum"];
if (_part == _medPartNum) then {
TRACE_1("delayed medication call after tourniquet removeal",_x);
- ["medical_advMedication", [_target], _x] call EFUNC(common,targetEvent);
+ [QGVAR(treatmentAdvanced_medicationLocal), _x, [_target]] call CBA_fnc_targetEvent;
_delayedMedications set [_forEachIndex, -1];
_updatedArray = true;
};
} forEach _delayedMedications;
+
if (_updatedArray) then {
_delayedMedications = _delayedMedications - [-1];
_target setVariable [QGVAR(occludedMedications), _delayedMedications, true];
diff --git a/addons/medical/functions/fnc_actionUnloadUnit.sqf b/addons/medical/functions/fnc_actionUnloadUnit.sqf
index 705eeb88f5..75fe76bce9 100644
--- a/addons/medical/functions/fnc_actionUnloadUnit.sqf
+++ b/addons/medical/functions/fnc_actionUnloadUnit.sqf
@@ -21,4 +21,4 @@ params ["_caller", "_target", ["_drag", false]];
if (vehicle _target == _target) exitWith {};
if (([_target] call EFUNC(common,isAwake))) exitWith {};
-["unloadPersonEvent", _target, [_target, vehicle _target, _caller]] call EFUNC(common,targetEvent);
+["ace_unloadPersonEvent", [_target, vehicle _target, _caller], _target] call CBA_fnc_targetEvent;
diff --git a/addons/medical/functions/fnc_addDamageToUnit.sqf b/addons/medical/functions/fnc_addDamageToUnit.sqf
index a11cc4689f..1969e3ff74 100644
--- a/addons/medical/functions/fnc_addDamageToUnit.sqf
+++ b/addons/medical/functions/fnc_addDamageToUnit.sqf
@@ -54,7 +54,7 @@ private _debugCode = {
ACE_LOGERROR_6("addDamageToUnit - FAILED - [unit:%1, partNo:%2, addDmg:%3] results:[alive:%4 old:%5 new:%6]", _unit, _partNumber, _damageToAdd, alive _unit, _startDmg, _endDmg);
};
};
-[{diag_frameno > (_this select 0)}, _debugCode, [_checkAtFrame, _unit, _startDmg, _damageToAdd, _partNumber]] call EFUNC(common,waitUntilAndExecute);
+[{diag_frameno > (_this select 0)}, _debugCode, [_checkAtFrame, _unit, _startDmg, _damageToAdd, _partNumber]] call CBA_fnc_waitUntilAndExecute;
#endif
private _return = [_unit, _selection, (_currentDamage + _damageToAdd), _unit, _typeOfDamage, _hitpointIndex] call FUNC(handleDamage);
diff --git a/addons/medical/functions/fnc_addHeartRateAdjustment.sqf b/addons/medical/functions/fnc_addHeartRateAdjustment.sqf
index cc8c093071..64acf71bb7 100644
--- a/addons/medical/functions/fnc_addHeartRateAdjustment.sqf
+++ b/addons/medical/functions/fnc_addHeartRateAdjustment.sqf
@@ -16,10 +16,10 @@
#include "script_component.hpp"
-
params [["_unit", objNull, [objNull]], ["_value", 0, [0]], ["_time", 1, [0]], ["_callBack", {}, [{}]]];
-_adjustment = _unit getVariable [QGVAR(heartRateAdjustments), []];
+private _adjustment = _unit getVariable [QGVAR(heartRateAdjustments), []];
_adjustment pushBack [_value, _time, _callBack];
-_unit setVariable [QGVAR(heartRateAdjustments), _adjustment ];
-["Medical_onHeartRateAdjustmentAdded", [_unit, _value, _time]] call EFUNC(common,localEvent);
+_unit setVariable [QGVAR(heartRateAdjustments), _adjustment];
+
+["ace_addedHeartRateAdjustment", [_unit, _value, _time]] call CBA_fnc_localEvent;
diff --git a/addons/medical/functions/fnc_addToInjuredCollection.sqf b/addons/medical/functions/fnc_addToInjuredCollection.sqf
index 48e400f7b2..77d2378d0d 100644
--- a/addons/medical/functions/fnc_addToInjuredCollection.sqf
+++ b/addons/medical/functions/fnc_addToInjuredCollection.sqf
@@ -8,52 +8,10 @@
* ReturnValue:
* None
*
- * Public: Yes
+ * Deprecated
*/
-
#include "script_component.hpp"
-params ["_unit", ["_force", false]];
+ACE_DEPRECATED("ace_medical_fnc_addToInjuredCollection","3.7.0","ace_medical_fnc_addVitalLoop");
-if ([_unit] call FUNC(hasMedicalEnabled) || _force) then {
-
- if !(local _unit) exitWith {
- [[_unit, _force], QUOTE(DFUNC(addToInjuredCollection)), _unit] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
- };
-
- if ((_unit getVariable[QGVAR(addedToUnitLoop),false] || !alive _unit) && !_force) exitWith{};
- _unit setVariable [QGVAR(addedToUnitLoop), true, true];
-
- [{
- params ["_args", "_idPFH"];
- _args params ["_unit", "_interval"];
- _interval = ACE_time - _interval;
- (_this select 0) set [1, ACE_time];
-
- if (!alive _unit || !local _unit) then {
- [_idPFH] call CBA_fnc_removePerFrameHandler;
- if (!local _unit) then {
- if (GVAR(level) >= 2) then {
- _unit setVariable [QGVAR(heartRate), _unit getVariable [QGVAR(heartRate), 80], true];
- _unit setVariable [QGVAR(bloodPressure), _unit getVariable [QGVAR(bloodPressure), [80, 120]], true];
- };
- _unit setVariable [QGVAR(bloodVolume), _unit getVariable [QGVAR(bloodVolume), 100], true];
- };
- } else {
- [_unit, _interval] call FUNC(handleUnitVitals);
-
- private "_pain";
- _pain = _unit getVariable [QGVAR(pain), 0];
- if (_pain > (_unit getVariable [QGVAR(painSuppress), 0])) then {
- // This introduces wierd unconscious behaviour for basic medical and possibly also advanced.
- // TODO This is disabled as it's considered non critical code.
- // We will need to decide if we want unconscious triggered on high pain levels or if we can get rid of this entirely.
- /*if (_pain > 0.7 && {random(1) > 0.6}) then {
- [_unit] call FUNC(setUnconscious);
- };*/
-
- [_unit, _pain] call FUNC(playInjuredSound);
- };
- };
- }, 1, [_unit, ACE_time]] call CBA_fnc_addPerFrameHandler;
-};
+_this call FUNC(addVitalLoop);
diff --git a/addons/medical/functions/fnc_addToLog.sqf b/addons/medical/functions/fnc_addToLog.sqf
index 8d1b337514..f0c6b9c622 100644
--- a/addons/medical/functions/fnc_addToLog.sqf
+++ b/addons/medical/functions/fnc_addToLog.sqf
@@ -16,22 +16,20 @@
#include "script_component.hpp"
-private ["_moment", "_logVarName", "_log","_newLog", "_logs"];
params ["_unit", "_type", "_message", "_arguments"];
if (!local _unit) exitWith {
- [_this, QFUNC(addToLog), _unit] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
+ [QGVAR(addToMedicalLog), _this, _unit] call CBA_fnc_targetEvent;
};
date params ["", "", "", "_hour", "_minute"];
-_moment = format [ (["%1:%2", "%1:0%2"] select (_minute < 10)), _hour, _minute];
+private _moment = format [ (["%1:%2", "%1:0%2"] select (_minute < 10)), _hour, _minute];
+private _logVarName = format[QGVAR(logFile_%1), _type];
-_logVarName = format[QGVAR(logFile_%1), _type];
-
-_log = _unit getVariable [_logVarName, []];
+private _log = _unit getVariable [_logVarName, []];
if (count _log >= 8) then {
- _newLog = [];
+ private _newLog = [];
{
// ensure the first element will not be added
if (_forEachIndex > 0) then {
@@ -43,9 +41,9 @@ if (count _log >= 8) then {
_log pushBack [_message, _moment, _type, _arguments];
_unit setVariable [_logVarName, _log, true];
-["medical_onLogEntryAdded", [_unit, _type, _message, _arguments]] call EFUNC(common,localEvent);
+["ace_medicalLogEntryAdded", [_unit, _type, _message, _arguments]] call CBA_fnc_localEvent;
-_logs = _unit getVariable [QGVAR(allLogs), []];
+private _logs = _unit getVariable [QGVAR(allLogs), []];
if !(_logVarName in _logs) then {
_logs pushBack _logVarName;
_unit setVariable [QGVAR(allLogs), _logs, true];
diff --git a/addons/medical/functions/fnc_addToTriageCard.sqf b/addons/medical/functions/fnc_addToTriageCard.sqf
index bd988fa84c..cfd58f09b4 100644
--- a/addons/medical/functions/fnc_addToTriageCard.sqf
+++ b/addons/medical/functions/fnc_addToTriageCard.sqf
@@ -14,22 +14,20 @@
#include "script_component.hpp"
-private ["_log", "_inList", "_amount"];
params ["_unit", "_newItem"];
if (!local _unit) exitWith {
- [_this, QUOTE(DFUNC(addToTriageCard)), _unit] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
+ [QGVAR(addToTriageCard), _this, _unit] call CBA_fnc_targetEvent;
};
-_log = _unit getVariable [QGVAR(triageCard), []];
-_inList = false;
-_amount = 1;
+private _log = _unit getVariable [QGVAR(triageCard), []];
+private _inList = false;
+private _amount = 1;
{
if ((_x select 0) == _newItem) exitWith {
- private "_info";
- _info = _log select _forEachIndex;
+ private _info = _log select _forEachIndex;
_info set [1,(_info select 1) + 1];
- _info set [2, ACE_gameTime];
+ _info set [2, CBA_missionTime];
_log set [_forEachIndex, _info];
_amount = (_info select 1);
@@ -38,7 +36,7 @@ _amount = 1;
} forEach _log;
if (!_inList) then {
- _log pushBack [_newItem, 1, ACE_gameTime];
+ _log pushBack [_newItem, 1, CBA_missionTime];
};
_unit setVariable [QGVAR(triageCard), _log, true];
-["Medical_onItemAddedToTriageCard", [_unit, _newItem, _amount]] call EFUNC(common,localEvent);
+["ace_itemAddedToTriageCard", [_unit, _newItem, _amount]] call CBA_fnc_localEvent;
diff --git a/addons/medical/functions/fnc_addUnloadPatientActions.sqf b/addons/medical/functions/fnc_addUnloadPatientActions.sqf
index f29b3923f1..2725365bc1 100644
--- a/addons/medical/functions/fnc_addUnloadPatientActions.sqf
+++ b/addons/medical/functions/fnc_addUnloadPatientActions.sqf
@@ -15,11 +15,10 @@
#include "script_component.hpp"
params ["_vehicle", "_player", "_parameters"];
-private ["_actions", "_unit"];
-_actions = [];
+private _actions = [];
{
- _unit = _x;
+ private _unit = _x;
if (_unit != _player && {(alive _unit) && {_unit getVariable ["ACE_isUnconscious", false]}}) then {
_actions pushBack
[
diff --git a/addons/medical/functions/fnc_addVitalLoop.sqf b/addons/medical/functions/fnc_addVitalLoop.sqf
new file mode 100644
index 0000000000..aa3d6608d0
--- /dev/null
+++ b/addons/medical/functions/fnc_addVitalLoop.sqf
@@ -0,0 +1,30 @@
+/*
+ * Author: Glowbal
+ * Enabled the vitals loop for a unit.
+ *
+ * Arguments:
+ * 0: The Unit
+ *
+ * ReturnValue:
+ * None
+ *
+ * Public: Yes
+ */
+
+#include "script_component.hpp"
+
+params ["_unit", ["_force", false]];
+
+if !([_unit] call FUNC(hasMedicalEnabled) || _force) exitWith {};
+
+if !(local _unit) exitWith {
+ [QGVAR(addVitalLoop), [_unit, _force], _unit] call CBA_fnc_targetEvent;
+};
+
+// Quit if the unit already has a vital loop, or is dead, unless it's forced
+if ((_unit getVariable[QGVAR(addedToUnitLoop),false] || !alive _unit) && !_force) exitWith{};
+
+// Schedule the loop to be executed again 1 sec later
+// @todo: should the loop be started righ away instead?
+_unit setVariable [QGVAR(addedToUnitLoop), true, true];
+[DFUNC(vitalLoop), [_unit, CBA_missionTime], 1] call CBA_fnc_waitAndExecute;
diff --git a/addons/medical/functions/fnc_adjustPainLevel.sqf b/addons/medical/functions/fnc_adjustPainLevel.sqf
index df82e06823..b78ee3d4f7 100644
--- a/addons/medical/functions/fnc_adjustPainLevel.sqf
+++ b/addons/medical/functions/fnc_adjustPainLevel.sqf
@@ -26,15 +26,13 @@ TRACE_3("ACE_DEBUG: adjustPainLevel Called",_unit, _pain, _addedPain);
//Ignore if medical system disabled:
if (GVAR(level) == 0) exitWith {};
-_pain = _unit getVariable [QGVAR(pain), 0];
+private _pain = ((_unit getVariable [QGVAR(pain), 0]) + _addedPain) max 0;
-_pain = _pain + _addedPain;
if (GVAR(level) == 1) then {_pain = _pain min 1;}; //for basic, cap at 1
-_pain = _pain max 0;
_unit setVariable [QGVAR(pain), _pain];
//Start up the vital watching (if not already running)
-[_unit] call FUNC(addToInjuredCollection);
+[_unit] call FUNC(addVitalLoop);
-_pain
+_pain;
diff --git a/addons/medical/functions/fnc_bodyCleanupLoop.sqf b/addons/medical/functions/fnc_bodyCleanupLoop.sqf
new file mode 100644
index 0000000000..af17ffcd34
--- /dev/null
+++ b/addons/medical/functions/fnc_bodyCleanupLoop.sqf
@@ -0,0 +1,30 @@
+/*
+ * Author: Glowbal, esteldunedain
+ * Loop that cleans up litter
+ *
+ * Arguments:
+ * None
+ *
+ * ReturnValue:
+ * None
+ *
+ * Public: No
+ */
+
+#include "script_component.hpp"
+
+{
+ TRACE_2("body",_x,isPlayer _x);
+ if ((!isNull _x) && {!isPlayer _x}) then {deleteVehicle _x};
+} forEach GVAR(bodiesToDelete);
+
+// deleteVehicle doesn't have instant results so it won't usualy be filtered until next run
+GVAR(bodiesToDelete) = GVAR(bodiesToDelete) - [objNull];
+
+// If no more bodies remain, exit the loop
+if (GVAR(bodiesToDelete) isEqualTo []) exitWith {
+ TRACE_1("array emptied - rem PFEH",GVAR(bodiesToDelete));
+};
+
+// Schedule the loop to be executed again 20 sec later
+[DFUNC(bodyCleanupLoop), [], 20] call CBA_fnc_waitAndExecute;
diff --git a/addons/medical/functions/fnc_canAccessMedicalEquipment.sqf b/addons/medical/functions/fnc_canAccessMedicalEquipment.sqf
index e6856335cc..53707ae65c 100644
--- a/addons/medical/functions/fnc_canAccessMedicalEquipment.sqf
+++ b/addons/medical/functions/fnc_canAccessMedicalEquipment.sqf
@@ -14,12 +14,11 @@
#include "script_component.hpp"
-private ["_accessLevel", "_return"];
params ["_caller", "_target"];
-_accessLevel = _target getVariable [QGVAR(allowSharedEquipmentAccess), -1];
+private _accessLevel = _target getVariable [QGVAR(allowSharedEquipmentAccess), -1];
-_return = false;
+private _return = false;
if (_accessLevel >= 0) then {
if (_accessLevel == 0) exitWith { _return = true; };
diff --git a/addons/medical/functions/fnc_canTreat.sqf b/addons/medical/functions/fnc_canTreat.sqf
index 1d9fadf455..1c78eb1e43 100644
--- a/addons/medical/functions/fnc_canTreat.sqf
+++ b/addons/medical/functions/fnc_canTreat.sqf
@@ -19,20 +19,18 @@
#include "script_component.hpp"
-private ["_config", "_medicRequired", "_items", "_locations", "_return", "_condition", "_patientStateCondition", "_allowedSelections"];
params ["_caller", "_target", "_selectionName", "_className"];
if !(_target isKindOf "CAManBase") exitWith { false };
-
-_config = (ConfigFile >> "ACE_Medical_Actions" >> (["Basic", "Advanced"] select (GVAR(level)>=2)) >> _className);
+private _config = (ConfigFile >> "ACE_Medical_Actions" >> (["Basic", "Advanced"] select (GVAR(level)>=2)) >> _className);
if !(isClass _config) exitwith {false};
// Allow self treatment check
if (_caller == _target && {getNumber (_config >> "allowSelfTreatment") == 0}) exitwith {false};
-_medicRequired = if (isNumber (_config >> "requiredMedic")) then {
+private _medicRequired = if (isNumber (_config >> "requiredMedic")) then {
getNumber (_config >> "requiredMedic");
} else {
// Check for required class
@@ -43,15 +41,15 @@ _medicRequired = if (isNumber (_config >> "requiredMedic")) then {
};
if !([_caller, _medicRequired] call FUNC(isMedic)) exitwith { false };
-_items = getArray (_config >> "items");
+private _items = getArray (_config >> "items");
if (count _items > 0 && {!([_caller, _target, _items] call FUNC(hasItems))}) exitwith { false };
-_allowedSelections = getArray (_config >> "allowedSelections");
+private _allowedSelections = getArray (_config >> "allowedSelections");
if !("All" in _allowedSelections || {(_selectionName in _allowedSelections)}) exitwith { false };
-_return = true;
+private _return = true;
if (getText (_config >> "condition") != "") then {
- _condition = getText (_config >> "condition");
+ private _condition = getText (_config >> "condition");
if (isnil _condition) then {
_condition = compile _condition;
} else {
@@ -65,27 +63,25 @@ if (getText (_config >> "condition") != "") then {
};
if (!_return) exitwith { false };
-_patientStateCondition = if (isText(_config >> "patientStateCondition")) then {
+private _patientStateCondition = if (isText(_config >> "patientStateCondition")) then {
missionNamespace getVariable [getText(_config >> "patientStateCondition"), 0]
} else {
getNumber(_config >> "patientStateCondition")
};
if (_patientStateCondition == 1 && {!([_target] call FUNC(isInStableCondition))}) exitwith {false};
-_locations = getArray (_config >> "treatmentLocations");
+private _locations = getArray (_config >> "treatmentLocations");
if ("All" in _locations) exitwith { true };
-private [ "_medFacility", "_medVeh"];
-_medFacility = {([_caller] call FUNC(isInMedicalFacility)) || ([_target] call FUNC(isInMedicalFacility))};
-_medVeh = {([_caller] call FUNC(isInMedicalVehicle)) || ([_target] call FUNC(isInMedicalVehicle))};
+private _medFacility = {([_caller] call FUNC(isInMedicalFacility)) || ([_target] call FUNC(isInMedicalFacility))};
+private _medVeh = {([_caller] call FUNC(isInMedicalVehicle)) || ([_target] call FUNC(isInMedicalVehicle))};
{
if (_x == "field") exitwith {_return = true;};
if (_x == "MedicalFacility" && _medFacility) exitwith {_return = true;};
if (_x == "MedicalVehicle" && _medVeh) exitwith {_return = true;};
if !(isnil _x) exitwith {
- private "_val";
- _val = missionNamespace getVariable _x;
+ private _val = missionNamespace getVariable _x;
if (_val isEqualType 0) then {
_return = switch (_val) do {
case 0: {true}; //AdvancedMedicalSettings_anywhere
diff --git a/addons/medical/functions/fnc_createLitter.sqf b/addons/medical/functions/fnc_createLitter.sqf
index bb90e0e3e2..fd3bc9a403 100644
--- a/addons/medical/functions/fnc_createLitter.sqf
+++ b/addons/medical/functions/fnc_createLitter.sqf
@@ -21,7 +21,6 @@
#define MIN_ENTRIES_LITTER_CONFIG 3
-private ["_config", "_litter", "_createLitter", "_position", "_createdLitter"];
params ["_caller", "_target", "_selectionName", "_className", "", "_usersOfItems", "_bloodLossOnSelection"];
//Ensures comptibilty with other possible medical treatment configs
@@ -30,28 +29,27 @@ private _previousDamage = _bloodLossOnSelection;
if !(GVAR(allowLitterCreation)) exitwith {};
if (vehicle _caller != _caller || vehicle _target != _target) exitwith {};
-_config = (configFile >> "ACE_Medical_Actions" >> "Basic" >> _className);
-if (GVAR(level) >= 2) then {
- _config = (configFile >> "ACE_Medical_Actions" >> "Advanced" >> _className);
+private _config = if (GVAR(level) >= 2) then {
+ (configFile >> "ACE_Medical_Actions" >> "Advanced" >> _className);
+} else {
+ (configFile >> "ACE_Medical_Actions" >> "Basic" >> _className)
};
if !(isClass _config) exitwith {false};
-
if !(isArray (_config >> "litter")) exitwith {};
-_litter = getArray (_config >> "litter");
+private _litter = getArray (_config >> "litter");
-_createLitter = {
- private["_position", "_direction"];
+private _createLitter = {
params ["_unit", "_litterClass"];
// @TODO: handle carriers over water
// For now, don't spawn litter if we are over water to avoid floating litter
- if(surfaceIsWater (getPos _unit)) exitWith { false };
+ if (surfaceIsWater (getPos _unit)) exitWith { false };
- _position = getPosATL _unit;
+ private _position = getPosATL _unit;
_position params ["_posX", "_posY", "_posZ"];
_position = [_posX + (random 2) - 1, _posY + (random 2) - 1, _posZ];
- _direction = (random 360);
+ private _direction = (random 360);
// Create the litter, and timeout the event based on the cleanup delay
// The cleanup delay for events in MP is handled by the server side
@@ -60,7 +58,7 @@ _createLitter = {
true
};
-_createdLitter = [];
+private _createdLitter = [];
{
if (_x isEqualType []) then {
if (count _x < MIN_ENTRIES_LITTER_CONFIG) exitwith {};
diff --git a/addons/medical/functions/fnc_determineIfFatal.sqf b/addons/medical/functions/fnc_determineIfFatal.sqf
index 8a70d336c2..9dbbcce9a6 100644
--- a/addons/medical/functions/fnc_determineIfFatal.sqf
+++ b/addons/medical/functions/fnc_determineIfFatal.sqf
@@ -22,7 +22,6 @@
#define CHANGE_FATAL_TORSO 0.6
#define CHANGE_FATAL_LIMB 0.1
-private ["_damageThreshold", "_damageBodyPart", "_chanceFatal"];
params ["_unit", "_part", ["_withDamage", 0]];
if (!alive _unit) exitWith {true};
@@ -30,7 +29,7 @@ if ((vehicle _unit != _unit) && {!alive (vehicle _unit)}) exitWith { true };
if (_part < 0 || _part > 5) exitWith {false};
// Find the correct Damage threshold for unit.
-_damageThreshold = [1,1,1];
+private _damageThreshold = [1,1,1];
if ([_unit] call EFUNC(common,IsPlayer)) then {
_damageThreshold =_unit getVariable[QGVAR(unitDamageThreshold), [GVAR(playerDamageThreshold), GVAR(playerDamageThreshold), GVAR(playerDamageThreshold) * 1.7]];
} else {
@@ -38,20 +37,20 @@ if ([_unit] call EFUNC(common,IsPlayer)) then {
};
_damageThreshold params ["_thresholdHead", "_thresholdTorso", "_thresholdLimbs"];
-_damageBodyPart = ((_unit getVariable [QGVAR(bodyPartStatus),[0, 0, 0, 0, 0, 0]]) select _part) + _withDamage;
+private _damageBodyPart = ((_unit getVariable [QGVAR(bodyPartStatus),[0, 0, 0, 0, 0, 0]]) select _part) + _withDamage;
// Check if damage to body part is higher as damage head
if (_part == 0) exitWith {
- _chanceFatal = CHANGE_FATAL_HEAD + ((INCREASE_CHANCE_HEAD * (_damageBodyPart - _thresholdHead)) * 10);
+ private _chanceFatal = CHANGE_FATAL_HEAD + ((INCREASE_CHANCE_HEAD * (_damageBodyPart - _thresholdHead)) * 10);
(_damageBodyPart >= _thresholdHead && {(_chanceFatal >= random(1))});
};
// Check if damage to body part is higher as damage torso
if (_part == 1) exitWith {
- _chanceFatal = CHANGE_FATAL_TORSO + ((INCREASE_CHANCE_TORSO * (_damageBodyPart - _thresholdTorso)) * 10);
+ private _chanceFatal = CHANGE_FATAL_TORSO + ((INCREASE_CHANCE_TORSO * (_damageBodyPart - _thresholdTorso)) * 10);
(_damageBodyPart >= _thresholdTorso && {(_chanceFatal >= random(1))});
};
// Check if damage to body part is higher as damage limbs
// We use a slightly lower decrease for limbs, as we want any injuries done to those to be less likely to be fatal compared to head shots or torso.
-_chanceFatal = CHANGE_FATAL_LIMB + ((INCREASE_CHANGE_LIMB * (_damageBodyPart - _thresholdLimbs)) * 10);
+private _chanceFatal = CHANGE_FATAL_LIMB + ((INCREASE_CHANGE_LIMB * (_damageBodyPart - _thresholdLimbs)) * 10);
(_damageBodyPart >= _thresholdLimbs && {(_chanceFatal >= random(1))});
diff --git a/addons/medical/functions/fnc_displayPatientInformation.sqf b/addons/medical/functions/fnc_displayPatientInformation.sqf
index 279bbf060d..0f44ea5699 100644
--- a/addons/medical/functions/fnc_displayPatientInformation.sqf
+++ b/addons/medical/functions/fnc_displayPatientInformation.sqf
@@ -18,7 +18,7 @@
// Exit for basic medical
if (GVAR(level) < 2) exitWith {};
-private ["_amountOfGeneric", "_bandagedwounds", "_logCtrl", "_part", "_partText", "_pointDamage", "_severity", "_total", "_totalIvVolume", "_triageStatus", "_type"];
+
params ["_target", ["_show", true], ["_selectionN", 0]];
GVAR(currentSelectedSelectionN) = [0, _selectionN] select (IS_SCALAR(_selectionN));
@@ -42,20 +42,20 @@ if (_show) then {
if (ACE_player distance _target > MAX_DISTANCE) exitwith {
("ACE_MedicalRscDisplayInformation" call BIS_fnc_rscLayer) cutText ["","PLAIN"];
[_idPFH] call CBA_fnc_removePerFrameHandler;
- ["displayTextStructured", [ACE_player], [[LSTRING(DistanceToFar), [_target] call EFUNC(common,getName)], 1.75, ACE_player]] call EFUNC(common,targetEvent);
+ [QEGVAR(common,displayTextStructured), [[LSTRING(DistanceToFar), [_target] call EFUNC(common,getName)], 1.75, ACE_player], [ACE_player]] call CBA_fnc_targetEvent;
};
disableSerialization;
- _display = uiNamespace getVariable QGVAR(DisplayInformation);
+ private _display = uiNamespace getVariable QGVAR(DisplayInformation);
if (isnil "_display") exitwith {
[_idPFH] call CBA_fnc_removePerFrameHandler;
};
- _allInjuryTexts = [];
- _genericMessages = [];
+ private _allInjuryTexts = [];
+ private _genericMessages = [];
if (GVAR(level) >= 2 && {([_unit] call FUNC(hasMedicalEnabled))}) then {
- _partText = [LSTRING(Head), LSTRING(Torso), LSTRING(LeftArm) ,LSTRING(RightArm) ,LSTRING(LeftLeg), LSTRING(RightLeg)] select _selectionN;
+ private _partText = [LSTRING(Head), LSTRING(Torso), LSTRING(LeftArm) ,LSTRING(RightArm) ,LSTRING(LeftLeg), LSTRING(RightLeg)] select _selectionN;
_genericMessages pushback [localize _partText, [1, 1, 1, 1]];
};
@@ -73,10 +73,9 @@ if (_show) then {
_genericMessages pushback [localize LSTRING(Status_Pain), [1, 1, 1, 1]];
};
- _totalIvVolume = 0;
+ private _totalIvVolume = 0;
{
- private "_value";
- _value = _target getVariable _x;
+ private _value = _target getVariable _x;
if !(isnil "_value") then {
_totalIvVolume = _totalIvVolume + (_target getVariable [_x, 0]);
};
@@ -85,23 +84,22 @@ if (_show) then {
_genericMessages pushback [format[localize LSTRING(receivingIvVolume), floor _totalIvVolume], [1, 1, 1, 1]];
};
- _damaged = [false, false, false, false, false, false];
- _selectionBloodLoss = [0,0,0,0,0,0];
+ private _damaged = [false, false, false, false, false, false];
+ private _selectionBloodLoss = [0,0,0,0,0,0];
if (GVAR(level) >= 2 && {([_target] call FUNC(hasMedicalEnabled))}) then {
- _openWounds = _target getVariable [QGVAR(openWounds), []];
- private "_amountOf";
+ private _openWounds = _target getVariable [QGVAR(openWounds), []];
{
_x params ["", "_x1", "_selectionX", "_amountOf", "_x4"];
// Find how much this bodypart is bleeding
if (_amountOf > 0) then {
- _damaged set[_selectionX, true];
+ _damaged set [_selectionX, true];
_selectionBloodLoss set [_selectionX, (_selectionBloodLoss select _selectionX) + (20 * (_x4 * _amountOf))];
if (_selectionN == _selectionX) then {
// Collect the text to be displayed for this injury [ Select injury class type definition - select the classname DisplayName (6th), amount of injuries for this]
if (_amountOf >= 1) then {
// TODO localization
- _allInjuryTexts pushback [format["%2x %1", (GVAR(AllWoundInjuryTypes) select _x1) select 6, _amountOf], [1,1,1,1]];
+ _allInjuryTexts pushback [format["%2x %1", (GVAR(AllWoundInjuryTypes) select _x1) select 6, ceil _amountOf], [1,1,1,1]];
} else {
// TODO localization
_allInjuryTexts pushback [format["Partial %1", (GVAR(AllWoundInjuryTypes) select _x1) select 6], [1,1,1,1]];
@@ -110,7 +108,7 @@ if (_show) then {
};
} foreach _openWounds;
- _bandagedwounds = _target getVariable [QGVAR(bandagedWounds), []];
+ private _bandagedwounds = _target getVariable [QGVAR(bandagedWounds), []];
{
_x params ["", "", "_selectionX", "_amountOf", "_x4"];
// Find how much this bodypart is bleeding
@@ -122,7 +120,7 @@ if (_show) then {
if (_amountOf > 0) then {
if (_amountOf >= 1) then {
// TODO localization
- _allInjuryTexts pushback [format["[B] %2x %1", (GVAR(AllWoundInjuryTypes) select (_x select 1)) select 6, _amountOf], [0.88,0.7,0.65,1]];
+ _allInjuryTexts pushback [format["[B] %2x %1", (GVAR(AllWoundInjuryTypes) select (_x select 1)) select 6, ceil _amountOf], [0.88,0.7,0.65,1]];
} else {
// TODO localization
_allInjuryTexts pushback [format["[B] Partial %1", (GVAR(AllWoundInjuryTypes) select (_x select 1)) select 6], [0.88,0.7,0.65,1]];
@@ -131,18 +129,18 @@ if (_show) then {
};
} foreach _bandagedwounds;
} else {
- _damaged = [true, true, true, true, true, true];
+ private _damaged = [true, true, true, true, true, true];
{
private _hitPoint = [_target, _x, true] call FUNC(translateSelections);
_selectionBloodLoss set [_forEachIndex, _target getHitPointDamage _hitPoint];
if (_target getHitPointDamage _hitPoint > 0 && {_forEachIndex == _selectionN}) then {
- _pointDamage = _target getHitPointDamage _hitPoint;
- _severity = switch (true) do {
+ private _pointDamage = _target getHitPointDamage _hitPoint;
+ private _severity = switch (true) do {
case (_pointDamage > 0.5): {localize LSTRING(HeavilyWounded)};
case (_pointDamage > 0.1): {localize LSTRING(LightlyWounded)};
default {localize LSTRING(VeryLightlyWounded)};
};
- _part = localize ([
+ private _part = localize ([
LSTRING(Head),
LSTRING(Torso),
LSTRING(LeftArm),
@@ -157,14 +155,13 @@ if (_show) then {
// Handle the body image coloring
- _availableSelections = [50,51,52,53,54,55];
+ private _availableSelections = [50,51,52,53,54,55];
{
- private ["_red", "_green", "_blue", "_total"];
- _total = _x;
+ private _total = _x;
+ private _red = 1;
+ private _green = 1;
+ private _blue = 1;
- _red = 1;
- _green = 1;
- _blue = 1;
if (_total > 0) then {
if (_damaged select _forEachIndex) then {
_green = (0.9 - _total) max 0;
@@ -178,7 +175,7 @@ if (_show) then {
(_display displayCtrl (_availableSelections select _foreachIndex)) ctrlSetTextColor [_red, _green, _blue, 1.0];
} foreach _selectionBloodLoss;
- _lbCtrl = (_display displayCtrl 200);
+ private _lbCtrl = (_display displayCtrl 200);
lbClear _lbCtrl;
{
_x params ["_add", "_color"];
@@ -186,7 +183,7 @@ if (_show) then {
_lbCtrl lbSetColor [_foreachIndex, _color];
} foreach _genericMessages;
- _amountOfGeneric = count _genericMessages;
+ private _amountOfGeneric = count _genericMessages;
{
_x params ["_add", "_color"];
_lbCtrl lbAdd _add;
@@ -196,13 +193,11 @@ if (_show) then {
_lbCtrl lbAdd (localize LSTRING(NoInjuriesBodypart));
};
- _logCtrl = (_display displayCtrl 302);
+ private _logCtrl = (_display displayCtrl 302);
lbClear _logCtrl;
- private ["_logs", "_message", "_moment", "_arguments", "_lbCtrl"];
- _logs = _target getVariable [QGVAR(logFile_Activity), []];
+ private _logs = _target getVariable [QGVAR(logFile_Activity), []];
{
- // [_message,_moment,_type, _arguments]
_x params ["_message", "_moment", "_type", "_arguments"];
if (isLocalized _message) then {
_message = localize _message;
@@ -217,7 +212,7 @@ if (_show) then {
_logCtrl lbAdd format["%1 %2", _moment, _message];
} foreach _logs;
- _triageStatus = [_target] call FUNC(getTriageStatus);
+ private _triageStatus = [_target] call FUNC(getTriageStatus);
(_display displayCtrl 303) ctrlSetText (_triageStatus select 0);
(_display displayCtrl 303) ctrlSetBackgroundColor (_triageStatus select 2);
diff --git a/addons/medical/functions/fnc_displayTriageCard.sqf b/addons/medical/functions/fnc_displayTriageCard.sqf
index 47af145055..1633853214 100644
--- a/addons/medical/functions/fnc_displayTriageCard.sqf
+++ b/addons/medical/functions/fnc_displayTriageCard.sqf
@@ -14,7 +14,6 @@
#include "script_component.hpp"
-private ["_amount", "_item", "_log", "_message", "_triageCardTexts", "_triageStatus"];
params ["_target", ["_show", true]];
GVAR(TriageCardTarget) = if (_show) then {_target} else {ObjNull};
@@ -24,7 +23,6 @@ if (_show) then {
createDialog QGVAR(triageCard);
[{
- private ["_target", "_display", "_alphaLevel", "_alphaLevel", "_lbCtrl"];
params ["_args", "_idPFH"];
_args params ["_target"];
if (GVAR(TriageCardTarget) != _target) exitWith {
@@ -32,21 +30,21 @@ if (_show) then {
};
disableSerialization;
- _display = uiNamespace getVariable QGVAR(triageCard);
+ private _display = uiNamespace getVariable QGVAR(triageCard);
if (isNil "_display") exitWith {
[_idPFH] call CBA_fnc_removePerFrameHandler;
};
- _triageCardTexts = [];
+ private _triageCardTexts = [];
// TODO fill the lb with the appropiate information for the patient
- _lbCtrl = (_display displayCtrl 200);
+ private _lbCtrl = (_display displayCtrl 200);
lbClear _lbCtrl;
- _log = _target getVariable [QGVAR(triageCard), []];
+ private _log = _target getVariable [QGVAR(triageCard), []];
{
_x params ["_item", "_amount"];
- _message = _item;
+ private _message = _item;
if (isClass(configFile >> "CfgWeapons" >> _item)) then {
_message = getText(configFile >> "CfgWeapons" >> _item >> "DisplayName");
} else {
@@ -64,8 +62,7 @@ if (_show) then {
_lbCtrl lbAdd _x;
} forEach _triageCardTexts;
- _triageStatus = [_target] call FUNC(getTriageStatus);
-
+ private _triageStatus = [_target] call FUNC(getTriageStatus);
_triageStatus params ["_text", "", "_color"];
(_display displayCtrl 2000) ctrlSetText _text;
diff --git a/addons/medical/functions/fnc_dropDownTriageCard.sqf b/addons/medical/functions/fnc_dropDownTriageCard.sqf
index e7a4d3c0a9..c499283446 100644
--- a/addons/medical/functions/fnc_dropDownTriageCard.sqf
+++ b/addons/medical/functions/fnc_dropDownTriageCard.sqf
@@ -13,20 +13,19 @@
#include "script_component.hpp"
-private ["_ctrl", "_display", "_idc", "_pos"];
params ["_show"];
-disableSerialization;
-_display = uiNamespace getVariable QGVAR(triageCard);
+disableSerialization;
+private _display = uiNamespace getVariable QGVAR(triageCard);
if (isNil "_display") exitWith {};
-_pos = [0,0,0,0];
+private _pos = [0,0,0,0];
if (_show) then {
_pos = ctrlPosition (_display displayCtrl 2001);
};
for "_idc" from 2002 to 2006 step 1 do {
_pos set [1, (_pos select 1) + (_pos select 3)];
- _ctrl = (_display displayCtrl _idc);
+ private _ctrl = (_display displayCtrl _idc);
_ctrl ctrlSetPosition _pos;
_ctrl ctrlCommit 0;
};
diff --git a/addons/medical/functions/fnc_getBloodPressure.sqf b/addons/medical/functions/fnc_getBloodPressure.sqf
index 3fdc4f9d52..63908eecc7 100644
--- a/addons/medical/functions/fnc_getBloodPressure.sqf
+++ b/addons/medical/functions/fnc_getBloodPressure.sqf
@@ -20,14 +20,12 @@
// Value is taken because with cardic output and resistance at default values, it will put blood pressure Low at 80.
#define MODIFIER_BP_LOW 0.1524
-private ["_bloodPressureLow", "_bloodPressureHigh", "_cardiacOutput", "_resistance"];
-
params ["_unit"];
-_cardiacOutput = [_unit] call FUNC(getCardiacOutput);
-_resistance = _unit getVariable [QGVAR(peripheralResistance), 100];
+private _cardiacOutput = [_unit] call FUNC(getCardiacOutput);
+private _resistance = _unit getVariable [QGVAR(peripheralResistance), 100];
-_bloodPressureHigh = (_cardiacOutput * MODIFIER_BP_HIGH) * _resistance;
-_bloodPressureLow = (_cardiacOutput * MODIFIER_BP_LOW) * _resistance;
+private _bloodPressureHigh = (_cardiacOutput * MODIFIER_BP_HIGH) * _resistance;
+private _bloodPressureLow = (_cardiacOutput * MODIFIER_BP_LOW) * _resistance;
[_bloodPressureLow max 0, _bloodPressureHigh max 0]
diff --git a/addons/medical/functions/fnc_getBloodVolumeChange.sqf b/addons/medical/functions/fnc_getBloodVolumeChange.sqf
index 1737bb3b98..04051e54b2 100644
--- a/addons/medical/functions/fnc_getBloodVolumeChange.sqf
+++ b/addons/medical/functions/fnc_getBloodVolumeChange.sqf
@@ -28,24 +28,26 @@
*/
#define BLOOD_CHANGE_PER_SECOND 0.0595
+#define EMPTY_IV_BAG_VALUE 0
+#define IV_VOLUME (_unit getVariable [_x, EMPTY_IV_BAG_VALUE]) + IV_CHANGE_PER_SECOND
+
private ["_bloodVolume", "_bloodVolumeChange", "_ivVolume"];
params ["_unit"];
-_bloodVolume = _unit getVariable [QGVAR(bloodVolume), 100];
-_bloodVolumeChange = -([_unit] call FUNC(getBloodLoss));
+private _bloodVolume = _unit getVariable [QGVAR(bloodVolume), 100];
+private _bloodVolumeChange = -([_unit] call FUNC(getBloodLoss));
-if (_bloodVolume < 100.0) then {
+if (_bloodVolume < 100) then {
{
- if ((_unit getVariable [_x, 0]) > 0) then {
+ if ((_unit getVariable [_x, EMPTY_IV_BAG_VALUE]) > EMPTY_IV_BAG_VALUE) then {
_bloodVolumeChange = _bloodVolumeChange + BLOOD_CHANGE_PER_SECOND;
- _ivVolume = (_unit getVariable [_x, 0]) + IV_CHANGE_PER_SECOND;
- _unit setVariable [_x,_ivVolume];
+ _unit setVariable [_x, IV_VOLUME];
};
} forEach GVAR(IVBags);
} else {
{
- if ((_unit getVariable [_x, 0]) > 0) then {
- _unit setVariable [_x, 0]; // lets get rid of exessive IV volume
+ if ((_unit getVariable [_x, EMPTY_IV_BAG_VALUE]) > EMPTY_IV_BAG_VALUE) then {
+ _unit setVariable [_x, EMPTY_IV_BAG_VALUE]; // lets get rid of exessive IV volume
};
} forEach GVAR(IVBags);
};
diff --git a/addons/medical/functions/fnc_getCardiacOutput.sqf b/addons/medical/functions/fnc_getCardiacOutput.sqf
index d07319e8b5..74da98012b 100644
--- a/addons/medical/functions/fnc_getCardiacOutput.sqf
+++ b/addons/medical/functions/fnc_getCardiacOutput.sqf
@@ -14,7 +14,7 @@
#include "script_component.hpp"
/*
- Cardiac output (Q or or CO ) is the volume of blood being pumped by the heart, in particular by a left or right ventricle in the ACE_time interval of one minute. CO may be measured in many ways, for example dm3/min (1 dm3 equals 1 litre).
+ Cardiac output (Q or or CO ) is the volume of blood being pumped by the heart, in particular by a left or right ventricle in the CBA_missionTime interval of one minute. CO may be measured in many ways, for example dm3/min (1 dm3 equals 1 litre).
Source: http://en.wikipedia.org/wiki/Cardiac_output
*/
diff --git a/addons/medical/functions/fnc_getHeartRateChange.sqf b/addons/medical/functions/fnc_getHeartRateChange.sqf
index 3ba4b7875f..4f0b19f80c 100644
--- a/addons/medical/functions/fnc_getHeartRateChange.sqf
+++ b/addons/medical/functions/fnc_getHeartRateChange.sqf
@@ -15,22 +15,21 @@
#define HEART_RATE_MODIFIER 0.02
-private ["_heartRate", "_hrIncrease", "_bloodLoss", "_time", "_values", "_adjustment", "_change", "_callBack", "_bloodVolume"];
params ["_unit"];
-_hrIncrease = 0;
+private _hrIncrease = 0;
if (!(_unit getVariable [QGVAR(inCardiacArrest),false])) then {
- _heartRate = _unit getVariable [QGVAR(heartRate), 80];
- _bloodLoss = [_unit] call FUNC(getBloodLoss);
+ private _heartRate = _unit getVariable [QGVAR(heartRate), 80];
+ private _bloodLoss = [_unit] call FUNC(getBloodLoss);
- _adjustment = _unit getVariable [QGVAR(heartRateAdjustments), []];
+ private _adjustment = _unit getVariable [QGVAR(heartRateAdjustments), []];
{
_x params ["_values", "_time", "_callBack"];
if (abs _values > 0) then {
if (_time <= 0) then {
_time = 1;
};
- _change = (_values / _time);
+ private _change = (_values / _time);
_hrIncrease = _hrIncrease + _change;
if ( (_time - 1) <= 0) then {
@@ -45,15 +44,15 @@ if (!(_unit getVariable [QGVAR(inCardiacArrest),false])) then {
_adjustment set [_forEachIndex, ObjNull];
[_unit] call _callBack;
};
-
} forEach _adjustment;
+
_adjustment = _adjustment - [ObjNull];
_unit setVariable [QGVAR(heartRateAdjustments), _adjustment];
- _bloodVolume = _unit getVariable [QGVAR(bloodVolume), 100];
+ private _bloodVolume = _unit getVariable [QGVAR(bloodVolume), 100];
if (_bloodVolume > 75) then {
- if (_bloodLoss >0.0) then {
- if (_bloodLoss <0.5) then {
+ if (_bloodLoss > 0.0) then {
+ if (_bloodLoss < 0.5) then {
if (_heartRate < 126) then {
_hrIncrease = _hrIncrease + 0.05;
};
diff --git a/addons/medical/functions/fnc_getUnconsciousCondition.sqf b/addons/medical/functions/fnc_getUnconsciousCondition.sqf
index cf8cc86c22..ad366b5ab2 100644
--- a/addons/medical/functions/fnc_getUnconsciousCondition.sqf
+++ b/addons/medical/functions/fnc_getUnconsciousCondition.sqf
@@ -13,14 +13,13 @@
#include "script_component.hpp"
-private ["_unit","_return"];
params ["_unit"];
if (isnil QGVAR(unconsciousConditions)) then {
GVAR(unconsciousConditions) = [];
};
-_return = false;
+private _return = false;
{
if ((_x isEqualType {}) && {([_unit] call _x)}) exitwith {
_return = true;
diff --git a/addons/medical/functions/fnc_handleBandageOpening.sqf b/addons/medical/functions/fnc_handleBandageOpening.sqf
index 84ffa01258..f2a5a45af2 100644
--- a/addons/medical/functions/fnc_handleBandageOpening.sqf
+++ b/addons/medical/functions/fnc_handleBandageOpening.sqf
@@ -21,16 +21,16 @@
private ["_className", "_reopeningChance", "_reopeningMinDelay", "_reopeningMaxDelay", "_config", "_woundTreatmentConfig", "_bandagedWounds", "_exist", "_injuryId", "_existingInjury", "_delay", "_openWounds", "_selectedInjury", "_bandagedInjury"];
params ["_target", "_impact", "_part", "_injuryIndex", "_injury", "_bandage"];
-_classID = _injury select 1;
-_className = GVAR(woundClassNames) select _classID;
+private _classID = _injury select 1;
+private _className = GVAR(woundClassNames) select _classID;
// default, just in case..
-_reopeningChance = 0.1;
-_reopeningMinDelay = 120;
-_reopeningMaxDelay = 200;
+private _reopeningChance = 0.1;
+private _reopeningMinDelay = 120;
+private _reopeningMaxDelay = 200;
// Get the default values for the used bandage
-_config = (ConfigFile >> "ACE_Medical_Advanced" >> "Treatment" >> "Bandaging");
+private _config = (ConfigFile >> "ACE_Medical_Advanced" >> "Treatment" >> "Bandaging");
if (isClass (_config >> _bandage)) then {
_config = (_config >> _bandage);
_reopeningChance = getNumber (_config >> "reopeningChance");
@@ -41,7 +41,7 @@ if (isClass (_config >> _bandage)) then {
};
if (isClass (_config >> _className)) then {
- _woundTreatmentConfig = (_config >> _className);
+ private _woundTreatmentConfig = (_config >> _className);
if (isNumber (_woundTreatmentConfig >> "reopeningChance")) then {
_reopeningChance = getNumber (_woundTreatmentConfig >> "reopeningChance");
};
@@ -56,10 +56,10 @@ if (isClass (_config >> _className)) then {
};
TRACE_5("configs",_bandage,_className,_reopeningChance,_reopeningMinDelay,_reopeningMaxDelay);
-_bandagedWounds = _target getVariable [QGVAR(bandagedWounds), []];
-_injuryType = _injury select 1;
-_exist = false;
-_bandagedInjury = [];
+private _bandagedWounds = _target getVariable [QGVAR(bandagedWounds), []];
+private _injuryType = _injury select 1;
+private _exist = false;
+private _bandagedInjury = [];
{
if ((_x select 1) == _injuryType && (_x select 2) == (_injury select 2)) exitwith {
_exist = true;
@@ -85,19 +85,18 @@ if (random(1) <= _reopeningChance) then {
_delay = _reopeningMinDelay + random(_reopeningMaxDelay - _reopeningMinDelay);
TRACE_1("Will open",_delay);
[{
- private ["_bandage", "_openWounds", "_selectedInjury","_bandagedWounds","_exist"];
params ["_target", "_impact", "_part", "_injuryIndex", "_injury"];
TRACE_5("params",_target,_impact,_part,_injuryIndex,_injury);
//if (alive _target) then {
- _openWounds = _target getVariable [QGVAR(openWounds), []];
- if ((count _openWounds)-1 < _injuryIndex) exitwith {};
- _selectedInjury = _openWounds select _injuryIndex;
+ private _openWounds = _target getVariable [QGVAR(openWounds), []];
+ if ((count _openWounds) - 1 < _injuryIndex) exitwith {};
+ private _selectedInjury = _openWounds select _injuryIndex;
if (_selectedInjury select 1 == _injury select 1 && (_selectedInjury select 2) == (_injury select 2)) then { // matching the IDs
- _bandagedWounds = _target getVariable [QGVAR(bandagedWounds), []];
- _exist = false;
- _injuryId = _injury select 1;
+ private _bandagedWounds = _target getVariable [QGVAR(bandagedWounds), []];
+ private _exist = false;
+ private _injuryId = _injury select 1;
{
if ((_x select 1) == _injuryId && (_x select 2) == (_injury select 2)) exitwith {
_exist = true;
@@ -117,5 +116,5 @@ if (random(1) <= _reopeningChance) then {
};
// Otherwise something went wrong, we we don't reopen them..
//};
- }, [_target, _impact, _part, _injuryIndex, +_injury], _delay] call EFUNC(common,waitAndExecute);
+ }, [_target, _impact, _part, _injuryIndex, +_injury], _delay] call CBA_fnc_waitAndExecute;
};
diff --git a/addons/medical/functions/fnc_handleCollisionDamage.sqf b/addons/medical/functions/fnc_handleCollisionDamage.sqf
new file mode 100644
index 0000000000..191a91cb6a
--- /dev/null
+++ b/addons/medical/functions/fnc_handleCollisionDamage.sqf
@@ -0,0 +1,14 @@
+// by commy2
+#include "script_component.hpp"
+
+params ["_unit", "_newDamage"];
+
+private ["_selection", "_totalDamage"];
+
+_selection = "body";
+
+_totalDamage = (_unit getHit _selection) + _newDamage;
+
+_unit setHit [_selection, _totalDamage];
+
+systemChat format ["collision: %1", _this];
diff --git a/addons/medical/functions/fnc_handleCreateLitter.sqf b/addons/medical/functions/fnc_handleCreateLitter.sqf
index c87d51a7e1..b67d2107b0 100644
--- a/addons/medical/functions/fnc_handleCreateLitter.sqf
+++ b/addons/medical/functions/fnc_handleCreateLitter.sqf
@@ -1,65 +1,50 @@
-/*
- * Author: Glowbal
- * handle Litter Create
- *
- * Arguments:
- * 0: Litter Class
- * 1: Position
- * 2: Unit
- *
- * Return Value:
- * None
- *
- * Public: No
- */
-#include "script_component.hpp"
-
-if(!hasInterface) exitWith { false };
-
-params ["_litterClass", "_position", "_direction"];
-private["_litterObject", "_maxLitterCount"];
-//IGNORE_PRIVATE_WARNING(_values);
-
-if (isNil QGVAR(allCreatedLitter)) then {
- GVAR(allCreatedLitter) = [];
- GVAR(litterPFHRunning) = false;
-};
-
-_litterObject = _litterClass createVehicleLocal _position;
-_litterObject setDir _direction;
-_litterObject setPosATL _position;
-// Move the litter next frame to get rid of HORRIBLE spacing, fixes #1112
-[{ params ["_object", "_pos"]; _object setPosATL _pos; }, [_litterObject, _position]] call EFUNC(common,execNextFrame);
-
-_maxLitterCount = getArray (configFile >> "ACE_Settings" >> QGVAR(litterSimulationDetail) >> "_values") select GVAR(litterSimulationDetail);
-if((count GVAR(allCreatedLitter)) > _maxLitterCount ) then {
- // gank the first litter object, and spawn ours.
- private["_oldLitter"];
- _oldLitter = GVAR(allCreatedLitter) deleteAt 0;
- {
- deleteVehicle _x;
- } forEach (_oldLitter select 1);
-};
-
-GVAR(allCreatedLitter) pushBack [ACE_time, [_litterObject]];
-
-if(!GVAR(litterPFHRunning) && {GVAR(litterCleanUpDelay) > 0}) then {
- GVAR(litterPFHRunning) = true;
- [{
- {
- _x params ["_time", "_objects"];
- if (ACE_time - _time >= GVAR(litterCleanUpDelay)) then {
- {
- deleteVehicle _x;
- } forEach _objects;
- GVAR(allCreatedLitter) set[_forEachIndex, objNull];
- };
- } forEach GVAR(allCreatedLitter);
- GVAR(allCreatedLitter) = GVAR(allCreatedLitter) - [objNull];
-
- if ( (count GVAR(allCreatedLitter)) == 0) exitWith {
- [(_this select 1)] call CBA_fnc_removePerFrameHandler;
- GVAR(litterPFHRunning) = false;
- };
- }, 30, []] call CBA_fnc_addPerFrameHandler;
-};
+/*
+ * Author: Glowbal
+ * handle Litter Create
+ *
+ * Arguments:
+ * 0: Litter Class
+ * 1: Position
+ * 2: Unit
+ *
+ * Return Value:
+ * None
+ *
+ * Public: No
+ */
+#include "script_component.hpp"
+
+if(!hasInterface) exitWith { false };
+
+params ["_litterClass", "_position", "_direction"];
+private["_litterObject", "_maxLitterCount"];
+//IGNORE_PRIVATE_WARNING(_values);
+
+if (isNil QGVAR(allCreatedLitter)) then {
+ GVAR(allCreatedLitter) = [];
+ GVAR(litterPFHRunning) = false;
+};
+
+_litterObject = _litterClass createVehicleLocal _position;
+_litterObject setDir _direction;
+_litterObject setPosATL _position;
+// Move the litter next frame to get rid of HORRIBLE spacing, fixes #1112
+[{ params ["_object", "_pos"]; _object setPosATL _pos; }, [_litterObject, _position]] call CBA_fnc_execNextFrame;
+
+_maxLitterCount = getArray (configFile >> "ACE_Settings" >> QGVAR(litterSimulationDetail) >> "_values") select GVAR(litterSimulationDetail);
+if((count GVAR(allCreatedLitter)) > _maxLitterCount ) then {
+ // gank the first litter object, and spawn ours.
+ private["_oldLitter"];
+ _oldLitter = GVAR(allCreatedLitter) deleteAt 0;
+ {
+ deleteVehicle _x;
+ } forEach (_oldLitter select 1);
+};
+
+GVAR(allCreatedLitter) pushBack [CBA_missionTime, [_litterObject]];
+
+if(!GVAR(litterPFHRunning) && {GVAR(litterCleanUpDelay) > 0}) then {
+ // Start the litter cleanup loop
+ GVAR(litterPFHRunning) = true;
+ call FUNC(litterCleanupLoop);
+};
diff --git a/addons/medical/functions/fnc_handleDamage.sqf b/addons/medical/functions/fnc_handleDamage.sqf
index a5ce32b9e0..4cf237e949 100644
--- a/addons/medical/functions/fnc_handleDamage.sqf
+++ b/addons/medical/functions/fnc_handleDamage.sqf
@@ -77,6 +77,10 @@ _minLethalDamage = if (_typeIndex >= 0) then {
0.01
};
+if (!isNull _shooter) then {
+ _unit setvariable [QGVAR(lastDamageSource), _shooter, false];
+};
+
private _vehicle = vehicle _unit;
private _effectiveSelectionName = _selection;
if ((_vehicle != _unit) && {!(_vehicle isKindOf "StaticWeapon")} && {_shooter in [objNull, driver _vehicle, _vehicle]} && {_projectile == ""} && {_selection == ""}) then {
@@ -98,7 +102,8 @@ if ((_minLethalDamage <= _newDamage) && {[_unit, [_effectiveSelectionName] call
_damageReturn = _damageReturn min 0.89;
};
-[_unit] call FUNC(addToInjuredCollection);
+// Start the loop that tracks the unit vitals
+[_unit] call FUNC(addVitalLoop);
if (_unit getVariable [QGVAR(preventInstaDeath), GVAR(preventInstaDeath)]) exitWith {
private _delayedUnconsicous = false;
@@ -115,11 +120,11 @@ if (_unit getVariable [QGVAR(preventInstaDeath), GVAR(preventInstaDeath)]) exitW
if (_delayedUnconsicous) then {
[{
[_this select 0, true] call FUNC(setUnconscious);
- }, [_unit], 0.7] call EFUNC(common,waitAndExecute);
+ }, [_unit], 0.7] call CBA_fnc_waitAndExecute;
} else {
[{
[_this select 0, true] call FUNC(setUnconscious);
- }, [_unit]] call EFUNC(common,execNextFrame);
+ }, [_unit]] call CBA_fnc_execNextFrame;
};
0.89;
};
diff --git a/addons/medical/functions/fnc_handleDamage_advanced.sqf b/addons/medical/functions/fnc_handleDamage_advanced.sqf
index 33b1d3f7ee..068162a55b 100644
--- a/addons/medical/functions/fnc_handleDamage_advanced.sqf
+++ b/addons/medical/functions/fnc_handleDamage_advanced.sqf
@@ -8,8 +8,12 @@
* 2: Amount Of Damage
* 3: Shooter
* 4: Projectile
- * 5: Current damage to be returned
- * 6: Type of Damage
+ * 5: Hit part index of the hit point
+ * 6: Current damage to be returned
+ *
+ * //On 1.63 dev:
+ * 6: Shooter?
+ * 7: Current damage to be returned
*
* Return Value:
* None
@@ -19,20 +23,24 @@
#include "script_component.hpp"
-private ["_typeOfProjectile", "_part", "_damageBodyParts", "_hitPoints"];
params ["_unit", "_selectionName", "_amountOfDamage", "_sourceOfDamage", "_typeOfProjectile", "_hitPointNumber", "_newDamage"];
-_part = [_selectionName] call FUNC(selectionNameToNumber);
+//Temp fix for 1.63 handleDamage changes
+if (_newDamage isEqualType objNull) then {
+ _newDamage = _this select 7;
+};
+
+private _part = [_selectionName] call FUNC(selectionNameToNumber);
if (_part < 0) exitWith {};
-_hitPoints = ["HitHead", "HitBody", "HitLeftArm", "HitRightArm", "HitLeftLeg", "HitRightLeg"];
+private _hitPoints = ["HitHead", "HitBody", "HitLeftArm", "HitRightArm", "HitLeftLeg", "HitRightLeg"];
// Sorting out the damage
-_damageBodyParts = _unit getVariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]];
+private _damageBodyParts = _unit getVariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]];
_damageBodyParts set [_part, (_damageBodyParts select _part) + _newDamage];
_unit setVariable [QGVAR(bodyPartStatus), _damageBodyParts, true];
-_typeOfDamage = [_typeOfProjectile] call FUNC(getTypeOfDamage);
+private _typeOfDamage = [_typeOfProjectile] call FUNC(getTypeOfDamage);
[_unit, _selectionName, _newDamage, _typeOfProjectile, _typeOfDamage] call FUNC(handleDamage_assignWounds);
diff --git a/addons/medical/functions/fnc_handleDamage_advancedSetDamage.sqf b/addons/medical/functions/fnc_handleDamage_advancedSetDamage.sqf
index e42e6be725..b18604f133 100644
--- a/addons/medical/functions/fnc_handleDamage_advancedSetDamage.sqf
+++ b/addons/medical/functions/fnc_handleDamage_advancedSetDamage.sqf
@@ -17,10 +17,8 @@ params ["_unit"];
if (!local _unit) exitWith {};
-private "_bodyStatus";
-
// ["head", "body", "hand_l", "hand_r", "leg_l", "leg_r"]
-_bodyStatus = _unit getVariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]];
+private _bodyStatus = _unit getVariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]];
_bodyStatus params ["_headDamage", "_torsoDamage", "_handsDamageR", "_handsDamageL", "_legsDamageR", "_legsDamageL"];
diff --git a/addons/medical/functions/fnc_handleDamage_basic.sqf b/addons/medical/functions/fnc_handleDamage_basic.sqf
index 04dceff84d..0d4e9292a8 100644
--- a/addons/medical/functions/fnc_handleDamage_basic.sqf
+++ b/addons/medical/functions/fnc_handleDamage_basic.sqf
@@ -12,13 +12,12 @@
#include "script_component.hpp"
-private ["_damageBodyParts", "_cache_params", "_cache_damages"];
params ["_target"];
TRACE_1("ACE_DEBUG: HandleDamage_BASIC Called",_target);
-_damageBodyParts = _target getVariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]];
-_cache_params = _target getVariable [QGVAR(cachedHandleDamageParams), []];
-_cache_damages = _target getVariable QGVAR(cachedDamages);
+private _damageBodyParts = _target getVariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]];
+private _cache_params = _target getVariable [QGVAR(cachedHandleDamageParams), []];
+private _cache_damages = _target getVariable QGVAR(cachedDamages);
TRACE_4("ACE_DEBUG: HandleDamage BASIC",_unit, _damageBodyParts,_cache_params,_cache_damages);
diff --git a/addons/medical/functions/fnc_handleDamage_caching.sqf b/addons/medical/functions/fnc_handleDamage_caching.sqf
index cc969ce961..c1cf726399 100644
--- a/addons/medical/functions/fnc_handleDamage_caching.sqf
+++ b/addons/medical/functions/fnc_handleDamage_caching.sqf
@@ -58,6 +58,7 @@ if (_unit getVariable [QGVAR(isFalling), false]) then {
} else {
_newDamage = _newDamage * 0.5;
};
+ if (_newDamage < 0.075) then {_newDamage = 0;}; //Filter minor falling damage to non-leg hitpoints
} else {
if (_selectionName == "") then {
_selectionName = selectRandom ["leg_l", "leg_r"];
diff --git a/addons/medical/functions/fnc_handleLocal.sqf b/addons/medical/functions/fnc_handleLocal.sqf
index 91689f311f..42e8a9b7b2 100644
--- a/addons/medical/functions/fnc_handleLocal.sqf
+++ b/addons/medical/functions/fnc_handleLocal.sqf
@@ -17,14 +17,15 @@
params ["_unit", "_local"];
if (_local) then {
+ // If the unit had a loop tracking its vitals, restart it locally
if (_unit getVariable[QGVAR(addedToUnitLoop),false]) then {
- [_unit, true] call FUNC(addToInjuredCollection);
+ [_unit, true] call FUNC(addVitalLoop);
};
if ((_unit getVariable ["ACE_isUnconscious",false]) && {count (_unit getVariable [QGVAR(unconsciousArguments), []]) >= 6}) then {
private "_arguments";
_arguments = (_unit getVariable [QGVAR(unconsciousArguments), []]);
- _arguments set [2, ACE_time];
+ _arguments set [2, CBA_missionTime];
[DFUNC(unconsciousPFH), 0.1, _arguments ] call CBA_fnc_addPerFrameHandler;
diff --git a/addons/medical/functions/fnc_handleUnitVitals.sqf b/addons/medical/functions/fnc_handleUnitVitals.sqf
index 6159351cc9..8cbc38e63a 100644
--- a/addons/medical/functions/fnc_handleUnitVitals.sqf
+++ b/addons/medical/functions/fnc_handleUnitVitals.sqf
@@ -13,18 +13,17 @@
#include "script_component.hpp"
-private ["_heartRate","_bloodPressure","_bloodVolume","_painStatus", "_lastTimeValuesSynced", "_syncValues", "_airwayStatus", "_blood"];
params ["_unit", "_interval"];
TRACE_3("ACE_DEBUG",_unit,_interval,_unit);
if (_interval == 0) exitWith {};
-_lastTimeValuesSynced = _unit getVariable [QGVAR(lastMomentValuesSynced), 0];
-_syncValues = (ACE_time - _lastTimeValuesSynced >= (10 + floor(random(10))) && GVAR(keepLocalSettingsSynced));
+private _lastTimeValuesSynced = _unit getVariable [QGVAR(lastMomentValuesSynced), 0];
+private _syncValues = (CBA_missionTime - _lastTimeValuesSynced >= (10 + floor(random(10))) && GVAR(keepLocalSettingsSynced));
if (_syncValues) then {
- _unit setVariable [QGVAR(lastMomentValuesSynced), ACE_time];
+ _unit setVariable [QGVAR(lastMomentValuesSynced), CBA_missionTime];
};
-_bloodVolume = (_unit getVariable [QGVAR(bloodVolume), 100]) + ([_unit] call FUNC(getBloodVolumeChange));
+private _bloodVolume = (_unit getVariable [QGVAR(bloodVolume), 100]) + ([_unit] call FUNC(getBloodVolumeChange));
_bloodVolume = _bloodVolume max 0;
_unit setVariable [QGVAR(bloodVolume), _bloodVolume, _syncValues];
@@ -61,7 +60,7 @@ if (([_unit] call FUNC(getBloodLoss)) > 0) then {
};
};
-_painStatus = _unit getVariable [QGVAR(pain), 0];
+private _painStatus = _unit getVariable [QGVAR(pain), 0];
TRACE_4("ACE_DEBUG",_painStatus,_unit getVariable QGVAR(hasPain),_unit getVariable QGVAR(painSuppress),_unit);
if (_painStatus > (_unit getVariable [QGVAR(painSuppress), 0])) then {
if !(_unit getVariable [QGVAR(hasPain), false]) then {
@@ -86,11 +85,10 @@ if (GVAR(level) == 1) then {
};
// bleeding
- _blood = _unit getVariable [QGVAR(bloodVolume), 100];
- if (_blood <= 35 and !(_unit getVariable ["ACE_isUnconscious", false])) then {
+ if (_bloodVolume <= 35 and !(_unit getVariable ["ACE_isUnconscious", false])) then {
[_unit, true] call FUNC(setUnconscious);
};
- if (_blood == 0) then {
+ if (_bloodVolume == 0) then {
[_unit] call FUNC(setDead);
};
};
@@ -110,22 +108,28 @@ if (GVAR(level) >= 2) then {
};
};
+ // Handle pain due tourniquets, that have been applied more than 120 s ago
+ private _oldTourniquets = (_unit getVariable [QGVAR(tourniquets), []]) select {_x > 0 && {CBA_missionTime - _x > 120}};
+ // Increase pain at a rate of 0.001 units/s per old tourniquet
+ _painStatus = _painStatus + (count _oldTourniquets) * 0.001 * _interval;
+
// Set the vitals
- _heartRate = (_unit getVariable [QGVAR(heartRate), 80]) + (([_unit] call FUNC(getHeartRateChange)) * _interval);
+ private _heartRate = (_unit getVariable [QGVAR(heartRate), 80]) + (([_unit] call FUNC(getHeartRateChange)) * _interval);
_unit setVariable [QGVAR(heartRate), _heartRate max 0, _syncValues];
- _bloodPressure = [_unit] call FUNC(getBloodPressure);
+ private _bloodPressure = [_unit] call FUNC(getBloodPressure);
_unit setVariable [QGVAR(bloodPressure), _bloodPressure, _syncValues];
- if (_painStatus > 0 && {_painStatus < 10}) then {
- _painReduce = if (_painStatus > 5) then {0.002} else {0.001};
- _unit setVariable [QGVAR(pain), (_painStatus - _painReduce * _interval) max 0, _syncValues];
- };
+ _painReduce = [0.001, 0.002] select (_painStatus > 5);
+
+ // @todo: replace this and the rest of the setVariable with EFUNC(common,setApproximateVariablePublic)
+ _unit setVariable [QGVAR(pain), (_painStatus - _painReduce * _interval) max 0, _syncValues];
+
TRACE_8("ACE_DEBUG_ADVANCED_VITALS",_painStatus,_painReduce,_heartRate,_bloodVolume,_bloodPressure,_interval,_syncValues,_unit);
// TODO Disabled until implemented fully
// Handle airway
/*if (GVAR(setting_allowAirwayInjuries)) then {
- _airwayStatus = _unit getVariable [QGVAR(airwayStatus), 100];
+ private _airwayStatus = _unit getVariable [QGVAR(airwayStatus), 100];
if (((_unit getVariable [QGVAR(airwayOccluded), false]) || (_unit getVariable [QGVAR(airwayCollapsed), false])) && !((_unit getVariable [QGVAR(airwaySecured), false]))) then {
if (_airwayStatus >= 0.5) then {
_unit setVariable [QGVAR(airwayStatus), _airwayStatus - 0.5 * _interval, _syncValues];
@@ -154,26 +158,15 @@ if (GVAR(level) >= 2) then {
[_unit, true, 10+ random(20)] call FUNC(setUnconscious); // safety check to ensure unconsciousness for units if they are not dead already.
};
- if (_bloodPressureH > 260) then {
- if (random(1) > 0.7) then {
- [_unit] call FUNC(setCardiacArrest);
- };
- };
- if (_bloodPressureL < 40 && _heartRate > 190) then {
- if (random(1) > 0.7) then {
- [_unit] call FUNC(setCardiacArrest);
- };
- };
- if (_bloodPressureH > 145 && _heartRate > 150) then {
- if (random(1) > 0.7) then {
- [_unit] call FUNC(setCardiacArrest);
- };
- };
- if (_heartRate > 200) then {
- [_unit] call FUNC(setCardiacArrest);
- };
+ if ((_bloodPressureH > 260)
+ || {_bloodPressureL < 40 && ({_heartRate > 190})}
+ || {(_bloodPressureH > 145 && {_heartRate > 150})}) then {
- if (_heartRate < 20) then {
+ if (random(1) > 0.7) then {
+ [_unit] call FUNC(setCardiacArrest);
+ };
+ };
+ if (_heartRate > 200 || (_heartRate < 20)) then {
[_unit] call FUNC(setCardiacArrest);
};
};
diff --git a/addons/medical/functions/fnc_hasItem.sqf b/addons/medical/functions/fnc_hasItem.sqf
index 3eb2f1e5f0..cebe02e6c6 100644
--- a/addons/medical/functions/fnc_hasItem.sqf
+++ b/addons/medical/functions/fnc_hasItem.sqf
@@ -15,7 +15,6 @@
#include "script_component.hpp"
-private ["_medic", "_patient", "_item", "_return", "_crew"];
params ["_medic", "_patient", "_item"];
if (isNil QGVAR(setting_allowSharedEquipment)) then {
@@ -29,9 +28,9 @@ if ([_medic, _item] call EFUNC(common,hasItem)) exitWith {
true
};
-_return = false;
+private _return = false;
if ((vehicle _medic != _medic) && {[vehicle _medic] call FUNC(isMedicalVehicle)}) then {
- _crew = crew vehicle _medic;
+ private _crew = crew vehicle _medic;
{
if ([_medic, _x] call FUNC(canAccessMedicalEquipment) && {([_x, _item] call EFUNC(common,hasItem))}) exitWith {
_return = true;
diff --git a/addons/medical/functions/fnc_hasItems.sqf b/addons/medical/functions/fnc_hasItems.sqf
index 7937b6a157..d3e79c0a54 100644
--- a/addons/medical/functions/fnc_hasItems.sqf
+++ b/addons/medical/functions/fnc_hasItems.sqf
@@ -15,10 +15,9 @@
#include "script_component.hpp"
-private ["_medic", "_patient", "_items", "_return"];
params ["_medic", "_patient", "_items"];
-_return = true;
+private _return = true;
{
//
if (_x isEqualType [] && {({[_medic, _patient, _x] call FUNC(hasItem)}count _x == 0)}) exitwith {
diff --git a/addons/medical/functions/fnc_hasMedicalEnabled.sqf b/addons/medical/functions/fnc_hasMedicalEnabled.sqf
index 5e2d73f925..5cc5b60aa3 100644
--- a/addons/medical/functions/fnc_hasMedicalEnabled.sqf
+++ b/addons/medical/functions/fnc_hasMedicalEnabled.sqf
@@ -16,10 +16,9 @@
*/
#include "script_component.hpp"
-private "_medicalEnabled";
params ["_unit"];
-_medicalEnabled = _unit getVariable QGVAR(enableMedical);
+private _medicalEnabled = _unit getVariable QGVAR(enableMedical);
if (isNil "_medicalEnabled") exitWith {
(((GVAR(enableFor) == 0 && (isPlayer _unit || (_unit getVariable [QEGVAR(common,isDeadPlayer), false])))) || (GVAR(enableFor) == 1) || GVAR(level) == 1)
};
diff --git a/addons/medical/functions/fnc_init.sqf b/addons/medical/functions/fnc_init.sqf
index 868b07fbf4..504135c204 100644
--- a/addons/medical/functions/fnc_init.sqf
+++ b/addons/medical/functions/fnc_init.sqf
@@ -86,4 +86,4 @@ _unit setVariable [QGVAR(allLogs), [], true];
// items
[{
_this call FUNC(itemCheck);
-}, [_unit], 0.5, 0.1] call EFUNC(common,waitAndExecute);
+}, [_unit], 0.5, 0.1] call CBA_fnc_waitAndExecute;
diff --git a/addons/medical/functions/fnc_isInMedicalFacility.sqf b/addons/medical/functions/fnc_isInMedicalFacility.sqf
index f934978d2b..313ee8eca4 100644
--- a/addons/medical/functions/fnc_isInMedicalFacility.sqf
+++ b/addons/medical/functions/fnc_isInMedicalFacility.sqf
@@ -19,7 +19,7 @@ params ["_unit"];
//Cache the results as this function could be called rapidly
(_unit getVariable [QGVAR(cacheInFacility), [-9, false]]) params ["_expireTime", "_lastResult"];
-if (ACE_time < _expireTime) exitWith {_lastResult};
+if (CBA_missionTime < _expireTime) exitWith {_lastResult};
private _eyePos = eyePos _unit;
private _isInBuilding = false;
@@ -58,6 +58,6 @@ if (!_isInBuilding) then {
};
//Save the results (with a 1 second expiry)
-_unit setVariable [QGVAR(cacheInFacility), [ACE_time + 1, _isInBuilding]];
+_unit setVariable [QGVAR(cacheInFacility), [CBA_missionTime + 1, _isInBuilding]];
_isInBuilding;
diff --git a/addons/medical/functions/fnc_litterCleanupLoop.sqf b/addons/medical/functions/fnc_litterCleanupLoop.sqf
new file mode 100644
index 0000000000..00e301be6e
--- /dev/null
+++ b/addons/medical/functions/fnc_litterCleanupLoop.sqf
@@ -0,0 +1,33 @@
+/*
+ * Author: Glowbal, esteldunedain
+ * Loop that cleans up litter
+ *
+ * Arguments:
+ * None
+ *
+ * ReturnValue:
+ * None
+ *
+ * Public: No
+ */
+
+#include "script_component.hpp"
+
+{
+ _x params ["_time", "_objects"];
+ if (CBA_missionTime - _time >= GVAR(litterCleanUpDelay)) then {
+ {
+ deleteVehicle _x;
+ } forEach _objects;
+ GVAR(allCreatedLitter) set[_forEachIndex, objNull];
+ };
+} forEach GVAR(allCreatedLitter);
+GVAR(allCreatedLitter) = GVAR(allCreatedLitter) - [objNull];
+
+// If no more litter remaining, exit the loop
+if ( (count GVAR(allCreatedLitter)) == 0) exitWith {
+ GVAR(litterPFHRunning) = false;
+};
+
+// Schedule the loop to be executed again 30 sec later
+[DFUNC(litterCleanupLoop), [], 30] call CBA_fnc_waitAndExecute;
diff --git a/addons/medical/functions/fnc_medicationEffectLoop.sqf b/addons/medical/functions/fnc_medicationEffectLoop.sqf
new file mode 100644
index 0000000000..00ef00a82c
--- /dev/null
+++ b/addons/medical/functions/fnc_medicationEffectLoop.sqf
@@ -0,0 +1,42 @@
+/*
+ * Author: Glowbal, esteldunedain
+ * Medication effect loop for an injection.
+ *
+ * Arguments:
+ * 0: Unit
+ * 1: Name of the Variable that is affected
+ * 2: Proportion of the effect applied
+ * 3: Rate at which the effect is applied
+ * 4: Viscosity adjustment rate
+ * 5: Pain reduction rate
+ *
+ * ReturnValue:
+ * None
+ *
+ * Public: No
+ */
+
+#include "script_component.hpp"
+
+params ["_unit", "_variableName", "_amountDecreased","_decreaseRate", "_viscosityAdjustmentRate", "_painReduceRate"];
+
+// If the unit died the loop is finished
+if (!alive _unit) exitWith {};
+
+// If locality changed finish the local loop
+if (!local _unit) exitWith {};
+
+// Apply medicinal effect
+private _usedMeds = (_unit getVariable [_variableName, 0]) - _decreaseRate;
+_unit setVariable [_variableName, _usedMeds];
+
+// Restore the viscosity while the medication is leaving the system
+_unit setVariable [QGVAR(peripheralResistance), ((_unit getVariable [QGVAR(peripheralResistance), 100]) - _viscosityAdjustmentRate) max 0];
+_unit setVariable [QGVAR(painSuppress), ((_unit getVariable [QGVAR(painSuppress), 0]) - _painReduceRate) max 0];
+
+// Exit if the medication has finished it's effect
+_amountDecreased = _amountDecreased + _decreaseRate;
+if (_amountDecreased >= 1 || (_usedMeds <= 0) || !alive _unit) exitWith {};
+
+// Schedule the loop to be executed again 1 sec later
+[DFUNC(medicationEffectLoop), [_unit, _variableName, _amountDecreased, _decreaseRate, _viscosityAdjustmentRate, _painReduceRate], 1] call CBA_fnc_waitAndExecute;
diff --git a/addons/medical/functions/fnc_modifyMedicalAction.sqf b/addons/medical/functions/fnc_modifyMedicalAction.sqf
index 02e5985297..8c8e64d465 100644
--- a/addons/medical/functions/fnc_modifyMedicalAction.sqf
+++ b/addons/medical/functions/fnc_modifyMedicalAction.sqf
@@ -20,22 +20,20 @@
params ["_target", "_player", "_selectionN", "_actionData"];
if (GVAR(level) < 2 || {!([_target] call FUNC(hasMedicalEnabled))}) exitWith {
- private ["_pointDamage"];
- _pointDamage = (_target getVariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]]) select _selectionN;
+ private _pointDamage = (_target getVariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]]) select _selectionN;
if (_pointDamage >= 0.8) exitWith {
- _actionData set [2, QUOTE(PATHTOF(UI\icons\medical_crossRed.paa))];
+ _actionData set [2, QPATHTOF(UI\icons\medical_crossRed.paa)];
};
if (_pointDamage > 0) exitWith {
- _actionData set [2, QUOTE(PATHTOF(UI\icons\medical_crossYellow.paa))];
+ _actionData set [2, QPATHTOF(UI\icons\medical_crossYellow.paa)];
};
};
-private ["_openWounds", "_amountOf"];
-_openWounds = _target getVariable [QGVAR(openWounds), []];
+private _openWounds = _target getVariable [QGVAR(openWounds), []];
{
_x params ["", "", "_selectionX", "_amountOf", "_x4"];
if (_amountOf > 0 && {(_selectionN == _selectionX)} && {_x4 > 0}) exitWith {
- _actionData set [2, QUOTE(PATHTOF(UI\icons\medical_crossRed.paa))];
+ _actionData set [2, QPATHTOF(UI\icons\medical_crossRed.paa)];
};
} forEach _openWounds;
diff --git a/addons/medical/functions/fnc_moduleBasicMedicalSettings.sqf b/addons/medical/functions/fnc_moduleBasicMedicalSettings.sqf
new file mode 100644
index 0000000000..08076878f2
--- /dev/null
+++ b/addons/medical/functions/fnc_moduleBasicMedicalSettings.sqf
@@ -0,0 +1,23 @@
+/*
+ * Author: Glowbal
+ * Module for adjusting the medical treatment settings
+ *
+ * Arguments:
+ * 0: The module logic
+ * 1: units
+ * 2: activated
+ *
+ * Return Value:
+ * None
+ *
+ * Public: No
+ */
+
+#include "script_component.hpp"
+
+params ["_logic", "_units", "_activated"];
+
+if !(_activated) exitWith {};
+
+[_logic, QGVAR(medicSetting_basicEpi), "medicSetting_basicEpi"] call EFUNC(common,readSettingFromModule);
+[_logic, QGVAR(useLocation_basicEpi), "useLocation_basicEpi"] call EFUNC(common,readSettingFromModule);
diff --git a/addons/medical/functions/fnc_moduleMedicalSettings.sqf b/addons/medical/functions/fnc_moduleMedicalSettings.sqf
index ab235858d2..29398bbc35 100644
--- a/addons/medical/functions/fnc_moduleMedicalSettings.sqf
+++ b/addons/medical/functions/fnc_moduleMedicalSettings.sqf
@@ -33,3 +33,4 @@ if !(_activated) exitWith {};
[_logic, QGVAR(bleedingCoefficient), "bleedingCoefficient"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(painCoefficient), "painCoefficient"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(keepLocalSettingsSynced), "keepLocalSettingsSynced"] call EFUNC(common,readSettingFromModule);
+// [_logic, QGVAR(delayUnconCaptive), "delayUnconCaptive"] call EFUNC(common,readSettingFromModule);
diff --git a/addons/medical/functions/fnc_onMedicationUsage.sqf b/addons/medical/functions/fnc_onMedicationUsage.sqf
index fc7e8daa2d..019abd094c 100644
--- a/addons/medical/functions/fnc_onMedicationUsage.sqf
+++ b/addons/medical/functions/fnc_onMedicationUsage.sqf
@@ -18,12 +18,11 @@
#include "script_component.hpp"
-private ["_foundEntry", "_allUsedMedication","_allMedsFromClassname", "_usedMeds", "_hasOverDosed", "_med", "_limit", "_decreaseAmount", "_viscosityAdjustment", "_medicationConfig", "_onOverDose"];
params ["_target", "_className", "_variable", "_maxDosage", "_timeInSystem", "_incompatabileMeds", "_viscosityChange", "_painReduce"];
TRACE_8("params",_target,_className,_variable,_maxDosage,_timeInSystem,_incompatabileMeds,_viscosityChange,_painReduce);
-_foundEntry = false;
-_allUsedMedication = _target getVariable [QGVAR(allUsedMedication), []];
+private _foundEntry = false;
+private _allUsedMedication = _target getVariable [QGVAR(allUsedMedication), []];
{
_x params ["_variableX", "_allMedsFromClassname"];
if (_variableX== _variable) exitWith {
@@ -43,12 +42,12 @@ if (!_foundEntry) then {
};
-_usedMeds = _target getVariable [_variable, 0];
+private _usedMeds = _target getVariable [_variable, 0];
if (_usedMeds >= floor (_maxDosage + round(random(2))) && _maxDosage >= 1 && GVAR(enableOverdosing)) then {
[_target] call FUNC(setDead);
};
-_hasOverDosed = 0;
+private _hasOverDosed = 0;
{
_x params ["_med", "_limit"];
{
@@ -60,8 +59,8 @@ _hasOverDosed = 0;
} forEach _incompatabileMeds;
if (_hasOverDosed > 0 && GVAR(enableOverdosing)) then {
- _medicationConfig = (configFile >> "ACE_Medical_Advanced" >> "Treatment" >> "Medication");
- _onOverDose = getText (_medicationConfig >> "onOverDose");
+ private _medicationConfig = (configFile >> "ACE_Medical_Advanced" >> "Treatment" >> "Medication");
+ private _onOverDose = getText (_medicationConfig >> "onOverDose");
if (isClass (_medicationConfig >> _className)) then {
_medicationConfig = (_medicationConfig >> _className);
if (isText (_medicationConfig >> "onOverDose")) then { _onOverDose = getText (_medicationConfig >> "onOverDose"); };
@@ -74,25 +73,8 @@ if (_hasOverDosed > 0 && GVAR(enableOverdosing)) then {
[_target, _className] call _onOverDose;
};
-_decreaseAmount = 1 / _timeInSystem;
-_viscosityAdjustment = _viscosityChange / _timeInSystem;
+private _decreaseAmount = 1 / _timeInSystem;
+private _viscosityAdjustment = _viscosityChange / _timeInSystem;
-[{
- params ["_args", "_idPFH"];
- _args params ["_target", "_timeInSystem", "_variable", "_amountDecreased","_decreaseAmount", "_viscosityAdjustment", "_painReduce"];
- private "_usedMeds";
- _usedMeds = _target getVariable [_variable, 0];
- _usedMeds = _usedMeds - _decreaseAmount;
- _target setVariable [_variable, _usedMeds];
-
- _amountDecreased = _amountDecreased + _decreaseAmount;
-
- // Restoring the viscosity while the medication is leaving the system
- _target setVariable [QGVAR(peripheralResistance), ((_target getVariable [QGVAR(peripheralResistance), 100]) - _viscosityAdjustment) max 0];
- _target setVariable [QGVAR(painSuppress), ((_target getVariable [QGVAR(painSuppress), 0]) - _painReduce) max 0];
-
- if (_amountDecreased >= 1 || (_usedMeds <= 0) || !alive _target) then {
- [_idPFH] call CBA_fnc_removePerFrameHandler;
- };
- _args set [3, _amountDecreased];
-}, 1, [_target, _timeInSystem, _variable, 0, _decreaseAmount, _viscosityAdjustment, _painReduce / _timeInSystem] ] call CBA_fnc_addPerFrameHandler;
+// Run the loop that computes the effect of the medication over time
+[_target, _variable, 0, _decreaseAmount, _viscosityAdjustment, _painReduce / _timeInSystem] call FUNC(medicationEffectLoop);
diff --git a/addons/medical/functions/fnc_onWoundUpdateRequest.sqf b/addons/medical/functions/fnc_onWoundUpdateRequest.sqf
index dff59fb2cf..e0a28dfd18 100644
--- a/addons/medical/functions/fnc_onWoundUpdateRequest.sqf
+++ b/addons/medical/functions/fnc_onWoundUpdateRequest.sqf
@@ -19,6 +19,6 @@ params ["_unit", "_originOfrequest"];
if (local _unit && !(local _originOfrequest)) then {
_openWounds = _unit getVariable [QGVAR(openWounds), []];
{
- ["medical_propagateWound", [_originOfrequest], [_unit, _x]] call EFUNC(common,targetEvent);
+ ["ace_medical_propagateWound", [_unit, _x], [_originOfrequest]] call CBA_fnc_targetEvent;
} forEach _openWounds;
};
diff --git a/addons/medical/functions/fnc_playInjuredSound.sqf b/addons/medical/functions/fnc_playInjuredSound.sqf
index 6dae7ab276..2e5ec2ab5f 100644
--- a/addons/medical/functions/fnc_playInjuredSound.sqf
+++ b/addons/medical/functions/fnc_playInjuredSound.sqf
@@ -16,7 +16,6 @@
#include "script_component.hpp"
-private ["_unit","_availableSounds_A","_availableSounds_B","_availableSounds_C","_sound", "_pain"];
params ["_unit", "_pain"];
if (!local _unit || !GVAR(enableScreams)) exitWith{};
@@ -27,7 +26,7 @@ _unit setVariable [QGVAR(playingInjuredSound),true];
// Play the sound if there is any damage present.
if (_pain > 0 && {[_unit] call EFUNC(common,isAwake)}) exitWith {
// Classnames of the available sounds.
- _availableSounds_A = [
+ private _availableSounds_A = [
"WoundedGuyA_01",
"WoundedGuyA_02",
"WoundedGuyA_03",
@@ -37,7 +36,7 @@ if (_pain > 0 && {[_unit] call EFUNC(common,isAwake)}) exitWith {
"WoundedGuyA_07",
"WoundedGuyA_08"
];
- _availableSounds_B = [
+ private _availableSounds_B = [
"WoundedGuyB_01",
"WoundedGuyB_02",
"WoundedGuyB_03",
@@ -47,14 +46,14 @@ if (_pain > 0 && {[_unit] call EFUNC(common,isAwake)}) exitWith {
"WoundedGuyB_07",
"WoundedGuyB_08"
];
- _availableSounds_C = [
+ private _availableSounds_C = [
"WoundedGuyC_01",
"WoundedGuyC_02",
"WoundedGuyC_03",
"WoundedGuyC_04",
"WoundedGuyC_05"
];
- _sound = "";
+ private _sound = "";
// Select the to be played sound based upon damage amount.
if (_pain > 0.5) then {
@@ -70,14 +69,13 @@ if (_pain > 0 && {[_unit] call EFUNC(common,isAwake)}) exitWith {
playSound3D [(getArray(configFile >> "CfgSounds" >> _sound >> "sound") select 0) + ".wss", objNull, false, getPos _unit, 15, 1, 25]; // +2db, 15 meters.
// Figure out what the delay will be before it is possible to play a sound again.
- private "_delay";
- _delay = (30 - (random(25) * _pain)) max (3.5 + random(2));
+ private _delay = (30 - (random(25) * _pain)) max (3.5 + random(2));
// Clean up the lock
[{
- (_this select 0) setVariable [QGVAR(playingInjuredSound),nil];
- }, [_unit], _delay, _delay] call EFUNC(common,waitAndExecute);
+ (_this select 0) setVariable [QGVAR(playingInjuredSound), nil];
+ }, [_unit], _delay, _delay] call CBA_fnc_waitAndExecute;
};
// Clean up in case there has not been played any sounds.
-_unit setVariable [QGVAR(playingInjuredSound),nil];
+_unit setVariable [QGVAR(playingInjuredSound), nil];
diff --git a/addons/medical/functions/fnc_requestWoundSync.sqf b/addons/medical/functions/fnc_requestWoundSync.sqf
index 1d7d6de53f..9f72c0b322 100644
--- a/addons/medical/functions/fnc_requestWoundSync.sqf
+++ b/addons/medical/functions/fnc_requestWoundSync.sqf
@@ -19,4 +19,4 @@ params [ "_target", "_caller"];
if (local _target || GVAR(level) < 2) exitWith {}; // if the target is local, we already got the most update to date information
if (_target getVariable [QGVAR(isWoundSynced), false]) exitWith {};
_target setVariable [QGVAR(isWoundSynced), true];
-["medical_woundUpdateRequest", [_target], [_target, _caller]] call EFUNC(common,targetEvent);
+["ace_medical_woundUpdateRequest", [_target, _caller], [_target]] call CBA_fnc_targetEvent;
diff --git a/addons/medical/functions/fnc_reviveStateLoop.sqf b/addons/medical/functions/fnc_reviveStateLoop.sqf
new file mode 100644
index 0000000000..bfc55ae6d8
--- /dev/null
+++ b/addons/medical/functions/fnc_reviveStateLoop.sqf
@@ -0,0 +1,56 @@
+/*
+ * Author: Glowbal, esteldunedain
+ * Loop that handles a unit in the revive state.
+ *
+ * Arguments:
+ * 0: Unit
+ *
+ * ReturnValue:
+ * None
+ *
+ * Public: No
+ */
+
+#include "script_component.hpp"
+
+params ["_unit"];
+
+// If locality changed finish the local loop
+// @todo: reinitiate the loop elsewhere
+if (!local _unit) exitWith {};
+
+private _startTime = _unit getVariable [QGVAR(reviveStartTime), 0];
+
+// Remove heartbeat
+if (GVAR(level) >= 2) then {
+ if (_unit getVariable [QGVAR(heartRate), 60] > 0) then {
+ _unit setVariable [QGVAR(heartRate), 0];
+ };
+};
+
+// If we are in revive state in a blown up vehicle, try to unload so that people can access the body
+if ((alive _unit) && {(vehicle _unit) != _unit} && {!alive (vehicle _unit)}) then {
+ TRACE_2("Unloading", _unit, vehicle _unit);
+ [_unit] call EFUNC(common,unloadPerson);
+};
+
+// If the timer run out, let the unit die and exit the loop
+if (GVAR(maxReviveTime) > 0 && {CBA_missionTime - _startTime > GVAR(maxReviveTime)}) exitwith {
+ _unit setVariable [QGVAR(inReviveState), nil, true];
+ _unit setVariable [QGVAR(reviveStartTime), nil];
+ [_unit, true] call FUNC(setDead);
+};
+
+// If the unit was taken out from revive state, exit the loop
+if !(_unit getVariable [QGVAR(inReviveState), false]) exitwith {
+ // Revived without dieing, so in case we have lifes, remove one.
+ if (GVAR(amountOfReviveLives) > 0) then {
+ _lifesLeft = _unit getVariable[QGVAR(amountOfReviveLives), GVAR(amountOfReviveLives)];
+ _unit setVariable [QGVAR(amountOfReviveLives), _lifesLeft - 1, true];
+ };
+
+ _unit setVariable [QGVAR(reviveStartTime), nil];
+};
+
+// Schedule the loop to be executed again 1 sec later
+[DFUNC(reviveStateLoop), [_unit], 1] call CBA_fnc_waitAndExecute;
diff --git a/addons/medical/functions/fnc_serverRemoveBody.sqf b/addons/medical/functions/fnc_serverRemoveBody.sqf
new file mode 100644
index 0000000000..42e755f003
--- /dev/null
+++ b/addons/medical/functions/fnc_serverRemoveBody.sqf
@@ -0,0 +1,34 @@
+/*
+ * Author: PabstMirror
+ * Removes corpse. Idealy it is just deleted the next frame,
+ * but player bodies cannot be deleted until they respawn, so it is hidden and deleted later.
+ *
+ * Arguments:
+ * 0: Mr Body
+ *
+ * Return Value:
+ * Nothing
+ *
+ * Example:
+ * [cursorTarget] call ace_medical_fnc_serverRemoveBody
+ *
+ * Public: No
+ */
+
+#include "script_component.hpp"
+
+params ["_target"];
+TRACE_2("",_target,isPlayer _target);
+
+//Hide the body globaly
+[QEGVAR(common,hideObjectGlobal), [_target, true]] call CBA_fnc_serverEvent;
+
+if (isNil QGVAR(bodiesToDelete)) then {GVAR(bodiesToDelete) = [];};
+GVAR(bodiesToDelete) pushBack _target;
+
+// Start up a loop to wait for bodies to be free to delete
+if ((count GVAR(bodiesToDelete)) > 0) then {
+ [] call FUNC(bodyCleanupLoop);
+};
+
+nil
diff --git a/addons/medical/functions/fnc_setCardiacArrest.sqf b/addons/medical/functions/fnc_setCardiacArrest.sqf
index 7b2c195f10..925ff4cc03 100644
--- a/addons/medical/functions/fnc_setCardiacArrest.sqf
+++ b/addons/medical/functions/fnc_setCardiacArrest.sqf
@@ -21,24 +21,23 @@ if (_unit getVariable [QGVAR(inCardiacArrest),false]) exitWith {};
_unit setVariable [QGVAR(inCardiacArrest), true,true];
_unit setVariable [QGVAR(heartRate), 0];
-["Medical_onEnteredCardiacArrest", [_unit]] call EFUNC(common,localEvent);
+["ace_enteredCardiacArrest", [_unit]] call CBA_fnc_localEvent;
[_unit, true] call FUNC(setUnconscious);
_timeInCardiacArrest = 120 + round(random(600));
[{
- private ["_args","_unit","_startTime","_timeInCardiacArrest","_heartRate"];
params ["_args", "_idPFH"];
_args params ["_unit", "_startTime", "_timeInCardiacArrest"];
- _heartRate = _unit getVariable [QGVAR(heartRate), 80];
+ private _heartRate = _unit getVariable [QGVAR(heartRate), 80];
if (_heartRate > 0 || !alive _unit) exitWith {
[_idPFH] call CBA_fnc_removePerFrameHandler;
_unit setVariable [QGVAR(inCardiacArrest), nil,true];
};
- if (ACE_time - _startTime >= _timeInCardiacArrest) exitWith {
+ if (CBA_missionTime - _startTime >= _timeInCardiacArrest) exitWith {
[_idPFH] call CBA_fnc_removePerFrameHandler;
_unit setVariable [QGVAR(inCardiacArrest), nil,true];
[_unit] call FUNC(setDead);
};
-}, 1, [_unit, ACE_time, _timeInCardiacArrest] ] call CBA_fnc_addPerFrameHandler;
+}, 1, [_unit, CBA_missionTime, _timeInCardiacArrest] ] call CBA_fnc_addPerFrameHandler;
diff --git a/addons/medical/functions/fnc_setDead.sqf b/addons/medical/functions/fnc_setDead.sqf
index 7c4f94b260..0e5fd884f4 100644
--- a/addons/medical/functions/fnc_setDead.sqf
+++ b/addons/medical/functions/fnc_setDead.sqf
@@ -20,7 +20,7 @@ params ["_unit", ["_force", false], ["_delaySetDamage", false]];
if ((!alive _unit) || {_unit getVariable ["ACE_isDead", false]}) exitWith {true};
if (!local _unit) exitwith {
- [[_unit, _force], QUOTE(DFUNC(setDead)), _unit, false] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
+ [QGVAR(setDead), [_unit, _force], _unit] call CBA_fnc_targetEvent;
false;
};
@@ -38,44 +38,11 @@ if (((_reviveVal == 1 && {[_unit] call EFUNC(common,isPlayer)} || _reviveVal ==
};
_unit setVariable [QGVAR(inReviveState), true, true];
- _unit setVariable [QGVAR(reviveStartTime), ACE_time];
+ _unit setVariable [QGVAR(reviveStartTime), CBA_missionTime];
[_unit, true] call FUNC(setUnconscious);
- [{
- private "_startTime";
- params ["_args", "_idPFH"];
- _args params ["_unit"];
- _startTime = _unit getVariable [QGVAR(reviveStartTime), 0];
-
- //If we are in reivie state in a blown up vehicle, try to unload so that people can access the body
- if ((alive _unit) && {(vehicle _unit) != _unit} && {!alive (vehicle _unit)}) then {
- TRACE_2("Unloading", _unit, vehicle _unit);
- [_unit] call EFUNC(common,unloadPerson);
- };
-
- if (GVAR(maxReviveTime) > 0 && {ACE_time - _startTime > GVAR(maxReviveTime)}) exitwith {
- [_idPFH] call CBA_fnc_removePerFrameHandler;
- _unit setVariable [QGVAR(inReviveState), nil, true];
- _unit setVariable [QGVAR(reviveStartTime), nil];
- [_unit, true] call FUNC(setDead);
- };
-
- if !(_unit getVariable [QGVAR(inReviveState), false]) exitwith {
- // revived without dieing, so in case we have lifes, remove one.
- if (GVAR(amountOfReviveLives) > 0) then {
- _lifesLeft = _unit getVariable[QGVAR(amountOfReviveLives), GVAR(amountOfReviveLives)];
- _unit setVariable [QGVAR(amountOfReviveLives), _lifesLeft - 1, true];
- };
-
- _unit setVariable [QGVAR(reviveStartTime), nil];
- [_idPFH] call CBA_fnc_removePerFrameHandler;
- };
- if (GVAR(level) >= 2) then {
- if (_unit getVariable [QGVAR(heartRate), 60] > 0) then {
- _unit setVariable [QGVAR(heartRate), 0];
- };
- };
- }, 1, [_unit] ] call CBA_fnc_addPerFrameHandler;
+ // Run the loop that tracks the revive state
+ [_unit ] call FUNC(reviveStateLoop);
false;
};
@@ -84,15 +51,15 @@ if (isPLayer _unit) then {
_unit setVariable ["isDeadPlayer", true, true];
};
-["medical_onSetDead", [_unit]] call EFUNC(common,localEvent);
+["ace_killed", [_unit]] call CBA_fnc_localEvent;
-//Delay a frame before killing the unit via scripted damage
+//Delay a frame before killing the unit via scripted damage
//to avoid triggering the "Killed" Event twice (and having the wrong killer)
if (!_delaySetDamage) then {
[_unit, 1] call FUNC(setStructuralDamage);
} else {
- [FUNC(setStructuralDamage), [_unit, 1]] call EFUNC(common,execNextFrame);
+ [FUNC(setStructuralDamage), [_unit, 1]] call CBA_fnc_execNextFrame;
};
true;
diff --git a/addons/medical/functions/fnc_setHitPointDamage.sqf b/addons/medical/functions/fnc_setHitPointDamage.sqf
index 44da08f233..b1dfe59d29 100644
--- a/addons/medical/functions/fnc_setHitPointDamage.sqf
+++ b/addons/medical/functions/fnc_setHitPointDamage.sqf
@@ -26,7 +26,7 @@ params ["_unit", "_selection", "_damage", ["_disabled", false]];
// Unit isn't local, give function to machine where it is.
if !(local _unit) exitWith {
- [_this, QUOTE(DFUNC(setHitPointDamage)), _unit] call EFUNC(common,execRemoteFnc);
+ [QGVAR(setHitPointDamage), _this, _unit] call CBA_fnc_targetEvent;
};
// Check if overall damage adjustment is disabled
diff --git a/addons/medical/functions/fnc_setUnconscious.sqf b/addons/medical/functions/fnc_setUnconscious.sqf
index 7cfc6f55b4..41c02dd553 100644
--- a/addons/medical/functions/fnc_setUnconscious.sqf
+++ b/addons/medical/functions/fnc_setUnconscious.sqf
@@ -39,7 +39,7 @@ if !(_set) exitWith {
if !(!(isNull _unit) && {(_unit isKindOf "CAManBase") && ([_unit] call EFUNC(common,isAwake))}) exitWith{};
if (!local _unit) exitWith {
- [[_unit, _set, _minWaitingTime, _force], QUOTE(DFUNC(setUnconscious)), _unit, false] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
+ [QGVAR(setUnconscious), [_unit, _set, _minWaitingTime, _force], _unit] call CBA_fnc_targetEvent;
};
_unit setVariable ["ACE_isUnconscious", true, true];
@@ -94,8 +94,18 @@ _unit setUnitPos "DOWN";
if (GVAR(moveUnitsFromGroupOnUnconscious)) then {
[_unit, true, "ACE_isUnconscious", side group _unit] call EFUNC(common,switchToGroupSide);
};
+// Delay Unconscious so the AI dont instant stop shooting on the unit #3121
+if (GVAR(delayUnconCaptive) == 0) then {
+ [_unit, "setCaptive", "ace_unconscious", true] call EFUNC(common,statusEffect_set);
+} else {
+ [{
+ params ["_unit"];
+ if (_unit getVariable ["ACE_isUnconscious", false]) then {
+ [_unit, "setCaptive", "ace_unconscious", true] call EFUNC(common,statusEffect_set);
+ };
+ },[_unit], GVAR(delayUnconCaptive)] call CBA_fnc_waitAndExecute;
+};
-[_unit, "setCaptive", QGVAR(unconscious), true] call EFUNC(common,statusEffect_set);
_anim = [_unit] call EFUNC(common,getDeathAnim);
[_unit, _anim, 1, true] call EFUNC(common,doAnimation);
[{
@@ -103,13 +113,13 @@ _anim = [_unit] call EFUNC(common,getDeathAnim);
if ((_unit getVariable "ACE_isUnconscious") and (animationState _unit != _anim)) then {
[_unit, _anim, 2, true] call EFUNC(common,doAnimation);
};
-}, [_unit, _anim], 0.5, 0] call EFUNC(common,waitAndExecute);
+}, [_unit, _anim], 0.5, 0] call CBA_fnc_waitAndExecute;
-_startingTime = ACE_time;
+_startingTime = CBA_missionTime;
[DFUNC(unconsciousPFH), 0.1, [_unit, _originalPos, _startingTime, _minWaitingTime, false, vehicle _unit isKindOf "ParachuteBase"] ] call CBA_fnc_addPerFrameHandler;
// unconscious can't talk
[_unit, "isUnconscious"] call EFUNC(common,muteUnit);
-["medical_onUnconscious", [_unit, true]] call EFUNC(common,globalEvent);
+["ace_unconscious", [_unit, true]] call CBA_fnc_globalEvent;
diff --git a/addons/medical/functions/fnc_showBloodEffect.sqf b/addons/medical/functions/fnc_showBloodEffect.sqf
new file mode 100644
index 0000000000..3e1e8931b3
--- /dev/null
+++ b/addons/medical/functions/fnc_showBloodEffect.sqf
@@ -0,0 +1,158 @@
+/*
+ * Author: KoffeinFlummi, Glowbal
+ * Does the blood screen effect, just like BIS_fnc_bloodeffect, but in non-sheduled environment.
+ *
+ * Arguments:
+ * 0: Effect multiplier
+ *
+ * Return Value:
+ * None
+ *
+ * Public: Yes
+ */
+#include "script_component.hpp"
+
+params ["_bloodRemaining"];
+
+disableSerialization;
+
+// get already existing controls, or create them
+private ["_fxBloodControls", "_bloodCtrl1", "_bloodCtrl2", "_bloodCtrl3"];
+
+_fxBloodControls = GETUVAR(GVAR(FXBloodControls),[]);
+
+if (count _fxBloodControls != 3) then {
+ _bloodCtrl1 = findDisplay 46 ctrlCreate ["RscPicture", -1];
+ _bloodCtrl2 = findDisplay 46 ctrlCreate ["RscPicture", -1];
+ _bloodCtrl3 = findDisplay 46 ctrlCreate ["RscPicture", -1];
+
+ // set their textures, screen position etc.
+ _bloodCtrl1 ctrlSetText "A3\Ui_f\data\igui\rsctitles\HealthTextures\blood_lower_ca.paa";
+ _bloodCtrl2 ctrlSetText "A3\Ui_f\data\igui\rsctitles\HealthTextures\blood_middle_ca.paa";
+ _bloodCtrl3 ctrlSetText "A3\Ui_f\data\igui\rsctitles\HealthTextures\blood_upper_ca.paa";
+
+ // positions are from config
+ private "_ctrlPosition";
+ _ctrlPosition = [
+ ((0 * safezoneW) + safezoneX) + ((safezoneW - (2.125 * safezoneW * 3/4)) / 2),
+ (-0.0625 * safezoneH) + safezoneY,
+ 2.125 * safezoneW * 3/4,
+ 1.125 * safezoneH
+ ];
+
+ _bloodCtrl1 ctrlSetPosition _ctrlPosition;
+ _bloodCtrl2 ctrlSetPosition _ctrlPosition;
+ _bloodCtrl3 ctrlSetPosition _ctrlPosition;
+
+ _fxBloodControls = [_bloodCtrl1, _bloodCtrl2, _bloodCtrl3];
+ SETUVAR(GVAR(FXBloodControls),_fxBloodControls);
+} else {
+ _bloodCtrl1 = _fxBloodControls select 0;
+ _bloodCtrl2 = _fxBloodControls select 1;
+ _bloodCtrl3 = _fxBloodControls select 2;
+};
+
+// reset everything
+_bloodCtrl1 ctrlSetFade 1;
+_bloodCtrl2 ctrlSetFade 1;
+_bloodCtrl3 ctrlSetFade 1;
+
+_bloodCtrl1 ctrlCommit 0;
+_bloodCtrl2 ctrlCommit 0;
+_bloodCtrl3 ctrlCommit 0;
+
+if (_bloodRemaining < 5) exitWith {
+ // nothing
+};
+
+if (_bloodRemaining < 25) exitWith {
+ _bloodCtrl1 ctrlSetFade 0.2;
+ _bloodCtrl1 ctrlCommit 0.2;
+
+ [{
+ (_this select 0) ctrlSetFade 1;
+ (_this select 0) ctrlCommit 0.8;
+ }, _fxBloodControls, 0.7] call EFUNC(common,waitAndExecute);
+};
+
+if (_bloodRemaining < 40) exitWith {
+ _bloodCtrl1 ctrlSetFade 0.2;
+ _bloodCtrl2 ctrlSetFade 0.85;
+ _bloodCtrl1 ctrlCommit 0.2;
+ _bloodCtrl2 ctrlCommit 0.2;
+
+ [{
+ (_this select 0) ctrlSetFade 1;
+ (_this select 1) ctrlSetFade 1;
+ (_this select 1) ctrlCommit 1;
+ }, _fxBloodControls, 0.7] call EFUNC(common,waitAndExecute);
+
+ [{
+ (_this select 0) ctrlCommit 0.8;
+ }, _fxBloodControls, 1.2] call EFUNC(common,waitAndExecute);
+};
+
+if (_bloodRemaining < 55) exitWith {
+ _bloodCtrl1 ctrlSetFade 0.2;
+ _bloodCtrl2 ctrlSetFade 0.7;
+ _bloodCtrl1 ctrlCommit 0.2;
+ _bloodCtrl2 ctrlCommit 0.2;
+
+ [{
+ (_this select 0) ctrlSetFade 1;
+ (_this select 1) ctrlSetFade 1;
+ (_this select 2) ctrlSetFade 1;
+ (_this select 1) ctrlCommit 1;
+ }, _fxBloodControls, 0.7] call EFUNC(common,waitAndExecute);
+
+ [{
+ (_this select 0) ctrlCommit 0.8;
+ }, _fxBloodControls, 1.2] call EFUNC(common,waitAndExecute);
+};
+
+if (_bloodRemaining < 70) exitWith {
+ _bloodCtrl1 ctrlSetFade 0.2;
+ _bloodCtrl2 ctrlSetFade 0.7;
+ _bloodCtrl3 ctrlSetFade 0.85;
+ _bloodCtrl1 ctrlCommit 0.2;
+ _bloodCtrl2 ctrlCommit 0.2;
+ _bloodCtrl3 ctrlCommit 0.2;
+
+ [{
+ (_this select 0) ctrlSetFade 1;
+ (_this select 1) ctrlSetFade 1;
+ (_this select 2) ctrlSetFade 1;
+ (_this select 2) ctrlCommit 1.5;
+ }, _fxBloodControls, 0.7] call EFUNC(common,waitAndExecute);
+
+ [{
+ (_this select 1) ctrlCommit 1;
+ }, _fxBloodControls, 1.7] call EFUNC(common,waitAndExecute);
+
+ [{
+ (_this select 0) ctrlCommit 0.8;
+ }, _fxBloodControls, 2.2] call EFUNC(common,waitAndExecute);
+};
+
+//default
+_bloodCtrl1 ctrlSetFade 0.2;
+_bloodCtrl2 ctrlSetFade 0.7;
+_bloodCtrl3 ctrlSetFade 0.7;
+_bloodCtrl1 ctrlCommit 0.2;
+_bloodCtrl2 ctrlCommit 0.2;
+_bloodCtrl3 ctrlCommit 0.2;
+
+[{
+ (_this select 0) ctrlSetFade 1;
+ (_this select 1) ctrlSetFade 1;
+ (_this select 2) ctrlSetFade 1;
+ (_this select 2) ctrlCommit 1.5;
+}, _fxBloodControls, 0.7] call EFUNC(common,waitAndExecute);
+
+[{
+ (_this select 1) ctrlCommit 1;
+}, _fxBloodControls, 1.7] call EFUNC(common,waitAndExecute);
+
+[{
+ (_this select 0) ctrlCommit 0.8;
+}, _fxBloodControls, 2.2] call EFUNC(common,waitAndExecute);
diff --git a/addons/medical/functions/fnc_translateSelections.sqf b/addons/medical/functions/fnc_translateSelections.sqf
index 98a4cf8c51..e6624507d1 100644
--- a/addons/medical/functions/fnc_translateSelections.sqf
+++ b/addons/medical/functions/fnc_translateSelections.sqf
@@ -46,7 +46,7 @@ if (_hitPointIndex isEqualTo true) exitWith {
if (!isNil {_unit getHitPointDamage _returnHitPoint}) exitWith {
_returnHitPoint;
};
-
+
//Those VR fuckers have weird limb hitpoints
private _hitPoints = switch (_selection) do {
case ("hand_l"): {L_ARM_HITPOINTS};
diff --git a/addons/medical/functions/fnc_treatment.sqf b/addons/medical/functions/fnc_treatment.sqf
index d7f80edc35..453d074f98 100644
--- a/addons/medical/functions/fnc_treatment.sqf
+++ b/addons/medical/functions/fnc_treatment.sqf
@@ -16,28 +16,26 @@
#include "script_component.hpp"
-private ["_config", "_medicRequired", "_items", "_locations", "_return", "_callbackProgress", "_treatmentTime", "_callerAnim", "_patientAnim", "_iconDisplayed", "_return", "_usersOfItems", "_consumeItems", "_condition", "_displayText", "_wpn", "_treatmentTimeConfig", "_patientStateCondition", "_allowedSelections"];
params ["_caller", "_target", "_selectionName", "_className"];
// If the cursorMenu is open, the loading bar will fail. If we execute the function one frame later, it will work fine
if (uiNamespace getVariable [QEGVAR(interact_menu,cursorMenuOpened),false]) exitwith {
- [{
- _this call FUNC(treatment);
- }, _this] call EFUNC(common,execNextFrame);
+ [DFUNC(treatment), _this] call CBA_fnc_execNextFrame;
};
if !(_target isKindOf "CAManBase") exitWith {false};
-_config = (configFile >> "ACE_Medical_Actions" >> "Basic" >> _className);
+private _config = (configFile >> "ACE_Medical_Actions" >> "Basic" >> _className);
if (GVAR(level) >= 2) then {
_config = (configFile >> "ACE_Medical_Actions" >> "Advanced" >> _className);
};
+
if !(isClass _config) exitwith {false};
// Allow self treatment check
if (_caller == _target && {getNumber (_config >> "allowSelfTreatment") == 0}) exitwith {false};
-_medicRequired = if (isNumber (_config >> "requiredMedic")) then {
+private _medicRequired = if (isNumber (_config >> "requiredMedic")) then {
getNumber (_config >> "requiredMedic");
} else {
// Check for required class
@@ -49,16 +47,16 @@ _medicRequired = if (isNumber (_config >> "requiredMedic")) then {
if !([_caller, _medicRequired] call FUNC(isMedic)) exitwith {false};
-_allowedSelections = getArray (_config >> "allowedSelections");
+private _allowedSelections = getArray (_config >> "allowedSelections");
if !("All" in _allowedSelections || {(_selectionName in _allowedSelections)}) exitwith {false};
// Check item
-_items = getArray (_config >> "items");
+private _items = getArray (_config >> "items");
if (count _items > 0 && {!([_caller, _target, _items] call FUNC(hasItems))}) exitwith {false};
-_return = true;
+private _return = true;
if (isText (_config >> "Condition")) then {
- _condition = getText(_config >> "condition");
+ private _condition = getText(_config >> "condition");
if (_condition != "") then {
if (isnil _condition) then {
_condition = compile _condition;
@@ -74,7 +72,7 @@ if (isText (_config >> "Condition")) then {
};
if (!_return) exitwith {false};
-_patientStateCondition = if (isText(_config >> "patientStateCondition")) then {
+private _patientStateCondition = if (isText(_config >> "patientStateCondition")) then {
missionNamespace getVariable [getText(_config >> "patientStateCondition"), 0]
} else {
getNumber(_config >> "patientStateCondition")
@@ -82,22 +80,20 @@ _patientStateCondition = if (isText(_config >> "patientStateCondition")) then {
if (_patientStateCondition == 1 && {!([_target] call FUNC(isInStableCondition))}) exitwith {false};
// Check allowed locations
-_locations = getArray (_config >> "treatmentLocations");
+private _locations = getArray (_config >> "treatmentLocations");
if ("All" in _locations) then {
_return = true;
} else {
- private [ "_medFacility", "_medVeh"];
- _medFacility = {([_caller] call FUNC(isInMedicalFacility)) || ([_target] call FUNC(isInMedicalFacility))};
- _medVeh = {([_caller] call FUNC(isInMedicalVehicle)) || ([_target] call FUNC(isInMedicalVehicle))};
+ private _medFacility = {([_caller] call FUNC(isInMedicalFacility)) || ([_target] call FUNC(isInMedicalFacility))};
+ private _medVeh = {([_caller] call FUNC(isInMedicalVehicle)) || ([_target] call FUNC(isInMedicalVehicle))};
{
if (_x == "field") exitwith {_return = true;};
if (_x == "MedicalFacility" && _medFacility) exitwith {_return = true;};
if (_x == "MedicalVehicle" && _medVeh) exitwith {_return = true;};
if !(isnil _x) exitwith {
- private "_val";
- _val = missionNamespace getVariable _x;
+ private _val = missionNamespace getVariable _x;
if (_val isEqualType 0) then {
_return = switch (_val) do {
case 0: {true}; //AdvancedMedicalSettings_anywhere
@@ -113,8 +109,8 @@ if ("All" in _locations) then {
if !(_return) exitwith {false};
-_usersOfItems = [];
-_consumeItems = if (isNumber (_config >> "itemConsumed")) then {
+private _usersOfItems = [];
+private _consumeItems = if (isNumber (_config >> "itemConsumed")) then {
getNumber (_config >> "itemConsumed");
} else {
// Check for required class
@@ -128,7 +124,7 @@ if (_consumeItems > 0) then {
};
// Parse the config for the progress callback
-_callbackProgress = getText (_config >> "callbackProgress");
+private _callbackProgress = getText (_config >> "callbackProgress");
if (_callbackProgress == "") then {
_callbackProgress = "true";
};
@@ -139,7 +135,7 @@ if (isNil _callbackProgress) then {
};
// Patient Animation
-_patientAnim = getText (_config >> "animationPatient");
+private _patientAnim = getText (_config >> "animationPatient");
if (_target getVariable ["ACE_isUnconscious", false] && GVAR(allowUnconsciousAnimationOnTreatment)) then {
if !(animationState _target in (getArray (_config >> "animationPatientUnconsciousExcludeOn"))) then {
_patientAnim = getText (_config >> "animationPatientUnconscious");
@@ -155,7 +151,7 @@ if (_caller != _target && {vehicle _target == _target} && {_patientAnim != ""})
};
// Player Animation
-_callerAnim = [getText (_config >> "animationCaller"), getText (_config >> "animationCallerProne")] select (stance _caller == "PRONE");
+private _callerAnim = [getText (_config >> "animationCaller"), getText (_config >> "animationCallerProne")] select (stance _caller == "PRONE");
if (_caller == _target) then {
_callerAnim = [getText (_config >> "animationCallerSelf"), getText (_config >> "animationCallerSelfProne")] select (stance _caller == "PRONE");
};
@@ -167,8 +163,8 @@ if (currentWeapon _caller == secondaryWeapon _caller) then {
_caller selectWeapon (primaryWeapon _caller);
};
-_wpn = ["non", "rfl", "pst"] select (1 + ([primaryWeapon _caller, handgunWeapon _caller] find (currentWeapon _caller)));
-_callerAnim = [_callerAnim, "[wpn]", _wpn] call CBA_fnc_replace;
+private _wpn = ["non", "rfl", "pst"] select (1 + ([primaryWeapon _caller, handgunWeapon _caller] find (currentWeapon _caller)));
+private _callerAnim = [_callerAnim, "[wpn]", _wpn] call CBA_fnc_replace;
if (vehicle _caller == _caller && {_callerAnim != ""}) then {
if (primaryWeapon _caller == "") then {
_caller addWeapon "ACE_FakePrimaryWeapon";
@@ -195,11 +191,11 @@ if (vehicle _caller == _caller && {_callerAnim != ""}) then {
};
//Get treatment time
-_treatmentTime = if (isNumber (_config >> "treatmentTime")) then {
+private _treatmentTime = if (isNumber (_config >> "treatmentTime")) then {
getNumber (_config >> "treatmentTime");
} else {
if (isText (_config >> "treatmentTime")) exitwith {
- _treatmentTimeConfig = getText(_config >> "treatmentTime");
+ private _treatmentTimeConfig = getText(_config >> "treatmentTime");
if (isnil _treatmentTimeConfig) then {
_treatmentTimeConfig = compile _treatmentTimeConfig;
} else {
@@ -225,13 +221,13 @@ _treatmentTime = if (isNumber (_config >> "treatmentTime")) then {
] call EFUNC(common,progressBar);
// Display Icon
-_iconDisplayed = getText (_config >> "actionIconPath");
+private _iconDisplayed = getText (_config >> "actionIconPath");
if (_iconDisplayed != "") then {
[QGVAR(treatmentActionIcon), true, _iconDisplayed, [1,1,1,1], getNumber(_config >> "actionIconDisplayTime")] call EFUNC(common,displayIcon);
};
// handle display of text/hints
-_displayText = "";
+private _displayText = "";
if (_target != _caller) then {
_displayText = getText(_config >> "displayTextOther");
} else {
@@ -239,7 +235,7 @@ if (_target != _caller) then {
};
if (_displayText != "") then {
- ["displayTextStructured", [_caller], [[_displayText, [_caller] call EFUNC(common,getName), [_target] call EFUNC(common,getName)], 1.5, _caller]] call EFUNC(common,targetEvent);
+ [QEGVAR(common,displayTextStructured), [[_displayText, [_caller] call EFUNC(common,getName), [_target] call EFUNC(common,getName)], 1.5, _caller], [_caller]] call CBA_fnc_targetEvent;
};
true;
diff --git a/addons/medical/functions/fnc_treatmentAdvanced_CPR.sqf b/addons/medical/functions/fnc_treatmentAdvanced_CPR.sqf
index f86e620625..0ce1f7d4d9 100644
--- a/addons/medical/functions/fnc_treatmentAdvanced_CPR.sqf
+++ b/addons/medical/functions/fnc_treatmentAdvanced_CPR.sqf
@@ -19,6 +19,12 @@
params ["_caller", "_target", "_selectionName", "_className", "_items"];
if (alive _target && {(_target getVariable [QGVAR(inCardiacArrest), false] || _target getVariable [QGVAR(inReviveState), false])}) then {
- [[_caller, _target], QUOTE(DFUNC(treatmentAdvanced_CPRLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
+ [_target, "activity_view", LSTRING(Activity_cpr), [[_caller, false, true] call EFUNC(common,getName)]] call FUNC(addToLog);
+
+ if (local _target) then {
+ [QGVAR(treatmentAdvanced_CPRLocal), [_caller, _target]] call CBA_fnc_localEvent;
+ } else {
+ [QGVAR(treatmentAdvanced_CPRLocal), [_caller, _target], _target] call CBA_fnc_targetEvent;
+ };
};
true;
diff --git a/addons/medical/functions/fnc_treatmentAdvanced_CPRLocal.sqf b/addons/medical/functions/fnc_treatmentAdvanced_CPRLocal.sqf
index 07431ac66d..fbc7aac601 100644
--- a/addons/medical/functions/fnc_treatmentAdvanced_CPRLocal.sqf
+++ b/addons/medical/functions/fnc_treatmentAdvanced_CPRLocal.sqf
@@ -14,13 +14,12 @@
#include "script_component.hpp"
-private "_reviveStartTime";
params ["_caller","_target"];
if (_target getVariable [QGVAR(inReviveState), false]) then {
- _reviveStartTime = _target getVariable [QGVAR(reviveStartTime),0];
+ private _reviveStartTime = _target getVariable [QGVAR(reviveStartTime),0];
if (_reviveStartTime > 0) then {
- _target setVariable [QGVAR(reviveStartTime), (_reviveStartTime + random(20)) min ACE_time];
+ _target setVariable [QGVAR(reviveStartTime), (_reviveStartTime + random(20)) min CBA_missionTime];
};
};
diff --git a/addons/medical/functions/fnc_treatmentAdvanced_bandage.sqf b/addons/medical/functions/fnc_treatmentAdvanced_bandage.sqf
index bb69a1e45a..e3b94700d2 100644
--- a/addons/medical/functions/fnc_treatmentAdvanced_bandage.sqf
+++ b/addons/medical/functions/fnc_treatmentAdvanced_bandage.sqf
@@ -17,6 +17,7 @@
*/
#include "script_component.hpp"
+
params ["_caller", "_target", "_selectionName", "_className", "_items", "", ["_specificSpot", -1]];
[_target, "activity", LSTRING(Activity_bandagedPatient), [[_caller, false, true] call EFUNC(common,getName)]] call FUNC(addToLog);
@@ -26,7 +27,12 @@ if !([_target] call FUNC(hasMedicalEnabled)) exitWith {
_this call FUNC(treatmentBasic_bandage);
};
-[[_target, _className, _selectionName, _specificSpot], QUOTE(DFUNC(treatmentAdvanced_bandageLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
+if (local _target) then {
+ [QGVAR(treatmentAdvanced_bandageLocal), [_target, _className, _selectionName, _specificSpot]] call CBA_fnc_localEvent;
+} else {
+ [QGVAR(treatmentAdvanced_bandageLocal), [_target, _className, _selectionName, _specificSpot], _target] call CBA_fnc_targetEvent;
+};
+
/* {
if (_x != "") then {
[_target, _x] call FUNC(addToTriageCard);
diff --git a/addons/medical/functions/fnc_treatmentAdvanced_bandageLocal.sqf b/addons/medical/functions/fnc_treatmentAdvanced_bandageLocal.sqf
index 5c02ecc0cb..39ebc6878c 100644
--- a/addons/medical/functions/fnc_treatmentAdvanced_bandageLocal.sqf
+++ b/addons/medical/functions/fnc_treatmentAdvanced_bandageLocal.sqf
@@ -15,46 +15,45 @@
#include "script_component.hpp"
-private ["_openWounds", "_config", "_effectiveness","_mostEffectiveInjury", "_mostEffectiveSpot", "_woundEffectivenss", "_mostEffectiveInjury", "_impact", "_exit", "_classID", "_effectivenessFound", "_className", "_hitPoints", "_hitSelections", "_point", "_woundTreatmentConfig"];
params ["_target", "_bandage", "_selectionName", ["_specificClass", -1]];
// Ensure it is a valid bodypart
-_part = [_selectionName] call FUNC(selectionNameToNumber);
+private _part = [_selectionName] call FUNC(selectionNameToNumber);
if (_part < 0) exitWith {false};
// Get the open wounds for this unit
-_openWounds = _target getVariable [QGVAR(openWounds), []];
+private _openWounds = _target getVariable [QGVAR(openWounds), []];
if (count _openWounds == 0) exitWith {false}; // nothing to do here!
// Get the default effectiveness for the used bandage
-_config = (ConfigFile >> "ACE_Medical_Advanced" >> "Treatment" >> "Bandaging");
-_effectiveness = getNumber (_config >> "effectiveness");
+private _config = (ConfigFile >> "ACE_Medical_Advanced" >> "Treatment" >> "Bandaging");
+private _effectiveness = getNumber (_config >> "effectiveness");
if (isClass (_config >> _bandage)) then {
_config = (_config >> _bandage);
if (isNumber (_config >> "effectiveness")) then { _effectiveness = getNumber (_config >> "effectiveness");};
};
// Figure out which injury for this bodypart is the best choice to bandage
-_mostEffectiveSpot = 0;
-_effectivenessFound = -1;
-_mostEffectiveInjury = _openWounds select 0;
-_exit = false;
+private _mostEffectiveSpot = 0;
+private _effectivenessFound = -1;
+private _mostEffectiveInjury = _openWounds select 0;
+private _exit = false;
{
_x params ["", "_classID", "_partX"];
TRACE_2("OPENWOUND: ", _target, _x);
// Only parse injuries that are for the selected bodypart.
if (_partX == _part) then {
- _woundEffectivenss = _effectiveness;
+ private _woundEffectiveness = _effectiveness;
// Select the classname from the wound classname storage
- _className = GVAR(woundClassNames) select _classID;
+ private _className = GVAR(woundClassNames) select _classID;
// Check if this wound type has attributes specified for the used bandage
if (isClass (_config >> _className)) then {
// Collect the effectiveness from the used bandage for this wound type
- _woundTreatmentConfig = (_config >> _className);
+ private _woundTreatmentConfig = (_config >> _className);
if (isNumber (_woundTreatmentConfig >> "effectiveness")) then {
- _woundEffectivenss = getNumber (_woundTreatmentConfig >> "effectiveness");
+ _woundEffectiveness = getNumber (_woundTreatmentConfig >> "effectiveness");
};
} else {
ACE_LOGWARNING_2("No config for wound type [%1] config base [%2]", _className, _config);
@@ -62,15 +61,15 @@ _exit = false;
TRACE_2("Wound classes: ", _specificClass, _classID);
if (_specificClass == _classID) exitWith {
- _effectivenessFound = _woundEffectivenss;
+ _effectivenessFound = _woundEffectiveness;
_mostEffectiveSpot = _forEachIndex;
_mostEffectiveInjury = _x;
_exit = true;
};
// Check if this is the currently most effective found.
- if (_woundEffectivenss * ((_x select 4) * (_x select 3)) > _effectivenessFound * ((_mostEffectiveInjury select 4) * (_mostEffectiveInjury select 3))) then {
- _effectivenessFound = _woundEffectivenss;
+ if (_woundEffectiveness * ((_x select 4) * (_x select 3)) > _effectivenessFound * ((_mostEffectiveInjury select 4) * (_mostEffectiveInjury select 3))) then {
+ _effectivenessFound = _woundEffectiveness;
_mostEffectiveSpot = _forEachIndex;
_mostEffectiveInjury = _x;
};
@@ -83,14 +82,14 @@ if (_effectivenessFound == -1) exitWith {}; // Seems everything is patched up on
// TODO refactor this part
// Find the impact this bandage has and reduce the amount this injury is present
-_impact = if ((_mostEffectiveInjury select 3) >= _effectivenessFound) then {_effectivenessFound} else { (_mostEffectiveInjury select 3) };
+private _impact = if ((_mostEffectiveInjury select 3) >= _effectivenessFound) then {_effectivenessFound} else { (_mostEffectiveInjury select 3) };
_mostEffectiveInjury set [ 3, ((_mostEffectiveInjury select 3) - _impact) max 0];
_openWounds set [_mostEffectiveSpot, _mostEffectiveInjury];
_target setVariable [QGVAR(openWounds), _openWounds, !USE_WOUND_EVENT_SYNC];
if (USE_WOUND_EVENT_SYNC) then {
- ["medical_propagateWound", [_target, _mostEffectiveInjury]] call EFUNC(common,globalEvent);
+ ["ace_medical_propagateWound", [_target, _mostEffectiveInjury]] call CBA_fnc_globalEvent;
};
// Handle the reopening of bandaged wounds
if (_impact > 0 && {GVAR(enableAdvancedWounds)}) then {
@@ -102,16 +101,14 @@ if (_impact > 0 && {GVAR(enableAdvancedWounds)}) then {
// Arma combines left and right arms into a single body part (HitHands), same with left and right legs (HitLegs).
// Arms are actually hands.
if (GVAR(healHitPointAfterAdvBandage)) then {
- private["_currentWounds", "_headWounds", "_bodyWounds", "_legsWounds", "_armWounds"];
-
// Get the list of the wounds the target is currently suffering from.
- _currentWounds = _target getVariable [QGVAR(openWounds), []];
+ private _currentWounds = _target getVariable [QGVAR(openWounds), []];
// Tally of unbandaged wounds to each body part.
- _headWounds = 0;
- _bodyWounds = 0;
- _legsWounds = 0;
- _armWounds = 0;
+ private _headWounds = 0;
+ private _bodyWounds = 0;
+ private _legsWounds = 0;
+ private _armWounds = 0;
// Loop through all current wounds and add up the number of unbandaged wounds on each body part.
{
@@ -120,7 +117,7 @@ if (GVAR(healHitPointAfterAdvBandage)) then {
// Use switch/case for early termination if wounded limb is found before all six are checked.
// Number of wounds multiplied by blood loss will return zero for a fully
// bandaged body part, not incrementing the wound counter; or it will return
- // some other number which will increment the wound counter.
+ // some other number which will increment the wound counter.
switch (_bodyPart) do {
// Head
case 0: {
diff --git a/addons/medical/functions/fnc_treatmentAdvanced_fullHeal.sqf b/addons/medical/functions/fnc_treatmentAdvanced_fullHeal.sqf
index a26876568d..18bd0468d2 100644
--- a/addons/medical/functions/fnc_treatmentAdvanced_fullHeal.sqf
+++ b/addons/medical/functions/fnc_treatmentAdvanced_fullHeal.sqf
@@ -12,7 +12,10 @@
params ["_caller", "_target", "_selectionName", "_className", "_items"];
-// TODO replace by event system
-[[_caller, _target], QUOTE(DFUNC(treatmentAdvanced_fullHealLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
+if (local _target) then {
+ [QGVAR(treatmentAdvanced_fullHealLocal), [_caller, _target]] call CBA_fnc_localEvent;
+} else {
+ [QGVAR(treatmentAdvanced_fullHealLocal), [_caller, _target], _target] call CBA_fnc_targetEvent;
+};
true;
diff --git a/addons/medical/functions/fnc_treatmentAdvanced_fullHealLocal.sqf b/addons/medical/functions/fnc_treatmentAdvanced_fullHealLocal.sqf
index 1bb3f23b15..df6eefe3cd 100644
--- a/addons/medical/functions/fnc_treatmentAdvanced_fullHealLocal.sqf
+++ b/addons/medical/functions/fnc_treatmentAdvanced_fullHealLocal.sqf
@@ -10,7 +10,6 @@
#include "script_component.hpp"
-private "_allUsedMedication";
params ["_caller", "_target"];
if (alive _target) exitWith {
@@ -60,7 +59,7 @@ if (alive _target) exitWith {
_target setVariable [QGVAR(painSuppress), 0, true];
// medication
- _allUsedMedication = _target getVariable [QGVAR(allUsedMedication), []];
+ private _allUsedMedication = _target getVariable [QGVAR(allUsedMedication), []];
{
_target setVariable [_x select 0, nil];
} forEach _allUsedMedication;
diff --git a/addons/medical/functions/fnc_treatmentAdvanced_fullHealTreatmentTime.sqf b/addons/medical/functions/fnc_treatmentAdvanced_fullHealTreatmentTime.sqf
index a0539948ea..b2b222e601 100644
--- a/addons/medical/functions/fnc_treatmentAdvanced_fullHealTreatmentTime.sqf
+++ b/addons/medical/functions/fnc_treatmentAdvanced_fullHealTreatmentTime.sqf
@@ -15,9 +15,7 @@
*/
#include "script_component.hpp"
-private "_totalDamage";
-
-_totalDamage = 0;
+private _totalDamage = 0;
{
_totalDamage = _totalDamage + _x;
diff --git a/addons/medical/functions/fnc_treatmentAdvanced_medication.sqf b/addons/medical/functions/fnc_treatmentAdvanced_medication.sqf
index c5643745d7..ceb788f571 100644
--- a/addons/medical/functions/fnc_treatmentAdvanced_medication.sqf
+++ b/addons/medical/functions/fnc_treatmentAdvanced_medication.sqf
@@ -22,7 +22,7 @@ TRACE_5("params",_caller,_target,_selectionName,_className,_items);
private _part = [_selectionName] call FUNC(selectionNameToNumber);
-["medical_advMedication", [_target], [_target, _className, _part]] call EFUNC(common,targetEvent);
+[QGVAR(treatmentAdvanced_medicationLocal), [_target, _className, _part], [_target]] call CBA_fnc_targetEvent;
{
if (_x != "") then {
diff --git a/addons/medical/functions/fnc_treatmentAdvanced_medicationLocal.sqf b/addons/medical/functions/fnc_treatmentAdvanced_medicationLocal.sqf
index 2c3cf4cc41..46a8b9c2a8 100644
--- a/addons/medical/functions/fnc_treatmentAdvanced_medicationLocal.sqf
+++ b/addons/medical/functions/fnc_treatmentAdvanced_medicationLocal.sqf
@@ -15,8 +15,6 @@
#include "script_component.hpp"
-private ["_currentInSystem", "_medicationConfig", "_painReduce", "_hrIncreaseLow", "_hrIncreaseNorm", "_hrIncreaseHigh", "_maxDose", "_inCompatableMedication", "_timeInSystem", "_heartRate", "_pain", "_resistance", "_hrCallback", "_varName", "_viscosityChange"];
-
params ["_target", "_className", "_partNumber"];
TRACE_3("params",_target,_className,_partNumber);
@@ -30,23 +28,22 @@ if ((_tourniquets select _partNumber) > 0) exitWith {
};
// We have added a new dose of this medication to our system, so let's increase it
-_varName = format[QGVAR(%1_inSystem), _className];
-_currentInSystem = _target getVariable [_varName, 0];
-_currentInSystem = _currentInSystem + 1;
-_target setVariable [_varName, _currentInSystem];
+private _varName = format[QGVAR(%1_inSystem), _className];
+private _currentInSystem = _target getVariable [_varName, 0];
+_target setVariable [_varName, _currentInSystem + 1];
// Find the proper attributes for the used medication
-_medicationConfig = (configFile >> "ACE_Medical_Advanced" >> "Treatment" >> "Medication");
-_painReduce = getNumber (_medicationConfig >> "painReduce");
-_hrIncreaseLow = getArray (_medicationConfig >> "hrIncreaseLow");
-_hrIncreaseNorm = getArray (_medicationConfig >> "hrIncreaseNormal");
-_hrIncreaseHigh = getArray (_medicationConfig >> "hrIncreaseHigh");
-_timeInSystem = getNumber (_medicationConfig >> "timeInSystem");
-_maxDose = getNumber (_medicationConfig >> "maxDose");
-_viscosityChange = getNumber (_medicationConfig >> "viscosityChange");
-_hrCallback = getText (_medicationConfig >> "hrCallback");
+private _medicationConfig = (configFile >> "ACE_Medical_Advanced" >> "Treatment" >> "Medication");
+private _painReduce = getNumber (_medicationConfig >> "painReduce");
+private _hrIncreaseLow = getArray (_medicationConfig >> "hrIncreaseLow");
+private _hrIncreaseNorm = getArray (_medicationConfig >> "hrIncreaseNormal");
+private _hrIncreaseHigh = getArray (_medicationConfig >> "hrIncreaseHigh");
+private _timeInSystem = getNumber (_medicationConfig >> "timeInSystem");
+private _maxDose = getNumber (_medicationConfig >> "maxDose");
+private _viscosityChange = getNumber (_medicationConfig >> "viscosityChange");
+private _hrCallback = getText (_medicationConfig >> "hrCallback");
-_inCompatableMedication = [];
+private _inCompatableMedication = [];
if (isClass (_medicationConfig >> _className)) then {
_medicationConfig = (_medicationConfig >> _className);
if (isNumber (_medicationConfig >> "painReduce")) then { _painReduce = getNumber (_medicationConfig >> "painReduce");};
@@ -64,9 +61,10 @@ if (isNil _hrCallback) then {
} else {
_hrCallback = missionNamespace getVariable _hrCallback;
};
+if (!(_hrCallback isEqualType {})) then {_hrCallback = {TRACE_1("callback was NOT code",_hrCallback)};};
// Adjust the heart rate based upon config entry
-_heartRate = _target getVariable [QGVAR(heartRate), 70];
+private _heartRate = _target getVariable [QGVAR(heartRate), 70];
if (alive _target) then {
if (_heartRate > 0) then {
if (_heartRate <= 45) then {
@@ -83,7 +81,7 @@ if (alive _target) then {
if (_painReduce > 0) then {
// Reduce pain
- _painSuppress = _target getVariable [QGVAR(painSuppress), 0];
+ private _painSuppress = _target getVariable [QGVAR(painSuppress), 0];
_target setVariable [QGVAR(painSuppress), (_painSuppress + _painReduce) max 0];
if (!GVAR(painIsOnlySuppressed)) then {
_pain = _target getVariable [QGVAR(pain), 0];
@@ -91,9 +89,8 @@ if (_painReduce > 0) then {
};
};
-_resistance = _target getVariable [QGVAR(peripheralResistance), 100];
-_resistance = _resistance + _viscosityChange;
-_target setVariable [QGVAR(peripheralResistance), _resistance max 0];
+private _resistance = _target getVariable [QGVAR(peripheralResistance), 100];
+_target setVariable [QGVAR(peripheralResistance), (_resistance + _viscosityChange) max 0];
// Call back to ensure that the medication is decreased over time
[_target, _classname, _varName, _maxDose, _timeInSystem, _inCompatableMedication, _viscosityChange, _painReduce] call FUNC(onMedicationUsage);
diff --git a/addons/medical/functions/fnc_treatmentBasic_bandage.sqf b/addons/medical/functions/fnc_treatmentBasic_bandage.sqf
index 04cace08af..c0411c09e4 100644
--- a/addons/medical/functions/fnc_treatmentBasic_bandage.sqf
+++ b/addons/medical/functions/fnc_treatmentBasic_bandage.sqf
@@ -20,4 +20,8 @@
private ["_hitSelections", "_hitPoints", "_point", "_damage"];
params ["_caller", "_target", "_selection", "_className"];
-[[_target, _selection], QUOTE(DFUNC(treatmentBasic_bandageLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
+if (local _target) then {
+ [QGVAR(treatmentBasic_bandageLocal), [_target, _selection]] call CBA_fnc_localEvent;
+} else {
+ [QGVAR(treatmentBasic_bandageLocal), [_target, _selection], _target] call CBA_fnc_targetEvent;
+};
diff --git a/addons/medical/functions/fnc_treatmentBasic_bandageLocal.sqf b/addons/medical/functions/fnc_treatmentBasic_bandageLocal.sqf
index 73b40f8a9b..f8c11a7484 100644
--- a/addons/medical/functions/fnc_treatmentBasic_bandageLocal.sqf
+++ b/addons/medical/functions/fnc_treatmentBasic_bandageLocal.sqf
@@ -18,14 +18,14 @@
params ["_target", "_selectionName"];
-_damageBodyParts = _target getVariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]];
+private _damageBodyParts = _target getVariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]];
// Ensure it is a valid bodypart
-_part = [_selectionName] call FUNC(selectionNameToNumber);
+private _part = [_selectionName] call FUNC(selectionNameToNumber);
if (_part < 0) exitwith {false};
if ((_damageBodyParts select _part) > 0) then {
- _damageOnPart = (_damageBodyParts select _part);
+ private _damageOnPart = (_damageBodyParts select _part);
// Temp quick fix to change in behaviour of basic medical bandaging
if (_damageOnPart - BANDAGEHEAL > 0) then {
_damageOnPart = _damageOnPart - (_damageOnPart * BANDAGEHEAL);
diff --git a/addons/medical/functions/fnc_treatmentBasic_bloodbag.sqf b/addons/medical/functions/fnc_treatmentBasic_bloodbag.sqf
index 5700d351cb..6989ac14b8 100644
--- a/addons/medical/functions/fnc_treatmentBasic_bloodbag.sqf
+++ b/addons/medical/functions/fnc_treatmentBasic_bloodbag.sqf
@@ -18,4 +18,8 @@
params ["_caller", "_target", "_treatmentClassname"];
-[[_target, _treatmentClassname], QUOTE(DFUNC(treatmentBasic_bloodbagLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
+if (local _target) then {
+ [QGVAR(treatmentBasic_bloodbagLocal), [_target, _treatmentClassname]] call CBA_fnc_localEvent;
+} else {
+ [QGVAR(treatmentBasic_bloodbagLocal), [_target, _treatmentClassname], _target] call CBA_fnc_targetEvent;
+};
diff --git a/addons/medical/functions/fnc_treatmentBasic_bloodbagLocal.sqf b/addons/medical/functions/fnc_treatmentBasic_bloodbagLocal.sqf
index 64ba6e031b..cb4dcf032c 100644
--- a/addons/medical/functions/fnc_treatmentBasic_bloodbagLocal.sqf
+++ b/addons/medical/functions/fnc_treatmentBasic_bloodbagLocal.sqf
@@ -17,13 +17,11 @@
params ["_target", "_treatmentClassname"];
-private ["_blood", "_bloodAdded"];
-
-_bloodAdded = switch (true) do {
+private _bloodAdded = switch (true) do {
case (_treatmentClassname == "BloodIV_250"): {0.25 * BLOODBAGHEAL};
case (_treatmentClassname == "BloodIV_500"): {0.5 * BLOODBAGHEAL};
default {BLOODBAGHEAL};
};
-_blood = ((_target getVariable [QGVAR(bloodVolume), 100]) + _bloodAdded) min 100;
+private _blood = ((_target getVariable [QGVAR(bloodVolume), 100]) + _bloodAdded) min 100;
_target setVariable [QGVAR(bloodVolume), _blood, true];
diff --git a/addons/medical/functions/fnc_treatmentBasic_morphine.sqf b/addons/medical/functions/fnc_treatmentBasic_morphine.sqf
index 87559d0dd2..f704a67042 100644
--- a/addons/medical/functions/fnc_treatmentBasic_morphine.sqf
+++ b/addons/medical/functions/fnc_treatmentBasic_morphine.sqf
@@ -19,4 +19,8 @@
params ["_caller", "_target"];
-[[_target], QUOTE(DFUNC(treatmentBasic_morphineLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
+if (local _target) then {
+ [QGVAR(treatmentBasic_morphineLocal), [_target]] call CBA_fnc_localEvent;
+} else {
+ [QGVAR(treatmentBasic_morphineLocal), [_target], _target] call CBA_fnc_targetEvent;
+};
diff --git a/addons/medical/functions/fnc_treatmentBasic_morphineLocal.sqf b/addons/medical/functions/fnc_treatmentBasic_morphineLocal.sqf
index 780196819b..bb670c75bd 100644
--- a/addons/medical/functions/fnc_treatmentBasic_morphineLocal.sqf
+++ b/addons/medical/functions/fnc_treatmentBasic_morphineLocal.sqf
@@ -15,13 +15,13 @@
#include "script_component.hpp"
#define MORPHINEHEAL 0.4
-private ["_morphine", "_pain"];
params ["_target"];
// reduce pain, pain sensitivity
-_morphine = ((_target getVariable [QGVAR(morphine), 0]) + MORPHINEHEAL) min 1;
+private _morphine = ((_target getVariable [QGVAR(morphine), 0]) + MORPHINEHEAL) min 1;
_target setVariable [QGVAR(morphine), _morphine, true];
-_pain = ((_target getVariable [QGVAR(pain), 0]) - MORPHINEHEAL) max 0;
+
+private _pain = ((_target getVariable [QGVAR(pain), 0]) - MORPHINEHEAL) max 0;
_target setVariable [QGVAR(pain), _pain, true];
// @todo overdose
diff --git a/addons/medical/functions/fnc_treatmentIV.sqf b/addons/medical/functions/fnc_treatmentIV.sqf
index ebf33c75c7..456c415362 100644
--- a/addons/medical/functions/fnc_treatmentIV.sqf
+++ b/addons/medical/functions/fnc_treatmentIV.sqf
@@ -22,7 +22,12 @@ params ["_caller", "_target", "_selectionName", "_className", "_items"];
if (count _items == 0) exitWith {false};
_removeItem = _items select 0;
-[[_target, _className], QUOTE(DFUNC(treatmentIVLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
+if (local _target) then {
+ [QGVAR(treatmentIVLocal), [_target, _className]] call CBA_fnc_localEvent;
+} else {
+ [QGVAR(treatmentIVLocal), [_target, _className], _target] call CBA_fnc_targetEvent;
+};
+
[_target, _removeItem] call FUNC(addToTriageCard);
[_target, "activity", LSTRING(Activity_gaveIV), [[_caller, false, true] call EFUNC(common,getName)]] call FUNC(addToLog);
[_target, "activity_view", LSTRING(Activity_gaveIV), [[_caller, false, true] call EFUNC(common,getName)]] call FUNC(addToLog); // TODO expand message
diff --git a/addons/medical/functions/fnc_treatmentIVLocal.sqf b/addons/medical/functions/fnc_treatmentIVLocal.sqf
index ef8a83af65..71c6f16b97 100644
--- a/addons/medical/functions/fnc_treatmentIVLocal.sqf
+++ b/addons/medical/functions/fnc_treatmentIVLocal.sqf
@@ -15,16 +15,15 @@
#include "script_component.hpp"
-private ["_config", "_volumeAdded", "_typeOf", "_varName", "_bloodVolume"];
params ["_target", "_treatmentClassname"];
-_bloodVolume = _target getVariable [QGVAR(bloodVolume), 100];
+private _bloodVolume = _target getVariable [QGVAR(bloodVolume), 100];
if (_bloodVolume >= 100) exitWith {};
// Find the proper attributes for the used IV
-_config = (configFile >> "ACE_Medical_Advanced" >> "Treatment" >> "IV");
-_volumeAdded = getNumber (_config >> "volume");
-_typeOf = getText (_config >> "type");
+private _config = (configFile >> "ACE_Medical_Advanced" >> "Treatment" >> "IV");
+private _volumeAdded = getNumber (_config >> "volume");
+private _typeOf = getText (_config >> "type");
if (isClass (_config >> _treatmentClassname)) then {
_config = (_config >> _treatmentClassname);
@@ -34,7 +33,7 @@ if (isClass (_config >> _treatmentClassname)) then {
ERROR("IV Treatment Classname not found");
};
-_varName = format["ACE_Medical_IVVolume_%1",_typeOf];
+private _varName = format["ACE_Medical_IVVolume_%1",_typeOf];
_target setVariable [_varName, (_target getVariable [_varName, 0]) + _volumeAdded, true];
if !(_varName in GVAR(IVBags)) then {
diff --git a/addons/medical/functions/fnc_treatmentTourniquet.sqf b/addons/medical/functions/fnc_treatmentTourniquet.sqf
index 1c5c9282db..3fa34a58aa 100644
--- a/addons/medical/functions/fnc_treatmentTourniquet.sqf
+++ b/addons/medical/functions/fnc_treatmentTourniquet.sqf
@@ -17,34 +17,32 @@
#include "script_component.hpp"
-private ["_caller","_target","_part","_selectionName","_removeItem", "_tourniquets", "_items", "_output", "_className"];
-_caller = _this select 0;
-_target = _this select 1;
-_selectionName = _this select 2;
-_className = _this select 3;
-_items = _this select 4;
+params ["_caller", "_target", "_selectionName", "_className", "_items"];
if (count _items == 0) exitWith {false};
-_part = [_selectionName] call FUNC(selectionNameToNumber);
+private _part = [_selectionName] call FUNC(selectionNameToNumber);
if (_part == 0 || _part == 1) exitWith {
- // ["displayTextStructured", [_caller], ["You cannot apply a CAT on this body part!"]] call EFUNC(common,targetEvent);
+ // [QEGVAR(common,displayTextStructured), ["You cannot apply a CAT on this body part!"], [_caller]] call CBA_fnc_targetEvent;
false;
};
-_tourniquets = _target getVariable [QGVAR(tourniquets), [0,0,0,0,0,0]];
+private _tourniquets = _target getVariable [QGVAR(tourniquets), [0,0,0,0,0,0]];
if ((_tourniquets select _part) > 0) exitWith {
_output = "There is already a tourniquet on this body part!"; // TODO localization
- ["displayTextStructured", [_caller], [_output, 1.5, _caller]] call EFUNC(common,targetEvent);
+ [QEGVAR(common,displayTextStructured), [_output, 1.5, _caller], [_caller]] call CBA_fnc_targetEvent;
false;
};
-_removeItem = _items select 0;
-[[_target, _removeItem, _selectionName], QUOTE(DFUNC(treatmentTourniquetLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
+private _removeItem = _items select 0;
+if (local _target) then {
+ [QGVAR(treatmentTourniquetLocal), [_target, _removeItem, _selectionName]] call CBA_fnc_localEvent;
+} else {
+ [QGVAR(treatmentTourniquetLocal), [_target, _removeItem, _selectionName], _target] call CBA_fnc_targetEvent;
+};
[_target, _removeItem] call FUNC(addToTriageCard);
[_target, "activity", LSTRING(Activity_appliedTourniquet), [[_caller, false, true] call EFUNC(common,getName)]] call FUNC(addToLog);
[_target, "activity_view", LSTRING(Activity_appliedTourniquet), [[_caller, false, true] call EFUNC(common,getName)]] call FUNC(addToLog); // TODO expand message
-
true
diff --git a/addons/medical/functions/fnc_treatmentTourniquetLocal.sqf b/addons/medical/functions/fnc_treatmentTourniquetLocal.sqf
index be9b03c9f1..ab24a94a23 100644
--- a/addons/medical/functions/fnc_treatmentTourniquetLocal.sqf
+++ b/addons/medical/functions/fnc_treatmentTourniquetLocal.sqf
@@ -13,35 +13,14 @@
*/
#include "script_component.hpp"
-private ["_tourniquets", "_part", "_applyingTo"];
params ["_target", "_tourniquetItem", "_selectionName"];
-[_target] call FUNC(addToInjuredCollection);
+//If we're not already tracking vitals, start:
+[_target] call FUNC(addVitalLoop);
-_part = [_selectionName] call FUNC(selectionNameToNumber);
+private _part = [_selectionName] call FUNC(selectionNameToNumber);
// Place a tourniquet on the bodypart
-_tourniquets = _target getVariable [QGVAR(tourniquets), [0,0,0,0,0,0]];
-_applyingTo = (_tourniquets select _part) + 1 + round(random(100));
-_tourniquets set[_part, _applyingTo];
+private _tourniquets = _target getVariable [QGVAR(tourniquets), [0,0,0,0,0,0]];
+_tourniquets set [_part, CBA_missionTime];
_target setVariable [QGVAR(tourniquets), _tourniquets, true];
-
-[{
- params ["_args", "_idPFH"];
- _args params ["_target", "_applyingTo", "_part", "_time"];
-
- if (!alive _target) exitWith {
- [_idPFH] call CBA_fnc_removePerFrameHandler;
- };
-
- _tourniquets = _target getVariable [QGVAR(tourniquets), [0,0,0,0,0,0]];
- if !((_tourniquets select _part) == _applyingTo) exitWith {
- // Tourniquet has been removed
- [_idPFH] call CBA_fnc_removePerFrameHandler;
- };
- if (ACE_time - _time > 120) then {
- _target setVariable [QGVAR(pain), (_target getVariable [QGVAR(pain), 0]) + 0.005];
- };
-}, 5, [_target, _applyingTo, _part, ACE_time] ] call CBA_fnc_addPerFrameHandler;
-
-true
diff --git a/addons/medical/functions/fnc_treatment_failure.sqf b/addons/medical/functions/fnc_treatment_failure.sqf
index 4029721566..d81c576feb 100644
--- a/addons/medical/functions/fnc_treatment_failure.sqf
+++ b/addons/medical/functions/fnc_treatment_failure.sqf
@@ -17,7 +17,6 @@
#include "script_component.hpp"
-private ["_config", "_callback", "_weaponSelect", "_lastAnim"];
params ["_args"];
_args params ["_caller", "_target", "_selectionName", "_className", "_items", "_usersOfItems"];
@@ -25,7 +24,7 @@ if (primaryWeapon _caller == "ACE_FakePrimaryWeapon") then {
_caller removeWeapon "ACE_FakePrimaryWeapon";
};
if (vehicle _caller == _caller) then {
- _lastAnim = _caller getVariable [QGVAR(treatmentPrevAnimCaller), ""];
+ private _lastAnim = _caller getVariable [QGVAR(treatmentPrevAnimCaller), ""];
//Don't play another medic animation (when player is rapidily treating)
TRACE_2("Reseting to old animation", animationState player, _lastAnim);
switch (toLower _lastAnim) do {
@@ -40,7 +39,7 @@ if (vehicle _caller == _caller) then {
};
_caller setVariable [QGVAR(treatmentPrevAnimCaller), nil];
-_weaponSelect = (_caller getVariable [QGVAR(selectedWeaponOnTreatment), []]);
+private _weaponSelect = (_caller getVariable [QGVAR(selectedWeaponOnTreatment), []]);
if ((_weaponSelect params [["_previousWeapon", ""]]) && {(_previousWeapon != "") && {_previousWeapon in (weapons _caller)}}) then {
for "_index" from 0 to 99 do {
_caller action ["SwitchWeapon", _caller, _caller, _index];
@@ -58,18 +57,17 @@ if ((_weaponSelect params [["_previousWeapon", ""]]) && {(_previousWeapon != "")
} forEach _usersOfItems;
// Record specific callback
-_config = (configFile >> "ACE_Medical_Actions" >> "Basic" >> _className);
+private _config = (configFile >> "ACE_Medical_Actions" >> "Basic" >> _className);
if (GVAR(level) >= 2) then {
_config = (configFile >> "ACE_Medical_Actions" >> "Advanced" >> _className);
};
-_callback = getText (_config >> "callbackFailure");
+private _callback = getText (_config >> "callbackFailure");
_callback = if (isNil _callback) then {
compile _callback
} else {
missionNamespace getVariable _callback
};
+if (!(_callback isEqualType {})) then {_callback = {TRACE_1("callback was NOT code",_callback)};};
_args call _callback;
-
-// _args call FUNC(createLitter);
diff --git a/addons/medical/functions/fnc_treatment_success.sqf b/addons/medical/functions/fnc_treatment_success.sqf
index 81c3a588ba..0e4609f9c9 100644
--- a/addons/medical/functions/fnc_treatment_success.sqf
+++ b/addons/medical/functions/fnc_treatment_success.sqf
@@ -17,7 +17,6 @@
#include "script_component.hpp"
-private ["_config", "_callback", "_weaponSelect", "_lastAnim"];
params ["_args"];
_args params ["_caller", "_target", "_selectionName", "_className", "_items", "_usersOfItems"];
@@ -25,7 +24,7 @@ if (primaryWeapon _caller == "ACE_FakePrimaryWeapon") then {
_caller removeWeapon "ACE_FakePrimaryWeapon";
};
if (vehicle _caller == _caller) then {
- _lastAnim = _caller getVariable [QGVAR(treatmentPrevAnimCaller), ""];
+ private _lastAnim = _caller getVariable [QGVAR(treatmentPrevAnimCaller), ""];
//Don't play another medic animation (when player is rapidily treating)
TRACE_2("Reseting to old animation", animationState player, _lastAnim);
switch (toLower _lastAnim) do {
@@ -40,7 +39,7 @@ if (vehicle _caller == _caller) then {
};
_caller setVariable [QGVAR(treatmentPrevAnimCaller), nil];
-_weaponSelect = (_caller getVariable [QGVAR(selectedWeaponOnTreatment), []]);
+private _weaponSelect = (_caller getVariable [QGVAR(selectedWeaponOnTreatment), []]);
if ((_weaponSelect params [["_previousWeapon", ""]]) && {(_previousWeapon != "") && {_previousWeapon in (weapons _caller)}}) then {
for "_index" from 0 to 99 do {
_caller action ["SwitchWeapon", _caller, _caller, _index];
@@ -53,17 +52,18 @@ if ((_weaponSelect params [["_previousWeapon", ""]]) && {(_previousWeapon != "")
};
// Record specific callback
-_config = (configFile >> "ACE_Medical_Actions" >> "Basic" >> _className);
+private _config = (configFile >> "ACE_Medical_Actions" >> "Basic" >> _className);
if (GVAR(level) >= 2) then {
_config = (configFile >> "ACE_Medical_Actions" >> "Advanced" >> _className);
};
-_callback = getText (_config >> "callbackSuccess");
+private _callback = getText (_config >> "callbackSuccess");
if (isNil _callback) then {
_callback = compile _callback;
} else {
_callback = missionNamespace getVariable _callback;
};
+if (!(_callback isEqualType {})) then {_callback = {TRACE_1("callback was NOT code",_callback)};};
//Get current blood loose on limb (for "bloody" litter)
private _bloodLossOnSelection = 0;
@@ -91,7 +91,7 @@ _args call FUNC(createLitter);
//If we're not already tracking vitals, start:
if (!(_target getVariable [QGVAR(addedToUnitLoop),false])) then {
- [_target] call FUNC(addToInjuredCollection);
+ [_target] call FUNC(addVitalLoop);
};
-["medical_treatmentSuccess", [_caller, _target, _selectionName, _className]] call EFUNC(common,localEvent);
+["ace_treatmentSuccess", [_caller, _target, _selectionName, _className]] call CBA_fnc_localEvent;
diff --git a/addons/medical/functions/fnc_unconsciousPFH.sqf b/addons/medical/functions/fnc_unconsciousPFH.sqf
index e78c80f3ec..edf2e871fd 100644
--- a/addons/medical/functions/fnc_unconsciousPFH.sqf
+++ b/addons/medical/functions/fnc_unconsciousPFH.sqf
@@ -33,15 +33,15 @@ if (!alive _unit) exitWith {
if (GVAR(moveUnitsFromGroupOnUnconscious)) then {
[_unit, false, "ACE_isUnconscious", side group _unit] call EFUNC(common,switchToGroupSide);
};
- [_unit, "setCaptive", QGVAR(unconscious), false] call EFUNC(common,statusEffect_set);
+ [_unit, "setCaptive", "ace_unconscious", false] call EFUNC(common,statusEffect_set);
[_unit, false] call EFUNC(common,disableAI);
//_unit setUnitPos _originalPos;
_unit setUnconscious false;
[_unit, "isUnconscious"] call EFUNC(common,unmuteUnit);
- ["medical_onUnconscious", [_unit, false]] call EFUNC(common,globalEvent);
+ ["ace_unconscious", [_unit, false]] call CBA_fnc_globalEvent;
- TRACE_3("ACE_DEBUG_Unconscious_Exit",_unit, (!alive _unit) , QGVAR(unconscious));
+ TRACE_3("ACE_DEBUG_Unconscious_Exit",_unit, (!alive _unit) , "ace_unconscious");
[_idPFH] call CBA_fnc_removePerFrameHandler;
};
@@ -96,13 +96,13 @@ if !(_unit getVariable ["ACE_isUnconscious",false]) exitWith {
};
_unit setVariable [QGVAR(vehicleAwakeAnim), nil];
- ["medical_onUnconscious", [_unit, false]] call EFUNC(common,globalEvent);
+ ["ace_unconscious", [_unit, false]] call CBA_fnc_globalEvent;
// EXIT PFH
[_idPFH] call CBA_fnc_removePerFrameHandler;
};
if (!_hasMovedOut) then {
// Reset the unit back to the previous captive state.
- [_unit, "setCaptive", QGVAR(unconscious), false] call EFUNC(common,statusEffect_set);
+ [_unit, "setCaptive", "ace_unconscious", false] call EFUNC(common,statusEffect_set);
// Swhich the unit back to its original group
//Unconscious units shouldn't be put in another group #527:
@@ -130,13 +130,13 @@ if (_parachuteCheck) then {
if (!local _unit) exitWith {
TRACE_6("ACE_DEBUG_Unconscious_PFH",_unit, _args, _startingTime, _minWaitingTime, _idPFH, _unit getVariable QGVAR(unconsciousArguments));
- _args set [3, _minWaitingTime - (ACE_time - _startingTime)];
+ _args set [3, _minWaitingTime - (CBA_missionTime - _startingTime)];
_unit setVariable [QGVAR(unconsciousArguments), _args, true];
[_idPFH] call CBA_fnc_removePerFrameHandler;
};
// Ensure we are waiting at least a minimum period before checking if we can wake up the unit again, allows for temp knock outs
-if ((ACE_time - _startingTime) >= _minWaitingTime) exitWith {
+if ((CBA_missionTime - _startingTime) >= _minWaitingTime) exitWith {
TRACE_2("ACE_DEBUG_Unconscious_Temp knock outs",_unit, [_unit] call FUNC(getUnconsciousCondition));
if (!([_unit] call FUNC(getUnconsciousCondition))) then {
_unit setVariable ["ACE_isUnconscious", false, true];
diff --git a/addons/medical/functions/fnc_useItem.sqf b/addons/medical/functions/fnc_useItem.sqf
index 7abf80c464..63b3f2a696 100644
--- a/addons/medical/functions/fnc_useItem.sqf
+++ b/addons/medical/functions/fnc_useItem.sqf
@@ -16,7 +16,6 @@
#include "script_component.hpp"
-private ["_return","_crew"];
params ["_medic", "_patient", "_item"];
if (isNil QGVAR(setting_allowSharedEquipment)) then {
@@ -24,22 +23,34 @@ if (isNil QGVAR(setting_allowSharedEquipment)) then {
};
if (GVAR(setting_allowSharedEquipment) && {[_patient, _item] call EFUNC(common,hasItem)}) exitWith {
- [[_patient, _item], QUOTE(EFUNC(common,useItem)), _patient] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
+ if (local _patient) then {
+ ["ace_useItem", [_patient, _item]] call CBA_fnc_localEvent;
+ } else {
+ ["ace_useItem", [_patient, _item], _patient] call CBA_fnc_targetEvent;
+ };
[true, _patient];
};
if ([_medic, _item] call EFUNC(common,hasItem)) exitWith {
- [[_medic, _item], QUOTE(EFUNC(common,useItem)), _medic] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
+ if (local _medic) then {
+ ["ace_useItem", [_medic, _item]] call CBA_fnc_localEvent;
+ } else {
+ ["ace_useItem", [_medic, _item], _medic] call CBA_fnc_targetEvent;
+ };
[true, _medic];
};
-_return = [false, objNull];
+private _return = [false, objNull];
if ([vehicle _medic] call FUNC(isMedicalVehicle) && {vehicle _medic != _medic}) then {
- _crew = crew vehicle _medic;
+ private _crew = crew vehicle _medic;
{
if ([_medic, _x] call FUNC(canAccessMedicalEquipment) && {([_x, _item] call EFUNC(common,hasItem))}) exitWith {
_return = [true, _x];
- [[_x, _item], QUOTE(EFUNC(common,useItem)), _x] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
+ if (local _x) then {
+ ["ace_useItem", [_x, _item]] call CBA_fnc_localEvent;
+ } else {
+ ["ace_useItem", [_x, _item], _x] call CBA_fnc_targetEvent;
+ };
};
} forEach _crew;
};
diff --git a/addons/medical/functions/fnc_useItems.sqf b/addons/medical/functions/fnc_useItems.sqf
index ce45d752a9..aac7b0623a 100644
--- a/addons/medical/functions/fnc_useItems.sqf
+++ b/addons/medical/functions/fnc_useItems.sqf
@@ -15,22 +15,21 @@
#include "script_component.hpp"
-private ["_medic", "_patient", "_items", "_itemUsedInfo", "_itemsUsedBy"];
params ["_medic", "_patient", "_items"];
-_itemsUsedBy = [];
+private _itemsUsedBy = [];
{
// handle a one of type use item
if (_x isEqualType []) then {
{
- _itemUsedInfo = [_medic, _patient, _x] call FUNC(useItem);
+ private _itemUsedInfo = [_medic, _patient, _x] call FUNC(useItem);
if (_itemUsedInfo select 0) exitWith { _itemsUsedBy pushBack [(_itemUsedInfo select 1), _x]};
} forEach _x;
};
// handle required item
if (_x isEqualType "") then {
- _itemUsedInfo = [_medic, _patient, _x] call FUNC(useItem);
+ private _itemUsedInfo = [_medic, _patient, _x] call FUNC(useItem);
if (_itemUsedInfo select 0) exitWith { _itemsUsedBy pushBack [(_itemUsedInfo select 1), _x]};
};
} forEach _items;
diff --git a/addons/medical/functions/fnc_vitalLoop.sqf b/addons/medical/functions/fnc_vitalLoop.sqf
new file mode 100644
index 0000000000..6e5bb7fb2b
--- /dev/null
+++ b/addons/medical/functions/fnc_vitalLoop.sqf
@@ -0,0 +1,48 @@
+/*
+ * Author: Glowbal, esteldunedain
+ * Vital loop for a unit.
+ *
+ * Arguments:
+ * 0: The Unit
+ * 1: Time of last computation
+ *
+ * ReturnValue:
+ * None
+ *
+ * Public: No
+ */
+
+#include "script_component.hpp"
+
+params ["_unit", "_lastTime"];
+
+// If the unit died the loop is finished
+if (!alive _unit) exitWith {};
+
+// If locality changed, broadcast the last medical state and finish the local loop
+if (!local _unit) exitWith {
+ if (GVAR(level) >= 2) then {
+ _unit setVariable [QGVAR(heartRate), _unit getVariable [QGVAR(heartRate), 80], true];
+ _unit setVariable [QGVAR(bloodPressure), _unit getVariable [QGVAR(bloodPressure), [80, 120]], true];
+ };
+ _unit setVariable [QGVAR(bloodVolume), _unit getVariable [QGVAR(bloodVolume), 100], true];
+};
+
+// Handle unit vitals
+[_unit, CBA_missionTime - _lastTime] call FUNC(handleUnitVitals);
+
+// Play injured sounds
+private _pain = _unit getVariable [QGVAR(pain), 0];
+if (_pain > (_unit getVariable [QGVAR(painSuppress), 0])) then {
+ // This introduces wierd unconscious behaviour for basic medical and possibly also advanced.
+ // TODO This is disabled as it's considered non critical code.
+ // We will need to decide if we want unconscious triggered on high pain levels or if we can get rid of this entirely.
+ /*if (_pain > 0.7 && {random(1) > 0.6}) then {
+ [_unit] call FUNC(setUnconscious);
+ };*/
+
+ [_unit, _pain] call FUNC(playInjuredSound);
+};
+
+// Schedule the loop to be executed again 1 sec later
+[DFUNC(vitalLoop), [_unit, CBA_missionTime], 1] call CBA_fnc_waitAndExecute;
diff --git a/addons/medical/stringtable.xml b/addons/medical/stringtable.xml
index f603344b98..dd6f3ca7d5 100644
--- a/addons/medical/stringtable.xml
+++ b/addons/medical/stringtable.xml
@@ -14,15 +14,15 @@
FERIMENTOS
- No injuries on this bodypart ...
- Körperteil nicht verletzt ...
- Non ci sono lesioni in questa parte del corpo ...
- Данная часть тела не повреждена ...
- Aucune blessures sur cette partie du corps ...
- Brak obrażeń na tej części ciała ...
- Sin heridas en esta parte del cuerpo ...
- Ezen a testrészen nincs sérülés ...
- Žádné zranění na této části těla ...
+ No injuries on this bodypart...
+ Körperteil nicht verletzt...
+ Non ci sono lesioni in questa parte del corpo...
+ Данная часть тела не повреждена...
+ Aucune blessures sur cette partie du corps...
+ Brak obrażeń na tej części ciała...
+ Sin heridas en esta parte del cuerpo...
+ Ezen a testrészen nincs sérülés...
+ Žádné zranění na této části těla...
Nenhum ferimento nesta parte do corpo...
@@ -42,13 +42,23 @@
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.
Устанавливает количество мусора, который появляется после использования мед. препаратов. Большое количество мусора может уменьшить производительность, поэтому данная настройка локальна для клиента.
- Il livello di dettagli della simulazione dei rifiuti indica il numero di rifiuti che verranno creati localmente nel client. La creazione di troppi rifiuti in aree locali potrebbe causare lag e calo di FPS. Questo è un settaggio client.
+ Il numero di rifiuti che verranno creati localmente. La creazione di troppi rifiuti in aree locali potrebbe causare lag e calo di FPS. Questo è un settaggio lato client.
Le niveau de simulation des détritus règle la quantité de déchets qui vont être créés localement chez le client. Des quantitées excessive chez certains clients peuvent causer des chutes de FPS, c'est donc une option client uniquement.
Die Einstellung für das Abfall-Detaillevel stellt die Menge des lokal angezeigten medizinischen Abfalls ein. Zuviel Abfall kann FPS-Einbrüche erzeugen, weswegen diese Einstellung nur clientseitig ist.
A hulladékszimuláció részletessége megszabja a kliens által megjelenített hulladékobjektumok mennyiségét. Súlyos mennyiségek izolált területeken alacsony FPS-t okozhatnak, így ez egy kliensoldali beállítás.
O nível de detalhe de sujeira determina o número de itens que irão aparecer no cliente. Quantidades excessivas em áreas locais podem aumentar o lag do FPS, então esta é uma opção somente para o cliente.
Počet zobrazených předmětů po použití zdravotnického materiálu ovlivňuje počet objektů, které budou zobrazeny klientovi v místě použití zdravotnického materiálu. Vyšší množství objektů může způsobovat poklesy FPS a proto je toto nastavení čistě na klientovi.
+
+ Inject Adenosine
+ Adenosin injizieren
+ Inyectar Adenosina
+ Wstrzyknij adenozynę
+ Injecter de l'adénosine
+ Inietta andenosina
+ Aplikovat adenosine
+ Injetar Adenosina
+
Inject Atropine
Atropin injizieren
@@ -71,7 +81,7 @@
Ввести адреналин
Epinefrin beadása
Injetar Epinefrina
- Inietta epinefrina
+ Inietta adrenalina
Inject Morphine
@@ -106,7 +116,7 @@
Transfuser du Plasma
Перелить плазму
Infúzió (vérplazma)
- Trasfusione di Plasma
+ Trasfusione di plasma
Transfundir Plasma
@@ -218,99 +228,109 @@
Benda la gamba destra
- Injecting Morphine ...
- Morphin injizieren ...
- Inyectando Morfina ...
- Wstrzykiwanie morfiny ...
- Aplikuji morfin ...
- Введение морфина ...
+ Injecting Morphine...
+ Morphin injizieren...
+ Inyectando Morfina...
+ Wstrzykiwanie morfiny...
+ Aplikuji morfin...
+ Введение морфина...
Injection de Morphine...
- Morfium beadása ...
- Injetando Morfina ...
- Inietto la morfina ...
+ Morfium beadása...
+ Injetando Morfina...
+ Inietto la morfina...
- Injecting Epinephrine ...
- Epinephrin injizieren ...
- Inyectando Epinefrina ...
- Wstrzykiwanie adrenaliny ...
- Aplikuji adrenalin ...
- Введение адреналина ...
- Injection d'Adrénaline ...
- Epinefrin beadása ...
- Injetando Epinefrina ...
- Inietto l'epinefrina ...
+ Injecting Epinephrine...
+ Epinephrin injizieren...
+ Inyectando Epinefrina...
+ Wstrzykiwanie adrenaliny...
+ Aplikuji adrenalin...
+ Введение адреналина...
+ Injection d'Adrénaline...
+ Epinefrin beadása...
+ Injetando Epinefrina...
+ Inietto l'adrenalina...
+
+
+ Injecting Adenosine...
+ Adenosin injizieren...
+ Inyectando Adenosina...
+ Wstrzykiwanie adenozyny...
+ Injection d'adénosine...
+ Inietto l'andenosina
+ Aplikuji adenosine...
+ Injetando Adenosina...
- Injecting Atropine ...
- Atropin injizieren ...
- Inyectando Atropina ...
- Aplikuji atropin ...
- Wstrzykiwanie atropiny ...
- Injection d'Atropine ...
- Введение атропина ...
- Atropin beadása ...
- Inietto l'atropina ...
+ Injecting Atropine...
+ Atropin injizieren...
+ Inyectando Atropina...
+ Aplikuji atropin...
+ Wstrzykiwanie atropiny...
+ Injection d'Atropine...
+ Введение атропина...
+ Atropin beadása...
+ Inietto l'atropina...
Injetando Atropina
- Transfusing Blood ...
- Bluttransfusion ...
- Transfusión de sangre ...
- Przetaczanie krwi ...
- Probíhá transfúze krve ...
- Переливание крови ...
- Transfusion Sanguine ...
- Infúzió vérrel ...
- Transfundindo Sangue ...
- Effettuo la trasfusione di sangue ...
+ Transfusing Blood...
+ Bluttransfusion...
+ Transfusión de sangre...
+ Przetaczanie krwi...
+ Probíhá transfúze krve...
+ Переливание крови...
+ Transfusion Sanguine...
+ Infúzió vérrel...
+ Transfundindo Sangue...
+ Effettuo la trasfusione di sangue...
- Transfusing Saline ...
- Salzlösungtransfusion ...
- Transfusión de salino ...
- Probíha transfúze fyziologického roztoku ...
- Przetaczanie soli fizjologicznej ...
- Transfusion de saline ...
- Переливание физраствора ...
- Infúzió sós vizzel ...
+ Transfusing Saline...
+ Salzlösungtransfusion...
+ Transfusión de salino...
+ Probíha transfúze fyziologického roztoku...
+ Przetaczanie soli fizjologicznej...
+ Transfusion de saline...
+ Переливание физраствора...
+ Infúzió sós vizzel...
Effettuo la rasfusione di soluzione salina
Transfundindo Soro...
- Transfusing Plasma ...
- Plasmatransfusion ...
- Transfusión de plasma ...
- Probíha transfúze plazmy ...
- Przetaczanie osocza ...
- Transfusion de Plasma ...
- Переливание плазмы ...
- Infúzió vérplazmával ...
- Effettu la trasfusione di plasma ...
+ Transfusing Plasma...
+ Plasmatransfusion...
+ Transfusión de plasma...
+ Probíha transfúze plazmy...
+ Przetaczanie osocza...
+ Transfusion de Plasma...
+ Переливание плазмы...
+ Infúzió vérplazmával...
+ Effettu la trasfusione di plasma...
Transfundindo Plasma...
- Bandaging ...
- Verbinden ...
- Vendando ...
- Bandażowanie ...
- Obvazuji ...
- Pansement ...
- Sto applicando la benda ...
- Bekötözés ...
- Atando ...
- Перевязывание ...
+ Bandaging...
+ Verbinden...
+ Vendando...
+ Bandażowanie...
+ Obvazuji...
+ Pansement...
+ Sto bendando...
+ Bekötözés...
+ Atando...
+ Перевязывание...
- Applying Tourniquet ...
- Setze Tourniquet an ...
- Aplicando torniquete ...
- Aplikuji škrtidlo ...
- Zakładanie stazy ...
- Mise en place du Garrot ...
- Наложение жгута ...
- Érszorító felhelyezése ...
- Sto applicando il laccio emostatico ...
+ Applying Tourniquet...
+ Setze Tourniquet an...
+ Aplicando torniquete...
+ Aplikuji škrtidlo...
+ Zakładanie stazy...
+ Mise en place du Garrot...
+ Наложение жгута...
+ Érszorító felhelyezése...
+ Sto applicando il laccio emostatico...
Applicando Torniquete
@@ -327,7 +347,7 @@
Field Dressing
- Verbandpäckchen
+ Wundverband
Compresa de campaña
Бинтовая повязка
Obinadlo
@@ -347,14 +367,14 @@
Bendaggio compressivo
Bandage gauze
Bandagem de Compressão
- Tlakový obvaz
+ Obvaz Tlakový
Elastic Bandage
Elastischer Verband
Vendaje elástico
Давящая повязка
- Elastické obinadlo
+ Obavaz Elastický
Bandaż elastyczny
Pansement élastique
Rögzitő kötszer
@@ -428,7 +448,7 @@
Жгут
Škrtidlo
Staza
- Tourniquet
+ Garrot
Érszorító
Laccio emostatico
Torniquete
@@ -440,7 +460,7 @@
Снять жгут
Sundat škrtidlo
Zdejmij stazę
- Enlever le Tourniquet
+ Enlever le garrot
Érszorító leszedése
Rimuovi laccio emostatico
Remover Torniquete
@@ -458,15 +478,15 @@
Diagnosticar
- Diagnosing ...
- Diagnostizieren ...
+ Diagnosing...
+ Diagnostizieren...
Diagnosi in corso...
- Диагностика ...
+ Диагностика...
Diagnostic en cours
- Diagnozowanie ...
- Diagnosticando ...
+ Diagnozowanie...
+ Diagnosticando...
Diagnózis folyamatban...
- Diagnostika ...
+ Diagnostika...
Diagnosticando...
@@ -482,15 +502,15 @@
SBV
- Performing CPR ...
- HLW durchführen ...
+ Performing CPR...
+ HLW durchführen...
Eseguendo RCP...
- Сердечно-лёгочная реанимация ...
+ Сердечно-лёгочная реанимация...
RPC en cours
- Przeprowadzanie RKO ...
- Realizando RCP ...
+ Przeprowadzanie RKO...
+ Realizando RCP...
Újraélesztés folyamatban...
- Provádím CPR ...
+ Provádím CPR...
Realizando o SBV...
@@ -502,7 +522,7 @@
Administrer du sang en IV (1000ml)
Podat krev. transfúzi (1000ml)
Vér adása intravénásan (1000ml)
- Effettua trasfusione sangue IV (1000ml)
+ Effettua trasfusione sangue EV (1˙000ml)
Administrar Sangue IV (1000ml)
@@ -514,7 +534,7 @@
Administrer du sang en IV (500ml)
Podat krev. transfúzi (500ml)
Vér adása intravénásan (500ml)
- Effettua trasfusione sangue IV (500ml)
+ Effettua trasfusione sangue EV (500ml)
Administrar Sangue IV (500ml)
@@ -526,7 +546,7 @@
Administrer du sang en IV (250ml)
Podat krev. transfúzi (250ml)
Vér adása intravénásan (250ml)
- Effettua trasfusione sangue IV (250ml)
+ Effettua trasfusione sangue EV (250ml)
Administrar Sangue IV (250ml)
@@ -538,7 +558,7 @@
Administrer du plasma en IV (1000ml)
Podat plazmu (1000ml)
Vérplazma adása intravénásan (1000ml)
- Effettua trasfusione plasma IV (1000ml)
+ Effettua trasfusione plasma EV (1˙000ml)
Administrar Plasma IV (1000ml)
@@ -550,7 +570,7 @@
Administrer du plasma en IV (500ml)
Podat plazmu (500ml)
Vérplazma adása intravénásan (500ml)
- Effettua trasfusione plasma IV (500ml)
+ Effettua trasfusione plasma EV (500ml)
Administrar Plasma IV (500ml)
@@ -562,7 +582,7 @@
Administrer du plasma en IV (250ml)
Podat plazmu (250ml)
Vérplazma adása intravénásan (250ml)
- Effettua trasfusione plasma IV (250ml)
+ Effettua trasfusione plasma EV (250ml)
Administrar Plasma IV (250ml)
@@ -574,7 +594,7 @@
Administrer de la solution saline en IV (1000ml)
Podaz fyz. roztok (1000ml)
Sós víz adása intravénásan (1000ml)
- Effettua trasfusione salina IV (1000ml)
+ Effettua trasfusione salina EV (1˙000ml)
Administrar Soro IV (1000ml)
@@ -586,7 +606,7 @@
Administrer de la solution saline en IV (500ml)
Podaz fyz. roztok (500ml)
Sós víz adása intravénásan (500ml)
- Effettua trasfusione salina IV (500ml)
+ Effettua trasfusione salina EV (500ml)
Administrar Soro IV (500ml)
@@ -598,7 +618,7 @@
Administrer de la solution saline en IV (250ml)
Podaz fyz. roztok (250ml)
Sós víz adása intravénásan (250ml)
- Effettua trasfusione salina IV (250ml)
+ Effettua trasfusione salina EV (250ml)
Administrar Soro IV (250ml)
@@ -750,7 +770,7 @@
Tourniquet [CAT]
Жгут
Torniquete [CAT]
- Tourniquet [CAT]
+ Garrot [CAT]
Staza [typ. CAT]
Škrtidlo [CAT]
Érszorító [CAT]
@@ -760,18 +780,18 @@
Receiving IV [%1ml]
Erhalte IV [%1ml]
- Reciviendo IV [%1ml]
+ Recibiendo IV [%1ml]
Принимается переливание [%1 мл]
Otrzymywanie IV [pozostało %1ml]
Transfusion en IV [%1ml]
Přijímání transfúze [%1ml]
Infúzióra kötve [%1ml]
- Ricevendo IV [%1ml]
+ Ricevendo EV [%1ml]
Recebendo IV [%1ml]
Bandage (Basic)
- Bandage (Standard)
+ Bandage (Einfach)
Повязка (обычная)
Vendaje (Básico)
Bandage (Standard)
@@ -815,14 +835,14 @@
Nyomókötszer
Bendaggio compressivo
Bandagem de Compressão
- Tlakový obvaz
+ Obvaz (Tlakový)
Used to pack medium to large wounds and stem the bleeding
Wird verwendet, um mittlere bis große Wunden abzudecken und Blutungen zu stoppen
Для тампонирования ран среднего и большого размера и остановки кровотечения.
Se utiliza para vendar heridas medianas o grandes y detener el sangrado
- Utilisé pour couvrir des blessures de taille moyenne à grande. Arrête l'hémorragies
+ Utilisé pour couvrir des blessures de taille moyenne à grande. Arrête l'hémorragie.
Używany w celu opatrywania średnich i dużych ran oraz tamowania krwawienia. Dobrze radzi sobie z tamowaniem ran płatowych oraz postrzałowych.
Közepestől nagyig terjedő sebek betakarására és vérzés elállítására használt kötszer
Usato su ferite medie o larghe per fermare emorragie.
@@ -833,7 +853,7 @@
A bandage used to pack the wound to stem bleeding and facilitate wound healing. Packing a wound is an option in large polytrauma injuries.
Повязка для тампонирования раны, остановки кровотечения и лучшего заживления. При тяжёлых сочетанных ранениях возможно тампонирование раны.
Se utiliza para detener la hemorragia de una herida y favorecer su cicatrización. Se usa en grandes lesiones o politraumatismos.
- Bandage servant à recouvrir les blessures pour arrêter les hémmoragies et faciliter la guérisson. Recouvrir une blessure est optionnel dans le cas de blessures polytraumatiques
+ Bandage servant à recouvrir les blessures pour arrêter les hémoragies et faciliter la guérison. Recouvrir une blessure est optionnel dans le cas de blessures polytraumatiques.
Opatrunek stosowany w celu zatrzymania krwawienia i osłony większych ran.
Egy kötszerfajta, melyet a sebek nyomására használnak a vérzés elállítása és sebgyógyulás érdekében. A nyomókötés egy lehetőség nagyobb polytraumatikus sérülések esetén.
Un bendaggio usato per coprire la ferita, fermare il sanguinamento e facilitarne la guarigione. Questa tecnica è opzionale su ferite multiple.
@@ -848,7 +868,7 @@
Vendaje (Elástico)
Bandage (Élastique)
Bandaż (elastyczny)
- Obvaz (elastický)
+ Obvaz (Elastický)
Rögzító kötszer
Benda (elastica)
Bandagem (Elástica)
@@ -882,7 +902,7 @@
Tourniquet [CAT]
Жгут
Torniquete (CAT)
- Tourniquet (CAT)
+ Garrot (CAT)
Staza (typ. CAT)
Škrtidlo (CAT)
Érszorító (CAT)
@@ -920,14 +940,14 @@
Morfina auto-inyectable
Auto-injecteur de Morphine
Autostrzykawka z morfiną
- Autoinjektor morfin
+ Auto-morfin
Morfium autoinjektor
Autoiniettore di morfina
Auto-injetor de morfina
Used to combat moderate to severe pain experiences
- Wird verwendet um moderate bis starke Schmärzen zu lindern.
+ Wird verwendet um moderate bis starke Schmerzen zu lindern.
Для снятия средних и сильных болевых ощущений
Usado para combatir los estados dolorosos de moderados a severos
Utilisé pour réduire les douleurs modérées à sévères.
@@ -949,6 +969,36 @@
Um analgésico usado para combater dores moderadas e fortes.
Analgetikum slouží k tlumení středně těžkých a těžkých bolestí
+
+ Adenosine autoinjector
+ Adenosin-Autoinjektor
+ Asenosina auto-inyectable
+ Autostrzykawka z adenozyną
+ Auto-injécteur d'adénosine
+ Autoiniettore di adenosina
+ Auto-adenosine
+ Auto-injetor de Adenosina
+
+
+ Used to counter effects of Epinephrine
+ Wird verwendet um die Symptome von Epiniphrin zu lindern
+ Utilizada para contrarrestar los effectos de la Epinefrina
+ Adenozyna. Stosowana do zwalczania efektów działania adrenaliny.
+ Utilisé pour contrer les effets de l'adrénaline
+ Usato per contrastare l'effetto dell'epinefrina
+ Slouží jako protiváha Adrenalinu
+ Usado para combater os efeitos da Epinefrina
+
+
+ A drug used to counter the effects of Epinephrine
+ Ein Medikament, das die Symptome von Epiniphrin bekämpft.
+ Medicamento usado para contrarrestar los efectos de la Epinefrina.
+ Organiczny związek chemiczny z grupy nukleozydów. Skuteczna w leczeniu częstoskurczu komorowego. Działa rozszerzająco na naczynia krwionośne.
+ Un composé utilisé pour contrer les effets de l'adrénaline
+ Medicamento usato per contrastare l'effetto dell'epinefrina
+ Droga používaná k tlumení efektu Adrenalinu
+ Uma droga usada para combater os efeitos da Epinefrina
+
Atropine autoinjector
Атропин в пневмошприце
@@ -956,7 +1006,7 @@
Auto-injecteur d'Atropine
Autostrzykawka AtroPen
Atropin-Autoinjektor
- Autoinjektor atropin
+ Auto-atropine
Atropin autoinjektor
Autoiniettore di atropina
Auto-injetor de Atropina
@@ -992,9 +1042,9 @@
Auto-injecteur d'épinéphrine
Autostrzykawka EpiPen
Epiniphrin-Autoinjektor
- Autoinjektor adrenalin
+ Auto-adrenalin
Epinefrin autoinjektor
- Autoiniettore di epinefrina
+ Autoiniettore di adrenalina
Auto-injetor de epinefrina
@@ -1016,7 +1066,7 @@
Medicament qui fonctionne sur le système nerveux sympathique créant une dilatation des bronches, augmente la fréquence cardiaque et annule les effets d'une réaction allergique (anaphylaxie). Utilisé lors d'arrêt cardio-respiratoire pour augmenter les chances de retrouver un pouls.
EpiPen z adrenaliną ma działanie sympatykomimetyczne, tj. pobudza receptory alfa- i beta-adrenergiczne. Pobudzenie układu współczulnego prowadzi do zwiększenia częstotliwości pracy serca, zwiększenia pojemności wyrzutowej serca i przyśpieszenia krążenia wieńcowego. Pobudzenie oskrzelowych receptorów beta-adrenergicznych wywołuje rozkurcz mięśni gładkich oskrzeli, co w efekcie zmniejsza towarzyszące oddychaniu świsty i duszności.
Una sostanza che permette di dilatare i bronchi, aumentare il battito cardiaco e combattere effetti di reazioni allergiche. Usato anche in casi di arresto cardiaco.
- Ein Medikament, das die Bronchien erweitert, die Herzfrequenz erhöht und Symptome von allergischen Reaktionen(Anaphylaxie) bekämpft. Wird bei plötzlichem Herzstillstand verabreicht.
+ Ein Medikament, das die Bronchien erweitert, die Herzfrequenz erhöht und Symptome von allergischen Reaktionen (Anaphylaxie) bekämpft. Wird bei plötzlichem Herzstillstand verabreicht.
Uma droga trabalha dilatando os bronquios, aumentando a frequência cardíaca e combate efeitos de reações alérgicas(anáfilaticas). Usado em casos de parada cardiaca com poucas changes de recuperação.
Egy hormon, mely a szimpatikus idegrendszer által kitágítja a hörgőket, valamint megnöveli a szívverést, ezzel ellensúlyozva ilyen jellegű allergiás reakciókat (anafilaxiás sokk). Hirtelen szívmegállás esetén is használt, idő alatt csökkenő hatásfokkal.
Zúžení periferních cév díky působení na alfa receptory a následné kontrakci hladkých svalů, tím dochází k tzv. centralizaci oběhu, krev se soustřeďuje v životně důležitých centrálních orgánech (srdce, mozek, plíce), působí také pozitivně na srdeční činnost a dochází ke zvýšení krevního tlaku a tepu. Dále se používá při náhlé srdeční zástavě.
@@ -1029,7 +1079,7 @@
Osocze IV (1000ml)
Plasma IV (1000ml)
Vérplazma-infúzió (1000ml)
- Plasma IV (1000ml)
+ Plasma EV (1000ml)
Plasma IV (1000ml)
Krevní plazma (1000ml)
@@ -1065,7 +1115,7 @@
Osocze IV (500ml)
Plasma IV (500ml)
Vérplazma-infúzió (500ml)
- Plasma IV (500ml)
+ Plasma EV (500ml)
Plasma IV (500ml)
Krevní plazma (500ml)
@@ -1077,7 +1127,7 @@
Osocze IV (250ml)
Plasma IV (250ml)
Vérplazma-infúzió (250ml)
- Plasma IV (250ml)
+ Plasma EV (250ml)
Plasma IV (250ml)
Krevní plazma (250ml)
@@ -1089,7 +1139,7 @@
Krew IV (1000ml)
Blut IV (1000ml)
Vér-infúzió (1000ml)
- Sangue IV (1000ml)
+ Sangue EV (1000ml)
Sangue IV (1000ml)
Krevní transfúze (1000ml)
@@ -1097,7 +1147,7 @@
Blood IV, for restoring a patients blood (keep cold)
Пакет крови для возмещения объёма потерянной крови (хранить в холодильнике)
Sangre intravenosa, para restarurar el volumen sanguíneo (mantener frío)
- Cullot sanguin O- ,utiliser seulement lors de perte sanguine majeur afin de remplacer le volume sanguin perdu. Habituelment utiliser lors du transport ou dans un etablisement de soin.
+ Cullot sanguin O-, utilisé seulement lors de perte sanguine majeure afin de remplacer le volume sanguin perdu. Habituelment utilisé lors du transport ou dans un etablisement de soins.
Krew IV, używana do uzupełnienia krwi u pacjenta, trzymać w warunkach chłodniczych.
Vér-infúzió, intravénás bejuttatásra egy páciensnek (hidegen tárolandó)
Sangue usato per ripristinare pazienti in cui si è verificata una perdita di sangue (conservare al fresco)
@@ -1111,7 +1161,7 @@
Krew 0 Rh-, używana w rzadkich i szczególnych przypadkach do uzupełnienia krwi u pacjenta, zazwyczaj w trakcie fazie transportu rannej osoby do szpitala.
Utilice sólo durante gran pérdida de sangre para reemplazar el volumen de sangre perdida. Uso habitual durante el transporte de heridos.
Sangue 0 negativo usato per ripristinare sangue in pazienti in cui si è verificata una perdita di sangue.
- Cullot sanguin O- utilisé dans de rares et stricts cas pour compléter une perte de sang importante. Administré normalement lors d'un MEDEVAC
+ Cullot sanguin O- utilisé dans de rares et stricts cas pour compléter une perte de sang importante. Administré normalement lors d'un MEDEVAC.
O Negative Blutinfusion wird nur in seltenen Fällen verwendet, um den Bluthaushalt des Patienten zu ergänzen. Wird in der Regel wärend der Transportphase durchgeführt.
Sangue O- , utilizado em casos raros para rapidamente repor o sangue. Uso habitual ocorre durante o transporte ou em estações de tratamento.
Nullás vércsoportú, Rh-negatív vér-infúzió, melyet kritikus és ritka helyzetekben vérutánpótlásra használnak, jellemzően az orvosi ellátás szállítási fázisa közben.
@@ -1125,7 +1175,7 @@
Krew IV (500ml)
Blut IV (500ml)
Vér-infúzió (500ml)
- Sangue IV (500ml)
+ Sangue EV (500ml)
Sangue IV (500ml)
Krevní transfúze (500ml)
@@ -1137,7 +1187,7 @@
Krew IV (250ml)
Blut IV (250ml)
Vér-infúzió (250ml)
- Samgue IV (250ml)
+ Sangue EV (250ml)
Sangue IV (250ml)
Krevní transfúze (250ml)
@@ -1149,7 +1199,7 @@
Sól fizjologiczna IV (1000ml)
Kochsalzlösung (1000ml)
0,9%-os sósvíz-infúzió (1000ml)
- Soluzione salina IV (1000ml)
+ Soluzione salina EV (1˙000ml)
Soro IV (1000ml)
Fyziologický roztok (1000ml)
@@ -1172,7 +1222,7 @@
Un remplacant temporaire pour rétablir la tension artérielle lors de perte sanguine, administré par intra-veineuse
Używany w medycynie w formie płynu infuzyjnego jako środek nawadniający i uzupełniający niedobór elektrolitów, podawany dożylnie (IV).
Egy orvosi térfogat-helyreállító készítmény, melyet intravénás módon lehet a szervezetbe juttatni.
- Una soluzione medica per ripristinare il volume del sangue introdotta tramite trasfusione IV.
+ Una soluzione medica per ripristinare il volume del sangue introdotta tramite trasfusione EV.
Ein medizinisches Volumenersatzmittel, dass durch einen intravenösen Zugang in den Blutkreislauf verabreicht wird.
Uma reposição temporaria para restaurar a pressão arterial perdida por perda de sangue.
Fyziologický roztok se využívá nejčastěji jako infuze při dehydrataci organismu.
@@ -1185,7 +1235,7 @@
Sól fizjologiczna IV (500ml)
Kochsalzlösung (500ml)
0,9%-os sósvíz-infúzió (500ml)
- Soluzione salina IV (500ml)
+ Soluzione salina EV (500ml)
Soro IV (1000ml)
Fyziologický roztok (500ml)
@@ -1197,7 +1247,7 @@
Sól fizjologiczna IV (250ml)
Kochsalzlösung (250ml)
0,9%-os sósvíz-infúzió (250ml)
- Soluzione salina IV (250ml)
+ Soluzione salina EV (250ml)
Soro IV (1000ml)
Fyziologický roztok (250ml)
@@ -1207,7 +1257,7 @@
Vendaje básico (QuickClot)
Bandage basique (Hémostatique)
Opatrunek QuikClot ACS
- Verbandpäckchen(Gerinnungsmittel)
+ Verbandpäckchen (QuikClot)
Általános zárókötszer (QuikClot)
Bendaggio emostatico (QuikClot)
Bandagem básica (Coagulante)
@@ -1247,7 +1297,7 @@
Elsősegélycsomag
Pronto soccorso personale
Kit De Primeiros Socorros Pessoal
- Osobní lékárnička
+ Osobní lékárnička (PAK)
Includes various treatment kit needed for stitching or advanced treatment
@@ -1282,7 +1332,7 @@
Usar equipo de primeros auxilios
Elsősegélycsomag használata
Usar o kit de primeiros socorros
- Použít osobní lékárničku
+ Použít osobní lékárničku (PAK)
Usa il pronto soccorso personale
@@ -1383,15 +1433,15 @@
Checking Blood Pressure..
- Mesure de la tension ...
- Проверка артериального давления ...
+ Mesure de la tension...
+ Проверка артериального давления...
Comprobando presión arterial...
Sprawdzanie ciśnienia krwi...
Blutdruck kontrollieren...
Vérnyomás megmérése...
Controllando la pressione sanguigna..
Aferindo Pressão Arterial...
- Kontroluji krevní tlak ...
+ Měřím krevní tlak...
%1 checked Blood Pressure: %2
@@ -1402,7 +1452,7 @@
%1 sprawdził ciśnienie krwi: %2
%1 verificada la presión arterial: %2
%1 ellenőrizte a vérnyomást: %2
- %1 zkontrolován krevní tlak: %2
+ %1 zkontroloval krevní tlak: %2
%1 verificou pressão arterial: %2
@@ -1427,7 +1477,7 @@
Wyczuwasz ciśnienie krwi o wartości %2/%3
Der Blutdruck liegt bei %2/%3
A Pressão Arterial é de %2/%3
- Našel jsi krevní tlak u %2/%3
+ Naměřil si krevní tlak u %2/%3
You find a low blood pressure
@@ -1439,7 +1489,7 @@
A vérnyomás alacsony
La pressione sanguigna è bassa
Pressão Arterial baixa
- Naměřil jsi nízký krevní tlak
+ Naměřil si nízký krevní tlak
You find a normal blood pressure
@@ -1451,7 +1501,7 @@
A vérnyomás normális
La pressione sanguigna è normale
Pressão Arterial normal
- Naměřil jsi normální krevní tlak
+ Naměřil si normální krevní tlak
You find a high blood pressure
@@ -1463,7 +1513,7 @@
A vérnyomás magas
La pressione sanguigna è alta
Pressão Arterial Alta
- Naměřil jsi vysoký krevní tlak
+ Naměřil si vysoký krevní tlak
You find no blood pressure
@@ -1475,7 +1525,7 @@
Nem észlelhető vérnyomás
La pressione sanguigna è assente
Sem Pressão Arterial
- Nenaměřil jsi žádný krevní tlak
+ Nenaměřil si žádný krevní tlak
You fail to find a blood pressure
@@ -1487,12 +1537,12 @@
Nem sikerült a vérnyomás megmérése
Manca strumento per misurare pressione sanguigna
Você falhou em aferir a Pressão Arterial
- Nedokázal jsi změřit krevní tlak
+ Nedokázal si změřit krevní tlak
Low
Niedrig
- Basso
+ Bassa
Низкое
Faible
Niskie
@@ -1516,7 +1566,7 @@
High
Hoch
- Alto
+ Alta
Высокое
Haute
Wysokie
@@ -1547,19 +1597,19 @@
Pulzus
Polso
Pulso
- Tep
+ Puls
- Checking Heart Rate ...
- Vérification du rythme cardiaque ...
- Проверка пульса ...
- Comprobando ritmo cardíaco ...
- Sprawdzanie tętna ...
- Kontrolliere Herzfrequenz ...
+ Checking Heart Rate...
+ Vérification du rythme cardiaque...
+ Проверка пульса...
+ Comprobando ritmo cardíaco...
+ Sprawdzanie tętna...
+ Kontrolliere Herzfrequenz...
Szívverés-szám mérése...
- Controllando il battito cardiaco ...
- Aferindo Pulso ...
- Kontroluji srdeční tep ...
+ Controllando il battito cardiaco...
+ Aferindo Pulso...
+ Kontroluji srdeční tep...
You checked %1
@@ -1571,7 +1621,7 @@
A %1 ellenőrizve
Hai diagnosticato %1
Você aferiu o paciente %1
- Zkontroloval jsi %1
+ Zkontroloval si %1
%1 checked Heart Rate: %2
@@ -1595,6 +1645,7 @@
Nada
Aucun
Nincs
+ Niente
Weak
@@ -1654,7 +1705,7 @@
A szívverés-szám alacsony
Hai riscontrato un debole battito cardiaco
Freqüência Cardíaca baixa
- Nahmatal jsi slabý srdeční tep
+ Nahmatal si slabý srdeční puls
You find a strong Heart Rate
@@ -1666,7 +1717,7 @@
A szívverés-szám magas
Hai riscontrato un forte battito cardiaco
Freqüência Cardíaca normal
- Nahmatal jsi silný srdeční tep
+ Nahmatal si silný srdeční puls
You find a normal Heart Rate
@@ -1678,7 +1729,7 @@
A szívverés-szám normális
Hai riscontrato un normale battito cardiaco
Freqüência Cardíaca alta
- Nahmatal jsi normální srdeční tep
+ Nahmatal si normální srdeční puls
You find no Heart Rate
@@ -1690,7 +1741,7 @@
Nem észlelhető szívverés
Hai riscontrato una assenza di battito cardiaco
Sem Freqüência Cardíaca
- Nenašel jsi
+ Žádný puls
Response
@@ -1713,7 +1764,7 @@
Du prüfst ob der Patient ansprechbar ist
Ellenőrzöd a páciens reagálóképességét
Controlli la risposta del paziente
- Aferindo se o paciente tem reação...
+ Aferindo se o paciente tem reação
Zkontroloval jsi reakci pacienta
@@ -1754,7 +1805,7 @@
Patient %1<br/>is %2.<br/>%3.<br/>%4
- Paziente %1<br/>è %2.<br/>%3.<br/>%4
+ Il paziente %1<br/>è %2.<br/>%3.<br/>%4
Пациент %1<br/>%2.<br/>%3.<br/>%4
Patient %1<br/>ist %2.<br/>%3.<br/>%4
Patient %1<br/>est %2.<br/>%3.<br/>
@@ -1766,7 +1817,7 @@
alive
- Vivo
+ vivo
жив
lebendig
vivant
@@ -1778,7 +1829,7 @@
dead
- Morto
+ morto
мёртв
muerto
tot
@@ -1790,7 +1841,7 @@
He's lost some blood
- Ha perso sangue
+ Ha perso poco sangue
Ha perdido un poco de sangre
Есть кровопотеря
Er hat etwas Blut verloren
@@ -1826,7 +1877,7 @@
He is in pain
- è affetto da dolore
+ Sente dolori
Испытывает боль
Er hat Schmerzen
Il souffre
@@ -1838,7 +1889,7 @@
He is not in pain
- Non è affetto da dolore
+ Non sente dolori
Не испытывает боли
Er hat keine Schmerzen
Il ne souffre pas
@@ -1905,7 +1956,7 @@
Szycie
Összevarrás
Suturando
- Suturando...
+ Suturando
Šití
@@ -2041,16 +2092,16 @@
Umístni tělo do pytle na mrtvoly
- Placing body in bodybag
- Colocando cuerpo en bolsa para cadáveres
- Упаковка тела ...
- Körper wird in Leichensack gepackt
- Pakowanie ciała do worka na zwłoki ...
- Placement du corps dans la housse
- Test hullazsákba helyezése ...
- Stai mettendo il corpo nella sacca
+ Placing body in bodybag...
+ Colocando cuerpo en bolsa para cadáveres...
+ Упаковка тела...
+ Körper wird in Leichensack gepackt...
+ Pakowanie ciała do worka na zwłoki...
+ Placement du corps dans la housse...
+ Test hullazsákba helyezése...
+ Stai mettendo il corpo nella sacca...
Colocando corpo dentro do saco para cadáver...
- Umístňuji tělo do pytle na mrtvoly
+ Umístňuji tělo do pytle na mrtvoly...
%1 has bandaged patient
@@ -2064,6 +2115,17 @@
%1 aplicou bandagem no paciente
%1 již obvázal pacienta
+
+ %1 performed CPR
+ %1 wykonał cykl RKO
+ %1 provádí CPR
+ %1 hat eine HLW durchgeführt
+ %1 ha eseguito CPR
+ %1 realizou RCP
+ %1 провел сердечно-легочную реанимацию
+ %1 realicó RCP
+ %1 à fait une RPC
+
%1 used %2
%1 usó %2
@@ -2084,7 +2146,7 @@
%1 podał IV
%1 a administré une IV
%1 infúziót adott
- %1 ha somministrato una IV
+ %1 ha somministrato una EV
%1 aplicou um intravenoso
%1 již aplikoval IV
@@ -2092,7 +2154,7 @@
%1 applied a tourniquet
%1 aplicado torniquete
%1 наложил жгут
- %1 hat einen Tourniquet angelegt
+ %1 hat ein Tourniquet angelegt
%1 założył stazę
%1 a appliqué un garrot
%1 felhelyezett egy érszorítót
@@ -2100,15 +2162,6 @@
%1 aplicou um torniquete
%1 použil škrtidlo
-
- %1 performed CPR
- %1 hat eine HLW durchgeführt
- %1 wykonał cykl RKO
- %1 провел сердечно-легочную реанимацию
- %1 realicó RCP
- %1 realizou RCP
- %1 provádí CPR
-
%1 used Personal Aid Kit
%1 hat das eigene Erste-Hilfe-Set verwendet
@@ -2116,6 +2169,9 @@
%1 utilizou KPS
%1 používá PAK
%1 использовал аптечку
+ %1 ha usato Kit Pronto Soccorso Personale
+ %1 usó Kit de Primeros Auxilios
+ %1 à utilisé un PAK
Heavily wounded
@@ -2126,7 +2182,7 @@
Gravemente herido
Lourdement blessé
Erősen sérült
- Těžce zraněn
+ Těžce raněn
Gravemente ferido
@@ -2138,7 +2194,7 @@
Levemente herido
Légèrement blessé
Enyhén sérült
- Lehce zraněn
+ Lehce raněn
Levemente ferido
@@ -2150,7 +2206,7 @@
Muy levemente herido
Très légèrement blessé
Nagyon enyhén sérült
- Velmi lehce zraněn
+ Velmi lehce raněn
Muito levemente ferido
@@ -2232,6 +2288,9 @@
Исцелять полностью перебинтованные части тела
Curar hitpoints totalmente enfaixados
Heal fully bandaged hitpoints
+ Cura hitpoints completamente bendati
+ Soigner les plaies entièrement bandées.
+ Heilt vollständig bandagierte Trefferpunkte
Pain is only temporarily suppressed
@@ -2243,6 +2302,7 @@
La douleur est seulement supprimée temporairement
A fájdalom csak ideiglenesen csökken
Боль приглушается только временно
+ Dolore è soppresso solo temporaneamente
Pain Effect Type
@@ -2302,7 +2362,7 @@
Selecione o tipo de menu que você prefere; padrão seleções 3d ou radial.
Válaszd ki a neked megfelelő menüt: Alapértelmezett 3D válogatás, vagy kerek.
Zvolte typ menu: základní 3D výběr nebo kruhový
- Seleziona il tipo di menù che preferisci: selezione 3d predefinita o radiale.
+ Seleziona il tipo di menù che preferisci: selezione (3D), radiale o disabilitata.
Selections (3d)
@@ -2629,7 +2689,7 @@
Střelné poranění
- Smal Velocity Wound
+ Small Velocity Wound
Kleines Ballistisches Trauma
Lenta Velocità Ferita
Малая огнестрельная рана
@@ -2725,28 +2785,28 @@
Zlomená stehenní kost
- Treating ...
- Behandeln ...
- Ellátás ...
- Opatrywanie ran ...
- Traitement ...
- Лечение ...
- Tratando ...
+ Treating...
+ Behandeln...
+ Ellátás...
+ Opatrywanie ran...
+ Traitement...
+ Лечение...
+ Tratando...
Tratando...
- Ošetřuji ...
- Curando ...
+ Ošetřuji...
+ Curando...
- Removing Tourniquet ...
- Tourniquet entfernen ...
- Zdejmowanie stazy ...
- Quitando torniquete ...
- Retire le tourniquet ...
+ Removing Tourniquet...
+ Tourniquet entfernen...
+ Zdejmowanie stazy...
+ Quitando torniquete...
+ Retire le garrot...
Removendo torniquete...
- Érszorító eltávolítása ...
- Sundavám škrtidlo ...
- Снятие жгута ...
- Togliendo il laccio emostatico ...
+ Érszorító eltávolítása...
+ Sundavám škrtidlo...
+ Снятие жгута...
+ Togliendo il laccio emostatico...
ACE Medical
@@ -2758,6 +2818,7 @@
ACE Médico
ACE Médical
ACE Orvosi Rendszer
+ ACE Medical
Medical Settings [ACE]
@@ -2769,6 +2830,7 @@
Ajustes médicos [ACE]
Option médicale [ACE]
Orvosi beállítások [ACE]
+ Impostazioni Mediche [ACE]
Medical Level
@@ -2780,6 +2842,7 @@
Nível médico
Niveau de simulation médicale
Orvosi szint
+ Livello Medico
What is the medical simulation level?
@@ -2791,6 +2854,7 @@
Qual o nível de simulação médica?
Quel niveau de simulation médicale choisissez vous?
Milyen komplex legyen az orvosi szimuláció?
+ Qual'è il livello di simulazione medica?
Basic
@@ -2802,6 +2866,7 @@
Básica
Basique
Alap
+ Basico
Advanced
@@ -2813,6 +2878,7 @@
Avançada
Avancée
Fejlett
+ Avanzato
Medics setting
@@ -2824,6 +2890,7 @@
Configuração médica
Paramètre des infirmiers
Orvosok beállítása
+ Parametri Medici
What is the level of detail prefered for medics?
@@ -2835,14 +2902,25 @@
Qual o nível de detalhe preferido para os médicos?
Quel niveau de détail voullez vous pour les infirmier?
Mi a javasolt részletesség orvosok számára?
+ Qual'è il livello di dettagli preferito per i medici?
Locations boost training
Místa pro vylepšení zkušeností
+ Località aumentano addestramento
+ Örtliche Trainingssteigerung
+ Ubicación mejora entrenamiento.
+ Miejsca zwiększają wyszkolenie
+ Localização melhora treinamento
Boost medic rating in medical vehicles or near medical facilities [untrained becomes medic, medic becomes doctor]
Zlepšit zkušenosti zdravotníka v medickém vozidle nebo poblíž zdravotního zařízení [nezkušení se stane zdravotníkem, zdravotník se stane doktorem]
+ Aumenta il rating medico in veicoli medici o vicino strutture mediche [non addestrato diventa medico, medico diventa dottore]
+ Steigert die medizinische Einstufung eines Soldaten in Sanitätsfarhzeugen oder in der Nähe von Sanitätseinrichtungen [untrainiert wird zu Sanitäter, Sanitäter zu Doktor]
+ Mejora el entrenamiento médico dentro de vehículos médicos o cerca de instalaciones médicas (no entrenados se convierten en médicos, médicos se convierten en doctores)
+ Zwiększa poziom wyszkolenia medyków wewnątrz pojazdów medycznych lub w pobliżu budynków medycznych [niedoświadczony zostaje medykiem, medyk zostaje doktorem]
+ Aumenta a classificação do médico dentro de veículos médicos ou perto de instalações médicas [sem treinamento vira médico, médico vira doutor]
Disable medics
@@ -2854,6 +2932,7 @@
Desativar médicos
Désactiver les infirmiers
Orvosok letiltása
+ Disabilita medici
Enable Litter
@@ -2865,6 +2944,7 @@
Ativar lixo médico
Activer les détritus
Szemét engedélyezése
+ Abilita Barella
Enable litter being created upon treatment
@@ -2876,6 +2956,7 @@
Ativar lixo ser criado após tratamento
Activer la création de détrimus au début des traitements
Engedélyezi a szemét keletkezését ellátáskor
+ Abilita la creazione della barella dopo trattamento
Life time of litter objects
@@ -2887,6 +2968,7 @@
Tempo de vida dos objetos do lixo
Durée d'affichage des détritus
Szemétobjektumok élettartama
+ Tempo di vita delle barelle
How long should litter objects stay? In seconds. -1 is forever.
@@ -2898,6 +2980,7 @@
Quanto tempo os objetos do lixo devem ficar? Em segundos. -1 é para sempre.
Combien de temps doivent rester affiché les détritus? En secondes. -1 pour tout le temps
Milyen sokáig legyenek jelen a szemétobjektumok (másodpercben)? A -1 végtelen időt jelent.
+ Per quanto devono restare le barelle? In secondi. -1 è permanente
Enable Screams
@@ -2909,6 +2992,7 @@
Ativar gritos
Activer les hurlements
Kiáltások engedélyezése
+ Abilita Grida
Enable screaming by injuried units
@@ -2920,6 +3004,7 @@
Ativa gritos para unidades feridas
Active les hurlements d'unités blessées
Engedélyezi a sérült egységek kiáltásait
+ Abilita Grida da parte delle unità ferite
Player Damage
@@ -2931,6 +3016,7 @@
Dano do jogador
Dégats des joueurs
Játékos sérülés
+ Danno Giocatore
What is the damage a player can take before being killed?
@@ -2942,6 +3028,7 @@
Qal é o dano que um jogador pode sofrer antes de morrer?
Quels dégats peut subir un joueur avant d'être tué
Mennyi sérülést szenvedhet el egy játékos, mielőtt meghal?
+ Quanto è il danno che un giocatore può sostenere prima di essere ucciso?
AI Damage
@@ -2953,6 +3040,7 @@
Dano da IA
Dégats des IA
AI sérülés
+ Danno AI
What is the damage an AI can take before being killed?
@@ -2964,6 +3052,7 @@
Qual é o dano que uma IA pode sofrer antes de morrer?
Quels dégats peut subir une IA avant d'être tuée
Mennyi sérülést szenvedhet el egy AI, mielőtt meghal?
+ Quanto è il danno che un'IA può sostenere prima di essere uccisa?
AI Unconsciousness
@@ -2975,6 +3064,7 @@
Inconsciência da IA
Inconscience des IA
AI eszméletlenség
+ Incoscienza IA
Allow AI to go unconscious
@@ -2984,8 +3074,9 @@
KI kann bewusstlos werden
Umožňuje AI upadnout do bezvědomí
Permite IA ficar inconsciente
- Autoriser les IA à tomber inconsciente
+ Autoriser les IA à tomber inconscients
Engedélyezi az AI eszméletének elvesztését
+ Permetti alle IA di diventare incoscienti
Remote Controlled AI
@@ -2997,10 +3088,11 @@
Contrôle à distance des IA
Távvezérelt AI
Зевса считать ботом
+ IA Controllate in Remoto
Treat remote controlled units as AI not players?
- Behandle ferngesteuerte Einheiten als KI und nicht als Spieler?
+ Legt fest, ob ferngesteuerte Einheiten als KI anstatt als Spieler behandelt werden sollen.
¿Tratar unidades remotamente controladas como IA?
Tratar unidades remotamente controladas como IA?
Traktuj jednostki zdalnie sterowane (przez Zeusa) jako AI, nie jako graczy?
@@ -3008,17 +3100,19 @@
Soigner les unitées controlées à distance comme des IA et non comme des joueurs?
Távvezérelt egységek AI-ként, nem játékosként való kezelése?
Обрабатывать дистанционно управляемых юнитов как ботов, а не как игроков?
+ Considera le unità controllate in remoto come IA e non come giocatori?
Prevent instant death
Откл. мгновенную смерть
- Wył. natychmiast. śmierć
+ Wyłącz natychmiastową śmierć
Prevenir muerte instantánea
Verhindere direkten Tod
Zabránit okamžité smrti
Previnir morte instantânea
- Empêcher la morte instantanée
+ Empêcher la mort instantanée
Azonnali halál kiiktatása
+ Previeni morte istantanea
Have a unit move to unconscious instead of death
@@ -3030,6 +3124,7 @@
Fazer a unidade ficar inconsciente invés de morrer
Forcer l'inconscience au lieu de la mort instantanée
Egy egység kerüljön eszméletlen állapotba a halott helyett
+ Imposta un'unità come incosciente invece di morta
Bleeding coefficient
@@ -3041,6 +3136,7 @@
Coeficiente de sangramento
Coefficient de saignement
Vérzési koefficiens
+ Coefficiente sanguinamento
Coefficient to modify the bleeding speed
@@ -3052,6 +3148,7 @@
Coeficiente para modificar a velocidade do sangramento
Coefficient modifiant la vitesse de saignement
Egy szorzó a vérzés sebességének szabályozására
+ Coefficiente che modifica la velocità di sanguinamento
Pain coefficient
@@ -3063,17 +3160,19 @@
Coeficiente de dor
Coefficient de douleur
Fájdalmi koefficiens
+ Coefficiente dolore
Coefficient to modify the pain intensity
Коэффициент, изменяющий уровень боли
Mnożnik modyfikujący intensywność bólu
Coeficiente para modificar la intensidad del dolor
- Multiplikator um den Schmerzintensität zu verändern
+ Multiplikator um die Schmerzintensität zu verändern
Koeficient intenzity bolesti
Coeficiente para modificar a instensidade de dor
Coefficient modifiant l'intensité de la douleur
Egy szorzó a fájdalom erősségének szabályozására
+ Coefficiente che modifica l'intensità del dolore
Sync status
@@ -3085,6 +3184,7 @@
Sincronizar estado
Status de la synchronisation
Szinkronizációs állapot
+ Sincronizza stato
Keep unit status synced. Recommended on.
@@ -3096,6 +3196,7 @@
Mater o estado da unidade sincronizado. Recomendado ativado.
Garder l'unité synchronisée, Recommandé sur oui.
Egységállapotok szinkronizálása. Javasolt a bekapcsolása.
+ Mantieni lo stato delle unità sincronizzato. Consigliato attivo.
Provides a medical system for both players and AI.
@@ -3107,6 +3208,17 @@
Proporciona o sistema médico para os jogadores e a IA.
Fourni un système médical pour les joueurs tout comme pour les IA.
Egy orvosi rendszert ad játékosok és AI-k számára.
+ Fornisce un sistema medico sia per giocatori che IA.
+
+
+ Basic Medical Settings [ACE]
+ Standard Sanitätseinstellungen [ACE]
+ Podstawowe ustawienia medyczne
+ Ajustes médicos básicos [ACE]
+ Réglages du système médical basic [ACE]
+ Impostazioni Mediche Di Base [ACE]
+ Základní zdravotnické nastavení [ACE]
+ Ajustes médicos básicos [ACE]
Advanced Medical Settings [ACE]
@@ -3118,6 +3230,7 @@
Ajustes médicos avançados [ACE]
Paramètres des soins avancés
Fejlett orvosi beállítások [ACE]
+ Impostazioni Mediche Avanzate [ACE]
Enabled for
@@ -3128,7 +3241,8 @@
Povoleno pro
Habilitado para
Activer pour
- Engedélyezve...
+ Engedélyezve
+ Abilitato per
Select what units the advanced medical system will be enabled for
@@ -3140,6 +3254,7 @@
Selecione quais unidades o sistema médico avançado será habilitado
Sélectionne pour quelle unité le système de soin avancé est activé
Kiválasztható, mely egységek számára legyen engedélyezve a fejlett orvosi rendszer
+ Seleziona per quali unità verrà abilitato i sistema medico avanzato
Players only
@@ -3151,28 +3266,31 @@
Somente jogadores
Joueur uniquement
Csak játékosok
+ Solo giocatori
Players and AI
Игроков и ботов
Gracze oraz AI
- Jugadors e IA
+ Jugadores e IA
Spieler und KI
Hráči a AI
Jogadores e IA
Joueur et IA
Játékosok és AI
+ Giocatori ed IA
Enable Advanced wounds
Усложненные раны
- Akt. zaawansowane rany
+ Aktywuj zaawansowane rany
Activa heridas avanzadas
Aktiviere erweiterte Wunden
Povolit pokročilé zranění
Ativar ferimentos avançados
Activer les blessures avancées
Komplex sebek engedélyezése
+ Abilita ferite Avanzate
Allow reopening of bandaged wounds?
@@ -3184,6 +3302,7 @@
Permitr reabertura de ferimentos enfaixados?
Permettre la réouverture des bandages
Visszanyílhatnak a bekötözött sebek?
+ Permetti la riapertura di ferite bendate?
Vehicle Crashes
@@ -3195,6 +3314,7 @@
Batidas de veículos
Accident en véhicule
Járműbalesetek
+ Schianto Veicoli
Do units take damage from a vehicle crash?
@@ -3206,17 +3326,39 @@
As unidades recebem dano de uma batida de veículo?
Les unités subissent des dégats lors d'accident
Sérülnek-e az egységek autós ütközés során?
+ Le unità sostengono danni da incidenti con veicoli?
+
+
+ Allow Epinephrine
+ Erlaube Epiniphrin
+ Permitir Epinefrina
+ Ograniczenia adrenaliny
+ Autoriser l'adrénaline
+ Permette epinefrina
+ Povolit adrenalin
+ Permitir Epinefrina
+
+
+ Who can use Epinephrine for full heal? (Basic medical only)
+ Wer darf Epiniphrin zur vollständigen Heilung benutzen? (Standard Sanitätseinstellungen)
+ Configura quienes pueden usar Epinefrina (Solo sistema médico básico)
+ Kto może skorzystać z adrenaliny w celu pełnego uleczenia? (Tylko podstawowy system medyczny)
+ Qui peut utiliser l'adrénaline pour les soins complets ? (Médical basique seulement)
+ Chi può usare l'epinefrina per la cura completa? (solo per sistema medico di base)
+ Kdo může použít adrenalin k úplnému vyléčení? (Pouze základní zdravotní systém)
+ Quem pode usar Epinefrina para cura completa? (Somente sistema médico básico)
Allow PAK
Использование аптечки
- Ust. apteczek osobistych
+ Ustawienie apteczek osobistych
Permitir EPA
Erlaube Erste-Hilfe-Set
- Povolit osobní lékárničky
+ Povolit osobní lékárničky (PAK)
Permitir Kit de Primeiros Socorros
Permettre le kit de premier secours
Elsősegélycsomag engedélyezése
+ Consenti Kit di Pronto Soccorso
Who can use the PAK for full heal?
@@ -3228,6 +3370,7 @@
Quem pode usar o KPS para cura completa?
Qui peut utilier les kit de premier secours pour soigner
Ki használhatja az elsősegélycsomagot teljes gyógyításra?
+ Chi può usare il KPS per cura completa?
Anyone
@@ -3239,6 +3382,7 @@
Qualquer um
Tout le monde
Akárki
+ Chiunque
Medics only
@@ -3250,6 +3394,7 @@
Somente médicos
Infirmier uniquement
Csak orvosok
+ Solo medici
Doctors only
@@ -3261,17 +3406,19 @@
Somente doutores
Médecin uniquement
Csak doktorok
+ Solo dottori
Remove PAK on use
Удалять аптечки после использования
Usuń apteczkę po użyciu
Eliminar EPA después del uso
- Entferne Erste-Hilfe-Set bei Verwendung
+ Entf. Erste-Hilfe-Set bei Verwendung
Odebrat osobní lékárničku po použití
Remover o KPS depois do uso
Enlever le KPS à l'utilisation
Elsősegélycsomag eltávolítása használatkor
+ Rimuovi Kit Pronto Soccorso dopo l'uso
Should PAK be removed on usage?
@@ -3283,17 +3430,39 @@
Deve o KPS ser removido depois do uso?
Le Kit de Premier Secours doit il être enlevé à l'utilisation?
Eltávolítódjon az elsősegélycsomag használatkor?
+ Il Kit Pronto Soccorso dev'essere rimosso dopo l'utilizzo?
+
+
+ Locations Epinephrine
+ Orte für Epiniphrin
+ Ubicaciones epinefrina
+ Ograniczenia adrenaliny
+ Position des adrénalines
+ Ubicazione epinefrina
+ Oblast k použití adrenalinu
+ Localizações de Epinefrina
+
+
+ Where can the Epinephrine be used? (Basic Medical)
+ Wo kann Epiniphrin verwendet werden? (Standard Sanitätseinstellungen)
+ Configura donde puede usarse Epinefrina (Solo sistema médico básico)
+ Gdzie można korzystać z adrenaliny? (Podstawowy system medyczny)
+ Où peuvent être utilisées les adrénalines ? (Médical basique)
+ Dove si può usare l'epinefrina? (Sistema medico di base)
+ Kde může být použit adrenalin? (Pouze základní zdravotní systém)
+ Onde pode-se usar a Epinefrina? (Somente sistema médico básico)
Locations PAK
Место использования аптечки
- Ogr. apteczek osobistych
- Ubicacions del EPA
+ Ograniczenie apteczek osobistych
+ Ubicaciones del EPA
Orte für Erste-Hilfe-Set
- Lokace osobní lékárničky
+ Oblast k použití PAK
Localizações do KPS
Lieu d'utilisation du KPS
Elsősegélycsomag helyek
+ Locazioni Kit Pronto Soccorso
Where can the PAK be used?
@@ -3301,32 +3470,35 @@
Gdzie można korzystać z apteczek osobistych?
¿Dónde se puede utilizar el equipo de primeros auxilios?
Wo kann das Erste-Hilfe-Set verwendet werden?
- Kde může být použita osobní lékárnička?
+ Kde může být použita osobní lékárnička (PAK)?
Onde o kit de primeiros socorros pode ser utilizado?
Où le Kit de Premier Secour peut être utilisé
Hol lehet az elsősegélycsomagot használni?
+ Dove può essere usato il Kit Pronto Soccorso?
Condition PAK
- Voraussetzungen für das Erste-Hilfe-Set
- Podmínka osobní lékárničky
+ Bedingungen für d. Erste-Hilfe-Set
+ Podmínky pro použití osobní lékárničky
Condición EPA
Condition d'utilisation du KPS
Warunek apteczek
Elsősegélycsomag állapot
Condição do KPS
Условие использования аптечки
+ Condizioni Kit Pronto Soccorso
When can the PAK be used?
Wann kann das Erste-Hilfe-Set verwendet werden?
- Kde může být použita osobní lékárnička?
+ Kdy může být použita osobní lékárnička?
¿Cuando se puede utilizar el Equipo de primeros auxilios?
Quand peut être utilisé le Kit de Premier Secours
Po spełnieniu jakich warunków apteczka osobista może zostać zastosowana na pacjencie?
Mikor lehet az elsősegélycsomagot használni?
Onde o kit de primeiros socorros pode ser utilizado?
Когда может использоваться аптечка?
+ Quando può essere usato il Kit Pronto Soccorso?
Anywhere
@@ -3334,10 +3506,11 @@
Wszędzie
Donde sea
Überall
- Kdekoli
+ Kdekoliv
Qualquer lugar
PArtout
Akárhol
+ Ovunque
Medical vehicles
@@ -3349,6 +3522,7 @@
Veículos médcos
Dans les véhicules médicals
Orvosi járművek
+ Veicoli medici
Medical facility
@@ -3360,6 +3534,7 @@
Instalação médica
Dans les installations médicales
Orvosi létesítmény
+ Strutture mediche
Vehicles & facility
@@ -3371,17 +3546,19 @@
Veículos e instalações
Dans les véhicules et les installations médicals
Járművek & létesítmény
+ Veicoli e Strutture
Allow Surgical Kit (Adv)
Хирургический набор может использоваться (усл.)
- Ust. zestawu chirurg.
+ Ustawienia zestawu chirurgicznego
Permitir equipo quirúrgico (Avanzado)
Erlaube Operationskasten
Povolit chirurgickou soupravu (Pokr.)
Permite kit cirúrgico (avançado)
Permettre les kit de chirurgie (Avancé)
Sebészkészlet (Fejlett) engedélyezése
+ Permetti Kit Chirurgico (Avanzato)
Who can use the Surgical Kit?
@@ -3393,17 +3570,19 @@
Quem pode usar o kit cirúrgico?
Qui peut utiliser les kit de chirurgie
Ki használhatja a sebészkészletet?
+ Chi può usare il Kit Chirurgico?
Remove Surgical Kit (Adv)
Удалять хирургический набор (усл.)
- Usuń zest. chir. po użyciu
+ Usuń zestaw chirurgiczny po użyciu
Eliminar equipo quirúrgico (Avanzado)
Entferne Operationskasten (erweitert)
Odebrat chirurgickou soupravu (Pokr.)
Remover kit cirúrgico (avançado)
Supprimer les kit de chirurgie (Avancé)
Sebészkészlet (Fejlett) eltávolítása
+ Rimuovi Kit Chirurgico (Avanzato)
Should Surgical kit be removed on usage?
@@ -3415,17 +3594,19 @@
Deve o kit cirúrgico ser removido após o uso?
Le kit de chirurgie doit il être supprimé à l'utilisation
Eltávolítódjon a sebészkészlet használatkor?
+ Il Kit Chirurgico dev'essere rimosso dopo l'uso?
Locations Surgical Kit (Adv)
Место использования хирургического набора (усл.)
- Ogr. zestawu chirurg.
+ Ograniczenie zestawu chirurgicznego
Ubicaciones del equipo quirúrgico (Avanzado)
Orte für Operationskästen (erweitert)
Lokace chirurgické soupravy (Pokr.)
Localizações do kit cirúrgico (avançado)
Lieu d'utilisation du kit de chirurgie
Sebészkészlet (Fejlett) helyei
+ Località Kit Chirurgico (Avanzato)
Where can the Surgical Kit be used?
@@ -3437,17 +3618,19 @@
Onde o kit cirúrgico pode ser utilizado?
Où peut être utilisé les kit de chirurgie
Hol lehet a sebészkészletet használni?
+ Dove può essere usato il Kit Chirurgico?
Condition Surgical Kit (Adv)
- Voraussetzungen für den Operationskasten (erweitert)
+ Beding. für d. Operationskasten (erw.)
Podmínka chirurgické soupravy (Pokr.)
Condición de equipo quirúrgico (Av)
Conditions d'utilisation du kit de chirurgie
- Warunek zestawu chir.
+ Warunek zestawu chirurgicznego
Sebészkészlet állapot
Condição do Kit Cirúrgico (Avançado)
Условие использования хирургического набора (усл.)
+ Condizioni Kit Chirurgico (Avanzato)
When can the Surgical Kit be used?
@@ -3459,6 +3642,7 @@
Mikor lehet a sebészkészletet használni?
Onde o kit cirúrgico pode ser utilizado?
Когда может использоваться хирургический набор?
+ Quando può essere usato il Kit Chirurgico?
Heal hitpoints
@@ -3468,6 +3652,8 @@
Исцелять части тела
Curar hitpoints
Léčit hitponty
+ Cura Hitpoints
+ Soigner les dommages
Heal fully bandaged hitpoints
@@ -3477,6 +3663,8 @@
Исцелять полностью перебинтованные части тела
Curar totalmente hitpoints enfaixados
Heal fully bandaged hitpoints
+ Cura Hitpoints completamente bendati
+ Soigner les plaies entièrement bandées.
Pain suppression
@@ -3488,6 +3676,7 @@
Suppression de la douleur
Fájdalomcsillapítás
Приглушение боли
+ Soppressione dolore
Pain is only temporarily suppressed, not removed
@@ -3499,17 +3688,28 @@
La douleur est temporairement supprimée, pas enlevée
A fájdalom csak ideiglenesen csökken, nem távolítódik el
Боль приглушается только временно
+ Dolore è solo temporaneamente soppresso, non rimosso
+
+
+ Configure the treatment settings from ACE Basic Medical
+ Behandlungseinstellungen der Standard ACE-Medizin konfigurieren
+ Configure las opciones de tratamiento del sistema médico básico de ACE
+ Skonfiguruj ustawienia leczenia podstawowego systemu medycznego ACE
+ Configure les réglages de traitement dans ACE médical basique
+ Configura le impostazioni trattamenti per ACE Medical di base
+ Configura as opções de tratamento do sistema médico básico do ACE
- Configure the treatment settings from ACE Medical
+ Configure the treatment settings from ACE Advanced Medical
Настройка лечения в медицинской системе ACE
Skonfiguruj zaawansowane ustawienia leczenia systemu medycznego ACE
- Configure las opciones de tratamiento del ACE Médico
+ Configure las opciones de tratamiento del sistema médico avanzado de ACE
Behandlungseinstellungen vom ACE-Medizin konfigurieren
Konfigurace nastavení léčby ze zdravotnické systému ACE
Configure as opções de tratamento do ACE Médico
Configure les paramètres de traitement du système de soin ACE
Kezelési lehetőségek konfigurálása az ACE Orvosi rendszerből
+ Configura le impostazioni trattamenti per ACE Medical
Revive Settings [ACE]
@@ -3521,6 +3721,7 @@
Sistema de reavivamento [ACE]
Paramètre du revive [ACE]
Újraélesztés beállításai [ACE]
+ Impostazioni Revive [ACE]
Enable Revive
@@ -3532,6 +3733,7 @@
Habilitar reavivamento
Activer le revive
Újraélesztés engedélyezése
+ Abilita Revive
Enable a basic revive system
@@ -3543,17 +3745,19 @@
Habilitar um sistema básico de reavivamento
Active un sytème de revive basique
Egy alap újraélesztési rendszer engedélyezése
+ Abilita un sistema revive basico
Max Revive time
Макс. время реанимации
- Maks. czas agonii
+ Maksymalny czas agonii
Tiempo máximo de resucitado
Maximale Wiederbelebungszeit
Maximální čas pro oživení
Tempo máximo de reavivamento
Temps maximum pour le revive
Maximum újraélesztési idő
+ Tempo massimo Revive
Max amount of seconds a unit can spend in revive state
@@ -3565,6 +3769,7 @@
Quantidade máxima de segundos que uma unidade pode gastar em um estado de reavivamento
Nombre de seconde maximum qu'une unité peut être en attente d'un revive
Maximum másodperc, amit egy egység újraélesztési állapotban tölthet
+ Numero massimo di secondi che un'unità può spendere in stato revive
Max Revive lives
@@ -3576,6 +3781,7 @@
Vidas máximas do reavivado
Nombre maximum de revive
Maximum újraélesztési lehetőségek
+ Numero massimo Revives
Max amount of lives a unit. 0 or -1 is disabled.
@@ -3587,6 +3793,7 @@
Quantidade máxima de vidas por unidade. 0 ou -1 é desativado.
Nombre de vie maximale d'une unité. 0 ou -1 désactive
Egy egység maximum "életei". 0 vagy -1 letiltja.
+ Numero massimo di vite di un'unità. 0 o -1 per disabilitare.
Provides a medical system for both players and AI.
@@ -3598,6 +3805,7 @@
Proporciona um sistema médico para jogadores e IA.
Fourni un sytème médical pour les joueurs et les IAs
Egy orvosi rendszert ad játékosok és AI-k számára.
+ Fornisce un sistema medico sia per giocatori che IA
Set Medic Class [ACE]
@@ -3609,6 +3817,7 @@
Definir classe médica [ACE]
Définir comme unité médicale [ACE]
Orvos beállítása [ACE]
+ Imposta Classe Medico [ACE]
List
@@ -3620,6 +3829,7 @@
Lista
Liste
Lista
+ Lista
List of unit names that will be classified as medic, separated by commas.
@@ -3631,6 +3841,7 @@
Lista dos nomes das unidades que se classificam como médicos, separados por vírgulas.
Liste d'unité qui seront listées comme infirmier, séparation par virgule
Azon egységek nevei, melyek orvosként vannak meghatározva, vesszővel elválasztva.
+ Lista di nomi unità che verranno classificati come medici, separati da virgole.
Is Medic
@@ -3642,6 +3853,7 @@
É médico
Est infirmier
Orvos-e
+ E' Medico
This module allows you to assign the medic class to selected units.
@@ -3653,6 +3865,7 @@
Ez a modul engedélyezi az orvosi jelző hozzárendelését kiválasztott egységekhez.
Этот модуль позволяет назначить класс медика выбранным юнитам.
Este módulo permite asignar la clase médico a las unidades seleccionadas.
+ Questo modulo ti permette di assegnare la classe Medico alle unità selezionate.
None
@@ -3664,6 +3877,7 @@
Nada
Aucun
Nincs
+ Nessuno
Regular medic
@@ -3675,6 +3889,7 @@
Médico regular
Infirmier standard
Hagyományos orvos
+ Medico Regolare
Doctor (Only Advanced Medics)
@@ -3686,6 +3901,19 @@
Doutor (Somente médicos avançados)
Médecin (traitements avancés uniquement)
Doktor (csak fejlett orvosok)
+ Dottore (Solo Medici Avanzati)
+
+
+ Doctor
+ Врач
+ Doktor
+ Doctor
+ Arzt
+ Doktor
+ Doutor
+ Médecin
+ Doktor
+ Dottore
Assigns the ACE medic class to a unit
@@ -3697,6 +3925,7 @@
Atribui a classe médica do ACE a uma unidade
Assigner la classe médicale à une unité
Az ACE orvosi jelző hozzárendelése egy egységhez
+ Assegna la classe medico ACE ad un'unità
Set Medical Vehicle [ACE]
@@ -3708,6 +3937,7 @@
Definir veículo médico [ACE]
Définir comme véhicule médical [ACE]
Orvosi jármű beállítása [ACE]
+ Imposta Veicolo Medico [ACE]
List
@@ -3719,6 +3949,7 @@
Lista
Liste
Lista
+ Lista
List of vehicles that will be classified as medical vehicle, separated by commas.
@@ -3730,17 +3961,19 @@
Lista de veículos que serão classificados como veículos médicos, separados por vírgulas.
Liste de véhicule classé comme véhicule médical, séparation par virgule.
Orvosi járműveknek tekintett járművek listája, vesszővel elválasztva.
+ Lista di veicoli che verranno classificati come veicoli medici, separati da virgole.
Is Medical Vehicle
Является медицинским транспортом
- Jest pojazdem med.
+ Jest pojazdem medycznym
Es vehículo médico
Ist medizinisches Fahrzeug
Zdravotnické vozidlo
É um veículo médico
Véhicule médical
Orvosi jármű-e
+ E' Veicolo Medico
Whatever or not the objects in the list will be a medical vehicle.
@@ -3752,6 +3985,7 @@
Se serão ou não os objetos dessa lista veículos médicos.
Quoi qu'il arrive les objets de la liste seront des véhicules médical
A listában lévő objektumok orvosi járművek-e, vagy sem.
+ Gli oggetti nella lista verranno considerati veicoli medici o meno.
Assigns the ACE medic class to a unit
@@ -3763,6 +3997,7 @@
Atribui a classe médica ACE a uma unidade
Assigne la classe médicale à une unité
Hozzárendeli az ACE orvosi jelzőt egy egységhez
+ Assegna la classe medico ACE ad un'unità
Set Medical Facility [ACE]
@@ -3774,17 +4009,19 @@
Definir instalação médica [ACE]
Définir comme équipement médical [ACE]
Orvosi létesítmény beállítása [ACE]
+ Imposta Struttura Medica [ACE]
Is Medical Facility
Является госпиталем
- Jest budynkiem med.
+ Jest budynkiem medycznym
Es centro médico
Ist eine medizinische Einrichtung
Zdravotnické zařízení
É uma instalação médica
Est un équipement médical
Orvosi létesítmény-e
+ E' Struttura Medica
Registers an object as a medical facility
@@ -3796,6 +4033,7 @@
Registra um objeto como instalacão médica
Enregistrer un objet comme un équipement médical
Egy objektum orvosi létesítményként való regisztrálása
+ Registra un oggetto come struttura medica
Defines an object as a medical facility. This allows for more advanced treatments. Can be used on buildings and vehicles.
@@ -3807,17 +4045,19 @@
Define um objeto como instalação médica. Isso permite tratamentos mais avançados. Pode ser utilizado em edifícios e veículos.
Définir un objet comme équipement médical. Cela permet les traitements avancés. Peut être utilisé sur les batiments et les véhicules
Egy objektumot orvosi létesítményként határoz meg. Ez fejlett ellátási lehetőségeket engedélyez. Használható járműveken és épületeken.
+ Definisce un oggetto come struttura medica. Questo permette cure più avanzate. Può essere usato su edifici e veicoli.
[ACE] Medical Supply Crate (Basic)
[ACE] Ящик с медикаментами (базовая медицина)
[ACE] Skrzynka z zapasami medycznymi (podstawowa)
[ACE] Caja de suministros médicos (Básica)
- [ACE] Sanitätskiste (standard)
+ [ACE] Sanitätskiste (Standard)
[ACE] Zdravotnické zásoby (základní)
[ACE] Caixa com suprimentos médicos
[ACE] Caisse médicale (basique)
[ACE] Orvosi láda (Alap)
+ [ACE] Cassa Rifornimenti Medici (Basico)
[ACE] Medical Supply Crate (Advanced)
@@ -3829,6 +4069,7 @@
[ACE] Caixa com suprimentos médicos (Avançados)
[ACE] Caisse médicale (avancée)
[ACE] Orvosi láda (Fejlett)
+ [ACE] Cassa Rifornimenti Medici (Avanzato)
Anytime
@@ -3840,6 +4081,7 @@
Akármikor
Sempre
В любое время
+ Sempre
Stable
@@ -3851,6 +4093,7 @@
Stabil
Estável
После стабилизации
+ Stabile
Medical
@@ -3872,6 +4115,8 @@
A distância de %1 está muito longe para tratamento
La distancia hasta %1 se ha agrandado demasiado para el tratamiento
%1 je příliš daleko, léčba není možná
+ Distanza da %1 è diventata troppo alta per permettere trattamento
+ %1 est trop loin pour être soigné
This person (%1) is awake and cannot be loaded
@@ -3881,15 +4126,54 @@
Боец (%1) в сознании и не может быть погружен
Esta pessoa (%1) está acordada e não pode ser carregada
Tato osoba (%1) je vzhůru a nemůže být naložena
+ Questa persona (%1) è sveglia e non può essere caricata.
+ Cette personne (%1) est consciente et ne peut être chargées.
There is no tourniquet on this body part!
- An diesem Körperteil befindet sich kein Tourniquet
+ An diesem Körperteil befindet sich kein Tourniquet!
Na tej części ciała nie ma stazy!
No hay torniquete en esta parte del cuerpo!
Нет жгута на этой части тела!
Não existe nenhum torniquete nesta parte do corpo!
Žádné škrtidlo na této části těla!
+ Non c'è nessun laccio emostatico su questa parte del corpo!
+ Il n'y a pas de garrot sur ce membre !
+
+
+ Medical training
+ Wyszkolenie medyczne
+ Addestramento Medico
+ Sanitätsausbildung
+ Entrenamiento médico
+ Entraînement médical
+ Lékařský výcvik
+ Treino médico
+
+
+ Whether or not the object will be a medical vehicle.
+ Czy pojazdy ma być pojazdem medycznym?
+ L'oggetto in questione sarà un veicolo medico o meno.
+ Legt fest, ob das Objekt ein Sanitätsfahrzeug ist.
+ Es un vehículo médico?
+ Définit si le véhicule est un véhicule médical ou non.
+ Se o objeto será ou não um veículo médico
+
+
+ Delay cease fire of AI while player is unconscious for medical reasons.
+ Verzögert das Ende des KI-Beschusses auf einen Spieler, wenn dieser aus medizinischen Gründen bewustlos wird.
+ Ritarda il cessate il fuoco dell'IA quando il giocatore è svenuto per motivi medici.
+ Prodleva zastavení palby pro AI, pokud je hráč v bezvědomí ze zdravotních důvodů.
+ Atraso durante cessar fogo da AI durante inconsciência médica
+
+
+ Delay cease fire of AI for unconsciousness
+ Verzögert Ende des KI-Beschusses bei medizinischer Bewustlosigkeit
+ Demora antes de volverse neutral al caer inconsciente
+ Opóźnij status captive u nieprzytomnych osób
+ Ritarda il cessate il fuoco dell'IA quando si è svenuti
+ Prodleva zastavení palby AI na bezvědomé
+ Atraso durante cessar fogo da AI durante inconsciência
\ No newline at end of file
diff --git a/addons/medical/ui/CfgInGameUI.hpp b/addons/medical/ui/CfgInGameUI.hpp
new file mode 100644
index 0000000000..5a09a11414
--- /dev/null
+++ b/addons/medical/ui/CfgInGameUI.hpp
@@ -0,0 +1,6 @@
+
+class CfgInGameUI {
+ class PeripheralVision {
+ bloodTexture = ""; //"A3\ui_f\data\igui\cfg\PeripheralVision\bloodTexture_ca.paa";
+ };
+};
diff --git a/addons/medical/ui/RscTitles.hpp b/addons/medical/ui/RscTitles.hpp
index b81643990c..3f9113a9d2 100644
--- a/addons/medical/ui/RscTitles.hpp
+++ b/addons/medical/ui/RscTitles.hpp
@@ -19,34 +19,34 @@ class Rsctitles {
colorBackground[] = {1,1,1,1};
colorPicture[] = {1,1,1,1};
colorText[] = {1,1,1,1};
- text = QUOTE(PATHTOF(ui\body_background.paa));
+ text = QPATHTOF(ui\body_background.paa);
};
class bodyImgHead: bodyImgBackground {
idc = 50;
colorBackground[] = {1,1,1,1};
colorPicture[] = {1,1,1,1};
colorText[] = {1,1,1,1};
- text = QUOTE(PATHTOF(ui\body_head.paa));
+ text = QPATHTOF(ui\body_head.paa);
};
class bodyImgTorso: bodyImgHead {
idc = 51;
- text = QUOTE(PATHTOF(ui\body_torso.paa));
+ text = QPATHTOF(ui\body_torso.paa);
};
class bodyImgArms_l: bodyImgHead {
idc = 52;
- text = QUOTE(PATHTOF(ui\body_arm_left.paa));
+ text = QPATHTOF(ui\body_arm_left.paa);
};
class bodyImgArms_r: bodyImgHead {
idc = 53;
- text = QUOTE(PATHTOF(ui\body_arm_right.paa));
+ text = QPATHTOF(ui\body_arm_right.paa);
};
class bodyImgLegs_l: bodyImgHead {
idc = 54;
- text = QUOTE(PATHTOF(ui\body_leg_left.paa));
+ text = QPATHTOF(ui\body_leg_left.paa);
};
class bodyImgLegs_r: bodyImgHead {
idc = 55;
- text = QUOTE(PATHTOF(ui\body_leg_right.paa));
+ text = QPATHTOF(ui\body_leg_right.paa);
};
class InjuryListLabel {
idc = 199;
@@ -57,7 +57,7 @@ class Rsctitles {
h = "0.7 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.7)";
style = 0x00 + 0x100; // ST_LEFT + ST_SHADOW
- font = "PuristaMedium";
+ font = "RobotoCondensed";
colorText[] = {0.95, 0.95, 0.95, 0.75};
colorBackground[] = {"(profilenamespace getVariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getVariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getVariable ['GUI_BCG_RGB_B',0.5])", "(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"};
text = CSTRING(Injuries);
@@ -103,11 +103,27 @@ class Rsctitles {
h = "0.7 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.7)";
style = 0x00 + 0x100; // ST_LEFT + ST_SHADOW
- font = "PuristaMedium";
+ font = "RobotoCondensed";
colorText[] = {0.95, 0.95, 0.95, 0.75};
colorBackground[] = {0,0,0,0.9};
text = "";
};
};
};
+
+ // disables blood texture overlay
+ class RscHealthTextures {
+ class controls {
+ class Flame_1;
+ class Blood_1: Flame_1 {
+ text = ""; //"A3\Ui_f\data\igui\rsctitles\HealthTextures\blood_lower_ca.paa";
+ };
+ class Blood_2: Flame_1 {
+ text = ""; //"A3\Ui_f\data\igui\rsctitles\HealthTextures\blood_middle_ca.paa";
+ };
+ class Blood_3: Flame_1 {
+ text = ""; //"A3\Ui_f\data\igui\rsctitles\HealthTextures\blood_upper_ca.paa";
+ };
+ };
+ };
};
diff --git a/addons/medical/ui/items/adenosine_x_ca.paa b/addons/medical/ui/items/adenosine_x_ca.paa
new file mode 100644
index 0000000000..49b79e99e5
Binary files /dev/null and b/addons/medical/ui/items/adenosine_x_ca.paa differ
diff --git a/addons/medical/ui/triagecard.hpp b/addons/medical/ui/triagecard.hpp
index d07da4337e..6a5138def8 100644
--- a/addons/medical/ui/triagecard.hpp
+++ b/addons/medical/ui/triagecard.hpp
@@ -14,7 +14,7 @@ class GVAR(triageCard) {
w = "15 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "19 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
style = ST_LEFT + ST_SHADOW;
- font = "PuristaMedium";
+ font = "RobotoCondensed";
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
colorText[] = {0.0, 0.0, 0.0, 1};
colorBackground[] = {1,1,1,1};
@@ -26,15 +26,15 @@ class GVAR(triageCard) {
y = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "5 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
- font = "PuristaMedium";
+ font = "RobotoCondensed";
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
colorText[] = {1,1,0,1};
colorBackground[] = {0,0,0,0};
- text = QUOTE(PATHTOF(ui\triage_card_corner_l.paa));
+ text = QPATHTOF(ui\triage_card_corner_l.paa);
};
class cornor_top_r: cornor_top_l {
x = "20 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
- text = QUOTE(PATHTOF(ui\triage_card_corner_r.paa));
+ text = QPATHTOF(ui\triage_card_corner_r.paa);
};
class TriageCardLabel {
@@ -46,7 +46,7 @@ class GVAR(triageCard) {
h = "0.7 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.7)";
style = 0x02 + 0x100; // ST_LEFT + ST_SHADOW
- font = "PuristaMedium";
+ font = "RobotoCondensed";
colorText[] = {0,0,0,1};
colorBackground[] = {0,0,0,0};
text = CSTRING(Actions_TriageCard);
diff --git a/addons/medical_menu/CfgEventHandlers.hpp b/addons/medical_menu/CfgEventHandlers.hpp
index 7392999c9a..da45b1d12e 100644
--- a/addons/medical_menu/CfgEventHandlers.hpp
+++ b/addons/medical_menu/CfgEventHandlers.hpp
@@ -1,3 +1,10 @@
+
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
diff --git a/addons/medical_menu/CfgVehicles.hpp b/addons/medical_menu/CfgVehicles.hpp
index d2bbf55fd1..1918511566 100644
--- a/addons/medical_menu/CfgVehicles.hpp
+++ b/addons/medical_menu/CfgVehicles.hpp
@@ -5,7 +5,7 @@ class CfgVehicles {
class ACE_moduleMedicalMenuSettings: ACE_Module {
scope = 2;
displayName = CSTRING(module_DisplayName);
- icon = QUOTE(PATHTOEF(medical,UI\Icon_Module_Medical_ca.paa));
+ icon = QPATHTOEF(medical,UI\Icon_Module_Medical_ca.paa);
category = "ACE_medical";
function = QUOTE(DFUNC(module));
functionPriority = 1;
@@ -50,7 +50,7 @@ class CfgVehicles {
exceptions[] = {"isNotInside"};
condition = QUOTE([ARR_2(ACE_player,_target)] call FUNC(canOpenMenu));
statement = QUOTE([_target] call DFUNC(openMenu));
- icon = PATHTOEF(medical,UI\icons\medical_cross.paa);
+ icon = QPATHTOEF(medical,UI\icons\medical_cross.paa);
};
};
@@ -63,7 +63,7 @@ class CfgVehicles {
exceptions[] = {"isNotInside"};
condition = QUOTE([ARR_2(ACE_player,_target)] call FUNC(canOpenMenu));
statement = QUOTE([_target] call DFUNC(openMenu));
- icon = PATHTOEF(medical,UI\icons\medical_cross.paa);
+ icon = QPATHTOEF(medical,UI\icons\medical_cross.paa);
};
};
};
diff --git a/addons/medical_menu/XEH_PREP.hpp b/addons/medical_menu/XEH_PREP.hpp
new file mode 100644
index 0000000000..8a44bd2bdc
--- /dev/null
+++ b/addons/medical_menu/XEH_PREP.hpp
@@ -0,0 +1,18 @@
+
+PREP(onMenuOpen);
+PREP(onMenuClose);
+PREP(openMenu);
+
+PREP(canOpenMenu);
+PREP(updateIcons);
+PREP(updateUIInfo);
+PREP(handleUI_DisplayOptions);
+PREP(handleUI_dropDownTriageCard);
+PREP(getTreatmentOptions);
+PREP(updateActivityLog);
+PREP(updateQuickViewLog);
+PREP(updateBodyImage);
+PREP(updateInformationLists);
+PREP(setTriageStatus);
+PREP(collectActions);
+PREP(module);
diff --git a/addons/medical_menu/XEH_postInit.sqf b/addons/medical_menu/XEH_postInit.sqf
index 92e2af341f..e7b7ec40cb 100644
--- a/addons/medical_menu/XEH_postInit.sqf
+++ b/addons/medical_menu/XEH_postInit.sqf
@@ -6,16 +6,14 @@ GVAR(MenuPFHID) = -1;
GVAR(lastOpenedOn) = -1;
GVAR(pendingReopen) = false;
-["medical_treatmentSuccess", {
-
+["ace_treatmentSuccess", {
if (GVAR(openAfterTreatment) && {GVAR(pendingReopen)}) then {
GVAR(pendingReopen) = false;
[{
[GVAR(INTERACTION_TARGET)] call FUNC(openMenu);
- }, []] call EFUNC(common,execNextFrame);
+ }, []] call CBA_fnc_execNextFrame;
};
-}] call EFUNC(common,addEventhandler);
-
+}] call CBA_fnc_addEventHandler;
["ACE3 Common", QGVAR(displayMenuKeyPressed), localize LSTRING(DisplayMenuKey),
{
@@ -31,10 +29,9 @@ GVAR(pendingReopen) = false;
false
},
{
- if (ACE_time - GVAR(lastOpenedOn) > 0.5) exitWith {
+ if (CBA_missionTime - GVAR(lastOpenedOn) > 0.5) exitWith {
[objNull] call FUNC(openMenu);
};
false
},
[35, [false, false, false]], false, 0] call CBA_fnc_addKeybind;
-
diff --git a/addons/medical_menu/XEH_preInit.sqf b/addons/medical_menu/XEH_preInit.sqf
index 65ac88e245..009a9ed1a6 100644
--- a/addons/medical_menu/XEH_preInit.sqf
+++ b/addons/medical_menu/XEH_preInit.sqf
@@ -2,23 +2,7 @@
ADDON = false;
-PREP(onMenuOpen);
-PREP(onMenuClose);
-PREP(openMenu);
-
-PREP(canOpenMenu);
-PREP(updateIcons);
-PREP(updateUIInfo);
-PREP(handleUI_DisplayOptions);
-PREP(handleUI_dropDownTriageCard);
-PREP(getTreatmentOptions);
-PREP(updateActivityLog);
-PREP(updateQuickViewLog);
-PREP(updateBodyImage);
-PREP(updateInformationLists);
-PREP(setTriageStatus);
-PREP(collectActions);
-PREP(module);
+#include "XEH_PREP.hpp"
GVAR(INTERACTION_TARGET) = objNull;
GVAR(actionsOther) = [];
diff --git a/addons/medical_menu/XEH_preStart.sqf b/addons/medical_menu/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/medical_menu/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/medical_menu/config.cpp b/addons/medical_menu/config.cpp
index 27e0db03b9..67d3966771 100644
--- a/addons/medical_menu/config.cpp
+++ b/addons/medical_menu/config.cpp
@@ -6,8 +6,9 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_medical"};
- author[] = {$STR_ACE_Common_ACETeam, "Glowbal"};
- authorUrl = "http://ace3mod.com";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"Glowbal"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
@@ -16,3 +17,7 @@ class CfgPatches {
#include "ui\menu.hpp"
#include "ACE_Settings.hpp"
#include "CfgVehicles.hpp"
+
+class ACE_newEvents {
+ Medical_onMenuOpen = "ace_medicalMenuOpened";
+};
diff --git a/addons/medical_menu/functions/fnc_collectActions.sqf b/addons/medical_menu/functions/fnc_collectActions.sqf
index 88f52c417a..af6742188e 100644
--- a/addons/medical_menu/functions/fnc_collectActions.sqf
+++ b/addons/medical_menu/functions/fnc_collectActions.sqf
@@ -15,27 +15,25 @@
*/
#include "script_component.hpp"
-private ["_configBasic", "_configAdvanced", "_fnc_compileActionsLevel"];
-_configBasic = (configFile >> "ACE_Medical_Actions" >> "Basic");
-_configAdvanced = (configFile >> "ACE_Medical_Actions" >> "Advanced");
+private _configBasic = (configFile >> "ACE_Medical_Actions" >> "Basic");
+private _configAdvanced = (configFile >> "ACE_Medical_Actions" >> "Advanced");
-_fnc_compileActionsLevel = {
- private ["_actions", "_displayName", "_condition", "_category", "_statement"];
+private _fnc_compileActionsLevel = {
params ["_config"];
- _actions = [];
+ private _actions = [];
{
if (isClass _x) then {
- _displayName = getText (_x >> "displayName");
- _category = getText (_x >> "category");
- _condition = format[QUOTE([ARR_4(ACE_player, GVAR(INTERACTION_TARGET), EGVAR(medical,SELECTIONS) select GVAR(selectedBodyPart), '%1')] call DEFUNC(medical,canTreatCached)), configName _x];
- _statement = format[QUOTE([ARR_4(ACE_player, GVAR(INTERACTION_TARGET), EGVAR(medical,SELECTIONS) select GVAR(selectedBodyPart), '%1')] call DEFUNC(medical,treatment)), configName _x];
+ private _displayName = getText (_x >> "displayName");
+ private _category = getText (_x >> "category");
+ private _condition = format[QUOTE([ARR_4(ACE_player, GVAR(INTERACTION_TARGET), EGVAR(medical,SELECTIONS) select GVAR(selectedBodyPart), '%1')] call DEFUNC(medical,canTreatCached)), configName _x];
+ private _statement = format[QUOTE([ARR_4(ACE_player, GVAR(INTERACTION_TARGET), EGVAR(medical,SELECTIONS) select GVAR(selectedBodyPart), '%1')] call DEFUNC(medical,treatment)), configName _x];
_actions pushBack [_displayName, _category, compile _condition, compile _statement];
};
nil
} count ("true" configClasses _config);
- _actions // return
+ _actions;
};
GVAR(actionsBasic) = [_configBasic] call _fnc_compileActionsLevel;
@@ -43,20 +41,20 @@ GVAR(actionsAdvanced) = [_configAdvanced] call _fnc_compileActionsLevel;
//Manually add the drag actions, if dragging exists.
if (["ace_dragging"] call EFUNC(common,isModLoaded)) then {
- _condition = {
+ private _condition = {
(ACE_player != GVAR(INTERACTION_TARGET)) && {[ACE_player, GVAR(INTERACTION_TARGET)] call EFUNC(dragging,canDrag)}
};
- _statement = {
+ private _statement = {
GVAR(pendingReopen) = false; //No medical_treatmentSuccess event after drag, so don't want this true
[ACE_player, GVAR(INTERACTION_TARGET)] call EFUNC(dragging,startDrag);
};
GVAR(actionsBasic) pushBack [localize ELSTRING(dragging,Drag), "drag", _condition, _statement];
GVAR(actionsAdvanced) pushBack [localize ELSTRING(dragging,Drag), "drag", _condition, _statement];
- _condition = {
+ private _condition = {
(ACE_player != GVAR(INTERACTION_TARGET)) && {[ACE_player, GVAR(INTERACTION_TARGET)] call EFUNC(dragging,canCarry)}
};
- _statement = {
+ private _statement = {
GVAR(pendingReopen) = false; //No medical_treatmentSuccess event after drag, so don't want this true
[ACE_player, GVAR(INTERACTION_TARGET)] call EFUNC(dragging,startCarry);
};
diff --git a/addons/medical_menu/functions/fnc_getTreatmentOptions.sqf b/addons/medical_menu/functions/fnc_getTreatmentOptions.sqf
index 8cbbe2d32f..6fed994671 100644
--- a/addons/medical_menu/functions/fnc_getTreatmentOptions.sqf
+++ b/addons/medical_menu/functions/fnc_getTreatmentOptions.sqf
@@ -19,19 +19,16 @@
params ["_player", "_target", "_name"];
-private ["_actions", "_collectedActions", "_bodyPart"];
-
if (!([ACE_player, _target, ["isNotInside"]] call EFUNC(common,canInteractWith))) exitWith {[]};
-_actions = if (EGVAR(medical,level) == 2) then {
+private _actions = if (EGVAR(medical,level) == 2) then {
GVAR(actionsAdvanced);
} else {
GVAR(actionsBasic);
};
-_collectedActions = [];
-
-_bodyPart = EGVAR(medical,SELECTIONS) select GVAR(selectedBodyPart);
+private _collectedActions = [];
+private _bodyPart = EGVAR(medical,SELECTIONS) select GVAR(selectedBodyPart);
{
_x params ["", "_currentCategory", "_currentCondition"];
if (_name == _currentCategory && {call _currentCondition}) then {
@@ -40,4 +37,4 @@ _bodyPart = EGVAR(medical,SELECTIONS) select GVAR(selectedBodyPart);
nil
} count _actions;
-_collectedActions // return
+_collectedActions;
diff --git a/addons/medical_menu/functions/fnc_handleUI_DisplayOptions.sqf b/addons/medical_menu/functions/fnc_handleUI_DisplayOptions.sqf
index 67e295e22e..97e5c19519 100644
--- a/addons/medical_menu/functions/fnc_handleUI_DisplayOptions.sqf
+++ b/addons/medical_menu/functions/fnc_handleUI_DisplayOptions.sqf
@@ -44,7 +44,7 @@ if (_name isEqualTo "toggle") exitWith {
closeDialog 0;
[{
[_this select 0] call FUNC(openMenu);
- }, [_newTarget], 0.1] call EFUNC(common,waitAndExecute);
+ }, [_newTarget], 0.1] call CBA_fnc_waitAndExecute;
};
// Clean the dropdown options list from all actions
@@ -77,7 +77,7 @@ if (_name isEqualTo "triage") exitWith {
_message = localize _message;
};
};
- _triageCardTexts pushBack format["%1x - %2 (%3m)", _amount, _message, round((ACE_gameTime - _time) / 60)];
+ _triageCardTexts pushBack format["%1x - %2 (%3m)", _amount, _message, round((CBA_missionTime - _time) / 60)];
nil;
} count _log;
diff --git a/addons/medical_menu/functions/fnc_handleUI_dropDownTriageCard.sqf b/addons/medical_menu/functions/fnc_handleUI_dropDownTriageCard.sqf
index 33b82e5d78..946ee2d0ef 100644
--- a/addons/medical_menu/functions/fnc_handleUI_dropDownTriageCard.sqf
+++ b/addons/medical_menu/functions/fnc_handleUI_dropDownTriageCard.sqf
@@ -15,13 +15,11 @@
*/
#include "script_component.hpp"
-private ["_display", "_pos", "_ctrl", "_currentPos", "_idc"];
-
disableSerialization;
-_display = uiNamespace getVariable QGVAR(medicalMenu);
-_pos = [0, 0, 0, 0];
-_currentPos = ctrlPosition (_display displayCtrl 2002);
+private _display = uiNamespace getVariable QGVAR(medicalMenu);
+private _pos = [0, 0, 0, 0];
+private _currentPos = ctrlPosition (_display displayCtrl 2002);
_currentPos params ["_currentPosX", "_currentPosY"];
if (_currentPosX == 0 && _currentPosY == 0) then {
_pos = ctrlPosition (_display displayCtrl 2001);
@@ -29,7 +27,7 @@ if (_currentPosX == 0 && _currentPosY == 0) then {
for "_idc" from 2002 to 2006 step 1 do {
_pos set [1, (_pos select 1) + (_pos select 3)];
- _ctrl = _display displayCtrl _idc;
+ private _ctrl = _display displayCtrl _idc;
_ctrl ctrlSetPosition _pos;
_ctrl ctrlCommit 0;
};
diff --git a/addons/medical_menu/functions/fnc_onMenuOpen.sqf b/addons/medical_menu/functions/fnc_onMenuOpen.sqf
index d8d1fde35a..58cb9ff74e 100644
--- a/addons/medical_menu/functions/fnc_onMenuOpen.sqf
+++ b/addons/medical_menu/functions/fnc_onMenuOpen.sqf
@@ -16,8 +16,6 @@
#include "script_component.hpp"
#define MAX_DISTANCE 10
-private "_target";
-
params ["_display"];
if (isNil "_display") exitWith {};
@@ -34,7 +32,7 @@ if (isNil QGVAR(LatestDisplayOptionMenu)) then {
};
};
-_target = GVAR(INTERACTION_TARGET);
+private _target = GVAR(INTERACTION_TARGET);
if (isNil QGVAR(INTERACTION_TARGET_PREVIOUS)) then {
GVAR(INTERACTION_TARGET_PREVIOUS) = _target;
};
@@ -81,10 +79,10 @@ GVAR(MenuPFHID) = [{
closeDialog 314412;
//If we failed because of distance check, show UI message:
if ((ACE_player distance GVAR(INTERACTION_TARGET)) > GVAR(maxRange)) then {
- ["displayTextStructured", [[ELSTRING(medical,DistanceToFar), [GVAR(INTERACTION_TARGET)] call EFUNC(common,getName)], 2, ACE_player]] call EFUNC(common,localEvent);
+ [[ELSTRING(medical,DistanceToFar), [GVAR(INTERACTION_TARGET)] call EFUNC(common,getName)], 2] call EFUNC(common,displayTextStructured);
};
};
}, 0, [_display]] call CBA_fnc_addPerFrameHandler;
-["Medical_onMenuOpen", [ACE_player, _target]] call EFUNC(common,localEvent);
+["ace_medicalMenuOpened", [ACE_player, _target]] call CBA_fnc_localEvent;
diff --git a/addons/medical_menu/functions/fnc_openMenu.sqf b/addons/medical_menu/functions/fnc_openMenu.sqf
index a8a51ff028..e0de46dba8 100644
--- a/addons/medical_menu/functions/fnc_openMenu.sqf
+++ b/addons/medical_menu/functions/fnc_openMenu.sqf
@@ -20,20 +20,15 @@ params ["_interactionTarget"];
if (dialog || {isNull _interactionTarget}) exitWith {
disableSerialization;
- private ["_display", "_handled"];
- _handled = false;
- _display = uiNamespace getVariable QGVAR(medicalMenu);
+ private _display = uiNamespace getVariable QGVAR(medicalMenu);
if (!isNil "_display") then {
closeDialog 314412;
- _handled = true;
};
-
- _handled
};
GVAR(INTERACTION_TARGET) = _interactionTarget;
createDialog QGVAR(medicalMenu);
-GVAR(lastOpenedOn) = ACE_time;
+GVAR(lastOpenedOn) = CBA_missionTime;
true
diff --git a/addons/medical_menu/functions/fnc_updateActivityLog.sqf b/addons/medical_menu/functions/fnc_updateActivityLog.sqf
index 50acb12e94..7406e25f33 100644
--- a/addons/medical_menu/functions/fnc_updateActivityLog.sqf
+++ b/addons/medical_menu/functions/fnc_updateActivityLog.sqf
@@ -16,11 +16,9 @@
*/
#include "script_component.hpp"
-private "_logCtrl";
-
params ["_display", "_logs"];
-_logCtrl = _display displayCtrl 214;
+private _logCtrl = _display displayCtrl 214;
lbClear _logCtrl;
{
diff --git a/addons/medical_menu/functions/fnc_updateBodyImage.sqf b/addons/medical_menu/functions/fnc_updateBodyImage.sqf
index 1e8067a7f6..1d83b54372 100644
--- a/addons/medical_menu/functions/fnc_updateBodyImage.sqf
+++ b/addons/medical_menu/functions/fnc_updateBodyImage.sqf
@@ -22,11 +22,9 @@ params ["_selectionBloodLoss", "_damaged", "_display"];
// Handle the body image coloring
private _availableSelections = [50, 51, 52, 53, 54, 55];
{
- private ["_red", "_green", "_blue"];
-
- _red = 1;
- _green = 1;
- _blue = 1;
+ private _red = 1;
+ private _green = 1;
+ private _blue = 1;
if (_x > 0) then {
if (_damaged select _forEachIndex) then {
diff --git a/addons/medical_menu/functions/fnc_updateIcons.sqf b/addons/medical_menu/functions/fnc_updateIcons.sqf
index b309938476..37508bd2b0 100644
--- a/addons/medical_menu/functions/fnc_updateIcons.sqf
+++ b/addons/medical_menu/functions/fnc_updateIcons.sqf
@@ -18,15 +18,13 @@
#define START_IDC 111
#define END_IDC 118
-private ["_display", "_idc", "_options", "_amount"];
-
disableSerialization;
-_display = uiNamespace getVariable QGVAR(medicalMenu);
+private _display = uiNamespace getVariable QGVAR(medicalMenu);
+private _options = ["triage" , "examine", "bandage", "medication", "airway", "advanced", "drag", "toggle"];
-_options = ["triage" , "examine", "bandage", "medication", "airway", "advanced", "drag", "toggle"];
for "_idc" from START_IDC to END_IDC step 1 do {
- _amount = [ACE_player, GVAR(INTERACTION_TARGET), _options select (_idc - START_IDC)] call FUNC(getTreatmentOptions);
+ private _amount = [ACE_player, GVAR(INTERACTION_TARGET), _options select (_idc - START_IDC)] call FUNC(getTreatmentOptions);
if ((count _amount) > 0 || _idc == START_IDC || _idc == END_IDC) then {
(_display displayCtrl _idc) ctrlSettextColor [1, 1, 1, 1];
} else {
diff --git a/addons/medical_menu/functions/fnc_updateInformationLists.sqf b/addons/medical_menu/functions/fnc_updateInformationLists.sqf
index 82c0a13746..28818465bc 100644
--- a/addons/medical_menu/functions/fnc_updateInformationLists.sqf
+++ b/addons/medical_menu/functions/fnc_updateInformationLists.sqf
@@ -14,11 +14,9 @@
*/
#include "script_component.hpp"
-private ["_lbCtrl", "_amountOfGeneric"];
-
params ["_display", "_genericMessages", "_allInjuryTexts"];
-_lbCtrl = _display displayCtrl 213;
+private _lbCtrl = _display displayCtrl 213;
lbClear _lbCtrl;
{
_x params ["_add", "_color"];
@@ -26,7 +24,7 @@ lbClear _lbCtrl;
_lbCtrl lbSetColor [_forEachIndex, _color];
} forEach _genericMessages;
-_amountOfGeneric = count _genericMessages;
+private _amountOfGeneric = count _genericMessages;
{
_x params ["_add", "_color"];
_lbCtrl lbAdd _add;
diff --git a/addons/medical_menu/functions/fnc_updateQuickViewLog.sqf b/addons/medical_menu/functions/fnc_updateQuickViewLog.sqf
index 900e375fb7..836ebafca2 100644
--- a/addons/medical_menu/functions/fnc_updateQuickViewLog.sqf
+++ b/addons/medical_menu/functions/fnc_updateQuickViewLog.sqf
@@ -16,27 +16,21 @@
*/
#include "script_component.hpp"
-private "_logCtrl";
-
params ["_display", "_logs"];
-_logCtrl = _display displayCtrl 215;
+private _logCtrl = _display displayCtrl 215;
lbClear _logCtrl;
{
_x params ["_message", "_moment", "", "_arguments"];
- if (isLocalized _message) then {
- _message = localize _message;
- };
-
{
if (_x isEqualType "" && {isLocalized _x}) then {
_arguments set [_foreachIndex, localize _x];
};
} forEach _arguments;
- _message = format ([_message] + _arguments);
+ _message = format ([([_message, localize _message] select (isLocalized _message))] + _arguments);
_logCtrl lbAdd format ["%1 %2", _moment, _message];
nil
} count _logs;
diff --git a/addons/medical_menu/functions/fnc_updateUIInfo.sqf b/addons/medical_menu/functions/fnc_updateUIInfo.sqf
index 412a2045e6..e36315bd08 100644
--- a/addons/medical_menu/functions/fnc_updateUIInfo.sqf
+++ b/addons/medical_menu/functions/fnc_updateUIInfo.sqf
@@ -76,7 +76,7 @@ if ((EGVAR(medical,level) >= 2) && {([_target] call EFUNC(medical,hasMedicalEnab
// Collect the text to be displayed for this injury [ Select injury class type definition - select the classname DisplayName (6th), amount of injuries for this]
if (_amountOf >= 1) then {
// TODO localization
- _allInjuryTexts pushBack [format["%2x %1", (EGVAR(medical,AllWoundInjuryTypes) select (_x select 1)) select 6, _amountOf], [1,1,1,1]];
+ _allInjuryTexts pushBack [format["%2x %1", (EGVAR(medical,AllWoundInjuryTypes) select (_x select 1)) select 6, ceil _amountOf], [1,1,1,1]];
} else {
// TODO localization
_allInjuryTexts pushBack [format["Partial %1", (EGVAR(medical,AllWoundInjuryTypes) select (_x select 1)) select 6], [1,1,1,1]];
@@ -97,7 +97,7 @@ if ((EGVAR(medical,level) >= 2) && {([_target] call EFUNC(medical,hasMedicalEnab
if (_amountOf > 0) then {
if (_amountOf >= 1) then {
// TODO localization
- _allInjuryTexts pushBack [format ["[B] %2x %1", (EGVAR(medical,AllWoundInjuryTypes) select (_x select 1)) select 6, _amountOf], [0.88,0.7,0.65,1]];
+ _allInjuryTexts pushBack [format ["[B] %2x %1", (EGVAR(medical,AllWoundInjuryTypes) select (_x select 1)) select 6, ceil _amountOf], [0.88,0.7,0.65,1]];
} else {
// TODO localization
_allInjuryTexts pushBack [format ["[B] Partial %1", (EGVAR(medical,AllWoundInjuryTypes) select (_x select 1)) select 6], [0.88,0.7,0.65,1]];
diff --git a/addons/medical_menu/stringtable.xml b/addons/medical_menu/stringtable.xml
index 691ad5f10b..e9812128f4 100644
--- a/addons/medical_menu/stringtable.xml
+++ b/addons/medical_menu/stringtable.xml
@@ -9,6 +9,8 @@
Медицинское меню
Menú médico
Zdravotnikcá nabídka
+ Menù Medico
+ Menu médical
Bandage / Fractures
@@ -170,6 +197,7 @@
Bandaże / Złamania
Bandagens / Fraturas
Bandáž / Zlomeniny
+ Bendaggi/Fratture
Body Part: %1
@@ -359,6 +406,7 @@
Część ciała: %1
Parte do corpo: %1
Část těla: %1
+ Parte del Corpo: %1
There are %2 %1 Bandaged Wounds
Er hat %2 verbundene Wunden (%1)
%2 перевязанные раны %1
Hay %2 Heridas %1 Vendadas
- Il y a %2 %1 Blessure Bandée
+ Il y a %2 %1 Blessure(s) Bandée(s)
Widzisz %2 zabandażowanych ran o %1 rozmiarze
Existem %2 ferimentos %1 tratados
Jsou zde %2 %1 ovázané rány
+ Ci sono %2 %1 Ferite Bendate
There is 1 %1 Bandaged Wound
@@ -439,6 +494,7 @@
Widzisz 1 zabandażowaną ranę o %1 rozmiarze
Existe 1 ferimento %1 tratado
Je zde 1 %1 ovázaná rána
+ C'è 1 %1 Ferita Bendata
There is a partial %1 Bandaged wound
@@ -449,6 +505,7 @@
Widzisz 1 częściowo zabandażowaną ranę o %1 rozmiarze
Existe um ferimento parcial tratado %1
Je zde částěčně %1 ovázaná rána
+ C'è 1 parziale %1 Ferita Bendata
\ No newline at end of file
diff --git a/addons/medical_menu/ui/menu.hpp b/addons/medical_menu/ui/menu.hpp
index 5968a643ff..16c79e7c6a 100644
--- a/addons/medical_menu/ui/menu.hpp
+++ b/addons/medical_menu/ui/menu.hpp
@@ -37,7 +37,7 @@ class GVAR(medicalMenu) {
w = "38 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
style = ST_LEFT + ST_SHADOW;
- font = "PuristaMedium";
+ font = "RobotoCondensed";
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
colorText[] = {0.95, 0.95, 0.95, 0.75};
colorBackground[] = {"(profilenamespace getVariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getVariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getVariable ['GUI_BCG_RGB_B',0.5])", "(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"};
@@ -51,7 +51,7 @@ class GVAR(medicalMenu) {
y = "2.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "38 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "3.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
- text = QUOTE(PATHTOF(data\background_img.paa));
+ text = QPATHTOF(data\background_img.paa);
colorText[] = {1, 1, 1, 0.0};
};
class CatagoryLeft: HeaderName {
@@ -94,42 +94,42 @@ class GVAR(medicalMenu) {
colorBackground[] = {0,0,0,1};
colorPicture[] = {1,1,1,1};
colorText[] = {1,1,1,1};
- text = QUOTE(PATHTOF(data\icons\triage_card_small.paa));
+ text = QPATHTOF(data\icons\triage_card_small.paa);
};
class iconImg2: iconImg1 {
idc = 112;
x = "3 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
- text = QUOTE(PATHTOF(data\icons\examine_patient_small.paa));
+ text = QPATHTOF(data\icons\examine_patient_small.paa);
};
class iconImg3: iconImg1 {
idc = 113;
x = "4.5 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
- text = QUOTE(PATHTOF(data\icons\bandage_fracture_small.paa));
+ text = QPATHTOF(data\icons\bandage_fracture_small.paa);
};
class iconImg4: iconImg1 {
idc = 114;
x = "6 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
- text = QUOTE(PATHTOF(data\icons\medication_small.paa));
+ text = QPATHTOF(data\icons\medication_small.paa);
};
class iconImg5: iconImg1 {
idc = 115;
x = "7.5 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
- text = QUOTE(PATHTOF(data\icons\airway_management_small.paa));
+ text = QPATHTOF(data\icons\airway_management_small.paa);
};
class iconImg6: iconImg1 {
idc = 116;
x = "9 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
- text = QUOTE(PATHTOF(data\icons\advanced_treatment_small.paa));
+ text = QPATHTOF(data\icons\advanced_treatment_small.paa);
};
class iconImg7: iconImg1 {
idc = 117;
x = "10.5 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
- text = QUOTE(PATHTOF(data\icons\icon_carry.paa));
+ text = QPATHTOF(data\icons\icon_carry.paa);
};
class iconImg8: iconImg1 {
idc = 118;
x = "12 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
- text = QUOTE(PATHTOF(data\icons\toggle_self_small.paa));
+ text = QPATHTOF(data\icons\toggle_self_small.paa);
};
@@ -274,7 +274,7 @@ class GVAR(medicalMenu) {
colorBackground[] = {1,1,1,1};
colorPicture[] = {1,1,1,1};
colorText[] = {1,1,1,1};
- text = QUOTE(PATHTOEF(medical,ui\body_background.paa));
+ text = QPATHTOEF(medical,ui\body_background.paa);
};
class bodyImgHead: bodyImgBackground {
idc = 50;
@@ -286,28 +286,28 @@ class GVAR(medicalMenu) {
colorBackground[] = {1,1,1,1};
colorPicture[] = {1,1,1,0.75};
colorText[] = {1,1,1,0.75};
- text = QUOTE(PATHTOEF(medical,ui\body_head.paa));
+ text = QPATHTOEF(medical,ui\body_head.paa);
};
class bodyImgTorso: bodyImgHead {
idc = 51;
- text = QUOTE(PATHTOEF(medical,ui\body_torso.paa));
+ text = QPATHTOEF(medical,ui\body_torso.paa);
};
class bodyImgArms_l: bodyImgHead {
idc = 52;
- text = QUOTE(PATHTOEF(medical,ui\body_arm_left.paa));
+ text = QPATHTOEF(medical,ui\body_arm_left.paa);
};
class bodyImgArms_r: bodyImgHead {
idc = 53;
- text = QUOTE(PATHTOEF(medical,ui\body_arm_right.paa));
+ text = QPATHTOEF(medical,ui\body_arm_right.paa);
};
class bodyImgLegs_l: bodyImgHead {
idc = 54;
- text = QUOTE(PATHTOEF(medical,ui\body_leg_left.paa));
+ text = QPATHTOEF(medical,ui\body_leg_left.paa);
};
class bodyImgLegs_r: bodyImgHead {
idc = 55;
- text = QUOTE(PATHTOEF(medical,ui\body_leg_right.paa));
+ text = QPATHTOEF(medical,ui\body_leg_right.paa);
};
diff --git a/addons/microdagr/ACE_Settings.hpp b/addons/microdagr/ACE_Settings.hpp
index db175e7303..f1e7595b74 100644
--- a/addons/microdagr/ACE_Settings.hpp
+++ b/addons/microdagr/ACE_Settings.hpp
@@ -1,7 +1,10 @@
class ACE_Settings {
- class GVAR(MapDataAvailable) {
+ class GVAR(mapDataAvailable) {
+ displayName = CSTRING(MapDataAvailable_DisplayName);
+ description = CSTRING(MapDataAvailable_Description);
value = 2;
typeName = "SCALAR";
isClientSettable = 0;
+ values[] = {CSTRING(MapFill_None), CSTRING(MapFill_OnlyRoads), CSTRING(MapFill_Full)};
};
-};
\ No newline at end of file
+};
diff --git a/addons/microdagr/CfgEventHandlers.hpp b/addons/microdagr/CfgEventHandlers.hpp
index 6d1d3b6dfb..47564cbd2d 100644
--- a/addons/microdagr/CfgEventHandlers.hpp
+++ b/addons/microdagr/CfgEventHandlers.hpp
@@ -1,3 +1,10 @@
+
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
diff --git a/addons/microdagr/CfgVehicles.hpp b/addons/microdagr/CfgVehicles.hpp
index 3fcf92beaa..cf596c9762 100644
--- a/addons/microdagr/CfgVehicles.hpp
+++ b/addons/microdagr/CfgVehicles.hpp
@@ -8,21 +8,21 @@ class CfgVehicles {
displayName = CSTRING(configure);
condition = QUOTE(([DISPLAY_MODE_DIALOG] call FUNC(canShow)) && {GVAR(currentShowMode) != DISPLAY_MODE_DIALOG});
statement = QUOTE([DISPLAY_MODE_DIALOG] call FUNC(openDisplay));
- icon = QUOTE(PATHTOF(UI\icon_microDAGR.paa));
+ icon = QPATHTOF(UI\icon_microDAGR.paa);
exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"};
class GVAR(show) {
//Opens the mini map
displayName = CSTRING(show);
condition = QUOTE(([DISPLAY_MODE_DISPLAY] call FUNC(canShow)) && {GVAR(currentShowMode) != DISPLAY_MODE_DISPLAY});
statement = QUOTE([DISPLAY_MODE_DISPLAY] call FUNC(openDisplay));
- icon = QUOTE(PATHTOF(UI\icon_microDAGR.paa));
+ icon = QPATHTOF(UI\icon_microDAGR.paa);
exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"};
};
class GVAR(close) {
displayName = CSTRING(closeUnit);
condition = QUOTE(GVAR(currentShowMode) != DISPLAY_MODE_CLOSED);
statement = QUOTE([DISPLAY_MODE_CLOSED] call FUNC(openDisplay));
- icon = QUOTE(PATHTOF(UI\icon_microDAGR.paa));
+ icon = QPATHTOF(UI\icon_microDAGR.paa);
exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"};
};
};
@@ -39,7 +39,7 @@ class CfgVehicles {
scope = 2;
isGlobal = 0;
isSingular = 1;
- icon = QUOTE(PATHTOF(UI\Icon_Module_microDAGR_ca.paa));
+ icon = QPATHTOF(UI\Icon_Module_microDAGR_ca.paa);
functionPriority = 0;
class Arguments {
class MapDataAvailable {
@@ -72,7 +72,7 @@ class CfgVehicles {
displayName = CSTRING(itemName);
author = ECSTRING(common,ACETeam);
vehicleClass = "Items";
- icon = QUOTE(PATHTOF(UI\icon_microDAGR.paa));
+ icon = QPATHTOF(UI\icon_microDAGR.paa);
class TransportItems {
MACRO_ADDITEM(ACE_microDAGR,1);
};
diff --git a/addons/microdagr/CfgWeapons.hpp b/addons/microdagr/CfgWeapons.hpp
index 6fa84b6e7b..92ace96c53 100644
--- a/addons/microdagr/CfgWeapons.hpp
+++ b/addons/microdagr/CfgWeapons.hpp
@@ -7,8 +7,8 @@ class CfgWeapons {
scope = 2;
displayName = CSTRING(itemName);
descriptionShort = CSTRING(itemDescription);
- model = QUOTE(PATHTOF(data\MicroDAGR.p3d));
- picture = QUOTE(PATHTOF(images\microDAGR_item.paa));
+ model = QPATHTOF(data\MicroDAGR.p3d);
+ picture = QPATHTOF(images\microDAGR_item.paa);
class ItemInfo: InventoryItem_Base_F {
mass = 2;
};
diff --git a/addons/microdagr/XEH_PREP.hpp b/addons/microdagr/XEH_PREP.hpp
new file mode 100644
index 0000000000..9803a19702
--- /dev/null
+++ b/addons/microdagr/XEH_PREP.hpp
@@ -0,0 +1,21 @@
+
+PREP(appMarkKeypadEntry);
+PREP(appMenuButtonConnectRangefinder);
+PREP(appSettingsLBClick);
+PREP(appWaypointsButtonDeleteWP);
+PREP(appWaypointsButtonSetWP);
+PREP(canShow);
+PREP(deviceAddWaypoint);
+PREP(deviceDeleteWaypoint);
+PREP(deviceGetWaypoints);
+PREP(dialogClosedEH);
+PREP(mapButtonDownEH);
+PREP(mapDoubleTapEH);
+PREP(mapOnDrawEH);
+PREP(modeMapButtons);
+PREP(moduleMapFill);
+PREP(openDisplay);
+PREP(recieveRangefinderData);
+PREP(saveCurrentAndSetNewMode);
+PREP(showApplicationPage);
+PREP(updateDisplay);
diff --git a/addons/microdagr/XEH_clientInit.sqf b/addons/microdagr/XEH_clientInit.sqf
index c918bcf454..46003b9cb1 100644
--- a/addons/microdagr/XEH_clientInit.sqf
+++ b/addons/microdagr/XEH_clientInit.sqf
@@ -16,11 +16,11 @@ _closeCode = {
if (GVAR(currentShowMode) == DISPLAY_MODE_CLOSED) exitWith {};
[DISPLAY_MODE_CLOSED] call FUNC(openDisplay);
};
-[(localize LSTRING(itemName)), QUOTE(PATHTOF(images\microDAGR_item.paa)), _conditonCode, _toggleCode, _closeCode] call EFUNC(common,deviceKeyRegisterNew);
+[(localize LSTRING(itemName)), QPATHTOF(images\microDAGR_item.paa), _conditonCode, _toggleCode, _closeCode] call EFUNC(common,deviceKeyRegisterNew);
//Add Eventhandler:
-["RangerfinderData", {_this call FUNC(recieveRangefinderData)}] call EFUNC(common,addEventHandler);
+[QEGVAR(vector,rangefinderData), {_this call FUNC(recieveRangefinderData)}] call CBA_fnc_addEventHandler;
//Global Variables to default:
GVAR(gpsPositionASL) = [0,0,0];
diff --git a/addons/microdagr/XEH_preInit.sqf b/addons/microdagr/XEH_preInit.sqf
index 39a1b313c6..ba262ec8c5 100644
--- a/addons/microdagr/XEH_preInit.sqf
+++ b/addons/microdagr/XEH_preInit.sqf
@@ -2,26 +2,7 @@
ADDON = false;
-PREP(appMarkKeypadEntry);
-PREP(appMenuButtonConnectRangefinder);
-PREP(appSettingsLBClick);
-PREP(appWaypointsButtonDeleteWP);
-PREP(appWaypointsButtonSetWP);
-PREP(canShow);
-PREP(deviceAddWaypoint);
-PREP(deviceDeleteWaypoint);
-PREP(deviceGetWaypoints);
-PREP(dialogClosedEH);
-PREP(mapButtonDownEH);
-PREP(mapDoubleTapEH);
-PREP(mapOnDrawEH);
-PREP(modeMapButtons);
-PREP(moduleMapFill);
-PREP(openDisplay);
-PREP(recieveRangefinderData);
-PREP(saveCurrentAndSetNewMode);
-PREP(showApplicationPage);
-PREP(updateDisplay);
+#include "XEH_PREP.hpp"
//Functions that are called for each draw of the map:
GVAR(miniMapDrawHandlers) = [];
diff --git a/addons/microdagr/XEH_preStart.sqf b/addons/microdagr/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/microdagr/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/microdagr/config.cpp b/addons/microdagr/config.cpp
index 7a39df8980..9da8434fe7 100644
--- a/addons/microdagr/config.cpp
+++ b/addons/microdagr/config.cpp
@@ -6,8 +6,9 @@ class CfgPatches {
weapons[] = {"ACE_microDAGR"};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
- author[] = {"PabstMirror"};
- authorUrl = "https://github.com/PabstMirror/";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"PabstMirror"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
@@ -17,3 +18,7 @@ class CfgPatches {
#include "CfgVehicles.hpp"
#include "gui.hpp"
#include "ACE_Settings.hpp"
+
+class ACE_newEvents {
+ RangerfinderData = QEGVAR(vector,rangefinderData);
+};
diff --git a/addons/microdagr/functions/fnc_canShow.sqf b/addons/microdagr/functions/fnc_canShow.sqf
index 70e8989031..d339f80794 100644
--- a/addons/microdagr/functions/fnc_canShow.sqf
+++ b/addons/microdagr/functions/fnc_canShow.sqf
@@ -27,8 +27,10 @@ _returnValue = switch (_showType) do {
("ACE_microDAGR" in (items ACE_player)) && {[ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)}
};
case (DISPLAY_MODE_DISPLAY): {
- //Can't have minimap up while zoomed in
- (cameraview != "GUNNER") && {"ACE_microDAGR" in (items ACE_player)} && {[ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)}
+ //Can't have minimap up while zoomed in on foot, but allow drivers to use while in "Gunner" to handle non-3d vehicles like most tanks
+ ((cameraView != "GUNNER") || {(vehicle ACE_player != ACE_player) && {driver vehicle ACE_player == ACE_player}}) &&
+ {"ACE_microDAGR" in (items ACE_player)} &&
+ {[ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)}
};
default { false };
};
diff --git a/addons/microdagr/functions/fnc_mapOnDrawEH.sqf b/addons/microdagr/functions/fnc_mapOnDrawEH.sqf
index 25f5bc92fd..92d647f348 100644
--- a/addons/microdagr/functions/fnc_mapOnDrawEH.sqf
+++ b/addons/microdagr/functions/fnc_mapOnDrawEH.sqf
@@ -27,7 +27,7 @@ if (GVAR(currentApplicationPage) == 1) then {
_theMap ctrlMapAnimAdd [0, DUMMY_ZOOM, DUMMY_POS];
ctrlMapAnimCommit _theMap;
_size = 412 * _mapSize;
- _theMap drawIcon [QUOTE(PATHTO_R(images\compass_starInverted.paa)), [1,1,1,1], DUMMY_POS, _size, _size, (-1 * (getDir ACE_player)), '', 0 ];
+ _theMap drawIcon [QUOTE(PATHTO_R(images\compass_starInverted.paa)), [1,1,1,1], DUMMY_POS, _size, _size, (-1 * (([ACE_player] call CBA_fnc_headDir) select 0)), '', 0 ];
_theMap drawIcon [QUOTE(PATHTO_R(images\compass_needle.paa)), [0.533,0.769,0.76,1], DUMMY_POS, _size, _size, 0, '', 0 ];
if (GVAR(currentWaypoint) != -1) then {
@@ -56,7 +56,7 @@ if (GVAR(currentApplicationPage) == 1) then {
ctrlMapAnimCommit _theMap;
};
_size = 48 * _mapSize;
- _theMap drawIcon [QUOTE(PATHTO_R(images\icon_self.paa)), [0.533,0.769,0.76,0.75], (getPosASL ACE_player), _size, _size, (getDir ACE_player), '', 0 ];
+ _theMap drawIcon [QUOTE(PATHTO_R(images\icon_self.paa)), [0.533,0.769,0.76,0.75], (getPosASL ACE_player), _size, _size, (([ACE_player] call CBA_fnc_headDir) select 0), '', 0 ];
if (GVAR(settingShowAllWaypointsOnMap)) then {
_size = 32 * _mapSize;
diff --git a/addons/microdagr/functions/fnc_showApplicationPage.sqf b/addons/microdagr/functions/fnc_showApplicationPage.sqf
index dba6b54f18..903680e896 100644
--- a/addons/microdagr/functions/fnc_showApplicationPage.sqf
+++ b/addons/microdagr/functions/fnc_showApplicationPage.sqf
@@ -38,9 +38,9 @@ if (GVAR(currentApplicationPage) == APP_MODE_INFODISPLAY) then {
(_display displayCtrl IDC_MODEDISPLAY_MODEPOSTIMECG) ctrlShow false;
(_display displayCtrl IDC_MODEDISPLAY_MODEPOSTARGETCG) ctrlShow true;
if (GVAR(currentWaypoint) == -2) then {
- (_display displayCtrl IDC_MODEDISPLAY_TARGETICON) ctrlSetText "\A3\ui_f\data\igui\rscingameui\rscoptics\laser_designator_iconLaserOn.paa"
+ (_display displayCtrl IDC_MODEDISPLAY_TARGETICON) ctrlSetText QUOTE(PATHTOF(images\icon_menuLaser.paa));
} else {
- (_display displayCtrl IDC_MODEDISPLAY_TARGETICON) ctrlSetText QUOTE(PATHTOF(images\icon_menuMark.paa));
+ (_display displayCtrl IDC_MODEDISPLAY_TARGETICON) ctrlSetText QPATHTOF(images\icon_menuMark.paa);
};
};
};
@@ -100,19 +100,19 @@ if (GVAR(currentApplicationPage) == APP_MODE_MARK) then {
//Buttons pushed:
if (GVAR(currentApplicationPage) == APP_MODE_INFODISPLAY) then {
- (_display displayCtrl IDC_BUTTONBG0) ctrlSetText QUOTE(PATHTOF(images\button_pushedDown.paa));
+ (_display displayCtrl IDC_BUTTONBG0) ctrlSetText QPATHTOF(images\button_pushedDown.paa);
} else {
- (_display displayCtrl IDC_BUTTONBG0) ctrlSetText QUOTE(PATHTOF(images\button_pushedUp.paa));
+ (_display displayCtrl IDC_BUTTONBG0) ctrlSetText QPATHTOF(images\button_pushedUp.paa);
};
if (GVAR(currentApplicationPage) == APP_MODE_COMPASS) then {
- (_display displayCtrl IDC_BUTTONBG1) ctrlSetText QUOTE(PATHTOF(images\button_pushedDown.paa));
+ (_display displayCtrl IDC_BUTTONBG1) ctrlSetText QPATHTOF(images\button_pushedDown.paa);
} else {
- (_display displayCtrl IDC_BUTTONBG1) ctrlSetText QUOTE(PATHTOF(images\button_pushedUp.paa));
+ (_display displayCtrl IDC_BUTTONBG1) ctrlSetText QPATHTOF(images\button_pushedUp.paa);
};
if (GVAR(currentApplicationPage) == APP_MODE_MAP) then {
- (_display displayCtrl IDC_BUTTONBG2) ctrlSetText QUOTE(PATHTOF(images\button_pushedDown.paa));
+ (_display displayCtrl IDC_BUTTONBG2) ctrlSetText QPATHTOF(images\button_pushedDown.paa);
} else {
- (_display displayCtrl IDC_BUTTONBG2) ctrlSetText QUOTE(PATHTOF(images\button_pushedUp.paa));
+ (_display displayCtrl IDC_BUTTONBG2) ctrlSetText QPATHTOF(images\button_pushedUp.paa);
};
//Update the page now:
diff --git a/addons/microdagr/functions/fnc_updateDisplay.sqf b/addons/microdagr/functions/fnc_updateDisplay.sqf
index 4b609085a8..7ba92e55ef 100644
--- a/addons/microdagr/functions/fnc_updateDisplay.sqf
+++ b/addons/microdagr/functions/fnc_updateDisplay.sqf
@@ -47,9 +47,9 @@ case (APP_MODE_INFODISPLAY): {
//Heading:
_compassAngleText = if (GVAR(settingUseMils)) then {
- [(floor ((6400 / 360) * (getDir ACE_player))), 4, 0] call CBA_fnc_formatNumber;
+ [(floor ((6400 / 360) * (([ACE_player] call CBA_fnc_headDir) select 0))), 4, 0] call CBA_fnc_formatNumber;
} else {
- ([(floor (getDir ACE_player)), 3, 1] call CBA_fnc_formatNumber) + "°" //degree symbol is in UTF-8
+ ([(floor (([ACE_player] call CBA_fnc_headDir) select 0)), 3, 1] call CBA_fnc_formatNumber) + "°" //degree symbol is in UTF-8
};
(_display displayCtrl IDC_MODEDISPLAY_HEADINGNUM) ctrlSetText _compassAngleText;
@@ -107,9 +107,9 @@ case (APP_MODE_INFODISPLAY): {
case (APP_MODE_COMPASS): {
//Heading:
_compassAngleText = if (GVAR(settingUseMils)) then {
- [(floor ((6400 / 360) * (getDir ACE_player))), 4, 0] call CBA_fnc_formatNumber;
+ [(floor ((6400 / 360) * (([ACE_player] call CBA_fnc_headDir) select 0))), 4, 0] call CBA_fnc_formatNumber;
} else {
- ([(floor (getDir ACE_player)), 3, 1] call CBA_fnc_formatNumber) + "°" //degree symbol is in UTF-8
+ ([(floor (([ACE_player] call CBA_fnc_headDir) select 0)), 3, 1] call CBA_fnc_formatNumber) + "°" //degree symbol is in UTF-8
};
(_display displayCtrl IDC_MODECOMPASS_HEADING) ctrlSetText _compassAngleText;
@@ -171,7 +171,7 @@ case (APP_MODE_WAYPOINTS): {
_currentIndex = (_currentIndex max 0) min (count _waypoints);
_wpListBox lbSetCurSel _currentIndex;
-
+
//Reset focus to a dummy ctrl (top button), otherwise HOME/POS1 key goes to top of listBox and has keybind blocked
ctrlSetFocus (_display displayCtrl IDC_TOPMENUBUTTON);
};
@@ -193,7 +193,7 @@ case (APP_MODE_SETUP): {
} else {
_settingListBox lbSetTextRight [1, (localize LSTRING(settingOff))];
};
-
+
//Reset focus to a dummy ctrl (top button), otherwise HOME/POS1 key goes to top of listBox and has keybind blocked
ctrlSetFocus (_display displayCtrl IDC_TOPMENUBUTTON);
};
diff --git a/addons/microdagr/gui_controls.hpp b/addons/microdagr/gui_controls.hpp
index a8fbb8f83f..4fd194e1ab 100644
--- a/addons/microdagr/gui_controls.hpp
+++ b/addons/microdagr/gui_controls.hpp
@@ -10,7 +10,7 @@ class controlsBackground {
};
class StatusBarBS: RscPicture {
idc = -1;
- text = QUOTE(PATHTOF(images\microDAGR_topBar.paa));
+ text = QPATHTOF(images\microDAGR_topBar.paa);
x = X_PART(0);
y = Y_PART(0);
w = W_PART(25);
@@ -18,7 +18,7 @@ class controlsBackground {
};
class RangefinderConnectedIcon: RscPicture {
idc = IDC_RANGEFINDERCONNECTEDICON;
- text = "\A3\ui_f\data\igui\rscingameui\rscoptics\laser_designator_iconLaserOn.paa";
+ text = QUOTE(PATHTOF(images\icon_menuLaser.paa));
x = X_PART(6.35);
y = Y_PART(0.1);
w = W_PART(2.7);
@@ -187,7 +187,7 @@ class controls {
};
class selfIcon: RscPicture {
idc = -1;
- text = QUOTE(PATHTOF(images\icon_self.paa));
+ text = QPATHTOF(images\icon_self.paa);
x = W_PART(0.5);
y = H_PART(2);
w = W_PART(4);
@@ -242,7 +242,7 @@ class controls {
};
class CompasIcon: RscPicture {
idc = -1;
- text = QUOTE(PATHTOF(images\icon_infoCompass.paa));
+ text = QPATHTOF(images\icon_infoCompass.paa);
x = W_PART(0.5);
y = H_PART(8.5);
w = W_PART(2);
@@ -284,7 +284,7 @@ class controls {
class controls {
class TimeIcon: RscPicture {
idc = -1;
- text = QUOTE(PATHTOF(images\icon_infoClock.paa));
+ text = QPATHTOF(images\icon_infoClock.paa);
x = W_PART(0.5);
y = H_PART(3.5);
w = W_PART(2);
@@ -315,7 +315,7 @@ class controls {
class controls {
class TargetIcon: RscPicture {
idc = IDC_MODEDISPLAY_TARGETICON;
- text = QUOTE(PATHTOF(images\icon_menuMark.paa));
+ text = QPATHTOF(images\icon_menuMark.paa);
x = W_PART(0.5);
y = H_PART(0.5);
w = W_PART(2);
@@ -440,7 +440,7 @@ class controls {
class mapTrackButton: GVAR(RscActiveTextPicture) {
onbuttonclick = QUOTE(['autotrack'] call FUNC(modeMapButtons));
idc = IDC_MODEMAP_MAPTRACKBUTTON;
- text = QUOTE(PATHTOF(images\icon_mapTrack.paa));
+ text = QPATHTOF(images\icon_mapTrack.paa);
x = X_PART(11);
y = Y_PART(18.75);
w = W_PART(3);
@@ -449,14 +449,14 @@ class controls {
class mapZoomIn: mapTrackButton {
onbuttonclick = QUOTE(['zoomin'] call FUNC(modeMapButtons));
idc = IDC_MODEMAP_MAPZOOMIN;
- text = QUOTE(PATHTOF(images\icon_mapPlus.paa));
+ text = QPATHTOF(images\icon_mapPlus.paa);
color[] = {1,1,1,0.4};
x = X_PART(4);
};
class mapZoomOut: mapTrackButton {
onbuttonclick = QUOTE(['zoomout'] call FUNC(modeMapButtons));
idc = IDC_MODEMAP_MAPZOOMOUT;
- text = QUOTE(PATHTOF(images\icon_mapMinus.paa));
+ text = QPATHTOF(images\icon_mapMinus.paa);
color[] = {1,1,1,0.4};
x = X_PART(18);
};
@@ -472,7 +472,7 @@ class controls {
class Controls {
class ButtonTL: GVAR(RscActiveTextPicture) {
idc = -1;
- text = QUOTE(PATHTOF(images\icon_menuMark.paa));
+ text = QPATHTOF(images\icon_menuMark.paa);
x = W_PART(3);
y = H_PART(1.5);
w = W_PART(8);
@@ -480,19 +480,19 @@ class controls {
onbuttonclick = QUOTE([4] call FUNC(saveCurrentAndSetNewMode));
};
class ButtonTR: ButtonTL {
- text = QUOTE(PATHTOF(images\icon_menuWaypoints.paa));
+ text = QPATHTOF(images\icon_menuWaypoints.paa);
x = W_PART(14);
y = H_PART(1.5);
onbuttonclick = QUOTE([5] call FUNC(saveCurrentAndSetNewMode));
};
class ButtonBL: ButtonTL {
- text = "\A3\ui_f\data\igui\rscingameui\rscoptics\laser_designator_iconLaserOn.paa";
+ text = QUOTE(PATHTOF(images\icon_menuLaser.paa));
x = W_PART(3);
y = H_PART(10.5);
onbuttonclick = QUOTE(_this call FUNC(appMenuButtonConnectRangefinder));
};
class ButtonBR: ButtonTL {
- text = QUOTE(PATHTOF(images\icon_menuSettings.paa));
+ text = QPATHTOF(images\icon_menuSettings.paa);
x = W_PART(14);
y = H_PART(10.5);
onbuttonclick = QUOTE([6] call FUNC(saveCurrentAndSetNewMode));
@@ -555,7 +555,7 @@ class controls {
};
class DeleteButton: GVAR(RscActiveTextPicture) {
idc = -1;
- text = QUOTE(PATHTOF(images\icon_deleteButton.paa));
+ text = QPATHTOF(images\icon_deleteButton.paa);
x = W_PART(20);
y = H_PART(2.75);
w = W_PART(2);
@@ -717,7 +717,7 @@ class controls {
class ButtonBG0: RscPicture {
idc = IDC_BUTTONBG0;
- text = QUOTE(PATHTOF(images\button_pushedDown.paa));
+ text = QPATHTOF(images\button_pushedDown.paa);
x = X_PART(0 * (25/3));
y = Y_PART(21);
w = W_PART((25/3));
@@ -733,7 +733,7 @@ class controls {
};
class ButtonIcon0: GVAR(RscActiveTextPicture) {
idc = -1;
- text = QUOTE(PATHTOF(images\icon_info.paa));
+ text = QPATHTOF(images\icon_info.paa);
x = X_PART(0 * (25/3));
y = Y_PART(21);
w = W_PART((25/3));
@@ -741,19 +741,19 @@ class controls {
onbuttonclick = QUOTE([APP_MODE_INFODISPLAY] call FUNC(saveCurrentAndSetNewMode));
};
class ButtonIcon1: ButtonIcon0 {
- text = QUOTE(PATHTOF(images\icon_compass.paa));
+ text = QPATHTOF(images\icon_compass.paa);
x = X_PART(1 * (25/3));
onbuttonclick = QUOTE([APP_MODE_COMPASS] call FUNC(saveCurrentAndSetNewMode));
};
class ButtonIcon2: ButtonIcon0 {
- text = QUOTE(PATHTOF(images\icon_map.paa));
+ text = QPATHTOF(images\icon_map.paa);
x = X_PART(2 * (25/3));
onbuttonclick = QUOTE([APP_MODE_MAP] call FUNC(saveCurrentAndSetNewMode));
};
//At the end: The Big Shell overlay
class MicroDagrShell: RscPicture {
idc = IDC_MICRODAGRSHELL;
- text = QUOTE(PATHTOF(images\microDAGR_shellPicture.paa));
+ text = QPATHTOF(images\microDAGR_shellPicture.paa);
x = X_PART(-14.77);
y = Y_PART(-5.875);
w = W_PART(53.62);
diff --git a/addons/microdagr/images/button_pushedDown.paa b/addons/microdagr/images/button_pushedDown.paa
index fc519a3235..30ac306c5b 100644
Binary files a/addons/microdagr/images/button_pushedDown.paa and b/addons/microdagr/images/button_pushedDown.paa differ
diff --git a/addons/microdagr/images/button_pushedUp.paa b/addons/microdagr/images/button_pushedUp.paa
index 5aa18986be..cc6981e82a 100644
Binary files a/addons/microdagr/images/button_pushedUp.paa and b/addons/microdagr/images/button_pushedUp.paa differ
diff --git a/addons/microdagr/images/icon_compass.paa b/addons/microdagr/images/icon_compass.paa
index 777eaffde4..4449ce17bc 100644
Binary files a/addons/microdagr/images/icon_compass.paa and b/addons/microdagr/images/icon_compass.paa differ
diff --git a/addons/microdagr/images/icon_info.paa b/addons/microdagr/images/icon_info.paa
index 5dc94a444c..00247b8267 100644
Binary files a/addons/microdagr/images/icon_info.paa and b/addons/microdagr/images/icon_info.paa differ
diff --git a/addons/microdagr/images/icon_infoClock.paa b/addons/microdagr/images/icon_infoClock.paa
index 292cf29afb..5d9b1eeda3 100644
Binary files a/addons/microdagr/images/icon_infoClock.paa and b/addons/microdagr/images/icon_infoClock.paa differ
diff --git a/addons/microdagr/images/icon_infoCompass.paa b/addons/microdagr/images/icon_infoCompass.paa
index 8390a24509..927940740c 100644
Binary files a/addons/microdagr/images/icon_infoCompass.paa and b/addons/microdagr/images/icon_infoCompass.paa differ
diff --git a/addons/microdagr/images/icon_map.paa b/addons/microdagr/images/icon_map.paa
index 52c3931c68..7fe52c455b 100644
Binary files a/addons/microdagr/images/icon_map.paa and b/addons/microdagr/images/icon_map.paa differ
diff --git a/addons/microdagr/images/icon_menuLaser.paa b/addons/microdagr/images/icon_menuLaser.paa
new file mode 100644
index 0000000000..43b546b88d
Binary files /dev/null and b/addons/microdagr/images/icon_menuLaser.paa differ
diff --git a/addons/microdagr/images/icon_menuMark.paa b/addons/microdagr/images/icon_menuMark.paa
index 2c77aac04b..44e62af43d 100644
Binary files a/addons/microdagr/images/icon_menuMark.paa and b/addons/microdagr/images/icon_menuMark.paa differ
diff --git a/addons/microdagr/images/icon_menuSettings.paa b/addons/microdagr/images/icon_menuSettings.paa
index cfb340247e..f8e307ff55 100644
Binary files a/addons/microdagr/images/icon_menuSettings.paa and b/addons/microdagr/images/icon_menuSettings.paa differ
diff --git a/addons/microdagr/images/icon_menuWaypoints.paa b/addons/microdagr/images/icon_menuWaypoints.paa
index 74ca3a59c1..92ebdb17ad 100644
Binary files a/addons/microdagr/images/icon_menuWaypoints.paa and b/addons/microdagr/images/icon_menuWaypoints.paa differ
diff --git a/addons/microdagr/images/microDAGR_topBar.paa b/addons/microdagr/images/microDAGR_topBar.paa
index c4c28307f0..317279a266 100644
Binary files a/addons/microdagr/images/microDAGR_topBar.paa and b/addons/microdagr/images/microDAGR_topBar.paa differ
diff --git a/addons/microdagr/stringtable.xml b/addons/microdagr/stringtable.xml
index 7e2261107f..c20ea7aede 100644
--- a/addons/microdagr/stringtable.xml
+++ b/addons/microdagr/stringtable.xml
@@ -1,4 +1,4 @@
-
+
@@ -311,6 +311,7 @@
MicroDAGR - Remplissage de la carte
MicroDAGR térképkitöltés
Заполнение карты MicroDAGR
+ Riempimento Mappa MicroDAGR
MicroDAGR Map Fill
@@ -322,6 +323,7 @@
MicroDAGR - Remplissage de la carte
MicroDAGR térképkitöltés
Заполнение карты MicroDAGR
+ Riempimento Mappa MicroDAGR
How much map data is filled on MicroDAGR's
@@ -330,9 +332,10 @@
Wie viel Daten auf einem MicroDAGR zu sehen sind
Kolik informací je načteno do MicroDAGR?
Quanta informação é preenchida no mapa do MicroDAGR
- Combien d'information apparaisse sur la carte du MicroDAGR
+ Combien d'informations apparaissent sur la carte du MicroDAGR
Mennyi térképadatot tartalmaz a MicroDAGR
Сколько данных должно отображаться на карте MicroDAGR
+ Quanti dati sono trasferiti nella mappa del MicroDAGR
Full Satellite + Buildings
@@ -344,6 +347,7 @@
Satellite + Batiments
Teljes műholdas + épületek
Спутник + Здания
+ Satellite Completo + Edifici
Topographical + Roads
@@ -355,28 +359,31 @@
Topographie + Routes
Topográfia + utak
Топография + Дороги
+ Topografico + Strade
None (Cannot use map view)
Żadna (wyłącza ekran mapy)
- Nada (No se puede el mapa)
+ Nada (No se puede usar vista del mapa)
Keine (kann keine Kartenansicht verwenden)
Žádný (Nelze použít zobrazení mapy)
Nada (Não pode usar a tela de mapa)
Rien (La vue carte n'est pas possible)
Semmi (nem használható a térképnézet)
Не показывать (запрещает использовать режим карты)
+ Nessuno (Non puoi usare la vista mappa)
- Controls how much data is filled on the microDAGR items. Less data restricts the map view to show less on the minimap.<br />Source: microDAGR.pbo
- Moduł ten pozwala kontrolować jak duża ilość informacji jest załadowana do przedmiotów MicroDAGR. Mniejsza ilość danych ogranicza widok mapy pokazując mniej rzeczy na minimapie.<br />Źródło: microDAGR.pbo
- Controla la cantidad de información disponible en el microDAGR. Menos datos limitan la vista del mapa a mostrar menos en el minimapa.<br />Fuente: microDAGR.pbo
- Steuert wie viel Daten auf dem microDAGR zu sehen ist. Weniger Daten schränken die Kartenansicht ein, um mehr auf der Minimap zu sehen.<br />Quelle: microDAGR.pbo
- Tento modul umožňuje kontrolovat, kolik informací je obsaženo v MicroDAGR. Menší množství dat omezené zobrazením mapy ukazují méně věcí na minimapě.<br />Zdroj: microDAGR.pbo
- Controla quantos dados são preenchidos nos itens microDAGR. Menos dados restringe a visualização de mapa para mostrar menos informações no minimapa<br/>Fonte: MicroDAGR.pbo
- Contrôle le nombre d'information disponible sur la carte du MicroDAGR. <br/>Source: microDAGR.pbo
- Meghatárroza a MicroDAGR objektumok térképének tartalmát. A kevesebb adat korlátozza a térképnézeti módot az eszközön. <br />Forrás: microDAGR.pbo
- Контролирует, сколько данных должно отображаться на карте устройств MicroDAGR. Ограничивает объем отображаемых данных на миникарте.<br />Источник: microDAGR.pbo
+ Controls how much data is filled on the microDAGR items. Less data restricts the map view to show less on the minimap.
+ Moduł ten pozwala kontrolować jak duża ilość informacji jest załadowana do przedmiotów MicroDAGR. Mniejsza ilość danych ogranicza widok mapy pokazując mniej rzeczy na minimapie.
+ Controla la cantidad de información disponible en el microDAGR. Menos datos limitan la vista del mapa a mostrar menos en el minimapa.
+ Steuert wie viel Daten auf dem microDAGR zu sehen ist. Weniger Daten schränken die Kartenansicht ein, um mehr auf der Minimap zu sehen.
+ Tento modul umožňuje kontrolovat, kolik informací je obsaženo v MicroDAGR. Menší množství dat omezené zobrazením mapy ukazují méně věcí na minimapě.
+ Controla quantos dados são preenchidos nos itens microDAGR. Menos dados restringe a visualização de mapa para mostrar menos informações no minimapa.
+ Contrôle le nombre d'informations disponibles sur la carte du MicroDAGR.
+ Meghatárroza a MicroDAGR objektumok térképének tartalmát. A kevesebb adat korlátozza a térképnézeti módot az eszközön.
+ Контролирует, сколько данных должно отображаться на карте устройств MicroDAGR. Ограничивает объем отображаемых данных на миникарте.
+ Controlla quanti dati sono presenti negli oggetti MicroDAGR. Meno dati costringono la vista mappa a mostrare meno informazioni nella minimappa.
-
+
\ No newline at end of file
diff --git a/addons/missileguidance/ACE_GuidanceConfig.hpp b/addons/missileguidance/ACE_GuidanceConfig.hpp
index f3434fef9b..f202e7d161 100644
--- a/addons/missileguidance/ACE_GuidanceConfig.hpp
+++ b/addons/missileguidance/ACE_GuidanceConfig.hpp
@@ -1,61 +1,61 @@
-class GVAR(AttackProfiles) {
- class LIN {
- name = "";
- visualName = "";
- description = "";
-
- functionName = QFUNC(attackProfile_LIN);
- };
- class DIR {
- name = "";
- visualName = "";
- description = "";
-
- functionName = QFUNC(attackProfile_DIR);
- };
- class MID {
- name = "";
- visualName = "";
- description = "";
-
- functionName = QFUNC(attackProfile_MID);
- };
- class HI {
- name = "";
- visualName = "";
- description = "";
-
- functionName = QFUNC(attackProfile_HI);
- };
- class JAV_DIR {
- name = "";
- visualName = "";
- description = "";
-
- functionName = QFUNC(attackProfile_JAV_DIR);
- };
- class JAV_TOP {
- name = "";
- visualName = "";
- description = "";
-
- functionName = QFUNC(attackProfile_JAV_TOP);
- };
-};
-
-class GVAR(SeekerTypes) {
- class SALH {
- name = "";
- visualName = "";
- description = "";
-
- functionName = QFUNC(seekerType_SALH);
- };
- class Optic {
- name = "";
- visualName = "";
- description = "";
-
- functionName = QFUNC(seekerType_Optic);
- };
-};
+class GVAR(AttackProfiles) {
+ class LIN {
+ name = "";
+ visualName = "";
+ description = "";
+
+ functionName = QFUNC(attackProfile_LIN);
+ };
+ class DIR {
+ name = "";
+ visualName = "";
+ description = "";
+
+ functionName = QFUNC(attackProfile_DIR);
+ };
+ class MID {
+ name = "";
+ visualName = "";
+ description = "";
+
+ functionName = QFUNC(attackProfile_MID);
+ };
+ class HI {
+ name = "";
+ visualName = "";
+ description = "";
+
+ functionName = QFUNC(attackProfile_HI);
+ };
+ class JAV_DIR {
+ name = "";
+ visualName = "";
+ description = "";
+
+ functionName = QFUNC(attackProfile_JAV_DIR);
+ };
+ class JAV_TOP {
+ name = "";
+ visualName = "";
+ description = "";
+
+ functionName = QFUNC(attackProfile_JAV_TOP);
+ };
+};
+
+class GVAR(SeekerTypes) {
+ class SALH {
+ name = "";
+ visualName = "";
+ description = "";
+
+ functionName = QFUNC(seekerType_SALH);
+ };
+ class Optic {
+ name = "";
+ visualName = "";
+ description = "";
+
+ functionName = QFUNC(seekerType_Optic);
+ };
+};
diff --git a/addons/missileguidance/ACE_Settings.hpp b/addons/missileguidance/ACE_Settings.hpp
index 2ec3326a98..e73d533c08 100644
--- a/addons/missileguidance/ACE_Settings.hpp
+++ b/addons/missileguidance/ACE_Settings.hpp
@@ -1,10 +1,10 @@
-class ACE_Settings {
- class GVAR(enabled) {
- value = 2;
- typeName = "SCALAR";
- isClientSettable = 1;
- displayName = CSTRING(Title);
- description = CSTRING(Desc);
- values[] = {CSTRING(Off), CSTRING(PlayerOnly), CSTRING(PlayerAndAi)};
- };
+class ACE_Settings {
+ class GVAR(enabled) {
+ value = 2;
+ typeName = "SCALAR";
+ isClientSettable = 1;
+ displayName = CSTRING(Title);
+ description = CSTRING(Desc);
+ values[] = {CSTRING(Off), CSTRING(PlayerOnly), CSTRING(PlayerAndAi)};
+ };
};
\ No newline at end of file
diff --git a/addons/missileguidance/CfgAmmo.hpp b/addons/missileguidance/CfgAmmo.hpp
index fc0546f797..ad3b854334 100644
--- a/addons/missileguidance/CfgAmmo.hpp
+++ b/addons/missileguidance/CfgAmmo.hpp
@@ -1,160 +1,156 @@
-enum {
- ACE_LOBL = 1,
- ACE_LOAL = 2
-};
-
-class CfgAmmo {
- class MissileBase;
-
- class M_PG_AT: MissileBase {
- model = "\A3\Weapons_F\Ammo\Rocket_01_fly_F";
- proxyShape = "\A3\Weapons_F\Ammo\Rocket_01_F";
-
- irLock = 0;
- laserLock = 0;
- airLock = 0;
- weaponLockSystem = "2 + 16";
-
- maxSpeed = 720;
- maxControlRange = 5000;
- maneuvrability = 8;
- timeToLive = 60;
- simulationStep = 0.01;
- airFriction = 0.1;
- sideAirFriction = 0.16;
- initTime = 0.002;
- thrustTime = 1.07;
- thrust = 530;
- fuseDistance = 2;
-
- effectsMissileInit = "MissileDAR1";
- effectsMissile = "missile2";
- whistleDist = 4;
- muzzleEffect = "";
-
- // Turn off arma crosshair-guidance
- manualControl = 0;
-
- // ACE uses these values
- trackOversteer = 1;
- trackLead = 0;
-
- // Begin ACE guidance Configs
- class ADDON {
- enabled = 1;
-
- minDeflection = 0.00025; // Minium flap deflection for guidance
- maxDeflection = 0.001; // Maximum flap deflection for guidance
- incDeflection = 0.0005; // The incrmeent in which deflection adjusts.
-
- canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode
-
- // Guidance type for munitions
- defaultSeekerType = "SALH";
- seekerTypes[] = { "SALH", "LIDAR", "SARH", "Optic", "Thermal", "GPS", "SACLOS", "MCLOS" };
-
- defaultSeekerLockMode = "LOAL";
- seekerLockModes[] = { "LOAL", "LOBL" };
-
- seekerAngle = 90; // Angle in front of the missile which can be searched
- seekerAccuracy = 1; // seeker accuracy multiplier
-
- seekerMinRange = 1;
- seekerMaxRange = 2500; // Range from the missile which the seeker can visually search
-
- // Attack profile type selection
- defaultAttackProfile = "LIN";
- attackProfiles[] = { "LIN", "DIR", "MID", "HI" };
- };
- };
-
- class ACE_Hydra70_DAGR: M_PG_AT {
- displayName = CSTRING(Hydra70_DAGR);
- displayNameShort = CSTRING(Hydra70_DAGR_Short);
-
- description = CSTRING(Hydra70_DAGR_Desc);
- descriptionShort = CSTRING(Hydra70_DAGR_Desc);
-
- EGVAR(rearm,caliber) = 70;
-
- //Explicity add guidance config
- class ADDON: ADDON {};
- };
-
- class ACE_Hellfire_AGM114K: ACE_Hydra70_DAGR {
- displayName = CSTRING(Hellfire_AGM114K);
- displayNameShort = CSTRING(Hellfire_AGM114K_Short);
-
- description = CSTRING(Hellfire_AGM114K_desc);
- descriptionShort = CSTRING(Hellfire_AGM114K_desc);
-
- // @TODO: placeholder model to at least make it look different
- model = "\A3\Weapons_F\Ammo\Missile_AT_03_fly_F";
- proxyShape = "\A3\Weapons_F\Ammo\Missile_AT_03_F";
-
- hit = 1400;
- indirectHit = 71;
- indirectHitRange = 4.5;
- effectsMissile = "missile2";
-
- //Explicity add guidance config
- class ADDON: ADDON {};
- };
-
- // Titan
- class M_Titan_AT: MissileBase {};
-
- class ACE_Javelin_FGM148: M_Titan_AT {
- irLock = 0;
- laserLock = 0;
- airLock = 0;
-
- // Turn off arma crosshair-guidance
- manualControl = 0;
-
- hit = 1400; // default: 800
- indirectHit = 20;
- indirectHitRange = 2;
- // ACE uses these values
- //trackOversteer = 1;
- //trackLead = 0;
-
- initTime = 2;
-
- // Begin ACE guidance Configs
- class ADDON {
- enabled = 1;
-
- minDeflection = 0.00005; // Minium flap deflection for guidance
- maxDeflection = 0.025; // Maximum flap deflection for guidance
- incDeflection = 0.00005; // The incrmeent in which deflection adjusts.
-
- canVanillaLock = 0;
-
- // Guidance type for munitions
- defaultSeekerType = "Optic";
- seekerTypes[] = { "Optic" };
-
- defaultSeekerLockMode = "LOBL";
- seekerLockModes[] = { "LOBL" };
-
- seekerAngle = 180; // Angle in front of the missile which can be searched
- seekerAccuracy = 1; // seeker accuracy multiplier
-
- seekerMinRange = 0;
- seekerMaxRange = 2500; // Range from the missile which the seeker can visually search
-
- // Attack profile type selection
- defaultAttackProfile = "JAV_TOP";
- attackProfiles[] = { "JAV_TOP", "JAV_DIR" };
- };
- };
- class ACE_Javelin_FGM148_static: ACE_Javelin_FGM148 {
- //Take config changes from (M_Titan_AT_static: M_Titan_AT)
- initTime = 0.25; //"How long (in seconds) the projectile waits before starting it's engine.", - but doesn't seem to do anything
- effectsMissileInit = "RocketBackEffectsStaticRPG";
-
- //Explicity add guidance config
- class ADDON: ADDON {};
- };
-};
+enum {
+ ACE_LOBL = 1,
+ ACE_LOAL = 2
+};
+
+class CfgAmmo {
+ class MissileBase;
+
+ class M_PG_AT: MissileBase {
+ model = "\A3\Weapons_F\Ammo\Rocket_01_fly_F";
+ proxyShape = "\A3\Weapons_F\Ammo\Rocket_01_F";
+
+ irLock = 0;
+ laserLock = 1;
+ airLock = 0;
+ weaponLockSystem = "4 + 16";
+
+ maxSpeed = 720;
+ maxControlRange = 5000;
+ maneuvrability = 8;
+ timeToLive = 60;
+ simulationStep = 0.01;
+ airFriction = 0.1;
+ sideAirFriction = 0.16;
+ initTime = 0.002;
+ thrustTime = 1.07;
+ thrust = 530;
+ fuseDistance = 2;
+
+ effectsMissileInit = "MissileDAR1";
+ effectsMissile = "missile2";
+ whistleDist = 4;
+ muzzleEffect = "";
+
+ // Turn off arma crosshair-guidance
+ manualControl = 0;
+
+ // ACE uses these values
+ trackOversteer = 1;
+ trackLead = 0;
+ };
+
+ class ACE_Hydra70_DAGR: M_PG_AT {
+ displayName = CSTRING(Hydra70_DAGR);
+ displayNameShort = CSTRING(Hydra70_DAGR_Short);
+
+ description = CSTRING(Hydra70_DAGR_Desc);
+ descriptionShort = CSTRING(Hydra70_DAGR_Desc);
+
+ EGVAR(rearm,caliber) = 70;
+
+ class ADDON {
+ enabled = 1;
+
+ minDeflection = 0.00025; // Minium flap deflection for guidance
+ maxDeflection = 0.001; // Maximum flap deflection for guidance
+ incDeflection = 0.0005; // The incrmeent in which deflection adjusts.
+
+ canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode
+
+ // Guidance type for munitions
+ defaultSeekerType = "SALH";
+ seekerTypes[] = { "SALH", "LIDAR", "SARH", "Optic", "Thermal", "GPS", "SACLOS", "MCLOS" };
+
+ defaultSeekerLockMode = "LOAL";
+ seekerLockModes[] = { "LOAL", "LOBL" };
+
+ seekerAngle = 90; // Angle in front of the missile which can be searched
+ seekerAccuracy = 1; // seeker accuracy multiplier
+
+ seekerMinRange = 1;
+ seekerMaxRange = 2500; // Range from the missile which the seeker can visually search
+
+ // Attack profile type selection
+ defaultAttackProfile = "LIN";
+ attackProfiles[] = { "LIN", "DIR", "MID", "HI" };
+ };
+ };
+
+ class ACE_Hellfire_AGM114K: ACE_Hydra70_DAGR {
+ displayName = CSTRING(Hellfire_AGM114K);
+ displayNameShort = CSTRING(Hellfire_AGM114K_Short);
+
+ description = CSTRING(Hellfire_AGM114K_desc);
+ descriptionShort = CSTRING(Hellfire_AGM114K_desc);
+
+ // @TODO: placeholder model to at least make it look different
+ model = "\A3\Weapons_F\Ammo\Missile_AT_03_fly_F";
+ proxyShape = "\A3\Weapons_F\Ammo\Missile_AT_03_F";
+
+ hit = 1400;
+ indirectHit = 71;
+ indirectHitRange = 4.5;
+ effectsMissile = "missile2";
+
+ //Explicity add guidance config
+ class ADDON: ADDON {};
+ };
+
+ // Titan
+ class M_Titan_AT: MissileBase {};
+
+ class ACE_Javelin_FGM148: M_Titan_AT {
+ irLock = 0;
+ laserLock = 0;
+ airLock = 0;
+
+ // Turn off arma crosshair-guidance
+ manualControl = 0;
+
+ hit = 1400; // default: 800
+ indirectHit = 20;
+ indirectHitRange = 2;
+ // ACE uses these values
+ //trackOversteer = 1;
+ //trackLead = 0;
+
+ initTime = 2;
+
+ // Begin ACE guidance Configs
+ class ADDON {
+ enabled = 1;
+
+ minDeflection = 0.00005; // Minium flap deflection for guidance
+ maxDeflection = 0.025; // Maximum flap deflection for guidance
+ incDeflection = 0.00005; // The incrmeent in which deflection adjusts.
+
+ canVanillaLock = 0;
+
+ // Guidance type for munitions
+ defaultSeekerType = "Optic";
+ seekerTypes[] = { "Optic" };
+
+ defaultSeekerLockMode = "LOBL";
+ seekerLockModes[] = { "LOBL" };
+
+ seekerAngle = 180; // Angle in front of the missile which can be searched
+ seekerAccuracy = 1; // seeker accuracy multiplier
+
+ seekerMinRange = 0;
+ seekerMaxRange = 2500; // Range from the missile which the seeker can visually search
+
+ // Attack profile type selection
+ defaultAttackProfile = "JAV_TOP";
+ attackProfiles[] = { "JAV_TOP", "JAV_DIR" };
+ };
+ };
+ class ACE_Javelin_FGM148_static: ACE_Javelin_FGM148 {
+ //Take config changes from (M_Titan_AT_static: M_Titan_AT)
+ initTime = 0.25; //"How long (in seconds) the projectile waits before starting it's engine.", - but doesn't seem to do anything
+ effectsMissileInit = "RocketBackEffectsStaticRPG";
+
+ //Explicity add guidance config
+ class ADDON: ADDON {};
+ };
+};
diff --git a/addons/missileguidance/CfgEventhandlers.hpp b/addons/missileguidance/CfgEventhandlers.hpp
index 8afeb9245e..7fba1f43c4 100644
--- a/addons/missileguidance/CfgEventhandlers.hpp
+++ b/addons/missileguidance/CfgEventhandlers.hpp
@@ -1,23 +1,30 @@
-class Extended_PreInit_EventHandlers {
- class ADDON {
- init = QUOTE(call COMPILE_FILE(XEH_pre_init));
- };
-};
-
-class Extended_PostInit_EventHandlers {
- class ADDON {
- init = QUOTE(call COMPILE_FILE(XEH_post_init));
- };
-};
-
-class Extended_FiredBIS_EventHandlers {
- class All {
- ADDON = QUOTE(_this call FUNC(onFired));
- };
-};
-
-class Extended_IncomingMissile_EventHandlers {
- class All {
- ADDON = QUOTE(_this call FUNC(onIncomingMissile));
- };
-};
\ No newline at end of file
+
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
+class Extended_PreInit_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_pre_init));
+ };
+};
+
+class Extended_PostInit_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_post_init));
+ };
+};
+
+class Extended_FiredBIS_EventHandlers {
+ class All {
+ ADDON = QUOTE(_this call FUNC(onFired));
+ };
+};
+
+class Extended_IncomingMissile_EventHandlers {
+ class All {
+ ADDON = QUOTE(_this call FUNC(onIncomingMissile));
+ };
+};
diff --git a/addons/missileguidance/CfgMagazines.hpp b/addons/missileguidance/CfgMagazines.hpp
index 31f4739417..e4a84862ae 100644
--- a/addons/missileguidance/CfgMagazines.hpp
+++ b/addons/missileguidance/CfgMagazines.hpp
@@ -1,53 +1,53 @@
-class CfgMagazines {
- class 12Rnd_PG_missiles;
-
- class 6Rnd_ACE_Hydra70_DAGR : 12Rnd_PG_missiles {
- ammo = "ACE_Hydra70_DAGR";
- count = 12;
- displayName = "6 Round DAGR";
- displayNameShort = "6 Round DAGR";
- descriptionShort = "6 Round DAGR";
- weight = 36;
-
- };
- class 12Rnd_ACE_Hydra70_DAGR : 6Rnd_ACE_Hydra70_DAGR {
- count = 12;
- displayName = "16 Round DAGR";
- displayNameShort = "16 Round DAGR";
- descriptionShort = "16 Round DAGR";
- weight = 72;
- };
- class 24Rnd_ACE_Hydra70_DAGR : 6Rnd_ACE_Hydra70_DAGR {
- count = 24;
- displayName = "24 Round DAGR";
- displayNameShort = "24 Round DAGR";
- descriptionShort = "24 Round DAGR";
- weight = 72;
- };
-
- // Hellfires
- class 6Rnd_ACE_Hellfire_AGM114K : 12Rnd_PG_missiles {
- count = 12;
- ammo = "ACE_Hellfire_AGM114K";
- displayName = "6Rnd_ACE_Hellfire_AGM114K";
- displayNameShort = "6Rnd_ACE_Hellfire_AGM114K";
- descriptionShort = "6Rnd_ACE_Hellfire_AGM114K";
- weight = 36;
-
- };
- class 12Rnd_ACE_Hellfire_AGM114K : 6Rnd_ACE_Hydra70_DAGR {
- count = 12;
- displayName = "12Rnd_ACE_Hellfire_AGM114K";
- displayNameShort = "12Rnd_ACE_Hellfire_AGM114K";
- descriptionShort = "12Rnd_ACE_Hellfire_AGM114K";
- weight = 72;
- };
- class 24Rnd_ACE_Hellfire_AGM114K : 6Rnd_ACE_Hydra70_DAGR {
- count = 24;
- displayName = "24Rnd_ACE_Hellfire_AGM114K";
- displayNameShort = "24Rnd_ACE_Hellfire_AGM114K";
- descriptionShort = "24Rnd_ACE_Hellfire_AGM114K";
- weight = 72;
- };
-
-};
\ No newline at end of file
+class CfgMagazines {
+ class 12Rnd_PG_missiles;
+
+ class 6Rnd_ACE_Hydra70_DAGR : 12Rnd_PG_missiles {
+ ammo = "ACE_Hydra70_DAGR";
+ count = 12;
+ displayName = "6 Round DAGR";
+ displayNameShort = "6 Round DAGR";
+ descriptionShort = "6 Round DAGR";
+ weight = 36;
+
+ };
+ class 12Rnd_ACE_Hydra70_DAGR : 6Rnd_ACE_Hydra70_DAGR {
+ count = 12;
+ displayName = "16 Round DAGR";
+ displayNameShort = "16 Round DAGR";
+ descriptionShort = "16 Round DAGR";
+ weight = 72;
+ };
+ class 24Rnd_ACE_Hydra70_DAGR : 6Rnd_ACE_Hydra70_DAGR {
+ count = 24;
+ displayName = "24 Round DAGR";
+ displayNameShort = "24 Round DAGR";
+ descriptionShort = "24 Round DAGR";
+ weight = 72;
+ };
+
+ // Hellfires
+ class 6Rnd_ACE_Hellfire_AGM114K : 12Rnd_PG_missiles {
+ count = 12;
+ ammo = "ACE_Hellfire_AGM114K";
+ displayName = "6Rnd_ACE_Hellfire_AGM114K";
+ displayNameShort = "6Rnd_ACE_Hellfire_AGM114K";
+ descriptionShort = "6Rnd_ACE_Hellfire_AGM114K";
+ weight = 36;
+
+ };
+ class 12Rnd_ACE_Hellfire_AGM114K : 6Rnd_ACE_Hydra70_DAGR {
+ count = 12;
+ displayName = "12Rnd_ACE_Hellfire_AGM114K";
+ displayNameShort = "12Rnd_ACE_Hellfire_AGM114K";
+ descriptionShort = "12Rnd_ACE_Hellfire_AGM114K";
+ weight = 72;
+ };
+ class 24Rnd_ACE_Hellfire_AGM114K : 6Rnd_ACE_Hydra70_DAGR {
+ count = 24;
+ displayName = "24Rnd_ACE_Hellfire_AGM114K";
+ displayNameShort = "24Rnd_ACE_Hellfire_AGM114K";
+ descriptionShort = "24Rnd_ACE_Hellfire_AGM114K";
+ weight = 72;
+ };
+
+};
diff --git a/addons/missileguidance/CfgVehicles.hpp b/addons/missileguidance/CfgVehicles.hpp
index 5069556078..be5c31a3f6 100644
--- a/addons/missileguidance/CfgVehicles.hpp
+++ b/addons/missileguidance/CfgVehicles.hpp
@@ -1,36 +1,36 @@
-class CfgVehicles {
-
- class AllVehicles;
- class Air: AllVehicles {
- class Turrets;
- };
-
- class Helicopter: Air {
- class Turrets {
- class MainTurret;
- };
- };
- class Helicopter_Base_F: Helicopter {};
- class Heli_Attack_01_base_F: Helicopter_Base_F {};
- class B_Heli_Attack_01_F : Heli_Attack_01_base_F {
- class Turrets: Turrets {
- class MainTurret;
- };
- };
-
- class ACE_Comanche_Test : B_Heli_Attack_01_F {
- scope = 1;
- scopeCurator = 0;
- displayName = "ACE_Comanche_Test";
- author = "ACE Team";
- class Library {
- libTextDesc = "ACE_Comanche_Test";
- };
- class Turrets: Turrets {
- class MainTurret: MainTurret {
- magazines[] = {"ACE_500Rnd_20mm_shells_Comanche", "24Rnd_ACE_Hellfire_AGM114K"};
- };
- };
- };
-
-};
+class CfgVehicles {
+
+ class AllVehicles;
+ class Air: AllVehicles {
+ class Turrets;
+ };
+
+ class Helicopter: Air {
+ class Turrets {
+ class MainTurret;
+ };
+ };
+ class Helicopter_Base_F: Helicopter {};
+ class Heli_Attack_01_base_F: Helicopter_Base_F {};
+ class B_Heli_Attack_01_F : Heli_Attack_01_base_F {
+ class Turrets: Turrets {
+ class MainTurret;
+ };
+ };
+
+ class ACE_Comanche_Test : B_Heli_Attack_01_F {
+ scope = 1;
+ scopeCurator = 0;
+ displayName = "ACE_Comanche_Test";
+ author = "ACE Team";
+ class Library {
+ libTextDesc = "ACE_Comanche_Test";
+ };
+ class Turrets: Turrets {
+ class MainTurret: MainTurret {
+ magazines[] = {"ACE_500Rnd_20mm_shells_Comanche", "24Rnd_ACE_Hellfire_AGM114K"};
+ };
+ };
+ };
+
+};
diff --git a/addons/missileguidance/CfgWeapons.hpp b/addons/missileguidance/CfgWeapons.hpp
index a922c6b82e..f57e3ab0df 100644
--- a/addons/missileguidance/CfgWeapons.hpp
+++ b/addons/missileguidance/CfgWeapons.hpp
@@ -1,13 +1,12 @@
-class Mode_SemiAuto;
-class CfgWeapons {
- class CannonCore;
- class LauncherCore;
-
- class RocketPods: LauncherCore {
- // canLock = 1;
- };
- class missiles_DAGR : RocketPods {
- canLock = 1;
- magazines[] += {"24Rnd_ACE_Hydra70_DAGR", "12Rnd_ACE_Hydra70_DAGR", "6Rnd_ACE_Hydra70_DAGR", "24Rnd_ACE_Hellfire_AGM114K", "12Rnd_ACE_Hellfire_AGM114K", "6Rnd_ACE_Hellfire_AGM114K" };
- };
-};
\ No newline at end of file
+class Mode_SemiAuto;
+class CfgWeapons {
+ class CannonCore;
+ class LauncherCore;
+
+ class RocketPods: LauncherCore {
+ // canLock = 1;
+ };
+ class missiles_DAGR : RocketPods {
+ canLock = 2;
+ };
+};
diff --git a/addons/missileguidance/XEH_PREP.hpp b/addons/missileguidance/XEH_PREP.hpp
new file mode 100644
index 0000000000..55948e7171
--- /dev/null
+++ b/addons/missileguidance/XEH_PREP.hpp
@@ -0,0 +1,32 @@
+
+PREP(rotateVectLineGetMap);
+PREP(rotateVectLine);
+PREP(changeMissileDirection);
+
+PREP(checkSeekerAngle);
+PREP(checkLos);
+
+PREP(onFired);
+PREP(onIncomingMissile);
+
+PREP(guidancePFH);
+PREP(doAttackProfile);
+PREP(doSeekerSearch);
+
+PREP(doHandoff);
+PREP(handleHandoff);
+
+// Attack Profiles
+PREP(attackProfile_LIN);
+PREP(attackProfile_DIR);
+PREP(attackProfile_MID);
+PREP(attackProfile_HI);
+PREP(attackProfile_AIR);
+
+// Javelin profiles
+PREP(attackProfile_JAV_DIR);
+PREP(attackProfile_JAV_TOP);
+
+// Seeker search functions
+PREP(seekerType_SALH);
+PREP(seekerType_Optic);
diff --git a/addons/missileguidance/XEH_post_init.sqf b/addons/missileguidance/XEH_post_init.sqf
index deaeef669d..282aac5503 100644
--- a/addons/missileguidance/XEH_post_init.sqf
+++ b/addons/missileguidance/XEH_post_init.sqf
@@ -1,3 +1,3 @@
-#include "script_component.hpp"
-
-[QGVAR(handoff), {_this call FUNC(handleHandoff)}] call EFUNC(common,addEventHandler);
+#include "script_component.hpp"
+
+[QGVAR(handoff), {_this call FUNC(handleHandoff)}] call CBA_fnc_addEventHandler;
diff --git a/addons/missileguidance/XEH_preStart.sqf b/addons/missileguidance/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/missileguidance/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/missileguidance/XEH_pre_init.sqf b/addons/missileguidance/XEH_pre_init.sqf
index 08219e02f0..a7feade1c3 100644
--- a/addons/missileguidance/XEH_pre_init.sqf
+++ b/addons/missileguidance/XEH_pre_init.sqf
@@ -1,33 +1,7 @@
-#include "script_component.hpp"
-
-PREP(rotateVectLineGetMap);
-PREP(rotateVectLine);
-PREP(changeMissileDirection);
-
-PREP(checkSeekerAngle);
-PREP(checkLos);
-
-PREP(onFired);
-PREP(onIncomingMissile);
-
-PREP(guidancePFH);
-PREP(doAttackProfile);
-PREP(doSeekerSearch);
-
-PREP(doHandoff);
-PREP(handleHandoff);
-
-// Attack Profiles
-PREP(attackProfile_LIN);
-PREP(attackProfile_DIR);
-PREP(attackProfile_MID);
-PREP(attackProfile_HI);
-PREP(attackProfile_AIR);
-
-// Javelin profiles
-PREP(attackProfile_JAV_DIR);
-PREP(attackProfile_JAV_TOP);
-
-// Seeker search functions
-PREP(seekerType_SALH);
-PREP(seekerType_Optic);
\ No newline at end of file
+#include "script_component.hpp"
+
+ADDON = false;
+
+#include "XEH_PREP.hpp"
+
+ADDON = true;
diff --git a/addons/missileguidance/config.cpp b/addons/missileguidance/config.cpp
index 591a4f1c5e..81c0aedc5e 100644
--- a/addons/missileguidance/config.cpp
+++ b/addons/missileguidance/config.cpp
@@ -1,20 +1,22 @@
-#include "script_component.hpp"
-
-class CfgPatches {
- class ADDON {
- units[] = {"ACE_Comanche_Test"};
- weapons[] = {};
- requiredVersion = REQUIRED_VERSION;
- requiredAddons[] = {"ace_laser"};
- VERSION_CONFIG;
- };
-};
-
-#include "ACE_GuidanceConfig.hpp"
-#include "ACE_Settings.hpp"
-
-#include "CfgEventhandlers.hpp"
-#include "CfgAmmo.hpp"
-#include "CfgMagazines.hpp"
-#include "CfgWeapons.hpp"
-#include "CfgVehicles.hpp"
+#include "script_component.hpp"
+
+class CfgPatches {
+ class ADDON {
+ units[] = {"ACE_Comanche_Test"};
+ weapons[] = {};
+ requiredVersion = REQUIRED_VERSION;
+ requiredAddons[] = {"ace_laser"};
+ author = ECSTRING(common,ACETeam);
+ url = ECSTRING(main,URL);
+ VERSION_CONFIG;
+ };
+};
+
+#include "ACE_GuidanceConfig.hpp"
+#include "ACE_Settings.hpp"
+
+#include "CfgEventhandlers.hpp"
+#include "CfgAmmo.hpp"
+#include "CfgMagazines.hpp"
+#include "CfgWeapons.hpp"
+#include "CfgVehicles.hpp"
diff --git a/addons/missileguidance/functions/fnc_attackProfile_AIR.sqf b/addons/missileguidance/functions/fnc_attackProfile_AIR.sqf
index 498b754287..9909124e2f 100644
--- a/addons/missileguidance/functions/fnc_attackProfile_AIR.sqf
+++ b/addons/missileguidance/functions/fnc_attackProfile_AIR.sqf
@@ -1,4 +1,4 @@
-//#define DEBUG_MODE_FULL
-#include "script_component.hpp"
-
+//#define DEBUG_MODE_FULL
+#include "script_component.hpp"
+
_this call FUNC(attackProfile_LIN);
\ No newline at end of file
diff --git a/addons/missileguidance/functions/fnc_attackProfile_DIR.sqf b/addons/missileguidance/functions/fnc_attackProfile_DIR.sqf
index 498b754287..9909124e2f 100644
--- a/addons/missileguidance/functions/fnc_attackProfile_DIR.sqf
+++ b/addons/missileguidance/functions/fnc_attackProfile_DIR.sqf
@@ -1,4 +1,4 @@
-//#define DEBUG_MODE_FULL
-#include "script_component.hpp"
-
+//#define DEBUG_MODE_FULL
+#include "script_component.hpp"
+
_this call FUNC(attackProfile_LIN);
\ No newline at end of file
diff --git a/addons/missileguidance/functions/fnc_attackProfile_HI.sqf b/addons/missileguidance/functions/fnc_attackProfile_HI.sqf
index 498b754287..9909124e2f 100644
--- a/addons/missileguidance/functions/fnc_attackProfile_HI.sqf
+++ b/addons/missileguidance/functions/fnc_attackProfile_HI.sqf
@@ -1,4 +1,4 @@
-//#define DEBUG_MODE_FULL
-#include "script_component.hpp"
-
+//#define DEBUG_MODE_FULL
+#include "script_component.hpp"
+
_this call FUNC(attackProfile_LIN);
\ No newline at end of file
diff --git a/addons/missileguidance/functions/fnc_attackProfile_JAV_DIR.sqf b/addons/missileguidance/functions/fnc_attackProfile_JAV_DIR.sqf
index d84b3b126b..d3f095ee95 100644
--- a/addons/missileguidance/functions/fnc_attackProfile_JAV_DIR.sqf
+++ b/addons/missileguidance/functions/fnc_attackProfile_JAV_DIR.sqf
@@ -1,66 +1,66 @@
-//#define DEBUG_MODE_FULL
-#include "script_component.hpp"
-
-#define STAGE_LAUNCH 1
-#define STAGE_CLIMB 2
-#define STAGE_COAST 3
-#define STAGE_TERMINAL 4
-
-EXPLODE_7_PVT(((_this select 1) select 0),_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
-private["_targetPos", "_projectilePos", "_target", "_seekerTargetPos", "_launchParams", "_targetLaunchParams"];
-private["_distanceToTarget", "_distanceToShooter", "_addHeight", "_returnTargetPos", "_state"];
-private["_cruisAlt", "_distanceShooterToTarget", "_shooterPos"];
-_seekerTargetPos = _this select 0;
-_launchParams = _this select 1;
-
-_target = _launchParams select 0;
-_targetLaunchParams = _launchParams select 1;
-
-_state = _this select 2;
-if( (count _state) < 1) then {
- _state set[0, STAGE_LAUNCH];
-};
-
-_shooterPos = getPosASL _shooter;
-_projectilePos = getPosASL _projectile;
-
-_distanceToTarget = _projectilePos vectorDistance _seekerTargetPos;
-_distanceToShooter = _projectilePos vectorDistance _shooterPos;
-_distanceShooterToTarget = _shooterPos vectorDistance _seekerTargetPos;
-
-TRACE_2("", _distanceToTarget, _distanceToShooter);
-
-// Add height depending on distance for compensate
-_returnTargetPos = _seekerTargetPos;
-
-switch( (_state select 0) ) do {
- case STAGE_LAUNCH: {
- TRACE_1("STAGE_LAUNCH","");
- if(_distanceToShooter < 10) then {
- _returnTargetPos = _seekerTargetPos vectorAdd [0,0,_distanceToTarget*2];
- } else {
- _state set[0, STAGE_CLIMB];
- };
- };
- case STAGE_CLIMB: {
- TRACE_1("STAGE_CLIMB","");
- _cruisAlt = 60 * (_distanceShooterToTarget/2000);
-
- if( ((ASLToATL _projectilePos) select 2) - ((ASLToATL _seekerTargetPos) select 2) >= _cruisAlt) then {
- _state set[0, STAGE_TERMINAL];
- } else {
- _returnTargetPos = _seekerTargetPos vectorAdd [0,0,_distanceToTarget*1.5];
- };
- };
- case STAGE_TERMINAL: {
- TRACE_1("STAGE_TERMINAL","");
- _returnTargetPos = _seekerTargetPos;
- };
-};
-
-#ifdef DEBUG_MODE_FULL
-drawLine3D [(ASLtoATL _returnTargetPos), (ASLtoATL _seekerTargetPos), [0,1,0,1]];
-#endif
-
-TRACE_1("Adjusted target position", _returnTargetPos);
+//#define DEBUG_MODE_FULL
+#include "script_component.hpp"
+
+#define STAGE_LAUNCH 1
+#define STAGE_CLIMB 2
+#define STAGE_COAST 3
+#define STAGE_TERMINAL 4
+
+EXPLODE_7_PVT(((_this select 1) select 0),_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
+private["_targetPos", "_projectilePos", "_target", "_seekerTargetPos", "_launchParams", "_targetLaunchParams"];
+private["_distanceToTarget", "_distanceToShooter", "_addHeight", "_returnTargetPos", "_state"];
+private["_cruisAlt", "_distanceShooterToTarget", "_shooterPos"];
+_seekerTargetPos = _this select 0;
+_launchParams = _this select 1;
+
+_target = _launchParams select 0;
+_targetLaunchParams = _launchParams select 1;
+
+_state = _this select 2;
+if( (count _state) < 1) then {
+ _state set[0, STAGE_LAUNCH];
+};
+
+_shooterPos = getPosASL _shooter;
+_projectilePos = getPosASL _projectile;
+
+_distanceToTarget = _projectilePos vectorDistance _seekerTargetPos;
+_distanceToShooter = _projectilePos vectorDistance _shooterPos;
+_distanceShooterToTarget = _shooterPos vectorDistance _seekerTargetPos;
+
+TRACE_2("", _distanceToTarget, _distanceToShooter);
+
+// Add height depending on distance for compensate
+_returnTargetPos = _seekerTargetPos;
+
+switch( (_state select 0) ) do {
+ case STAGE_LAUNCH: {
+ TRACE_1("STAGE_LAUNCH","");
+ if(_distanceToShooter < 10) then {
+ _returnTargetPos = _seekerTargetPos vectorAdd [0,0,_distanceToTarget*2];
+ } else {
+ _state set[0, STAGE_CLIMB];
+ };
+ };
+ case STAGE_CLIMB: {
+ TRACE_1("STAGE_CLIMB","");
+ _cruisAlt = 60 * (_distanceShooterToTarget/2000);
+
+ if( ((ASLToATL _projectilePos) select 2) - ((ASLToATL _seekerTargetPos) select 2) >= _cruisAlt) then {
+ _state set[0, STAGE_TERMINAL];
+ } else {
+ _returnTargetPos = _seekerTargetPos vectorAdd [0,0,_distanceToTarget*1.5];
+ };
+ };
+ case STAGE_TERMINAL: {
+ TRACE_1("STAGE_TERMINAL","");
+ _returnTargetPos = _seekerTargetPos;
+ };
+};
+
+#ifdef DEBUG_MODE_FULL
+drawLine3D [(ASLtoATL _returnTargetPos), (ASLtoATL _seekerTargetPos), [0,1,0,1]];
+#endif
+
+TRACE_1("Adjusted target position", _returnTargetPos);
_returnTargetPos;
\ No newline at end of file
diff --git a/addons/missileguidance/functions/fnc_attackProfile_JAV_TOP.sqf b/addons/missileguidance/functions/fnc_attackProfile_JAV_TOP.sqf
index 393abebc19..f26bcc58b0 100644
--- a/addons/missileguidance/functions/fnc_attackProfile_JAV_TOP.sqf
+++ b/addons/missileguidance/functions/fnc_attackProfile_JAV_TOP.sqf
@@ -1,84 +1,84 @@
-//#define DEBUG_MODE_FULL
-#include "script_component.hpp"
-
-#define STAGE_LAUNCH 1
-#define STAGE_CLIMB 2
-#define STAGE_COAST 3
-#define STAGE_TERMINAL 4
-
-EXPLODE_7_PVT(((_this select 1) select 0),_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
-private["_targetPos", "_projectilePos", "_target", "_seekerTargetPos", "_launchParams", "_targetLaunchParams"];
-private["_distanceToTarget", "_distanceToShooter", "_addHeight", "_returnTargetPos", "_state"];
-private["_cruisAlt", "_distanceShooterToTarget", "_shooterPos"];
-
-_seekerTargetPos = _this select 0;
-_launchParams = _this select 1;
-
-_target = _launchParams select 0;
-_targetLaunchParams = _launchParams select 1;
-
-_state = _this select 2;
-if( (count _state) < 1) then {
- _state set[0, STAGE_LAUNCH];
-};
-
-_shooterPos = getPosASL _shooter;
-_projectilePos = getPosASL _projectile;
-
-_distanceToTarget = _projectilePos vectorDistance _seekerTargetPos;
-_distanceToShooter = _projectilePos vectorDistance _shooterPos;
-_distanceShooterToTarget = _shooterPos vectorDistance _seekerTargetPos;
-
-TRACE_2("", _distanceToTarget, _distanceToShooter);
-
-// Add height depending on distance for compensate
-_returnTargetPos = _seekerTargetPos;
-
-switch( (_state select 0) ) do {
- case STAGE_LAUNCH: {
- TRACE_1("STAGE_LAUNCH","");
- if(_distanceToShooter < 10) then {
- _returnTargetPos = _seekerTargetPos vectorAdd [0,0,_distanceToTarget*2];
- } else {
- _state set[0, STAGE_CLIMB];
- };
- };
- case STAGE_CLIMB: {
- TRACE_1("STAGE_CLIMB","");
- _cruisAlt = 140;
- if(_distanceShooterToTarget < 1250) then {
- _cruisAlt = 140 * (_distanceShooterToTarget/1250);
- TRACE_1("_cruisAlt", _cruisAlt);
- };
- if( ((ASLToATL _projectilePos) select 2) - ((ASLToATL _seekerTargetPos) select 2) >= _cruisAlt) then {
- if(_cruisAlt < 140) then {
- _state set[0, STAGE_TERMINAL];
- } else {
- _state set[0, STAGE_COAST];
- };
- } else {
- _returnTargetPos = _seekerTargetPos vectorAdd [0,0,_distanceToTarget*1.5];
- };
- };
- case STAGE_COAST: {
- TRACE_1("STAGE_COAST","");
- TRACE_1("", ((ASLToATL _projectilePos) select 2) - (( ASLToATL _seekerTargetPos) select 2) );
- if(_distanceToTarget < ( ((ASLToATL _projectilePos) select 2) - (( ASLToATL _seekerTargetPos) select 2) ) * 1.5) then {
- _state set[0, STAGE_TERMINAL];
- } else {
- _returnTargetPos = _seekerTargetPos vectorAdd [0,0,(_projectilePos select 2)];
- };
- };
- case STAGE_TERMINAL: {
- TRACE_1("STAGE_TERMINAL","");
- //_returnTargetPos = _seekerTargetPos vectorAdd [0,0,_distanceToTarget * 0.02];
- _returnTargetPos = _seekerTargetPos;
- };
-};
-
-#ifdef DEBUG_MODE_FULL
-drawLine3D [(ASLtoATL _returnTargetPos), (ASLtoATL _seekerTargetPos), [0,1,0,1]];
-#endif
-
-TRACE_1("Adjusted target position", _returnTargetPos);
+//#define DEBUG_MODE_FULL
+#include "script_component.hpp"
+
+#define STAGE_LAUNCH 1
+#define STAGE_CLIMB 2
+#define STAGE_COAST 3
+#define STAGE_TERMINAL 4
+
+EXPLODE_7_PVT(((_this select 1) select 0),_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
+private["_targetPos", "_projectilePos", "_target", "_seekerTargetPos", "_launchParams", "_targetLaunchParams"];
+private["_distanceToTarget", "_distanceToShooter", "_addHeight", "_returnTargetPos", "_state"];
+private["_cruisAlt", "_distanceShooterToTarget", "_shooterPos"];
+
+_seekerTargetPos = _this select 0;
+_launchParams = _this select 1;
+
+_target = _launchParams select 0;
+_targetLaunchParams = _launchParams select 1;
+
+_state = _this select 2;
+if( (count _state) < 1) then {
+ _state set[0, STAGE_LAUNCH];
+};
+
+_shooterPos = getPosASL _shooter;
+_projectilePos = getPosASL _projectile;
+
+_distanceToTarget = _projectilePos vectorDistance _seekerTargetPos;
+_distanceToShooter = _projectilePos vectorDistance _shooterPos;
+_distanceShooterToTarget = _shooterPos vectorDistance _seekerTargetPos;
+
+TRACE_2("", _distanceToTarget, _distanceToShooter);
+
+// Add height depending on distance for compensate
+_returnTargetPos = _seekerTargetPos;
+
+switch( (_state select 0) ) do {
+ case STAGE_LAUNCH: {
+ TRACE_1("STAGE_LAUNCH","");
+ if(_distanceToShooter < 10) then {
+ _returnTargetPos = _seekerTargetPos vectorAdd [0,0,_distanceToTarget*2];
+ } else {
+ _state set[0, STAGE_CLIMB];
+ };
+ };
+ case STAGE_CLIMB: {
+ TRACE_1("STAGE_CLIMB","");
+ _cruisAlt = 140;
+ if(_distanceShooterToTarget < 1250) then {
+ _cruisAlt = 140 * (_distanceShooterToTarget/1250);
+ TRACE_1("_cruisAlt", _cruisAlt);
+ };
+ if( ((ASLToATL _projectilePos) select 2) - ((ASLToATL _seekerTargetPos) select 2) >= _cruisAlt) then {
+ if(_cruisAlt < 140) then {
+ _state set[0, STAGE_TERMINAL];
+ } else {
+ _state set[0, STAGE_COAST];
+ };
+ } else {
+ _returnTargetPos = _seekerTargetPos vectorAdd [0,0,_distanceToTarget*1.5];
+ };
+ };
+ case STAGE_COAST: {
+ TRACE_1("STAGE_COAST","");
+ TRACE_1("", ((ASLToATL _projectilePos) select 2) - (( ASLToATL _seekerTargetPos) select 2) );
+ if(_distanceToTarget < ( ((ASLToATL _projectilePos) select 2) - (( ASLToATL _seekerTargetPos) select 2) ) * 1.5) then {
+ _state set[0, STAGE_TERMINAL];
+ } else {
+ _returnTargetPos = _seekerTargetPos vectorAdd [0,0,(_projectilePos select 2)];
+ };
+ };
+ case STAGE_TERMINAL: {
+ TRACE_1("STAGE_TERMINAL","");
+ //_returnTargetPos = _seekerTargetPos vectorAdd [0,0,_distanceToTarget * 0.02];
+ _returnTargetPos = _seekerTargetPos;
+ };
+};
+
+#ifdef DEBUG_MODE_FULL
+drawLine3D [(ASLtoATL _returnTargetPos), (ASLtoATL _seekerTargetPos), [0,1,0,1]];
+#endif
+
+TRACE_1("Adjusted target position", _returnTargetPos);
_returnTargetPos;
\ No newline at end of file
diff --git a/addons/missileguidance/functions/fnc_attackProfile_LIN.sqf b/addons/missileguidance/functions/fnc_attackProfile_LIN.sqf
index 8c67e68402..4369f37ef4 100644
--- a/addons/missileguidance/functions/fnc_attackProfile_LIN.sqf
+++ b/addons/missileguidance/functions/fnc_attackProfile_LIN.sqf
@@ -1,50 +1,50 @@
-//#define DEBUG_MODE_FULL
-#include "script_component.hpp"
-
-EXPLODE_7_PVT(((_this select 1) select 0),_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
-private["_targetPos", "_projectilePos", "_target", "_seekerTargetPos", "_launchParams", "_targetLaunchParams"];
-private["_distanceToTarget", "_distanceToShooter", "_addHeight", "_returnTargetPos", "_shooterPos"];
-_seekerTargetPos = _this select 0;
-_launchParams = _this select 1;
-
-_target = _launchParams select 0;
-_targetLaunchParams = _launchParams select 1;
-
-_shooterPos = getPosASL _shooter;
-_projectilePos = getPosASL _projectile;
-
-_distanceToTarget = _projectilePos vectorDistance _seekerTargetPos;
-_distanceToShooter = _projectilePos vectorDistance _shooterPos;
-
-TRACE_3("", _distanceToTarget, _distanceToShooter, _seekerTargetPos);
-
-// Add height depending on distance for compensate
-_addHeight = [0,0,0];
-
-// Always climb an arc on initial launch if we are close to the round
-if( ((ASLtoATL _projectilePos) select 2) < 5 && _distanceToShooter < 15) then {
- _addHeight = _addHeight vectorAdd [0,0,_distanceToTarget];
-} else {
- // If we are below the target, increase the climbing arc
- if((_projectilePos select 2) < (_seekerTargetPos select 2) && _distanceToTarget > 100) then {
- _addHeight = _addHeight vectorAdd [0,0, ((_seekerTargetPos select 2) - (_projectilePos select 2))];
- };
-};
-
-// Handle arcing terminal low for high decent
-if( (_projectilePos select 2) > (_seekerTargetPos select 2) && _distanceToTarget < 100) then {
- _addHeight = _addHeight vectorDiff [0,0, ((_projectilePos select 2) - (_seekerTargetPos select 2)) * 0.5];
-} else {
- if((_projectilePos select 2) > (_seekerTargetPos select 2) && _distanceToTarget > 100) then {
- _addHeight = _addHeight vectorAdd [0,0, _distanceToTarget*0.02];
- };
-};
-
-_returnTargetPos = _seekerTargetPos vectorAdd _addHeight;
-
-#ifdef DEBUG_MODE_FULL
-drawLine3D [(ASLtoATL _returnTargetPos) vectorAdd _addHeight, ASLtoATL _returnTargetPos, [0,1,0,1]];
-#endif
-
-TRACE_1("Adjusted target position", _returnTargetPos);
+//#define DEBUG_MODE_FULL
+#include "script_component.hpp"
+
+EXPLODE_7_PVT(((_this select 1) select 0),_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
+private["_targetPos", "_projectilePos", "_target", "_seekerTargetPos", "_launchParams", "_targetLaunchParams"];
+private["_distanceToTarget", "_distanceToShooter", "_addHeight", "_returnTargetPos", "_shooterPos"];
+_seekerTargetPos = _this select 0;
+_launchParams = _this select 1;
+
+_target = _launchParams select 0;
+_targetLaunchParams = _launchParams select 1;
+
+_shooterPos = getPosASL _shooter;
+_projectilePos = getPosASL _projectile;
+
+_distanceToTarget = _projectilePos vectorDistance _seekerTargetPos;
+_distanceToShooter = _projectilePos vectorDistance _shooterPos;
+
+TRACE_3("", _distanceToTarget, _distanceToShooter, _seekerTargetPos);
+
+// Add height depending on distance for compensate
+_addHeight = [0,0,0];
+
+// Always climb an arc on initial launch if we are close to the round
+if( ((ASLtoATL _projectilePos) select 2) < 5 && _distanceToShooter < 15) then {
+ _addHeight = _addHeight vectorAdd [0,0,_distanceToTarget];
+} else {
+ // If we are below the target, increase the climbing arc
+ if((_projectilePos select 2) < (_seekerTargetPos select 2) && _distanceToTarget > 100) then {
+ _addHeight = _addHeight vectorAdd [0,0, ((_seekerTargetPos select 2) - (_projectilePos select 2))];
+ };
+};
+
+// Handle arcing terminal low for high decent
+if( (_projectilePos select 2) > (_seekerTargetPos select 2) && _distanceToTarget < 100) then {
+ _addHeight = _addHeight vectorDiff [0,0, ((_projectilePos select 2) - (_seekerTargetPos select 2)) * 0.5];
+} else {
+ if((_projectilePos select 2) > (_seekerTargetPos select 2) && _distanceToTarget > 100) then {
+ _addHeight = _addHeight vectorAdd [0,0, _distanceToTarget*0.02];
+ };
+};
+
+_returnTargetPos = _seekerTargetPos vectorAdd _addHeight;
+
+#ifdef DEBUG_MODE_FULL
+drawLine3D [(ASLtoATL _returnTargetPos) vectorAdd _addHeight, ASLtoATL _returnTargetPos, [0,1,0,1]];
+#endif
+
+TRACE_1("Adjusted target position", _returnTargetPos);
_returnTargetPos;
\ No newline at end of file
diff --git a/addons/missileguidance/functions/fnc_attackProfile_MID.sqf b/addons/missileguidance/functions/fnc_attackProfile_MID.sqf
index 498b754287..9909124e2f 100644
--- a/addons/missileguidance/functions/fnc_attackProfile_MID.sqf
+++ b/addons/missileguidance/functions/fnc_attackProfile_MID.sqf
@@ -1,4 +1,4 @@
-//#define DEBUG_MODE_FULL
-#include "script_component.hpp"
-
+//#define DEBUG_MODE_FULL
+#include "script_component.hpp"
+
_this call FUNC(attackProfile_LIN);
\ No newline at end of file
diff --git a/addons/missileguidance/functions/fnc_changeMissileDirection.sqf b/addons/missileguidance/functions/fnc_changeMissileDirection.sqf
index fda7ba9d07..f5fdee95a0 100644
--- a/addons/missileguidance/functions/fnc_changeMissileDirection.sqf
+++ b/addons/missileguidance/functions/fnc_changeMissileDirection.sqf
@@ -1,11 +1,11 @@
-#include "script_component.hpp"
-private ["_projectile", "_v", "_l", "_r"];
-
-_projectile = _this select 0;
-_v = _this select 1;
-
-_l = sqrt ((_v select 0) ^ 2 + (_v select 1) ^ 2);
-_r = -(_v select 2) / _l;
-
-_projectile setVectorDirAndUp [ _v, [(_v select 0) * _r,(_v select 1) * _r, _l] ];
+#include "script_component.hpp"
+private ["_projectile", "_v", "_l", "_r"];
+
+_projectile = _this select 0;
+_v = _this select 1;
+
+_l = sqrt ((_v select 0) ^ 2 + (_v select 1) ^ 2);
+_r = -(_v select 2) / _l;
+
+_projectile setVectorDirAndUp [ _v, [(_v select 0) * _r,(_v select 1) * _r, _l] ];
_projectile setVelocity (_v vectorMultiply (vectorMagnitude (velocity _projectile)));
\ No newline at end of file
diff --git a/addons/missileguidance/functions/fnc_checkLos.sqf b/addons/missileguidance/functions/fnc_checkLos.sqf
index f21a841367..764769b2f2 100644
--- a/addons/missileguidance/functions/fnc_checkLos.sqf
+++ b/addons/missileguidance/functions/fnc_checkLos.sqf
@@ -1,29 +1,29 @@
-/*
- * Author: jaynus
- * Returns whether the seeker object can see the target position with lineIntersect
- *
- * Argument:
- * 0: Seeker [Object]
- * 1: Target [Object]
- *
- * Return value:
- * Boolean
- */
-#include "script_component.hpp"
-private["_seeker", "_seekerPos", "_target", "_targetPos", "_return", "_vectorTo", "_searchPos"];
-_seeker = _this select 0;
-_target = _this select 1;
-
-_targetPos = getPosASL _target;
-_seekerPos = getPosASL _seeker;
-_return = true;
-
-if(!(terrainIntersectASL [ _seekerPos, _targetPos])) then {
- if(lineIntersects [_seekerPos, _targetPos, _seeker, _target]) then {
- _return = false;
- };
-} else {
- _return = false;
-};
-
+/*
+ * Author: jaynus
+ * Returns whether the seeker object can see the target position with lineIntersect
+ *
+ * Argument:
+ * 0: Seeker [Object]
+ * 1: Target [Object]
+ *
+ * Return value:
+ * Boolean
+ */
+#include "script_component.hpp"
+private["_seeker", "_seekerPos", "_target", "_targetPos", "_return", "_vectorTo", "_searchPos"];
+_seeker = _this select 0;
+_target = _this select 1;
+
+_targetPos = getPosASL _target;
+_seekerPos = getPosASL _seeker;
+_return = true;
+
+if(!(terrainIntersectASL [ _seekerPos, _targetPos])) then {
+ if(lineIntersects [_seekerPos, _targetPos, _seeker, _target]) then {
+ _return = false;
+ };
+} else {
+ _return = false;
+};
+
_return;
\ No newline at end of file
diff --git a/addons/missileguidance/functions/fnc_checkSeekerAngle.sqf b/addons/missileguidance/functions/fnc_checkSeekerAngle.sqf
index e8bc1a16f5..ff87b00e42 100644
--- a/addons/missileguidance/functions/fnc_checkSeekerAngle.sqf
+++ b/addons/missileguidance/functions/fnc_checkSeekerAngle.sqf
@@ -1,31 +1,31 @@
-/*
- * Author: jaynus
- * Returns whether the target position is within the maximum angle FOV of the provided seeker
- * objects current direction.
- *
- * Argument:
- * 0: Seeker [Object]
- * 1: Target [Position]
- * 2: Max Angle [Degrees]
- *
- * Return value:
- * Boolean
- */
-
-#include "script_component.hpp"
-private["_seeker", "_targetPos", "_seekerMaxAngle", "_sensorPos", "_testPointVector", "_testDotProduct"];
-
-_seeker = _this select 0;
-_targetPos = _this select 1;
-_seekerMaxAngle = _this select 2;
-
-_sensorPos = getPosASL _seeker;
-
-_testPointVector = vectorNormalized (_targetPos vectorDiff _sensorPos);
-_testDotProduct = (vectorNormalized (velocity _seeker)) vectorDotProduct _testPointVector;
-
-if(_testDotProduct < (cos _seekerMaxAngle)) exitWith {
- false
-};
-
+/*
+ * Author: jaynus
+ * Returns whether the target position is within the maximum angle FOV of the provided seeker
+ * objects current direction.
+ *
+ * Argument:
+ * 0: Seeker [Object]
+ * 1: Target [Position]
+ * 2: Max Angle [Degrees]
+ *
+ * Return value:
+ * Boolean
+ */
+
+#include "script_component.hpp"
+private["_seeker", "_targetPos", "_seekerMaxAngle", "_sensorPos", "_testPointVector", "_testDotProduct"];
+
+_seeker = _this select 0;
+_targetPos = _this select 1;
+_seekerMaxAngle = _this select 2;
+
+_sensorPos = getPosASL _seeker;
+
+_testPointVector = vectorNormalized (_targetPos vectorDiff _sensorPos);
+_testDotProduct = (vectorNormalized (velocity _seeker)) vectorDotProduct _testPointVector;
+
+if(_testDotProduct < (cos _seekerMaxAngle)) exitWith {
+ false
+};
+
true
\ No newline at end of file
diff --git a/addons/missileguidance/functions/fnc_doAttackProfile.sqf b/addons/missileguidance/functions/fnc_doAttackProfile.sqf
index b9a3502035..436cf275fe 100644
--- a/addons/missileguidance/functions/fnc_doAttackProfile.sqf
+++ b/addons/missileguidance/functions/fnc_doAttackProfile.sqf
@@ -1,29 +1,29 @@
-//#define DEBUG_MODE_FULL
-#include "script_component.hpp"
-
-EXPLODE_7_PVT(((_this select 1) select 0),_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
-private["_testName", "_attackProfilePos", "_attackProfile", "_attackProfileName", "_attackProfilesCfg", "_i", "_launchParams", "_testame", "_testProfile"];
-_launchParams = ((_this select 1) select 1);
-_attackProfileName = _launchParams select 3;
-
-TRACE_1("Attacking profile", _attackProfileName);
-
-_attackProfilesCfg = ( configFile >> QGVAR(AttackProfiles) );
-
-_attackProfile = nil;
-for [{_i=0}, {_i< (count _attackProfilesCfg) }, {_i=_i+1}] do {
- _testProfile = _attackProfilesCfg select _i;
- _testName = configName _testProfile;
- TRACE_3("", _testName, _testProfile, _attackProfilesCfg);
-
- if( _testName == _attackProfileName) exitWith {
- _attackProfile = _attackProfilesCfg select _i;
- };
-};
-
-_attackProfilePos = [0,0,0];
-if(!isNil "_attackProfile") then {
- _attackProfilePos = _this call (missionNamespace getVariable (getText (_attackProfile >> "functionName")));
-};
-
-_attackProfilePos;
\ No newline at end of file
+//#define DEBUG_MODE_FULL
+#include "script_component.hpp"
+
+EXPLODE_7_PVT(((_this select 1) select 0),_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
+private["_testName", "_attackProfilePos", "_attackProfile", "_attackProfileName", "_attackProfilesCfg", "_i", "_launchParams", "_testame", "_testProfile"];
+_launchParams = ((_this select 1) select 1);
+_attackProfileName = _launchParams select 3;
+
+TRACE_1("Attacking profile", _attackProfileName);
+
+_attackProfilesCfg = ( configFile >> QGVAR(AttackProfiles) );
+
+_attackProfile = nil;
+for [{_i=0}, {_i< (count _attackProfilesCfg) }, {_i=_i+1}] do {
+ _testProfile = _attackProfilesCfg select _i;
+ _testName = configName _testProfile;
+ TRACE_3("", _testName, _testProfile, _attackProfilesCfg);
+
+ if( _testName == _attackProfileName) exitWith {
+ _attackProfile = _attackProfilesCfg select _i;
+ };
+};
+
+_attackProfilePos = [0,0,0];
+if(!isNil "_attackProfile") then {
+ _attackProfilePos = _this call (missionNamespace getVariable (getText (_attackProfile >> "functionName")));
+};
+
+_attackProfilePos;
diff --git a/addons/missileguidance/functions/fnc_doHandoff.sqf b/addons/missileguidance/functions/fnc_doHandoff.sqf
index d99998c8c4..011c3d52d1 100644
--- a/addons/missileguidance/functions/fnc_doHandoff.sqf
+++ b/addons/missileguidance/functions/fnc_doHandoff.sqf
@@ -1,4 +1,4 @@
-#include "script_component.hpp"
-PARAMS_2(_target,_args);
-
-[QGVAR(handoff), [_target, _args]] call EFUNC(common,globalEvent);
\ No newline at end of file
+#include "script_component.hpp"
+PARAMS_2(_target,_args);
+
+[QGVAR(handoff), [_target, _args]] call CBA_fnc_globalEvent;
\ No newline at end of file
diff --git a/addons/missileguidance/functions/fnc_doSeekerSearch.sqf b/addons/missileguidance/functions/fnc_doSeekerSearch.sqf
index 081ab16353..fe73cd5118 100644
--- a/addons/missileguidance/functions/fnc_doSeekerSearch.sqf
+++ b/addons/missileguidance/functions/fnc_doSeekerSearch.sqf
@@ -1,30 +1,30 @@
-//#define DEBUG_MODE_FULL
-#include "script_component.hpp"
-
-EXPLODE_7_PVT(((_this select 1) select 0),_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
-private["_seekerProfilePos", "_i", "_launchParams", "_seekerType", "_seekerTypeName", "_seekerTypesCfg", "_testName", "_testProfile"];
-
-_launchParams = ((_this select 1) select 1);
-_seekerTypeName = _launchParams select 2;
-
-TRACE_1("Seeker type", _seekerTypeName);
-
-_seekerTypesCfg = ( configFile >> QGVAR(SeekerTypes) );
-
-_seekerType = nil;
-for [{_i=0}, {_i< (count _seekerTypesCfg) }, {_i=_i+1}] do {
- _testProfile = _seekerTypesCfg select _i;
- _testName = configName _testProfile;
- TRACE_3("", _testName, _testProfile, _seekerTypesCfg);
-
- if( _testName == _seekerTypeName) exitWith {
- _seekerType = _seekerTypesCfg select _i;
- };
-};
-
-_seekerProfilePos = [0,0,0];
-if(!isNil "_seekerType") then {
- _seekerProfilePos = _this call (missionNamespace getVariable (getText (_seekerType >> "functionName")));
-};
-
-_seekerProfilePos;
\ No newline at end of file
+//#define DEBUG_MODE_FULL
+#include "script_component.hpp"
+
+EXPLODE_7_PVT(((_this select 1) select 0),_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
+private["_seekerProfilePos", "_i", "_launchParams", "_seekerType", "_seekerTypeName", "_seekerTypesCfg", "_testName", "_testProfile"];
+
+_launchParams = ((_this select 1) select 1);
+_seekerTypeName = _launchParams select 2;
+
+TRACE_1("Seeker type", _seekerTypeName);
+
+_seekerTypesCfg = ( configFile >> QGVAR(SeekerTypes) );
+
+_seekerType = nil;
+for [{_i=0}, {_i< (count _seekerTypesCfg) }, {_i=_i+1}] do {
+ _testProfile = _seekerTypesCfg select _i;
+ _testName = configName _testProfile;
+ TRACE_3("", _testName, _testProfile, _seekerTypesCfg);
+
+ if( _testName == _seekerTypeName) exitWith {
+ _seekerType = _seekerTypesCfg select _i;
+ };
+};
+
+_seekerProfilePos = [0,0,0];
+if(!isNil "_seekerType") then {
+ _seekerProfilePos = _this call (missionNamespace getVariable (getText (_seekerType >> "functionName")));
+};
+
+_seekerProfilePos;
diff --git a/addons/missileguidance/functions/fnc_guidancePFH.sqf b/addons/missileguidance/functions/fnc_guidancePFH.sqf
index 122d690bae..36c11d58af 100644
--- a/addons/missileguidance/functions/fnc_guidancePFH.sqf
+++ b/addons/missileguidance/functions/fnc_guidancePFH.sqf
@@ -1,106 +1,106 @@
-//#define DEBUG_MODE_FULL
-#include "script_component.hpp"
-
-#define TIMESTEP_FACTOR 0.01
-
-private["_launchParams", "_targetLaunchParams", "_flightParams", "_seekerParams", "_stateParams"];
-private["_lastRunTime", "_runtimeDelta", "_adjustTime", "_args", "_seekerTargetPos", "_projectilePos"];
-private["_profileAdjustedTargetPos", "_incDeflection", "_minDeflection", "_maxDeflection"];
-private["_targetVector", "_adjustVector", "_finalAdjustVector", "_changeVector", "_pitch", "_yaw", "_roll"];
-private["_PS", "_distanceToTarget", "_targetRelativeVector", "_vectorTo"];
-
-_args = _this select 0;
-EXPLODE_7_PVT((_args select 0),_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
-
-if(!alive _projectile || isNull _projectile || isNull _shooter) exitWith {
- [(_this select 1)] call CBA_fnc_removePerFrameHandler;
-};
-
-_launchParams = _args select 1;
-_targetLaunchParams = _launchParams select 1;
-_flightParams = _args select 2;
-_seekerParams = _args select 3;
-
-_stateParams = _args select 4;
-
-_lastRunTime = _stateParams select 0;
-_runtimeDelta = ACE_diagTime - _lastRunTime;
-_adjustTime = 1;
-
-if(accTime > 0) then {
- _adjustTime = 1/accTime;
- _adjustTime = _adjustTime * (_runtimeDelta / TIMESTEP_FACTOR);
- TRACE_4("Adjust timing", 1/accTime, _adjustTime, _runtimeDelta, (_runtimeDelta / TIMESTEP_FACTOR) );
-} else {
- _adjustTime = 0;
-};
-
-_minDeflection = ((_flightParams select 0) - ((_flightParams select 0) * _adjustTime)) max 0;
-_maxDeflection = (_flightParams select 1) * _adjustTime;
-_incDeflection = _flightParams select 2;
-
-_projectilePos = getPosASL _projectile;
-
-// @TODO: placeholder for "last seek target position"
-// Last target pos should be optional based on the seeker unit
-_seekerTargetPos = [ [0,0,0], _args, (_stateParams select 1)] call FUNC(doSeekerSearch);
-if(isNil "_seekerTargetPos") then {
- _seekerTargetPos = _seekerTargetPos vectorAdd ((velocity _projectile) vectorMultiply 5);
-} else {
- if( (vectorMagnitude _seekerTargetPos) == 0) then {
- _seekerTargetPos = _seekerTargetPos vectorAdd ((velocity _projectile) vectorMultiply 5);
- };
-};
-
-_profileAdjustedTargetPos = [_seekerTargetPos,_args, (_stateParams select 2)] call FUNC(doAttackProfile);
-_targetVector = _projectilePos vectorFromTo _profileAdjustedTargetPos;
-_adjustVector = _targetVector vectorDiff (vectorDir _projectile);
-
-_yaw = 0;
-_pitch = 0;
-_roll = 0;
-if((_adjustVector select 0) < 0) then {
- _yaw = - ( (_minDeflection max (abs(_adjustVector select 0) min _maxDeflection) ) );
-} else {
- if((_adjustVector select 0) > 0) then {
- _yaw = ( (_minDeflection max ((_adjustVector select 0) min _maxDeflection) ) );
- };
-};
-if((_adjustVector select 1) < 0) then {
- _roll = - ( (_minDeflection max (abs(_adjustVector select 1) min _maxDeflection) ) );
-} else {
- if((_adjustVector select 1) > 0) then {
- _roll = ( (_minDeflection max ((_adjustVector select 1) min _maxDeflection) ) );
- };
-};
-if((_adjustVector select 2) < 0) then {
- _pitch = - ( (_minDeflection max (abs(_adjustVector select 2) min _maxDeflection) ) );
-} else {
- if((_adjustVector select 2) > 0) then {
- _pitch = ( (_minDeflection max ((_adjustVector select 2) min _maxDeflection) ) );
- };
-};
-_finalAdjustVector = [_yaw, _roll, _pitch];
-TRACE_2("", _pitch, _yaw);
-TRACE_4("", _targetVector, _targetRelativeVector, _adjustVector, _finalAdjustVector);
-
-if(accTime > 0) then {
- _changeVector = (vectorDir _projectile) vectorAdd _finalAdjustVector;
- [_projectile, _changeVector] call FUNC(changeMissileDirection);
-};
-
-#ifdef DEBUG_MODE_FULL
-drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,1,1,1], ASLtoATL _projectilePos, 0.75, 0.75, 0, str _vectorTo, 1, 0.025, "TahomaB"];
-drawLine3D [ASLtoATL _projectilePos, ASLtoATL _profileAdjustedTargetPos, [1,0,0,1]];
-
-_ps = "#particlesource" createVehicleLocal (ASLtoATL _projectilePos);
-_PS setParticleParams [["\A3\Data_f\cl_basic", 8, 3, 1], "", "Billboard", 1, 3.0141, [0, 0, 2], [0, 0, 0], 1, 1.275, 1, 0, [1, 1], [[1, 0, 0, 1], [1, 0, 0, 1], [1, 0, 0, 1]], [1], 1, 0, "", "", nil];
-_PS setDropInterval 3.0;
-
-hintSilent format["d: %1", _distanceToTarget];
-#endif
-
-_stateParams set[0, ACE_diagTime];
-
-_args set[4, _stateParams];
+//#define DEBUG_MODE_FULL
+#include "script_component.hpp"
+
+#define TIMESTEP_FACTOR 0.01
+
+private["_launchParams", "_targetLaunchParams", "_flightParams", "_seekerParams", "_stateParams"];
+private["_lastRunTime", "_runtimeDelta", "_adjustTime", "_args", "_seekerTargetPos", "_projectilePos"];
+private["_profileAdjustedTargetPos", "_incDeflection", "_minDeflection", "_maxDeflection"];
+private["_targetVector", "_adjustVector", "_finalAdjustVector", "_changeVector", "_pitch", "_yaw", "_roll"];
+private["_PS", "_distanceToTarget", "_targetRelativeVector", "_vectorTo"];
+
+_args = _this select 0;
+EXPLODE_7_PVT((_args select 0),_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
+
+if(!alive _projectile || isNull _projectile || isNull _shooter) exitWith {
+ [(_this select 1)] call CBA_fnc_removePerFrameHandler;
+};
+
+_launchParams = _args select 1;
+_targetLaunchParams = _launchParams select 1;
+_flightParams = _args select 2;
+_seekerParams = _args select 3;
+
+_stateParams = _args select 4;
+
+_lastRunTime = _stateParams select 0;
+_runtimeDelta = diag_tickTime - _lastRunTime;
+_adjustTime = 1;
+
+if(accTime > 0) then {
+ _adjustTime = 1/accTime;
+ _adjustTime = _adjustTime * (_runtimeDelta / TIMESTEP_FACTOR);
+ TRACE_4("Adjust timing", 1/accTime, _adjustTime, _runtimeDelta, (_runtimeDelta / TIMESTEP_FACTOR) );
+} else {
+ _adjustTime = 0;
+};
+
+_minDeflection = ((_flightParams select 0) - ((_flightParams select 0) * _adjustTime)) max 0;
+_maxDeflection = (_flightParams select 1) * _adjustTime;
+_incDeflection = _flightParams select 2;
+
+_projectilePos = getPosASL _projectile;
+
+// @TODO: placeholder for "last seek target position"
+// Last target pos should be optional based on the seeker unit
+_seekerTargetPos = [ [0,0,0], _args, (_stateParams select 1)] call FUNC(doSeekerSearch);
+if(isNil "_seekerTargetPos") then {
+ _seekerTargetPos = _seekerTargetPos vectorAdd ((velocity _projectile) vectorMultiply 5);
+} else {
+ if( (vectorMagnitude _seekerTargetPos) == 0) then {
+ _seekerTargetPos = _seekerTargetPos vectorAdd ((velocity _projectile) vectorMultiply 5);
+ };
+};
+
+_profileAdjustedTargetPos = [_seekerTargetPos,_args, (_stateParams select 2)] call FUNC(doAttackProfile);
+_targetVector = _projectilePos vectorFromTo _profileAdjustedTargetPos;
+_adjustVector = _targetVector vectorDiff (vectorDir _projectile);
+
+_yaw = 0;
+_pitch = 0;
+_roll = 0;
+if((_adjustVector select 0) < 0) then {
+ _yaw = - ( (_minDeflection max (abs(_adjustVector select 0) min _maxDeflection) ) );
+} else {
+ if((_adjustVector select 0) > 0) then {
+ _yaw = ( (_minDeflection max ((_adjustVector select 0) min _maxDeflection) ) );
+ };
+};
+if((_adjustVector select 1) < 0) then {
+ _roll = - ( (_minDeflection max (abs(_adjustVector select 1) min _maxDeflection) ) );
+} else {
+ if((_adjustVector select 1) > 0) then {
+ _roll = ( (_minDeflection max ((_adjustVector select 1) min _maxDeflection) ) );
+ };
+};
+if((_adjustVector select 2) < 0) then {
+ _pitch = - ( (_minDeflection max (abs(_adjustVector select 2) min _maxDeflection) ) );
+} else {
+ if((_adjustVector select 2) > 0) then {
+ _pitch = ( (_minDeflection max ((_adjustVector select 2) min _maxDeflection) ) );
+ };
+};
+_finalAdjustVector = [_yaw, _roll, _pitch];
+TRACE_2("", _pitch, _yaw);
+TRACE_4("", _targetVector, _targetRelativeVector, _adjustVector, _finalAdjustVector);
+
+if(accTime > 0) then {
+ _changeVector = (vectorDir _projectile) vectorAdd _finalAdjustVector;
+ [_projectile, _changeVector] call FUNC(changeMissileDirection);
+};
+
+#ifdef DEBUG_MODE_FULL
+drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,1,1,1], ASLtoATL _projectilePos, 0.75, 0.75, 0, str _vectorTo, 1, 0.025, "TahomaB"];
+drawLine3D [ASLtoATL _projectilePos, ASLtoATL _profileAdjustedTargetPos, [1,0,0,1]];
+
+_ps = "#particlesource" createVehicleLocal (ASLtoATL _projectilePos);
+_PS setParticleParams [["\A3\Data_f\cl_basic", 8, 3, 1], "", "Billboard", 1, 3.0141, [0, 0, 2], [0, 0, 0], 1, 1.275, 1, 0, [1, 1], [[1, 0, 0, 1], [1, 0, 0, 1], [1, 0, 0, 1]], [1], 1, 0, "", "", nil];
+_PS setDropInterval 3.0;
+
+hintSilent format["d: %1", _distanceToTarget];
+#endif
+
+_stateParams set[0, diag_tickTime];
+
+_args set[4, _stateParams];
_this set[0, _args];
\ No newline at end of file
diff --git a/addons/missileguidance/functions/fnc_handleHandoff.sqf b/addons/missileguidance/functions/fnc_handleHandoff.sqf
index 7145bc0038..af23ed84d8 100644
--- a/addons/missileguidance/functions/fnc_handleHandoff.sqf
+++ b/addons/missileguidance/functions/fnc_handleHandoff.sqf
@@ -1,6 +1,6 @@
-#include "script_component.hpp"
-PARAMS_2(_target,_args);
-
-if(isNil "_target" || {isNull _target} || {!local _target} ) exitWith { false };
-
+#include "script_component.hpp"
+PARAMS_2(_target,_args);
+
+if(isNil "_target" || {isNull _target} || {!local _target} ) exitWith { false };
+
[FUNC(guidancePFH), 0, _args] call CBA_fnc_addPerFrameHandler;
\ No newline at end of file
diff --git a/addons/missileguidance/functions/fnc_onFired.sqf b/addons/missileguidance/functions/fnc_onFired.sqf
index 7fc77fdd56..2a263721de 100644
--- a/addons/missileguidance/functions/fnc_onFired.sqf
+++ b/addons/missileguidance/functions/fnc_onFired.sqf
@@ -1,118 +1,118 @@
-//#define DEBUG_MODE_FULL
-#include "script_component.hpp"
-
-PARAMS_7(_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
-
-// Bail if guidance is disabled
-// Bail on locality of the projectile, it should be local to us
-if(GVAR(enabled) < 1 || {!local _projectile} ) exitWith { false };
-
-//Bail if shooter isn't player AND system not enabled for AI:
-if( !isPlayer _shooter && { GVAR(enabled) < 2 } ) exitWith { false };
-
-// Bail on not missile
-if(! (_ammo isKindOf "MissileBase") ) exitWith { false };
-
-private["_config", "_configs", "_enabled", "_target", "_seekerType", "_attackProfile"];
-private["_args", "_canUseLock", "_guidingUnit", "_launchPos", "_lockMode", "_targetPos", "_vanillaTarget"];
-
-//Verify ammo has explicity added guidance config (ignore inheritances)
-_configs = configProperties [(configFile >> "CfgAmmo" >> _ammo), QUOTE(configName _x == QUOTE(QUOTE(ADDON))), false];
-if( (count _configs) < 1) exitWith {};
-
-_config = (configFile >> "CfgAmmo" >> _ammo >> QUOTE(ADDON));
-_enabled = getNumber ( _config >> "enabled");
-
-// Bail if guidance is not enabled
-if(isNil "_enabled" || {_enabled != 1}) exitWith { false };
-
-_target = (vehicle _shooter) getVariable [QGVAR(target), nil];
-_targetPos = (vehicle _shooter) getVariable [QGVAR(targetPosition), nil];
-_seekerType = (vehicle _shooter) getVariable [QGVAR(seekerType), nil];
-_attackProfile = (vehicle _shooter) getVariable [QGVAR(attackProfile), nil];
-_lockMode = (vehicle _shooter) getVariable [QGVAR(lockMode), nil];
-
-// @TODO: make this vehicle shooter, but we need to differentiate where its set in ace_laser
-_laserCode = _shooter getVariable [QEGVAR(laser,code), ACE_DEFAULT_LASER_CODE];
-_laserInfo = [_laserCode, ACE_DEFAULT_LASER_WAVELENGTH, ACE_DEFAULT_LASER_WAVELENGTH];
-
-_launchPos = getPosASL (vehicle _shooter);
-
-TRACE_3("Begin guidance", _target, _seekerType, _attackProfile);
-
-if ( isNil "_seekerType" || { ! ( _seekerType in (getArray (_config >> "seekerTypes" ) ) ) } ) then {
- _seekerType = getText (_config >> "defaultSeekerType");
-};
-if ( isNil "_attackProfile" || { ! ( _attackProfile in (getArray (_config >> "attackProfiles" ) ) ) } ) then {
- _attackProfile = getText (_config >> "defaultAttackProfile");
-};
-if ( isNil "_lockMode" || { ! ( _lockMode in (getArray (_config >> "seekerLockModes" ) ) ) } ) then {
- _lockMode = getText (_config >> "defaultSeekerLockMode");
-};
-
-// If we didn't get a target, try to fall back on tab locking
-if(isNil "_target") then {
- if(!isPlayer _shooter) then {
- // This was an AI shot, lets still guide it on the AI target
- _target = _shooter getVariable[QGVAR(vanilla_target), nil];
- TRACE_1("Detected AI Shooter!", _target);
- } else {
- _canUseLock = getNumber (_config >> "canVanillaLock");
- // @TODO: Get vanilla target
- if(_canUseLock > 0 || difficulty < 1) then {
- _vanillaTarget = cursorTarget;
-
- TRACE_1("Using Vanilla Locking", _vanillaTarget);
- if(!isNil "_vanillaTarget") then {
- _target = _vanillaTarget;
- };
- };
- };
-};
-
-TRACE_4("Beginning ACE guidance system",_target,_ammo,_seekerType,_attackProfile);
-_args = [_this,
- [_shooter,
- [_target, _targetPos, _launchPos],
- _seekerType,
- _attackProfile,
- _lockMode,
- _laserInfo
- ],
- [
- getNumber ( _config >> "minDeflection" ),
- getNumber ( _config >> "maxDeflection" ),
- getNumber ( _config >> "incDeflection" )
- ],
- [
- getNumber ( _config >> "seekerAngle" ),
- getNumber ( _config >> "seekerAccuracy" ),
- getNumber ( _config >> "seekerMaxRange" )
- ],
- [ ACE_diagTime, [], [] ]
- ];
-
-// Hand off to the guiding unit. We just use local player so local PFH fires for now
-// Laser code needs to give us a shooter for LOBL, or the seeker unit needs to be able to shift locality
-// Based on its homing laser
-// Lasers need to be handled in a special LOAL/LOBL case
-
-//if(isPlayer _shooter) then {
-// _guidingUnit = ACE_player;
-//
-// if(local _guidingUnit) then {
-// [FUNC(guidancePFH), 0, _args ] call CBA_fnc_addPerFrameHandler;
-// } else {
-// [QGVAR(handoff), [_guidingUnit, _args] ] call FUNC(doHandoff);
-// };
-//} else {
- [FUNC(guidancePFH), 0, _args ] call CBA_fnc_addPerFrameHandler;
-//};
-
-
-/* Clears locking settings
-(vehicle _shooter) setVariable [QGVAR(target), nil];
-(vehicle _shooter) setVariable [QGVAR(seekerType), nil];
-(vehicle _shooter) setVariable [QGVAR(attackProfile), nil];
-(vehicle _shooter) setVariable [QGVAR(lockMode), nil];
-*/
\ No newline at end of file
+//#define DEBUG_MODE_FULL
+#include "script_component.hpp"
+
+PARAMS_7(_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
+
+// Bail if guidance is disabled
+// Bail on locality of the projectile, it should be local to us
+if(GVAR(enabled) < 1 || {!local _projectile} ) exitWith { false };
+
+//Bail if shooter isn't player AND system not enabled for AI:
+if( !isPlayer _shooter && { GVAR(enabled) < 2 } ) exitWith { false };
+
+// Bail on not missile
+if(! (_ammo isKindOf "MissileBase") ) exitWith { false };
+
+private["_config", "_configs", "_enabled", "_target", "_seekerType", "_attackProfile"];
+private["_args", "_canUseLock", "_guidingUnit", "_launchPos", "_lockMode", "_targetPos", "_vanillaTarget"];
+
+//Verify ammo has explicity added guidance config (ignore inheritances)
+_configs = configProperties [(configFile >> "CfgAmmo" >> _ammo), QUOTE(configName _x == QUOTE(QUOTE(ADDON))), false];
+if( (count _configs) < 1) exitWith {};
+
+_config = (configFile >> "CfgAmmo" >> _ammo >> QUOTE(ADDON));
+_enabled = getNumber ( _config >> "enabled");
+
+// Bail if guidance is not enabled
+if(isNil "_enabled" || {_enabled != 1}) exitWith { false };
+
+_target = (vehicle _shooter) getVariable [QGVAR(target), nil];
+_targetPos = (vehicle _shooter) getVariable [QGVAR(targetPosition), nil];
+_seekerType = (vehicle _shooter) getVariable [QGVAR(seekerType), nil];
+_attackProfile = (vehicle _shooter) getVariable [QGVAR(attackProfile), nil];
+_lockMode = (vehicle _shooter) getVariable [QGVAR(lockMode), nil];
+
+// @TODO: make this vehicle shooter, but we need to differentiate where its set in ace_laser
+_laserCode = _shooter getVariable [QEGVAR(laser,code), ACE_DEFAULT_LASER_CODE];
+_laserInfo = [_laserCode, ACE_DEFAULT_LASER_WAVELENGTH, ACE_DEFAULT_LASER_WAVELENGTH];
+
+_launchPos = getPosASL (vehicle _shooter);
+
+TRACE_3("Begin guidance", _target, _seekerType, _attackProfile);
+
+if (isNil "_seekerType" || {!(_seekerType in (getArray (_config >> "seekerTypes")))}) then {
+ _seekerType = getText (_config >> "defaultSeekerType");
+};
+if (isNil "_attackProfile" || {!(_attackProfile in (getArray (_config >> "attackProfiles")))}) then {
+ _attackProfile = getText (_config >> "defaultAttackProfile");
+};
+if (isNil "_lockMode" || {!(_lockMode in (getArray (_config >> "seekerLockModes")))}) then {
+ _lockMode = getText (_config >> "defaultSeekerLockMode");
+};
+
+// If we didn't get a target, try to fall back on tab locking
+if(isNil "_target") then {
+ if(!isPlayer _shooter) then {
+ // This was an AI shot, lets still guide it on the AI target
+ _target = _shooter getVariable[QGVAR(vanilla_target), nil];
+ TRACE_1("Detected AI Shooter!", _target);
+ } else {
+ _canUseLock = getNumber (_config >> "canVanillaLock");
+ // @TODO: Get vanilla target
+ if(_canUseLock > 0 || difficulty < 1) then {
+ _vanillaTarget = cursorTarget;
+
+ TRACE_1("Using Vanilla Locking", _vanillaTarget);
+ if(!isNil "_vanillaTarget") then {
+ _target = _vanillaTarget;
+ };
+ };
+ };
+};
+
+TRACE_4("Beginning ACE guidance system",_target,_ammo,_seekerType,_attackProfile);
+_args = [_this,
+ [_shooter,
+ [_target, _targetPos, _launchPos],
+ _seekerType,
+ _attackProfile,
+ _lockMode,
+ _laserInfo
+ ],
+ [
+ getNumber ( _config >> "minDeflection" ),
+ getNumber ( _config >> "maxDeflection" ),
+ getNumber ( _config >> "incDeflection" )
+ ],
+ [
+ getNumber ( _config >> "seekerAngle" ),
+ getNumber ( _config >> "seekerAccuracy" ),
+ getNumber ( _config >> "seekerMaxRange" )
+ ],
+ [ diag_tickTime, [], [] ]
+ ];
+
+// Hand off to the guiding unit. We just use local player so local PFH fires for now
+// Laser code needs to give us a shooter for LOBL, or the seeker unit needs to be able to shift locality
+// Based on its homing laser
+// Lasers need to be handled in a special LOAL/LOBL case
+
+//if(isPlayer _shooter) then {
+// _guidingUnit = ACE_player;
+//
+// if(local _guidingUnit) then {
+// [FUNC(guidancePFH), 0, _args ] call CBA_fnc_addPerFrameHandler;
+// } else {
+// [QGVAR(handoff), [_guidingUnit, _args] ] call FUNC(doHandoff);
+// };
+//} else {
+ [FUNC(guidancePFH), 0, _args ] call CBA_fnc_addPerFrameHandler;
+//};
+
+
+/* Clears locking settings
+(vehicle _shooter) setVariable [QGVAR(target), nil];
+(vehicle _shooter) setVariable [QGVAR(seekerType), nil];
+(vehicle _shooter) setVariable [QGVAR(attackProfile), nil];
+(vehicle _shooter) setVariable [QGVAR(lockMode), nil];
+*/
diff --git a/addons/missileguidance/functions/fnc_onIncomingMissile.sqf b/addons/missileguidance/functions/fnc_onIncomingMissile.sqf
index 33ebeb34e2..14902c32a5 100644
--- a/addons/missileguidance/functions/fnc_onIncomingMissile.sqf
+++ b/addons/missileguidance/functions/fnc_onIncomingMissile.sqf
@@ -1,8 +1,8 @@
-//#define DEBUG_MODE_FULL
-#include "script_component.hpp"
-PARAMS_3(_target,_ammo,_shooter);
-
-if(GVAR(enabled) < 1) exitWith {}; // bail if enabled
-if !(local (gunner _shooter) || {local _shooter}) exitWith {}; // bail if not shooter
-
+//#define DEBUG_MODE_FULL
+#include "script_component.hpp"
+PARAMS_3(_target,_ammo,_shooter);
+
+if(GVAR(enabled) < 1) exitWith {}; // bail if enabled
+if !(local (gunner _shooter) || {local _shooter}) exitWith {}; // bail if not shooter
+
_shooter setVariable [QGVAR(vanilla_target),_target, false];
\ No newline at end of file
diff --git a/addons/missileguidance/functions/fnc_rotateVectLine.sqf b/addons/missileguidance/functions/fnc_rotateVectLine.sqf
index b9904f0e5a..b42c8d103d 100644
--- a/addons/missileguidance/functions/fnc_rotateVectLine.sqf
+++ b/addons/missileguidance/functions/fnc_rotateVectLine.sqf
@@ -1,39 +1,39 @@
-#include "script_component.hpp"
-private["_d", "_map", "_p", "_theta", "_u"];
-
-_map = _this select 0;
-_theta = _this select 1;
-
-_p = _map select 0;
-_p1 = _map select 1;
-_p2 = _map select 2;
-
-_q1 = +(_map select 3);
-_q2 = +(_map select 4);
-_u = _map select 5;
-_d = _map select 6;
-
-/* Step 4 */
-_q2 set[0, (_q1 select 0) * cos(_theta) - (_q1 select 1) * sin(_theta)];
-_q2 set[1, (_q1 select 0) * sin(_theta) + (_q1 select 1) * cos(_theta)];
-_q2 set[2, (_q1 select 2)];
-
-/* Inverse of step 3 */
-_q1 set[0, (_q2 select 0) * _d + (_q2 select 2) * (_u select 0)];
-_q1 set[1, (_q2 select 1)];
-_q1 set[2, - (_q2 select 0) * (_u select 0) + (_q2 select 2) * _d];
-
-/* Inverse of step 2 */
-if (_d != 0) then {
- _q2 set[0, (_q1 select 0)];
- _q2 set[1, (_q1 select 1) * (_u select 2) / _d + (_q1 select 2) * (_u select 1) / _d];
- _q2 set[2, - (_q1 select 1) * (_u select 1) / _d + (_q1 select 2) * (_u select 2) / _d];
-} else {
- _q2 = _q1;
-};
-
-/* Inverse of step 1 */
-_q1 set[0, (_q2 select 0) + (_p1 select 0)];
-_q1 set[1, (_q2 select 1) + (_p1 select 1)];
-_q1 set[2, (_q2 select 2) + (_p1 select 2)];
+#include "script_component.hpp"
+private["_d", "_map", "_p", "_theta", "_u"];
+
+_map = _this select 0;
+_theta = _this select 1;
+
+_p = _map select 0;
+_p1 = _map select 1;
+_p2 = _map select 2;
+
+_q1 = +(_map select 3);
+_q2 = +(_map select 4);
+_u = _map select 5;
+_d = _map select 6;
+
+/* Step 4 */
+_q2 set[0, (_q1 select 0) * cos(_theta) - (_q1 select 1) * sin(_theta)];
+_q2 set[1, (_q1 select 0) * sin(_theta) + (_q1 select 1) * cos(_theta)];
+_q2 set[2, (_q1 select 2)];
+
+/* Inverse of step 3 */
+_q1 set[0, (_q2 select 0) * _d + (_q2 select 2) * (_u select 0)];
+_q1 set[1, (_q2 select 1)];
+_q1 set[2, - (_q2 select 0) * (_u select 0) + (_q2 select 2) * _d];
+
+/* Inverse of step 2 */
+if (_d != 0) then {
+ _q2 set[0, (_q1 select 0)];
+ _q2 set[1, (_q1 select 1) * (_u select 2) / _d + (_q1 select 2) * (_u select 1) / _d];
+ _q2 set[2, - (_q1 select 1) * (_u select 1) / _d + (_q1 select 2) * (_u select 2) / _d];
+} else {
+ _q2 = _q1;
+};
+
+/* Inverse of step 1 */
+_q1 set[0, (_q2 select 0) + (_p1 select 0)];
+_q1 set[1, (_q2 select 1) + (_p1 select 1)];
+_q1 set[2, (_q2 select 2) + (_p1 select 2)];
_q1;
\ No newline at end of file
diff --git a/addons/missileguidance/functions/fnc_rotateVectLineGetMap.sqf b/addons/missileguidance/functions/fnc_rotateVectLineGetMap.sqf
index fdbd6533ef..258cc93ae2 100644
--- a/addons/missileguidance/functions/fnc_rotateVectLineGetMap.sqf
+++ b/addons/missileguidance/functions/fnc_rotateVectLineGetMap.sqf
@@ -1,37 +1,37 @@
-#include "script_component.hpp"
-
-private ["_p", "_theta", "_p1", "_p2", "_q1", "_q2", "_u", "_d"];
-_p = _this select 0;
-_p1 = _this select 1;
-_p2 = _this select 2;
-
-_q1 = [];
-_q2 = [];
-_u = [];
-
-/* Step 1 */
-_q1 set[0, (_p select 0) - (_p1 select 0)];
-_q1 set[1, (_p select 1) - (_p1 select 1)];
-_q1 set[2, (_p select 2) - (_p1 select 2)];
-
-_u set[0, (_p2 select 0) - (_p1 select 0)];
-_u set[1, (_p2 select 1) - (_p1 select 1)];
-_u set[2, (_p2 select 2) - (_p1 select 2)];
-_u = _u call BIS_fnc_unitVector;
-_d = sqrt((_u select 1)*(_u select 1) + (_u select 2)*(_u select 2));
-
-/* Step 2 */
-if (_d != 0) then {
- _q2 set[0, (_q1 select 0)];
- _q2 set[1, (_q1 select 1) * (_u select 2) / _d - (_q1 select 2) * (_u select 1) / _d];
- _q2 set[2, (_q1 select 1) * (_u select 1) / _d + (_q1 select 2) * (_u select 2) / _d];
-} else {
- _q2 = _q1;
-};
-
-/* Step 3 */
-_q1 set[0, (_q2 select 0) * _d - (_q2 select 2) * (_u select 0)];
-_q1 set[1, (_q2 select 1)];
-_q1 set[2, (_q2 select 0) * (_u select 0) + (_q2 select 2) * _d];
-
+#include "script_component.hpp"
+
+private ["_p", "_theta", "_p1", "_p2", "_q1", "_q2", "_u", "_d"];
+_p = _this select 0;
+_p1 = _this select 1;
+_p2 = _this select 2;
+
+_q1 = [];
+_q2 = [];
+_u = [];
+
+/* Step 1 */
+_q1 set[0, (_p select 0) - (_p1 select 0)];
+_q1 set[1, (_p select 1) - (_p1 select 1)];
+_q1 set[2, (_p select 2) - (_p1 select 2)];
+
+_u set[0, (_p2 select 0) - (_p1 select 0)];
+_u set[1, (_p2 select 1) - (_p1 select 1)];
+_u set[2, (_p2 select 2) - (_p1 select 2)];
+_u = _u call BIS_fnc_unitVector;
+_d = sqrt((_u select 1)*(_u select 1) + (_u select 2)*(_u select 2));
+
+/* Step 2 */
+if (_d != 0) then {
+ _q2 set[0, (_q1 select 0)];
+ _q2 set[1, (_q1 select 1) * (_u select 2) / _d - (_q1 select 2) * (_u select 1) / _d];
+ _q2 set[2, (_q1 select 1) * (_u select 1) / _d + (_q1 select 2) * (_u select 2) / _d];
+} else {
+ _q2 = _q1;
+};
+
+/* Step 3 */
+_q1 set[0, (_q2 select 0) * _d - (_q2 select 2) * (_u select 0)];
+_q1 set[1, (_q2 select 1)];
+_q1 set[2, (_q2 select 0) * (_u select 0) + (_q2 select 2) * _d];
+
[_p, _p1, _p2, _q1, _q2, _u, _d]
\ No newline at end of file
diff --git a/addons/missileguidance/functions/fnc_seekerType_Optic.sqf b/addons/missileguidance/functions/fnc_seekerType_Optic.sqf
index 1cc71c1d94..8c9062fd49 100644
--- a/addons/missileguidance/functions/fnc_seekerType_Optic.sqf
+++ b/addons/missileguidance/functions/fnc_seekerType_Optic.sqf
@@ -1,51 +1,51 @@
-//#define DEBUG_MODE_FULL
-#include "script_component.hpp"
-
-EXPLODE_7_PVT(((_this select 1) select 0),_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
-private["_targets", "_foundTargetPos", "_launchParams", "_seekerParams", "_targetLaunchParams"];
-private["_angleFov", "_angleOkay", "_losOkay", "_seekerTargetPos", "_sensorPos", "_target"];
-
-_seekerTargetPos = _this select 0;
-
-_launchParams = _this select 1;
-_target = (((_launchParams select 1) select 1) select 0);
-_seekerParams = _launchParams select 3;
-
-TRACE_1("", _this);
-TRACE_1("", _launchParams);
-
-// TODO:: Make sure the missile maintains LOS
-_foundTargetPos = [0,0,0];
-if(!isNil "_target") then {
- _foundTargetPos = aimPos _target ;
- //_foundTargetPos = (_target modelToWorldVisual (getCenterOfMass _target));
-};
-
-// @TODO: This is seeker LOS and angle checks for LOAL only; LOBL does not need visual
-_angleFov = _seekerParams select 0;
-_angleOkay = [_projectile, _foundTargetPos, _angleFov] call FUNC(checkSeekerAngle);
-
-_losOkay = false;
-if(_angleOkay) then {
- _losOkay = [_projectile, _target] call FUNC(checkSeekerLos);
-};
-TRACE_2("", _angleOkay, _losOkay);
-
-// If we got here, it was an invalid target, just return a spot 5m in front of the missile
-if(!_angleOkay || !_losOkay) then {
- _foundTargetPos = _sensorPos vectorAdd ((velocity _projectile) vectorMultiply 5);
-} else {
- TRACE_2("", _target, _foundTargetPos);
- private["_projectileSpeed", "_distanceToTarget", "_eta", "_adjustVelocity"];
- // @TODO: Configurable lead for seekers
- _projectileSpeed = (vectorMagnitude velocity _projectile);
- _distanceToTarget = (getPosASL _projectile) vectorDistance _foundTargetPos;
-
- _eta = _distanceToTarget / _projectileSpeed;
-
- _adjustVelocity = (velocity _target) vectorMultiply _eta;
- _foundTargetPos = _foundTargetPos vectorAdd _adjustVelocity;
-};
-
-
-_foundTargetPos;
+//#define DEBUG_MODE_FULL
+#include "script_component.hpp"
+
+EXPLODE_7_PVT(((_this select 1) select 0),_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
+private["_targets", "_foundTargetPos", "_launchParams", "_seekerParams", "_targetLaunchParams"];
+private["_angleFov", "_angleOkay", "_losOkay", "_seekerTargetPos", "_sensorPos", "_target"];
+
+_seekerTargetPos = _this select 0;
+
+_launchParams = _this select 1;
+_target = (((_launchParams select 1) select 1) select 0);
+_seekerParams = _launchParams select 3;
+
+TRACE_1("", _this);
+TRACE_1("", _launchParams);
+
+// TODO:: Make sure the missile maintains LOS
+_foundTargetPos = [0,0,0];
+if(!isNil "_target") then {
+ _foundTargetPos = aimPos _target ;
+ //_foundTargetPos = (_target modelToWorldVisual (getCenterOfMass _target));
+};
+
+// @TODO: This is seeker LOS and angle checks for LOAL only; LOBL does not need visual
+_angleFov = _seekerParams select 0;
+_angleOkay = [_projectile, _foundTargetPos, _angleFov] call FUNC(checkSeekerAngle);
+
+_losOkay = false;
+if(_angleOkay) then {
+ _losOkay = [_projectile, _target] call FUNC(checkSeekerLos); //Note: Func does not exist? probably FUNC(checkLos)??
+};
+TRACE_2("", _angleOkay, _losOkay);
+
+// If we got here, it was an invalid target, just return a spot 5m in front of the missile
+if(!_angleOkay || !_losOkay) then {
+ _foundTargetPos = _sensorPos vectorAdd ((velocity _projectile) vectorMultiply 5);
+} else {
+ TRACE_2("", _target, _foundTargetPos);
+ private["_projectileSpeed", "_distanceToTarget", "_eta", "_adjustVelocity"];
+ // @TODO: Configurable lead for seekers
+ _projectileSpeed = (vectorMagnitude velocity _projectile);
+ _distanceToTarget = (getPosASL _projectile) vectorDistance _foundTargetPos;
+
+ _eta = _distanceToTarget / _projectileSpeed;
+
+ _adjustVelocity = (velocity _target) vectorMultiply _eta;
+ _foundTargetPos = _foundTargetPos vectorAdd _adjustVelocity;
+};
+
+
+_foundTargetPos;
diff --git a/addons/missileguidance/functions/fnc_seekerType_SALH.sqf b/addons/missileguidance/functions/fnc_seekerType_SALH.sqf
index 6297d21dfa..415e516617 100644
--- a/addons/missileguidance/functions/fnc_seekerType_SALH.sqf
+++ b/addons/missileguidance/functions/fnc_seekerType_SALH.sqf
@@ -1,32 +1,32 @@
-//#define DEBUG_MODE_FULL
-#include "script_component.hpp"
-
-EXPLODE_7_PVT(((_this select 1) select 0),_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
-private["_angleFov", "_canSeeTarget", "_foundTargetPos", "_laserResult", "_launchParams", "_seekerParams", "_laserCode", "_laserParams", "_seekerTargetPos", "_sensorPos", "_target"];
-_seekerTargetPos = _this select 0;
-_launchParams = _this select 1;
-_seekerParams = _launchParams select 3;
-_angleFov = _seekerParams select 0;
-
-_laserParams = (_launchParams select 1) select 5;
-TRACE_2("", _launchParams, _laserParams);
-if(!isNil "_target") then {
- // Handle AI or moving vanilla lasers
- _foundTargetPos = getPosASL _target;
-} else {
- _laserResult = [(getPosASL _projectile), (velocity _projectile), _angleFov, [(_laserParams select 1),(_laserParams select 2)], (_laserParams select 0)] call EFUNC(laser,seekerFindLaserSpot);
- _foundTargetPos = _laserResult select 0;
- TRACE_1("Search", _laserResult);
-};
-
-if(!isNil "_foundTargetPos") then {
- //_canSeeTarget = [_projectile, _foundTargetPos, _angleFov] call FUNC(checkSeekerAngle);
-
- // If we got here, it was an invalid target, just return a spot 5m in front of the missile
- if(!_canSeeTarget) then {
- _foundTargetPos = _sensorPos vectorAdd ((velocity _projectile) vectorMultiply 5);
- };
-
-};
-
+//#define DEBUG_MODE_FULL
+#include "script_component.hpp"
+
+EXPLODE_7_PVT(((_this select 1) select 0),_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
+private["_angleFov", "_canSeeTarget", "_foundTargetPos", "_laserResult", "_launchParams", "_seekerParams", "_laserCode", "_laserParams", "_seekerTargetPos", "_sensorPos", "_target"];
+_seekerTargetPos = _this select 0;
+_launchParams = _this select 1;
+_seekerParams = _launchParams select 3;
+_angleFov = _seekerParams select 0;
+
+_laserParams = (_launchParams select 1) select 5;
+TRACE_2("", _launchParams, _laserParams);
+if(!isNil "_target") then {
+ // Handle AI or moving vanilla lasers
+ _foundTargetPos = getPosASL _target;
+} else {
+ _laserResult = [(getPosASL _projectile), (velocity _projectile), _angleFov, [(_laserParams select 1),(_laserParams select 2)], (_laserParams select 0)] call EFUNC(laser,seekerFindLaserSpot);
+ _foundTargetPos = _laserResult select 0;
+ TRACE_1("Search", _laserResult);
+};
+
+if(!isNil "_foundTargetPos") then {
+ //_canSeeTarget = [_projectile, _foundTargetPos, _angleFov] call FUNC(checkSeekerAngle);
+
+ // If we got here, it was an invalid target, just return a spot 5m in front of the missile
+ if(!_canSeeTarget) then {
+ _foundTargetPos = _sensorPos vectorAdd ((velocity _projectile) vectorMultiply 5);
+ };
+
+};
+
_foundTargetPos;
\ No newline at end of file
diff --git a/addons/missileguidance/script_component.hpp b/addons/missileguidance/script_component.hpp
index 25e98bea60..b7a1eafbbc 100644
--- a/addons/missileguidance/script_component.hpp
+++ b/addons/missileguidance/script_component.hpp
@@ -1,19 +1,19 @@
-#define COMPONENT missileguidance
-#include "\z\ace\addons\main\script_mod.hpp"
-
-// #define DEBUG_MODE_FULL
-// #define DISABLE_COMPILE_CACHE
-// #define CBA_DEBUG_SYNCHRONOUS
-// #define ENABLE_PERFORMANCE_COUNTERS
-
-#ifdef DEBUG_ENABLED_MISSILEGUIDANCE
- #define DEBUG_MODE_FULL
-#endif
-
-#ifdef DEBUG_SETTINGS_MISSILEGUIDANCE
- #define DEBUG_SETTINGS DEBUG_SETTINGS_MISSILEGUIDANCE
-#endif
-
-#include "\z\ace\addons\main\script_macros.hpp"
-
+#define COMPONENT missileguidance
+#include "\z\ace\addons\main\script_mod.hpp"
+
+// #define DEBUG_MODE_FULL
+// #define DISABLE_COMPILE_CACHE
+// #define CBA_DEBUG_SYNCHRONOUS
+// #define ENABLE_PERFORMANCE_COUNTERS
+
+#ifdef DEBUG_ENABLED_MISSILEGUIDANCE
+ #define DEBUG_MODE_FULL
+#endif
+
+#ifdef DEBUG_SETTINGS_MISSILEGUIDANCE
+ #define DEBUG_SETTINGS DEBUG_SETTINGS_MISSILEGUIDANCE
+#endif
+
+#include "\z\ace\addons\main\script_macros.hpp"
+
#define FIREMODE_DIRECT_LOAL 1
\ No newline at end of file
diff --git a/addons/missileguidance/stringtable.xml b/addons/missileguidance/stringtable.xml
index c59c36fd50..35b947ce97 100644
--- a/addons/missileguidance/stringtable.xml
+++ b/addons/missileguidance/stringtable.xml
@@ -1,4 +1,4 @@
-
+
@@ -20,7 +20,7 @@
Продвинутое наведение ракет, или ПНР, обеспечивает множество усовершествований для наведения и стрельбы ракет. Также, это система, необходимая для всех ракетных типов оружия.
El guiado avanzado de misiles, o AMG en sus siglas en inglés, ofrece múltiples mejoras en el fijado y disparo de misiles. Es también un sistema requerido para armas de tipo misil.
Das Erweiterte Raketenlenksystem, auch ERls genannt, bietet viele Verbesserungen zum Aufschalten und Feuern mittels gelenkter Raketen.
- Le guidage avancé de missile, ou AMG en anglais, apporte de multiple améliorations au verouillage et au tir de missiles. C'est aussi un framework requis pour tout arme de type missile.
+ Le guidage avancé de missile, ou AMG en anglais, apporte de multiples améliorations au verouillage et au tir de missiles. C'est aussi un framework requis pour tout arme de type missile.
A fejlett rakétairányító (vagy AMG) többféle módosítást tartalmaz a rakéták célkövetéséhez és tüzeléséhez. Ez egy szükséges keresztrendszer a rakéta-alapú fegyverekhez.
Orientação avançada de mísseis ou OAM, fornece vários aprimoramentos para travamento de mísseis e disparos. Também é um sistema requerido para disparar armas que utilizem mísseis.
Pokočilé navádění raket (AMG) poskytuje několik vylepšení pro lepší zaměření a následnou střelbu. Je to prvek vyžadovaný u typu zbraní jako jsou rakety.
@@ -107,28 +107,31 @@
Eteint
Ki
Выкл.
+ Spento
Player Only
Tylko gracz
Solo jugador
Nur Spieler
- Pouze hráči
+ Pouze hráč
Somente jogador
Seulement les joueurs
Csak játékosok
Только игрок
+ Solo Giocatore
Player and AI
Gracz oraz AI
Jugador e IA
Spieler und KI
- Hráči a AI
+ Hráč a AI
Jogador e IA
Joueurs et IA
Játékosok és AI
Игрок и боты
+ Giocatore ed IA
-
+
\ No newline at end of file
diff --git a/addons/missionmodules/CfgEventHandlers.hpp b/addons/missionmodules/CfgEventHandlers.hpp
index f0a9f14d91..be284a9d70 100644
--- a/addons/missionmodules/CfgEventHandlers.hpp
+++ b/addons/missionmodules/CfgEventHandlers.hpp
@@ -1,4 +1,10 @@
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
diff --git a/addons/missionmodules/CfgVehicles.hpp b/addons/missionmodules/CfgVehicles.hpp
index ebf0b04f66..6a2f74b934 100644
--- a/addons/missionmodules/CfgVehicles.hpp
+++ b/addons/missionmodules/CfgVehicles.hpp
@@ -9,9 +9,9 @@ class CfgVehicles {
class ACE_moduleAmbianceSound: Module_F {
scope = 2;
displayName = CSTRING(AmbianceSounds_DisplayName);
- icon = QUOTE(PATHTOF(UI\Icon_Module_Ambient_Sounds_ca.paa));
+ icon = QPATHTOF(UI\Icon_Module_Ambient_Sounds_ca.paa);
category = "ACE_missionModules";
- function = QUOTE(FUNC(moduleAmbianceSound));
+ function = QFUNC(moduleAmbianceSound);
functionPriority = 1;
isGlobal = 1;
isTriggerActivated = 0;
diff --git a/addons/missionmodules/XEH_PREP.hpp b/addons/missionmodules/XEH_PREP.hpp
new file mode 100644
index 0000000000..bc24252b52
--- /dev/null
+++ b/addons/missionmodules/XEH_PREP.hpp
@@ -0,0 +1,2 @@
+
+PREP(moduleAmbianceSound);
diff --git a/addons/missionmodules/XEH_preInit.sqf b/addons/missionmodules/XEH_preInit.sqf
index cadbbabdd1..a7feade1c3 100644
--- a/addons/missionmodules/XEH_preInit.sqf
+++ b/addons/missionmodules/XEH_preInit.sqf
@@ -2,6 +2,6 @@
ADDON = false;
-PREP(moduleAmbianceSound);
+#include "XEH_PREP.hpp"
ADDON = true;
diff --git a/addons/missionmodules/XEH_preStart.sqf b/addons/missionmodules/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/missionmodules/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/missionmodules/config.cpp b/addons/missionmodules/config.cpp
index 0867b486c6..2f58f5c42f 100644
--- a/addons/missionmodules/config.cpp
+++ b/addons/missionmodules/config.cpp
@@ -2,12 +2,13 @@
class CfgPatches {
class ADDON {
- units[] = {"cse_moduleAmbianceSound"};
+ units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
- author[] = {"Glowbal"};
- authorUrl = "";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"Glowbal"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
diff --git a/addons/missionmodules/functions/fnc_moduleAmbianceSound.sqf b/addons/missionmodules/functions/fnc_moduleAmbianceSound.sqf
index 3ee45f324e..eb44a68f15 100644
--- a/addons/missionmodules/functions/fnc_moduleAmbianceSound.sqf
+++ b/addons/missionmodules/functions/fnc_moduleAmbianceSound.sqf
@@ -74,7 +74,7 @@ if (_activated && local _logic) then {
[_pfhHandle] call CBA_fnc_removePerFrameHandler;
};
- if (ACE_time - _lastTimePlayed >= ((_minDelayBetweensounds + random(_maxDelayBetweenSounds)) min _maxDelayBetweenSounds)) then {
+ if (CBA_missionTime - _lastTimePlayed >= ((_minDelayBetweensounds + random(_maxDelayBetweenSounds)) min _maxDelayBetweenSounds)) then {
// Find all players in session.
_allUnits = if (isMultiplayer) then {playableUnits} else {[ACE_player]};
@@ -109,11 +109,11 @@ if (_activated && local _logic) then {
// If no unit is to close to this position, we will play the sound.
if ({(_newPos distance _x < (_minimalDistance / 2))}count _allUnits == 0) then {
playSound3D [selectRandom _ambianceSounds, objNull, false, _newPos, _volume, 1, 1000];
- _args set [8, ACE_time];
+ _args set [8, CBA_missionTime];
};
};
};
- }, 0.1, [_logic, _ambianceSounds, _minimalDistance, _maximalDistance, _minDelayBetweensounds, _maxDelayBetweenSounds, _volume, _followPlayers, ACE_time] ] call CBA_fnc_addPerFrameHandler;
+ }, 0.1, [_logic, _ambianceSounds, _minimalDistance, _maximalDistance, _minDelayBetweensounds, _maxDelayBetweenSounds, _volume, _followPlayers, CBA_missionTime] ] call CBA_fnc_addPerFrameHandler;
};
true;
diff --git a/addons/missionmodules/stringtable.xml b/addons/missionmodules/stringtable.xml
index fe06252a61..1043d99f64 100644
--- a/addons/missionmodules/stringtable.xml
+++ b/addons/missionmodules/stringtable.xml
@@ -1,4 +1,4 @@
-
+
@@ -11,6 +11,7 @@
ACE module de mission
ACE küldetési modulok
Модули миссий ACE
+ Moduli Missione ACE
Ambiance Sounds [ACE]
@@ -22,6 +23,7 @@
Sons d'ambiance [ACE]
Ambiens hangok [ACE]
Звук окружения [ACE]
+ Souni Ambientali [ACE]
Sounds
@@ -33,6 +35,7 @@
Sons
Hangok
Звуки
+ Suoni
Class names of the ambiance sounds to be played. Seperated by ','
@@ -43,6 +46,7 @@
Nomes de classe dos sons de ambiente para serem reproduzidos. Separados por ","
Имена классов звуков окружения, которые должны проигрываться. Разделенные ','
ClassNames des sons d'ambiances. Séparation par ","
+ Nomi classi dei suoni ambientali da eseguire. Separati da ','
Minimal Distance
@@ -54,6 +58,7 @@
Distance minimale
Minimális távolság
Минимальная дистанция
+ Distanza Minimale
Used for calculating a random position and sets the minimal distance between the players and the played sound file(s)
@@ -65,6 +70,7 @@
Utilisé pour calculer une position aléatoire et pour définir la distance minimale entre le joueur les sons lus.
Egy véletlenszerű pozíció számításához használt érték, amihez megadja a minimum távolságot a játékosok és a lejátszott hangfájl(ok) között
Используется для расчета случайной позиции и указывает минимальное расстояние между игроками и источниками звука
+ Usati per calcolare una posizione casuale ed impostare la distanza minima tra i giocatori ed il file suono eseguito
Maximum Distance
@@ -76,6 +82,7 @@
Distance maximale
Maximális távolság
Максимальная дистанция
+ Distanza Massima
Used for calculating a random position and sets the maximum distance between the players and the played sound file(s)
@@ -87,6 +94,7 @@
Utilisé pour calculer une position aléatoire et pour définir la distance maximale entre le joueur les sons lus.
Egy véletlenszerű pozíció számításához használt érték, amihez megadja a maximum távolságot a játékosok és a lejátszott hangfájl(ok) között
Используется для расчета случайной позиции и указывает максимальное расстояние между игроками и источниками звука
+ Usato per calcolare una posizione casuale ed impostare la distanza massima tra giocatori e il file suono eseguito
Minimal Delay
@@ -98,6 +106,7 @@
Délais minimal
Minimum késleltetés
Минимальная задержка
+ Pausa Minima
Minimal delay between sounds played
@@ -109,6 +118,7 @@
Délais minimal entre les sons lus.
Minimum késleltetés a lejátszott hangok között
Минимальная задержка между воспроизведением звуков
+ Pausa Minima tra suoni eseguiti
Maximum Delay
@@ -120,6 +130,7 @@
Délais maximal
Maximum késleltetés
Максимальная задержка
+ Pausa Massima
Maximum delay between sounds played
@@ -131,6 +142,7 @@
Délais maximal entre les sons lus.
Maximum késleltetés a lejátszott hangok között
Максимальная задержка между воспроизведением звуков
+ Pausa Massima tra suoni eseguiti
Follow Players
@@ -142,6 +154,7 @@
Suivre les joueurs
Játékosok követése
Следовать за игроками
+ Segui Giocatori
Follow players. If set to false, loop will play sounds only nearby logic position.
@@ -153,6 +166,7 @@
Suivre le joueur. Si défini sur false, les sons seront joués en boucle autour la position logique
Játékosok követése. Ha le van tiltva, az ismétlés csak a legközelebbi logikai ponton játszik le hangokat.
Следовать за игроками. Если установить в Ложь, звуки будут циклически проигрываться только около позиции Логики.
+ Segui Giocatori. Se impostato su falso, il ciclo eseguirà i suoni solo vicino ad una posizione logica.
Volume
@@ -164,6 +178,7 @@
Volume
Hangerő
Громкость
+ Volume
The volume of the sounds played
@@ -175,6 +190,7 @@
Volume des sons lus
A lejátszott hangok hangereje
Громкость воспроизводимых звуков
+ Il volume dei suoni eseguiti
Ambiance sounds loop (synced across MP)
@@ -186,6 +202,7 @@
Sons d'ambiance lus en boucle (Synchronisation MP)
Ambiens hangok folyamatossága (MP alatt szinkronizálva)
Циклически воспроизводимые звуки окружения (синх. между игроками)
+ Ciclo Suoni Ambientali (sincronizzato in MP)
-
+
\ No newline at end of file
diff --git a/addons/mk6mortar/ACE_Settings.hpp b/addons/mk6mortar/ACE_Settings.hpp
index be7625bc3a..cd7d4e64cb 100644
--- a/addons/mk6mortar/ACE_Settings.hpp
+++ b/addons/mk6mortar/ACE_Settings.hpp
@@ -1,18 +1,31 @@
class ACE_Settings {
//These settings effect gameplay difficutly: defaults will leave the mortar the same as vanilla
class GVAR(airResistanceEnabled) {
+ displayName = CSTRING(airResistanceEnabled_DisplayName);
+ description = CSTRING(airResistanceEnabled_Description);
value = 0;
typeName = "BOOL";
isClientSetable = 0;
};
class GVAR(allowComputerRangefinder) {
+ displayName = CSTRING(allowComputerRangefinder_DisplayName);
+ description = CSTRING(allowComputerRangefinder_Description);
value = 1;
typeName = "BOOL";
isClientSetable = 0;
};
class GVAR(allowCompass) {
+ displayName = CSTRING(allowCompass_DisplayName);
+ description = CSTRING(allowCompass_Description);
value = 1;
typeName = "BOOL";
isClientSetable = 0;
};
+ class GVAR(useAmmoHandling) {
+ displayName = CSTRING(useAmmoHandling_DisplayName);
+ description = CSTRING(useAmmoHandling_Description);
+ value = 0;
+ typeName = "BOOL";
+ isClientSetable = 0;
+ };
};
diff --git a/addons/mk6mortar/CfgEventHandlers.hpp b/addons/mk6mortar/CfgEventHandlers.hpp
index 34c6ecc22c..957fefb736 100644
--- a/addons/mk6mortar/CfgEventHandlers.hpp
+++ b/addons/mk6mortar/CfgEventHandlers.hpp
@@ -1,13 +1,22 @@
+
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
};
};
+
class Extended_PostInit_EventHandlers {
class ADDON {
- clientInit = QUOTE( call COMPILE_FILE(XEH_clientInit) );
+ init = QUOTE(call COMPILE_FILE(XEH_postInit));
};
};
+
class Extended_FiredBIS_EventHandlers {
class Mortar_01_base_F {
class ADDON {
diff --git a/addons/mk6mortar/CfgVehicles.hpp b/addons/mk6mortar/CfgVehicles.hpp
index 481687f89f..75b0277192 100644
--- a/addons/mk6mortar/CfgVehicles.hpp
+++ b/addons/mk6mortar/CfgVehicles.hpp
@@ -8,7 +8,7 @@ class CfgVehicles {
condition = QUOTE(_this call FUNC(rangeTableCanUse));
statement = QUOTE(_this call FUNC(rangeTableOpen));
priority = 0;
- icon = QUOTE(PATHTOF(UI\icon_rangeTable.paa));
+ icon = QPATHTOF(UI\icon_rangeTable.paa);
exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"};
};
};
@@ -25,6 +25,7 @@ class CfgVehicles {
class Turrets: Turrets {
class MainTurret: MainTurret {};
};
+ class ACE_Actions;
};
class Mortar_01_base_F: StaticMortar {
class Turrets: Turrets {
@@ -34,6 +35,54 @@ class CfgVehicles {
discreteDistanceInitIndex = 0;
};
};
+ class ACE_Actions: ACE_Actions {
+ class GVAR(unloadMagazine) {
+ displayName = CSTRING(unloadMortar);
+ distance = 2;
+ condition = QUOTE(_this call FUNC(canUnloadMagazine));
+ statement = QUOTE([ARR_3(_target,_player,5)] call FUNC(unloadMagazineTimer));
+ icon = "";
+ selection = "usti hlavne";
+ };
+ class GVAR(LoadActions) {
+ displayName = CSTRING(loadMortar);
+ distance = 2;
+ condition = QUOTE([ARR_2(_target,_player)] call FUNC(canLoadMagazine));
+ statement = "";
+ icon = "";
+ selection = "usti hlavne";
+ class GVAR(loadMagazine_HE_Guided) {
+ displayName = CSTRING(loadMagazine_HE_Guided);
+ condition = QUOTE([ARR_3(_target,_player,'ACE_1Rnd_82mm_Mo_HE_Guided')] call FUNC(canLoadMagazine));
+ statement = QUOTE([ARR_4(_target,_player,8,'ACE_1Rnd_82mm_Mo_HE_Guided')] call FUNC(loadMagazineTimer));
+ icon = "";
+ };
+ class GVAR(loadMagazine_HE_LaserGuided) {
+ displayName = CSTRING(loadMagazine_HE_LaserGuided);
+ condition = QUOTE([ARR_3(_target,_player,'ACE_1Rnd_82mm_Mo_HE_LaserGuided')] call FUNC(canLoadMagazine));
+ statement = QUOTE([ARR_4(_target,_player,8,'ACE_1Rnd_82mm_Mo_HE_LaserGuided')] call FUNC(loadMagazineTimer));
+ icon = "";
+ };
+ class GVAR(loadMagazine_Illum) {
+ displayName = CSTRING(loadMagazine_Illum);
+ condition = QUOTE([ARR_3(_target,_player,'ACE_1Rnd_82mm_Mo_Illum')] call FUNC(canLoadMagazine));
+ statement = QUOTE([ARR_4(_target,_player,5,'ACE_1Rnd_82mm_Mo_Illum')] call FUNC(loadMagazineTimer));
+ icon = "";
+ };
+ class GVAR(loadMagazine_Smoke) {
+ displayName = CSTRING(loadMagazine_Smoke);
+ condition = QUOTE([ARR_3(_target,_player,'ACE_1Rnd_82mm_Mo_Smoke')] call FUNC(canLoadMagazine));
+ statement = QUOTE([ARR_4(_target,_player,2.5,'ACE_1Rnd_82mm_Mo_Smoke')] call FUNC(loadMagazineTimer));
+ icon = "";
+ };
+ class GVAR(loadMagazine_HE) {
+ displayName = CSTRING(loadMagazine_HE);
+ condition = QUOTE([ARR_3(_target,_player,'ACE_1Rnd_82mm_Mo_HE')] call FUNC(canLoadMagazine));
+ statement = QUOTE([ARR_4(_target,_player,2.5,'ACE_1Rnd_82mm_Mo_HE')] call FUNC(loadMagazineTimer));
+ icon = "";
+ };
+ };
+ };
class ACE_SelfActions {
class GVAR(toggleMils) {
displayName = "Toggle MILS";
@@ -53,7 +102,7 @@ class CfgVehicles {
scope = 2;
isGlobal = 0;
isSingular = 1;
- icon = QUOTE(PATHTOF(UI\Icon_Module_mk6_ca.paa));
+ icon = QPATHTOF(UI\Icon_Module_mk6_ca.paa);
functionPriority = 0;
class Arguments {
class airResistanceEnabled {
@@ -74,9 +123,48 @@ class CfgVehicles {
typeName = "BOOL";
defaultValue = 1;
};
+ class useAmmoHandling {
+ displayName = CSTRING(useAmmoHandling_DisplayName);
+ description = CSTRING(useAmmoHandling_Description);
+ typeName = "BOOL";
+ defaultValue = 0;
+ };
};
class ModuleDescription {
description = CSTRING(Module_Description);
};
};
+
+ class Box_NATO_AmmoOrd_F;
+ class ACE_Box_82mm_Mo_HE: Box_NATO_AmmoOrd_F {
+ displayName = CSTRING(HEBox_DisplayName);
+ author = ECSTRING(common,ACETeam);
+ maximumLoad = 400;
+ class TransportMagazines {
+ MACRO_ADDMAGAZINE(ACE_1Rnd_82mm_Mo_HE,8);
+ };
+ class TransportItems {};
+ class TransportWeapons {};
+ };
+ class ACE_Box_82mm_Mo_Smoke: ACE_Box_82mm_Mo_HE {
+ displayName = CSTRING(SmokeBox_DisplayName);
+ class TransportMagazines {
+ MACRO_ADDMAGAZINE(ACE_1Rnd_82mm_Mo_Smoke,8);
+ };
+ };
+ class ACE_Box_82mm_Mo_Illum: ACE_Box_82mm_Mo_HE {
+ displayName = CSTRING(IllumBox_DisplayName);
+ class TransportMagazines {
+ MACRO_ADDMAGAZINE(ACE_1Rnd_82mm_Mo_Illum,8);
+ };
+ };
+ class ACE_Box_82mm_Mo_Combo: ACE_Box_82mm_Mo_HE {
+ displayName = CSTRING(ComboBox_DisplayName);
+ maximumLoad = 2400;
+ class TransportMagazines {
+ MACRO_ADDMAGAZINE(ACE_1Rnd_82mm_Mo_HE,32);
+ MACRO_ADDMAGAZINE(ACE_1Rnd_82mm_Mo_Smoke,8);
+ MACRO_ADDMAGAZINE(ACE_1Rnd_82mm_Mo_Illum,8);
+ };
+ };
};
diff --git a/addons/mk6mortar/CfgWeapons.hpp b/addons/mk6mortar/CfgWeapons.hpp
index 97952af2d1..cb5454321d 100644
--- a/addons/mk6mortar/CfgWeapons.hpp
+++ b/addons/mk6mortar/CfgWeapons.hpp
@@ -7,9 +7,25 @@ class CfgWeapons {
scope = 2;
displayName = CSTRING(rangetable_name);
descriptionShort = CSTRING(rangetable_description);
- picture = QUOTE(PATHTOF(UI\icon_rangeTable.paa));
+ picture = QPATHTOF(UI\icon_rangeTable.paa);
class ItemInfo: InventoryItem_Base_F {
mass = 0.5;
};
};
+
+ class CannonCore;
+ class mortar_82mm: CannonCore {
+ class Single1;
+ };
+ class ACE_mortar_82mm: mortar_82mm {
+ author = ECSTRING(common,ACETeam);
+ magazines[] = {"ACE_1Rnd_82mm_Mo_HE","ACE_1Rnd_82mm_Mo_Smoke","ACE_1Rnd_82mm_Mo_Illum",
+ "ACE_1Rnd_82mm_Mo_HE_Guided","ACE_1Rnd_82mm_Mo_HE_LaserGuided"};
+ modes[] = {"Single1","Single2","Single3"};
+ reloadTime = 0.5;
+ magazineReloadTime = 0.5;
+ class Single1: Single1 {
+ reloadTime = 0.5;
+ };
+ };
};
diff --git a/addons/mk6mortar/RscInGameUI.hpp b/addons/mk6mortar/RscInGameUI.hpp
index a114896044..7d32512827 100644
--- a/addons/mk6mortar/RscInGameUI.hpp
+++ b/addons/mk6mortar/RscInGameUI.hpp
@@ -3,7 +3,7 @@ class RscInGameUI {
class CA_IGUI_elements_group: RscControlsGroup {};
};
class ACE_Mk6_RscWeaponRangeArtillery: RscWeaponRangeArtillery {
- onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_Mk6_RscWeaponRangeArtillery', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Mk6Mortar')])] call EFUNC(common,localEvent););
+ onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_Mk6_RscWeaponRangeArtillery', _this select 0)]; [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Mk6Mortar')])] call CBA_fnc_localEvent;);
controls[] = {"ACE_ChargeDisplay", "ACE_MILS_GROUP", "CA_IGUI_elements_group","CA_RangeElements_group"};
class ACE_ChargeDisplay: RscStructuredText {
idc = 80085;
diff --git a/addons/mk6mortar/RscRangeTable.hpp b/addons/mk6mortar/RscRangeTable.hpp
index 6bf0e51619..c719dd7ee4 100644
--- a/addons/mk6mortar/RscRangeTable.hpp
+++ b/addons/mk6mortar/RscRangeTable.hpp
@@ -7,7 +7,7 @@ class ACE_82mm_RangeTable_Dialog {
class ControlsBackground {
class TableBackground: RscPicture {
idc = -1;
- text = QUOTE(PATHTOF(UI\RangeTable_background.paa));
+ text = QPATHTOF(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)";
diff --git a/addons/mk6mortar/UI/w_l16_ammo_he_ca.paa b/addons/mk6mortar/UI/w_l16_ammo_he_ca.paa
new file mode 100644
index 0000000000..34f6ff53ac
Binary files /dev/null and b/addons/mk6mortar/UI/w_l16_ammo_he_ca.paa differ
diff --git a/addons/mk6mortar/UI/w_l16_ammo_illum_ca.paa b/addons/mk6mortar/UI/w_l16_ammo_illum_ca.paa
new file mode 100644
index 0000000000..318119f8a1
Binary files /dev/null and b/addons/mk6mortar/UI/w_l16_ammo_illum_ca.paa differ
diff --git a/addons/mk6mortar/UI/w_l16_ammo_smk_white_ca.paa b/addons/mk6mortar/UI/w_l16_ammo_smk_white_ca.paa
new file mode 100644
index 0000000000..16900ec51d
Binary files /dev/null and b/addons/mk6mortar/UI/w_l16_ammo_smk_white_ca.paa differ
diff --git a/addons/mk6mortar/XEH_PREP.hpp b/addons/mk6mortar/XEH_PREP.hpp
new file mode 100644
index 0000000000..600fc0707f
--- /dev/null
+++ b/addons/mk6mortar/XEH_PREP.hpp
@@ -0,0 +1,23 @@
+
+PREP(dev_buildTable);
+PREP(dev_formatNumber);
+PREP(dev_simulateCalcRangeTableLine);
+PREP(dev_simulateFindSolution);
+PREP(dev_simulateShot);
+
+PREP(canLoadMagazine);
+PREP(canUnloadMagazine);
+PREP(handleFired);
+PREP(handlePlayerVehicleChanged);
+PREP(loadMagazine);
+PREP(loadMagazineTimer);
+PREP(moduleInit);
+PREP(mortarInit);
+PREP(rangeTableCanUse);
+PREP(rangeTableOpen);
+PREP(rangeTablePageChange);
+PREP(rangeTablePreCalculatedValues);
+PREP(toggleMils);
+PREP(turretDisplayLoaded);
+PREP(unloadMagazine);
+PREP(unloadMagazineTimer);
diff --git a/addons/mk6mortar/XEH_clientInit.sqf b/addons/mk6mortar/XEH_clientInit.sqf
deleted file mode 100644
index cde5277260..0000000000
--- a/addons/mk6mortar/XEH_clientInit.sqf
+++ /dev/null
@@ -1,6 +0,0 @@
-#include "script_component.hpp"
-
-if (!hasInterface) exitWith {};
-
-["playerVehicleChanged", {_this call FUNC(handlePlayerVehicleChanged);}] call EFUNC(common,addEventHandler);
-["infoDisplayChanged", {_this call FUNC(turretDisplayLoaded);}] call EFUNC(common,addEventHandler);
diff --git a/addons/mk6mortar/XEH_postInit.sqf b/addons/mk6mortar/XEH_postInit.sqf
new file mode 100644
index 0000000000..594b0cc231
--- /dev/null
+++ b/addons/mk6mortar/XEH_postInit.sqf
@@ -0,0 +1,23 @@
+#include "script_component.hpp"
+
+[QGVAR(addMagazine), {
+ params ["_static", "_magazine"];
+ _static addMagazineTurret [_magazine,[0]];
+}] call CBA_fnc_addEventHandler;
+
+[QGVAR(removeMagazine), {
+ params ["_static", "_magazine"];
+ _static removeMagazineTurret [_magazine,[0]];
+}] call CBA_fnc_addEventHandler;
+
+[QGVAR(setAmmo), {
+ params ["_static", "_magazine","_ammoCount"];
+ _static setMagazineTurretAmmo [_magazine, _ammoCount, [0]];
+}] call CBA_fnc_addEventHandler;
+
+["ace_initMortar", {_this call FUNC(mortarInit);}] call CBA_fnc_addEventHandler;
+
+if (!hasInterface) exitWith {};
+
+["ace_playerVehicleChanged", FUNC(handlePlayerVehicleChanged)] call CBA_fnc_addEventHandler;
+["ace_infoDisplayChanged", FUNC(turretDisplayLoaded)] call CBA_fnc_addEventHandler;
diff --git a/addons/mk6mortar/XEH_preInit.sqf b/addons/mk6mortar/XEH_preInit.sqf
index 9af89ccb35..a7feade1c3 100644
--- a/addons/mk6mortar/XEH_preInit.sqf
+++ b/addons/mk6mortar/XEH_preInit.sqf
@@ -2,20 +2,6 @@
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);
+#include "XEH_PREP.hpp"
ADDON = true;
diff --git a/addons/mk6mortar/XEH_preStart.sqf b/addons/mk6mortar/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/mk6mortar/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/mk6mortar/cfgMagazines.hpp b/addons/mk6mortar/cfgMagazines.hpp
new file mode 100644
index 0000000000..a726bc5a9f
--- /dev/null
+++ b/addons/mk6mortar/cfgMagazines.hpp
@@ -0,0 +1,67 @@
+class cfgMagazines {
+ class 8Rnd_82mm_Mo_shells;
+ class ACE_1Rnd_82mm_Mo_HE: 8Rnd_82mm_Mo_shells {
+ count = 1;
+ scope = 2;
+ scopeCurator = 2;
+ author = ECSTRING(common,ACETeam);
+ displayName = CSTRING(magazine_HE_displayName);
+ displayNameShort = "";
+ descriptionShort = CSTRING(magazine_descriptionShort);
+ model = QPATHTOF(data\l16_ammo_he.p3d);
+ picture = QPATHTOF(UI\w_l16_ammo_he_ca.paa);
+ mass = 50;
+ };
+ class 8Rnd_82mm_Mo_Smoke_white;
+ class ACE_1Rnd_82mm_Mo_Smoke: 8Rnd_82mm_Mo_Smoke_white {
+ count = 1;
+ scope = 2;
+ scopeCurator = 2;
+ author = ECSTRING(common,ACETeam);
+ displayName = CSTRING(magazine_Smoke_displayName);
+ displayNameShort = "";
+ descriptionShort = CSTRING(magazine_descriptionShort);
+ model = QPATHTOF(data\l16_ammo_smk_white.p3d);
+ picture = QPATHTOF(UI\w_l16_ammo_smk_white_ca.paa);
+ mass = 50;
+ };
+ class 8Rnd_82mm_Mo_Flare_white;
+ class ACE_1Rnd_82mm_Mo_Illum: 8Rnd_82mm_Mo_Flare_white {
+ count = 1;
+ scope = 2;
+ scopeCurator = 2;
+ author = ECSTRING(common,ACETeam);
+ displayName = CSTRING(magazine_Illum_displayName);
+ displayNameShort = "";
+ descriptionShort = CSTRING(magazine_descriptionShort);
+ model = QPATHTOF(data\l16_ammo_illum.p3d);
+ picture = QPATHTOF(UI\w_l16_ammo_illum_ca.paa);
+ mass = 50;
+ };
+ class 8Rnd_82mm_Mo_guided;
+ class ACE_1Rnd_82mm_Mo_HE_Guided: 8Rnd_82mm_Mo_guided {
+ count = 1;
+ scope = 2;
+ scopeCurator = 2;
+ author = ECSTRING(common,ACETeam);
+ displayName = CSTRING(magazine_HE_Guided_displayName);
+ displayNameShort = "";
+ descriptionShort = CSTRING(magazine_descriptionShort);
+ model = QPATHTOF(data\l16_ammo_he.p3d);
+ picture = QPATHTOF(UI\w_l16_ammo_he_ca.paa);
+ mass = 50;
+ };
+ class 8Rnd_82mm_Mo_LG;
+ class ACE_1Rnd_82mm_Mo_HE_LaserGuided: 8Rnd_82mm_Mo_LG {
+ count = 1;
+ scope = 2;
+ scopeCurator = 2;
+ author = ECSTRING(common,ACETeam);
+ displayName = CSTRING(magazine_HE_LaserGuided_displayName);
+ displayNameShort = "";
+ descriptionShort = CSTRING(magazine_descriptionShort);
+ model = QPATHTOF(data\l16_ammo_he.p3d);
+ picture = QPATHTOF(UI\w_l16_ammo_he_ca.paa);
+ mass = 50;
+ };
+};
diff --git a/addons/mk6mortar/config.cpp b/addons/mk6mortar/config.cpp
index 8a54d15a5b..929f28b4d5 100644
--- a/addons/mk6mortar/config.cpp
+++ b/addons/mk6mortar/config.cpp
@@ -2,12 +2,14 @@
class CfgPatches {
class ADDON {
- units[] = {};
- weapons[] = {"ACE_RangeTable_82mm"};
+ units[] = {"ACE_Box_82mm_Mo_HE","ACE_Box_82mm_Mo_Smoke",
+ "ACE_Box_82mm_Mo_Illum","ACE_Box_82mm_Mo_Combo"};
+ weapons[] = {"ACE_RangeTable_82mm","ace_mortar_82mm"};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_interaction"};
- author[] = {"PabstMirror"};
- authorUrl = "https://github.com/acemod";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"PabstMirror","Grey","VKing"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
@@ -16,6 +18,7 @@ class CfgPatches {
#include "CfgEventHandlers.hpp"
#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"
+#include "CfgMagazines.hpp"
//UI Stuff:
@@ -30,3 +33,7 @@ class RscStructuredText;
#include "RscInGameUI.hpp"
#include "RscRangeTable.hpp"
+
+class ACE_newEvents {
+ initMortar = "ace_initMortar";
+};
diff --git a/addons/mk6mortar/data/l16_ammo_he.p3d b/addons/mk6mortar/data/l16_ammo_he.p3d
new file mode 100644
index 0000000000..96553ee44a
Binary files /dev/null and b/addons/mk6mortar/data/l16_ammo_he.p3d differ
diff --git a/addons/mk6mortar/data/l16_ammo_he.paa b/addons/mk6mortar/data/l16_ammo_he.paa
new file mode 100644
index 0000000000..59e367fd7c
Binary files /dev/null and b/addons/mk6mortar/data/l16_ammo_he.paa differ
diff --git a/addons/mk6mortar/data/l16_ammo_illum.p3d b/addons/mk6mortar/data/l16_ammo_illum.p3d
new file mode 100644
index 0000000000..43776c2634
Binary files /dev/null and b/addons/mk6mortar/data/l16_ammo_illum.p3d differ
diff --git a/addons/mk6mortar/data/l16_ammo_illum.paa b/addons/mk6mortar/data/l16_ammo_illum.paa
new file mode 100644
index 0000000000..70210a0813
Binary files /dev/null and b/addons/mk6mortar/data/l16_ammo_illum.paa differ
diff --git a/addons/mk6mortar/data/l16_ammo_smk_white.p3d b/addons/mk6mortar/data/l16_ammo_smk_white.p3d
new file mode 100644
index 0000000000..b3518a113e
Binary files /dev/null and b/addons/mk6mortar/data/l16_ammo_smk_white.p3d differ
diff --git a/addons/mk6mortar/data/l16_ammo_smk_white.paa b/addons/mk6mortar/data/l16_ammo_smk_white.paa
new file mode 100644
index 0000000000..5baf563966
Binary files /dev/null and b/addons/mk6mortar/data/l16_ammo_smk_white.paa differ
diff --git a/addons/mk6mortar/functions/fnc_canLoadMagazine.sqf b/addons/mk6mortar/functions/fnc_canLoadMagazine.sqf
new file mode 100644
index 0000000000..c0858a328a
--- /dev/null
+++ b/addons/mk6mortar/functions/fnc_canLoadMagazine.sqf
@@ -0,0 +1,53 @@
+/*
+ * Author: Grey
+ * Checks whether magazine can be loaded into static weapon
+ *
+ * Arguments:
+ * 0: static
+ * 1: unit
+ * 2: magazine class to check; if not given having any compatible magazine returns true (default: "")
+ *
+ * Return Value:
+ * canLoadMagazine
+ *
+ * Example:
+ * [_target,_player,"ACE_1Rnd_82mm_Mo_HE"] call ace_mk6mortar_fnc_canLoadMagazine
+ *
+ * Public: Yes
+ */
+#include "script_component.hpp"
+
+params ["_static","_unit",["_magazineClassOptional","",[""]]];
+private ["_canLoadMagazine","_currentMagazine","_weapon","_listOfMagNames",
+ "_hasCompatibleMagazine","_count"];
+
+if !(alive _static && GVAR(useAmmoHandling)) exitWith {false};
+
+_canLoadMagazine = false;
+_hasCompatibleMagazine = false;
+
+_currentMagazine = (magazinesAllTurrets _static) select 1;
+_weapon = (_static weaponsTurret [0]) select 0;
+
+_listOfMagNames = getArray(configFile >> "cfgWeapons" >> _weapon >> "magazines");
+_count = 0;
+
+//If function is called with an optional string then check if player has that magzine otherwise check all magazines of the player to see if they are compatible with the static weapon
+if (_magazineClassOptional != "") then {
+ if ([_unit,_magazineClassOptional] call EFUNC(common,hasMagazine)) then {
+ _hasCompatibleMagazine = true;
+ };
+ } else {
+ {
+ if ([_unit,_x] call EFUNC(common,hasMagazine)) exitWith {_hasCompatibleMagazine = true};
+ } forEach _listOfMagNames;
+};
+//If static weapon has a magazine then find the ammo count
+if (count (_static magazinesTurret [0]) > 0) then {
+ _count = _currentMagazine select 2;
+};
+//If the static weapon doesn't have a magzine or a magazine with no bullets, the player has a compatible magazine and the static weapon has a barrel then you can load a magazine
+if ((count (_static magazinesTurret [0]) == 0 || _count == 0 ) && _hasCompatibleMagazine) then {
+ _canLoadMagazine = true;
+};
+_canLoadMagazine
diff --git a/addons/mk6mortar/functions/fnc_canUnloadMagazine.sqf b/addons/mk6mortar/functions/fnc_canUnloadMagazine.sqf
new file mode 100644
index 0000000000..b1d6593574
--- /dev/null
+++ b/addons/mk6mortar/functions/fnc_canUnloadMagazine.sqf
@@ -0,0 +1,29 @@
+/*
+ * Author: Grey
+ * Checks whether magazine can be unloaded from static weapon
+ *
+ * Arguments:
+ * 0: static
+ * 1: unit
+ *
+ * Return Value:
+ * canUnloadMagazine
+ *
+ * Example:
+ * [_target,_player] call ace_mk6mortar_fnc_canUnloadMagazine
+ *
+ * Public: Yes
+ */
+#include "script_component.hpp"
+
+params ["_static","_unit"];
+private ["_canUnloadMagazine","_ammoCount"];
+
+if !(alive _static && GVAR(useAmmoHandling) && _static getVariable [QGVAR(initialized),false]) exitWith {false};
+_canUnloadMagazine = false;
+
+_ammoCount = ((magazinesAllTurrets _static) select 1) select 2;
+if (_ammoCount > 0) then {
+ _canUnloadMagazine = true;
+};
+_canUnloadMagazine
diff --git a/addons/mk6mortar/functions/fnc_dev_simulateCalcRangeTableLine.sqf b/addons/mk6mortar/functions/fnc_dev_simulateCalcRangeTableLine.sqf
index 9d8b292070..d1e0a8dd05 100644
--- a/addons/mk6mortar/functions/fnc_dev_simulateCalcRangeTableLine.sqf
+++ b/addons/mk6mortar/functions/fnc_dev_simulateCalcRangeTableLine.sqf
@@ -21,7 +21,7 @@ Example:
private ["_startTime", "_muzzleVelocity", "_rangeToHit", "_airFriction", "_vacElevation", "_radicand", "_maxElev", "_minElev", "_error", "_solutionElevation", "_lastTestResult", "_numberOfAttempts", "_lineElevation", "_lineTimeOfFlight", "_lineHeightElevation", "_lineHeightTimeDelta", "_lineCrosswindDeg", "_lineHeadwindMeters", "_lineTailWindMeters", "_result"];
-_startTime = ACE_diagTime;
+_startTime = diag_tickTime;
_muzzleVelocity = _this select 0;
_rangeToHit = _this select 1;
@@ -74,6 +74,6 @@ _lineAirDensDec = (_rangeToHit - (_lastTestResult select 0)) / 10;
_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, (ACE_diagTime - _startTime)];
+// 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_handleFired.sqf b/addons/mk6mortar/functions/fnc_handleFired.sqf
index d22b0efa47..483a69d42b 100644
--- a/addons/mk6mortar/functions/fnc_handleFired.sqf
+++ b/addons/mk6mortar/functions/fnc_handleFired.sqf
@@ -21,10 +21,17 @@
*/
#include "script_component.hpp"
-if (!GVAR(airResistanceEnabled)) exitWith {};
-
PARAMS_7(_vehicle,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
+if (GVAR(useAmmoHandling) && {_vehicle getVariable [QGVAR(initialized),false] && !(_vehicle getVariable [QGVAR(exclude),false])}) then {
+ // if !(_vehicle getVariable [QGVAR(exclude),false]) then {
+ _vehicle removeMagazineGlobal (_vehicle magazinesTurret [0] select 0);
+ TRACE_1("",_vehicle magazinesTurret [0]);
+ // };
+};
+
+if (!GVAR(airResistanceEnabled)) exitWith {};
+
private ["_shooterMan", "_temperature", "_newMuzzleVelocityCoefficent", "_bulletVelocity", "_bulletSpeed"];
// Large enough distance to not simulate any wind deflection
@@ -63,8 +70,8 @@ if (_newMuzzleVelocityCoefficent != 1) then {
[_pfID] call CBA_fnc_removePerFrameHandler;
};
- _deltaT = ACE_time - _time;
- _args set[2, ACE_time];
+ _deltaT = CBA_missionTime - _time;
+ _args set[2, CBA_missionTime];
_bulletVelocity = velocity _shell;
_bulletSpeed = vectorMagnitude _bulletVelocity;
@@ -78,4 +85,4 @@ if (_newMuzzleVelocityCoefficent != 1) then {
_shell setVelocity _bulletVelocity;
-}, 0, [_projectile, MK6_82mm_AIR_FRICTION, ACE_time, _relativeDensity]] call CBA_fnc_addPerFrameHandler;
+}, 0, [_projectile, MK6_82mm_AIR_FRICTION, CBA_missionTime, _relativeDensity]] call CBA_fnc_addPerFrameHandler;
diff --git a/addons/mk6mortar/functions/fnc_handlePlayerVehicleChanged.sqf b/addons/mk6mortar/functions/fnc_handlePlayerVehicleChanged.sqf
index 4b0e9e634c..8c8760bc15 100644
--- a/addons/mk6mortar/functions/fnc_handlePlayerVehicleChanged.sqf
+++ b/addons/mk6mortar/functions/fnc_handlePlayerVehicleChanged.sqf
@@ -3,7 +3,7 @@
* Handles player getting into new vehicle. Loads PFEG for mortar display if it is a mortar.
*
* Arguments:
- * 0:Player
+ * 0: Player
* 1: New Vehicle
*
* Return Value:
@@ -16,18 +16,30 @@
*/
#include "script_component.hpp"
-PARAMS_2(_player,_newVehicle);
-
-private["_tubeWeaponName" ,"_fireModes", "_lastFireMode"];
+params ["_player", "_newVehicle"];
if (isNull _newVehicle) exitWith {};
if (!(_newVehicle isKindOf "Mortar_01_base_F")) exitWith {};
-_tubeWeaponName = (weapons _newVehicle) select 0;
-_fireModes = getArray (configFile >> "CfgWeapons" >> _tubeWeaponName >> "modes");
+// Run magazine handling initialization if enabled
+if (!(_newVehicle getVariable [QGVAR(initialized),false]) && !(_newVehicle getVariable [QGVAR(exclude),false])) then {
+ // Make sure that mortar init is executed after settings init
+ [{
+ params ["_mortar"];
+ if (GVAR(useAmmoHandling) && {!(_mortar getVariable [QGVAR(initialized),false]) && !(_mortar getVariable [QGVAR(exclude),false])}) then {
+ //wait for proper turret locality change
+ [{
+ ["ace_initMortar", [_this], [_this]] call CBA_fnc_globalEvent;
+ }, _mortar, 0.05] call CBA_fnc_waitAndExecute;
+ };
+ }, _newVehicle] call EFUNC(common,runAfterSettingsInit);
+};
+
+private _tubeWeaponName = (weapons _newVehicle) select 0;
+private _fireModes = getArray (configFile >> "CfgWeapons" >> _tubeWeaponName >> "modes");
//Restore last firemode:
-_lastFireMode = _newVehicle getVariable [QGVAR(lastFireMode), -1];
+private _lastFireMode = _newVehicle getVariable [QGVAR(lastFireMode), -1];
if (_lastFireMode != -1) then {
_player action ["SwitchWeapon", _newVehicle, _player, _lastFireMode];
};
@@ -49,7 +61,7 @@ if (_lastFireMode != -1) then {
//Save firemode on vehicle:
_mortarVeh setVariable [QGVAR(lastFireMode), _currentChargeMode];
-
+
if (shownArtilleryComputer && {!GVAR(allowComputerRangefinder)}) then {
//Don't like this solution, but it works
closeDialog 0;
@@ -59,7 +71,7 @@ if (_lastFireMode != -1) then {
_display = uiNamespace getVariable ["ACE_Mk6_RscWeaponRangeArtillery", displayNull];
if (isNull _display) exitWith {}; //It may be null for the first frame
- _chargeText = format ["%1: %2 ", (localize LSTRING(rangetable_charge)), _currentChargeMode, QUOTE(PATHTOF(UI\ui_charges.paa))];
+ _chargeText = format ["%1: %2 ", (localize LSTRING(rangetable_charge)), _currentChargeMode, QPATHTOF(UI\ui_charges.paa)];
//Hud should hidden in 3rd person
_notGunnerView = cameraView != "GUNNER";
diff --git a/addons/mk6mortar/functions/fnc_loadMagazine.sqf b/addons/mk6mortar/functions/fnc_loadMagazine.sqf
new file mode 100644
index 0000000000..37fa2f4db4
--- /dev/null
+++ b/addons/mk6mortar/functions/fnc_loadMagazine.sqf
@@ -0,0 +1,65 @@
+/*
+ * Author: Grey
+ * Loads Magazine into static weapon
+ *
+ * Arguments:
+ * 0: static
+ * 1: unit
+ * 2: magazine class to load; if not given the first compatible magazine is loaded (default: "")
+ *
+ * Return Value:
+ * None
+ *
+ * Example:
+ * [_target,_player,"ACE_1Rnd_82mm_Mo_HE"] call ace_mk6mortar_fnc_loadMagazine
+ *
+ * Public: Yes
+ */
+#include "script_component.hpp"
+
+params ["_static","_unit",["_magazineClassOptional","",[""]]];
+private ["_weapon","_currentMagazine","_count","_magazines","_magazineDetails","_listOfMagNames",
+ "_magazineClass","_magazineClassDetails","_parsed","_roundsLeft"];
+
+//If function has been called with an optional classname hten add that magazine to the static weapon. Otherwise add the compatible magazine
+if(_magazineClassOptional != "") then {
+ _unit removeMagazine _magazineClassOptional;
+ [QGVAR(addMagazine), [_static, _magazineClassOptional]] call CBA_fnc_globalEvent;
+} else {
+ //Get weapon & magazine information of static weapon
+ _weapon = (_static weaponsTurret [0]) select 0;
+ _currentMagazine = (magazinesAllTurrets _static) select 1;
+ _currentMagazineClass = _currentMagazine select 0;
+ _count = _currentMagazine select 2;
+
+ //Check all of the players magazines to see if they are compatible with the static weapon. First magazine that is compatible is chosen
+ //VKing: This section ought to be double checked.
+ _magazines = magazines _unit;
+ _magazineDetails = magazinesDetail _unit;
+ _listOfMagNames = getArray(configFile >> "cfgWeapons" >> _weapon >> "magazines");
+ _magazineClass = "";
+ _magazineClassDetails = "";
+ _parsed ="";
+ _roundsLeft = 0;
+ {
+ if (_x in _listOfMagNames) exitWith {
+ _magazineClass = _x;
+ _magazineClassDetails = _magazineDetails select _forEachIndex;
+ };
+ } forEach _magazines;
+ //If the static weapon already has an empty magazine then remove it
+ if (_count == 0) then {
+ [QGVAR(removeMagazine), [_static, _currentMagazineClass]] call CBA_fnc_globalEvent;
+ };
+ //Find out the ammo count of the compatible magazine found
+ if (_magazineClassDetails != "") then{
+ _parsed = _magazineClassDetails splitString "([]/: )";
+ _parsed params ["_type", "", "", "_roundsLeftText", "_maxRoundsText"];
+ _roundsLeft = parseNumber _roundsLeftText;
+ _magType = _type;
+ };
+
+ _unit removeMagazine _magazineClass;
+ [QGVAR(addMagazine), [_static, _magazineClass]] call CBA_fnc_globalEvent;
+ [QGVAR(setAmmo), [_static, _magazineClass,_roundsLeft], _static] call CBA_fnc_targetEvent;
+};
diff --git a/addons/mk6mortar/functions/fnc_loadMagazineTimer.sqf b/addons/mk6mortar/functions/fnc_loadMagazineTimer.sqf
new file mode 100644
index 0000000000..16016f06e6
--- /dev/null
+++ b/addons/mk6mortar/functions/fnc_loadMagazineTimer.sqf
@@ -0,0 +1,28 @@
+/*
+ * Author: Grey
+ * Loads Magazine into static weapon using a timer
+ *
+ * Arguments:
+ * 0: static
+ * 1: unit
+ * 2: time to load
+ * 3: magazineClassOptional
+ *
+ * Return Value:
+ * None
+ *
+ * Example:
+ * [_target,_player,"ACE_1Rnd_82mm_Mo_HE"] call ace_mk6mortar_fnc_loadMagazineTimer
+ *
+ * Public: Yes
+ */
+#include "script_component.hpp"
+
+params ["_static","_unit","_timeToLoad",["_magazineClassOptional","",[""]]];
+
+//Move player into animation if player is standing
+if ((_unit call CBA_fnc_getUnitAnim) select 0 == "stand") then {
+ [_unit, "AmovPercMstpSrasWrflDnon_diary", 1] call EFUNC(common,doAnimation);
+};
+
+[_timeToLoad, [_static,_unit,_magazineClassOptional], {(_this select 0) call FUNC(loadMagazine)}, {}, localize LSTRING(loadingMortar)] call EFUNC(common,progressBar);
diff --git a/addons/mk6mortar/functions/fnc_moduleInit.sqf b/addons/mk6mortar/functions/fnc_moduleInit.sqf
index 75bab4cee9..3dedbb2c9e 100644
--- a/addons/mk6mortar/functions/fnc_moduleInit.sqf
+++ b/addons/mk6mortar/functions/fnc_moduleInit.sqf
@@ -25,3 +25,4 @@ 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);
+[_logic, QGVAR(useAmmoHandling), "useAmmoHandling"] call EFUNC(common,readSettingFromModule);
diff --git a/addons/mk6mortar/functions/fnc_mortarInit.sqf b/addons/mk6mortar/functions/fnc_mortarInit.sqf
new file mode 100644
index 0000000000..65d0ff74db
--- /dev/null
+++ b/addons/mk6mortar/functions/fnc_mortarInit.sqf
@@ -0,0 +1,46 @@
+/*
+ * Author: VKing
+ * Initializes mortar for use with ammunition handling magazines.
+ *
+ * Arguments:
+ * 0: Mortar
+ *
+ * Return Value:
+ * None
+ *
+ * Example:
+ * [mortar1] call ace_mk6mortar_fnc_mortarInit
+ *
+ * Public: No
+ */
+#include "script_component.hpp"
+
+params ["_mortar"];
+
+if (_mortar getVariable [QGVAR(initialized),false] || _mortar getVariable [QGVAR(exclude),false]) exitWith {TRACE_1("Exit",_mortar)};
+if (!(_mortar turretLocal [0])) exitWith {TRACE_1("Exit - turret not local",_mortar)};
+
+// Remove all magazines from turret
+if (count magazines _mortar > 0) then {
+ {
+ _mortar removeMagazineTurret [_x,[0]];
+ } forEach magazines _mortar;
+};
+
+// Replace current turret weapon with ammo handling weapon
+private _currentWeapon = _mortar weaponsTurret [0] select 0;
+private _newWeapon = "";
+
+if (_currentWeapon == "mortar_82mm") then {
+ _newWeapon = "ace_mortar_82mm";
+} else {
+ _newWeapon = getText (configFile >> "CfgWeapons" >> _currentWeapon >> QGVAR(replaceWith));
+};
+
+if (_newWeapon != "") then {
+ _mortar removeWeaponTurret [_currentWeapon,[0]];
+ _mortar addWeaponTurret [_newWeapon,[0]];
+};
+
+_mortar setVariable [QGVAR(initialized),true,true];
+TRACE_1("Init complete",_mortar);
diff --git a/addons/mk6mortar/functions/fnc_turretDisplayLoaded.sqf b/addons/mk6mortar/functions/fnc_turretDisplayLoaded.sqf
index 23518f64f3..da7a529d86 100644
--- a/addons/mk6mortar/functions/fnc_turretDisplayLoaded.sqf
+++ b/addons/mk6mortar/functions/fnc_turretDisplayLoaded.sqf
@@ -18,7 +18,8 @@
disableSerialization;
-PARAMS_2(_display,_rscType);
+params ["_display", "_rscType"];
+TRACE_2("params",_display,_rscType);
if (_rscType != "Mk6Mortar") exitWith {};
if (isNull _display) exitWith {};
diff --git a/addons/mk6mortar/functions/fnc_unloadMagazine.sqf b/addons/mk6mortar/functions/fnc_unloadMagazine.sqf
new file mode 100644
index 0000000000..c485a39a3a
--- /dev/null
+++ b/addons/mk6mortar/functions/fnc_unloadMagazine.sqf
@@ -0,0 +1,39 @@
+/*
+ * Author: Grey
+ *
+ * Unload current magazine from static weapon
+ *
+ * Arguments:
+ * 0: static
+ * 1: unit
+ *
+ * Return Value:
+ * None
+ *
+ * Example:
+ * [_target, _player] call ace_mk6mortar_fnc_unloadMagazine
+ *
+ * Public: Yes
+ */
+#include "script_component.hpp"
+
+params ["_static","_unit"];
+private ["_currentMagazine","_currentMagazineClass","_ammoCount"];
+
+//Get weapon & magazine information about static weapon
+_currentMagazine = (magazinesAllTurrets _static) select 1;
+_currentMagazineClass = _currentMagazine select 0;
+_ammoCount = _currentMagazine select 2;
+
+// Try to add the round to player inventory, otherwise place it on the ground near the player
+if (_ammoCount > 0) then {
+ if (_unit canAdd _currentMagazineClass) then {
+ _unit addMagazineGlobal _currentMagazineClass;
+ } else {
+ _pos = _unit modelToWorldVisual [0.5,0.5,0]; // Front right of player
+ _unit = createVehicle ["WeaponHolder_Single_F",_pos,[],0,"NONE"];
+ _unit addMagazineAmmoCargo [_currentMagazineClass, 1, _ammoCount];
+ _unit setPosATL _pos;
+ };
+ [QGVAR(removeMagazine), [_static, _currentMagazineClass]] call CBA_fnc_globalEvent;
+};
diff --git a/addons/mk6mortar/functions/fnc_unloadMagazineTimer.sqf b/addons/mk6mortar/functions/fnc_unloadMagazineTimer.sqf
new file mode 100644
index 0000000000..151f35492a
--- /dev/null
+++ b/addons/mk6mortar/functions/fnc_unloadMagazineTimer.sqf
@@ -0,0 +1,28 @@
+/*
+ * Author: Grey
+ *
+ * Unload current magazine from static weapon using a timer
+ *
+ * Arguments:
+ * 0: static
+ * 1: unit
+ * 2: time to unload
+ *
+ * Return Value:
+ * None
+ *
+ * Example:
+ * [_target, _player, 5] call ace_mk6mortar_fnc_unloadMagazineTimer
+ *
+ * Public: Yes
+ */
+#include "script_component.hpp"
+
+params ["_static","_unit","_timeToUnload"];
+
+//Move player into animation if player is standing
+if ((_unit call CBA_fnc_getUnitAnim) select 0 == "stand") then {
+ [_unit, "AmovPercMstpSrasWrflDnon_diary", 1] call EFUNC(common,doAnimation);
+};
+
+[_timeToUnload, [_static,_unit], {(_this select 0) call FUNC(unloadMagazine)}, {}, localize LSTRING(unloadingMortar)] call EFUNC(common,progressBar);
diff --git a/addons/mk6mortar/stringtable.xml b/addons/mk6mortar/stringtable.xml
index b79d8022ef..ba13c57627 100644
--- a/addons/mk6mortar/stringtable.xml
+++ b/addons/mk6mortar/stringtable.xml
@@ -14,16 +14,16 @@
Tavola di tiro 82mm
- Range Table for the MK6 82mm Mortar
+ Range Table for the Mk6 82mm Mortar
Distanztabelle für den Mk6 82mm Mortar
- Tabela strzelnicza dla moździerza 82mm MK6
- Table de tir pour le mortier MK6 82mm
- Таблица дальностей и прицелов для MK6 82 мм мортиры
- Tabla de distancias para el mortero MK6 de 82mm
- Hatótáv-tábla a MK6 82mm-es mozsárhoz
- Tabela de distâncias para morteiro MK6 82mm
- Rangetable pro MK6 82mm minomet
- Tavola di tiro per il mortaio calibro 82mm MK6
+ Tabela strzelnicza dla moździerza 82mm Mk6
+ Table de tir pour le mortier Mk6 82mm
+ Таблица дальностей и прицелов для Mk6 82 мм мортиры
+ Tabla de distancias para el mortero Mk6 de 82mm
+ Hatótáv-tábla a Mk6 82mm-es mozsárhoz
+ Tabela de distâncias para morteiro Mk6 82mm
+ Rangetable pro Mk6 82mm minomet
+ Tavola di tiro per il mortaio calibro 82mm Mk6
Open 82mm Rangetable
@@ -50,15 +50,16 @@
Carica
- MK6 Settings
- Moździerz MK6 - Ustawienia
- Ajustes MK6
- MK6-Einstellungen
- MK6 - Nastavení
- Ajustes do MK6
- Option du MK6
- MK6 beállítások
- Настройки MK6
+ Mk6 Settings
+ Moździerz Mk6 - Ustawienia
+ Ajustes Mk6
+ Mk6-Einstellungen
+ Mk6 - Nastavení
+ Ajustes do Mk6
+ Option du Mk6
+ Mk6 beállítások
+ Настройки Mk6
+ Impostazioni Mk6
Air Resistance
@@ -70,10 +71,11 @@
Résistance de l'air
Légellenállás
Сопротивление воздуха
+ Resistenza dell'Aria
For Player Shots, Model Air Resistance and Wind Effects
- Modeluj opór powietrza oraz wpływ wiatru na tor lotu pocisku dla strzałów z moździerza MK6 przez graczy
+ Modeluj opór powietrza oraz wpływ wiatru na tor lotu pocisku dla strzałów z moździerza Mk6 przez graczy
Para disparos del jugador, modelo de resistencia al aire y efectos de viento
Für Spielerschüsse, Luftwiderstand und Windeffekte
Pro hráčovu střelbu, Model odporu vzduchu a povětrných podmínek
@@ -81,17 +83,19 @@
Pour les tirs de joueurs, modèle de résistance à l'air et d'effet du vent
Játékos általi lövésekhez, legyen-e számított légellenállás és szélhatás
Для выстрелов игрока. Моделирует сопротивление воздуха и эффект ветра
+ Per Proiettili dei Giocatori, simula la Resistenza dell'Aria e gli Effetti del Vento
- Allow MK6 Computer
- Komputer MK6
- Habilitar ordenador del MK6
- Erlaube MK6-Computer
- MK6 - Povolit počítač
- Permitir computador do MK6
- Autoriser l'ordinateur de tir pour MK6
- MK6 számítógép engedélyezése
- Разрешить компьютер MK6
+ Allow Mk6 Computer
+ Komputer Mk6
+ Habilitar ordenador del Mk6
+ Erlaube Mk6-Computer
+ Mk6 - Povolit počítač
+ Permitir computador do Mk6
+ Autoriser l'ordinateur de tir pour Mk6
+ Mk6 számítógép engedélyezése
+ Разрешить компьютер Mk6
+ Consenti Computer Mk6
Show the Computer and Rangefinder (these NEED to be removed if you enable air resistance)
@@ -103,37 +107,249 @@
Affiche l'ordinateur de tir (cette option doit être DESACTIVEE si la résisance à l'air est activée)
A távmérő és számítógép megjelenítése (ezeket el KELL távolítani ha a légellenállás engedélyezve van)
Показывает компьютер и дальномер (это НУЖНО отключить, если вы включаете сопротивление воздуха)
+ Mostra il Computer e Distaziometro (questi DEVONO essere rimossi se vuoi abilitare la resistenza dell'aria)
- Allow MK6 Compass
- Kompas MK6
- Habilitar brujula del MK6
- Erlaube MK6-Kompass
- MK6 - Povolit kompas
- Permitir bússula do MK6
- Autoriser la boussole pour MK6
- MK6 iránytű engedélyezése
- Разрешить компас MK6
+ Allow Mk6 Compass
+ Kompas Mk6
+ Habilitar brujula del Mk6
+ Erlaube Mk6-Kompass
+ Mk6 - Povolit kompas
+ Permitir bússula do Mk6
+ Autoriser la boussole pour Mk6
+ Mk6 iránytű engedélyezése
+ Разрешить компас Mk6
+ Consenti Bussola Mk6
- Show the MK6 Digital Compass
- Pokaż kompas MK6
- Muestra la brujula digital en el MK6
- Zeige MK6-Digitaler-Kompass
- MK6 - Zobrazit digitální kompas
- Mostra a bússula digital do MK6
- Affiche la boussole digitale pour le MK6
- Az MK6 digitális iránytű megjelenítése
- Показывает цифровой компас MK6
+ Show the Mk6 Digital Compass
+ Pokaż kompas Mk6
+ Muestra la brujula digital en el Mk6
+ Zeige Mk6-Digitaler-Kompass
+ Mk6 - Zobrazit digitální kompas
+ Mostra a bússula digital do Mk6
+ Affiche la boussole digitale pour le Mk6
+ Az Mk6 digitális iránytű megjelenítése
+ Показывает цифровой компас Mk6
+ Mostra la Bussola Digitale Mk6
- This module allows you to setup MK6 mortar settings.
- Moduł ten pozwala dostosować ustawienia moździerza MK6.
- Dieses Modul erlaubt das Einstellen des MK6-Mörsers.
- Tento modul umožňuje nastavení minometu MK6.
- Este módulo permite que você ajuste o morteiro MK6.
- Модуль настройки миномета MK6.
- Ce module permet de régler les options du mortier MK6
+ This module allows you to setup Mk6 mortar settings.
+ Moduł ten pozwala dostosować ustawienia moździerza Mk6.
+ Dieses Modul erlaubt das Einstellen des Mk6-Mörsers.
+ Tento modul umožňuje nastavení minometu Mk6.
+ Este módulo permite que você ajuste o morteiro Mk6.
+ Модуль настройки миномета Mk6.
+ Ce module permet de régler les options du mortier Mk6
+ Questo modulo ti consente di impostare i parametri del mortaio Mk6.
+ Este módulo permite configurar los parámetros del mortero Mk6.
+
+
+ Use Ammunition handling
+ Aktiviere Munitionshandhabung
+ Usar manejo de munición.
+ Aktywuj obsługę amunicji
+ Utiliser la gestion des munitions
+ Utilizza la gestione delle munizioni
+ Usar manejo de munição
+
+
+ Removes mortar magazines, requiring individual rounds to be loaded by the gunner or loader. Does not affect AI mortars.
+ Enfernt das Magzin des Mörsers. Es ist nun erforderlich, die einzelnen Patronen manuell zu laden. Dies beeinflusst nicht die KI-Truppen.
+ Elimina los cargadores del mortero, requiriendo al artillero o cargador la carga manual de cada rondas. No afecta morteros controlados por IA.
+ Usuwa magazynki moździerza, wymagając ładowania pojedynczych pocisków przez strzelca lub ładowniczego. Nie dotyczy moździerzy AI.
+ Enlever les chargeurs de mortier, requiert des obus individuels qui doivent être chargés par le tireur ou le servant. N'affect pas les mortiers IA.
+ Toglie i proiettili dal mortaio. I colpi singoli devono essere caricati dall'operatore. Non cambia quado l'IA spara.
+ Elimina os carregadores do morteiro, requerendo que o atirador ou carregador utilize de forma individual a munição. Não afeta os morteiros controlados pela IA.
+
+
+ Remove Round
+ Entferne Patrone
+ Extraer ronda
+ Wyładuj pocisk
+ Enlever l'obus
+ Togli proiettile
+ Odstranit náboj
+ Remover munição
+
+
+ Load Mortar
+ Lade Mörser
+ Cargar mortero
+ Załaduj moździerz
+ Charger le mortier
+ Carica mortaio
+ Nabít minomet
+ Carregar morteiro
+
+
+ Unloading Round
+ Mörser entladen
+ Descargando ronda
+ Rozładowywanie moździerza
+ Déchargement de l'obus
+ Scarica proiettile
+ Descarregar munição
+
+
+ Preparing Round
+ Patrone vorbereiten
+ Preparando ronda
+ Przygotowywanie pocisku
+ Praparation de l'obus
+ Prepara il proiettile
+ Připavuji náboj
+ Preparar munição
+
+
+ Load HE
+ Lade Sprengpatrone
+ Cargar HE
+ Załaduj pocisk wybuchowy
+ Charger HE
+ Carica proiettile esplosivo ad alto potenziale (HE)
+ Nabít HE
+ Carregar HE
+
+
+ Load Smoke
+ Lade Nebelpatrone
+ Cargar Humo
+ Załaduj pocisk dymny
+ Charger Fumigène
+ Carica fumogeno
+ Nabít Dýmovnici
+ Carregar Fumaça
+
+
+ Load Illumination
+ Lade Leuchtpatrone
+ Cargar Iluminación
+ Załaduj pocisk oświetlający
+ Charger Eclairante
+ Carica illuminante
+ Nabít Světlici
+ Carregar Iluminação
+
+
+ Load Guided HE
+ Lade gelenkte Sprengpatrone
+ Cagar HE Guiada
+ Załaduj kierowany pocisk wybuchowy
+ Charger HE guidé
+ Carica HE guidata
+ Nabít HE (Naváděné)
+ Carregar HE Guiada
+
+
+ Load Laser Guided HE
+ Lade lasergelenkte Sprengpatrone
+ Cargar HE Guiada por Laser
+ Załaduj laserowo napr. pocisk wybuchowy
+ Charger HE guidé au laser
+ Carica HE a guida laser
+ Nabít HE (Naváděné laserem)
+ Carregar HE Guiada por Laser
+
+
+ 82mm HE Round
+ 82mm Sprengpatrone
+ Ronda 82mm HE
+ Pocisk wybuchowy kal. 82mm
+ Obus de 82mm HE
+ Proiettile da 82mm HE
+ 82mm HE náboj
+ Munição 82mm HE
+
+
+ 82mm Smoke Round
+ 82mm Nebelpatrone
+ Ronda 82mm Humo
+ Pocisk dymny kal. 82mm
+ Obus de 82mm fumigène
+ Proiettile Fumogeno da 82mm
+ 82mm Kouřový náboj
+ Munição 82mm Fumaça
+
+
+ 82mm Illumination Round
+ 82mm Leuchtpatrone
+ Ronda 82mm Iluminación
+ Pocisk oświetlający kal. 82mm
+ Obus de 82mm éclairant
+ Proiettile illuminante da 82mm
+ 82mm Osvětlovací náboj
+ Munição 82mm Iluminação
+
+
+ 82mm Guided HE Round
+ 82mm gelenkte Sprengpatrone
+ Ronda 82mm Guiada
+ Kierowany pocisk wybuchowy kal. 82mm
+ Obus de 82mm HE guidé
+ Proiettile HE guidato
+ 82mm HE náboj (naváděný)
+ Munição 82mm HE Guiada
+
+
+ 82mm Laser Guided HE Round
+ 82mm lasergelenkte Sprengpatrone
+ Ronda 82mm Guiada por Laser
+ Laserowo napr. pocisk wybuchowy kal. 82mm
+ Obus de 82mm HE guidé au laser
+ Proiettile HE a guida laser
+ 82mm HE náboj (naváděný laserem)
+ Munição 82mm HE Guiada por Laser
+
+
+ Used in Mk6 mortar
+ Wird im Mk6 Mörser verwendet
+ Usada en el mortero Mk6
+ Używany w moździerzu Mk6
+ Utilisé dans le mortier Mk6
+ Usato nel mortaio Mk6
+ Používá se u minometu Mk6
+ Usada no Morteiro MK6
+
+
+ [ACE] 82mm HE Rounds Box
+ [ACE] 82mm Sprengpatronenkiste
+ [ACE] Caja de municiones 82mm HE
+ [ACE] Skrzynka amunicji wybuchowej 82mm
+ [ACE] Obus de 82mm HE
+ [ACE] Scatola proiettili espolisvi ad alto potenziale (HE) da 82mm
+ [ACE] Bedna s municí (82mm HE)
+ [ACE] Caixa de Munição 82mm HE
+
+
+ [ACE] 82mm Smoke Rounds Box
+ [ACE] 82mm Nebelpatronenkiste
+ [ACE] Caja de municiones 82mm Humo
+ [ACE] Skrzynka amunicji dymnej 82mm
+ [ACE] Obus de 82mm fumigène
+ [ACE] Scatola fumogeni da 82mm
+ [ACE] Bedna s municí (82mm Dýmovnice)
+ [ACE] Caixa de Munição 82mm Fumaça
+
+
+ [ACE] 82mm Illumination Rounds Box
+ [ACE] 82mm Leuchtpatronenkiste
+ [ACE] Caja de municiones 82mm Iluminacion
+ [ACE] Skrzynka amunicji oświetlającej 82mm
+ [ACE] Obus de 82mm éclairants
+ [ACE] Scatola illuminanti da 82mm
+ [ACE] Bedna s municí (82mm Světlice)
+ [ACE] Caixa de Munição 82mm Iluminação
+
+
+ [ACE] 82mm Default Loadout Box
+ [ACE] 82mm Standardkiste
+ [ACE] Caja de municiones 82mm por defecto
+ [ACE] Skrzynka amunicji standardowej 82mm
+ [ACE] Obus de 82mm par défaut
+ [ACE] Scatola proiettili 82mm standard
+ [ACE] Bedna se standardní 82mm municí
+ [ACE] Caixa de Munição 82mm Padrão
\ No newline at end of file
diff --git a/addons/modules/CfgEventHandlers.hpp b/addons/modules/CfgEventHandlers.hpp
index 82d1c55d10..cd12d1938e 100644
--- a/addons/modules/CfgEventHandlers.hpp
+++ b/addons/modules/CfgEventHandlers.hpp
@@ -1,4 +1,10 @@
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
diff --git a/addons/modules/XEH_PREP.hpp b/addons/modules/XEH_PREP.hpp
new file mode 100644
index 0000000000..66edc4e817
--- /dev/null
+++ b/addons/modules/XEH_PREP.hpp
@@ -0,0 +1,2 @@
+
+PREP(moduleInit);
diff --git a/addons/modules/XEH_postInit.sqf b/addons/modules/XEH_postInit.sqf
index 0b8cc67842..293b946897 100644
--- a/addons/modules/XEH_postInit.sqf
+++ b/addons/modules/XEH_postInit.sqf
@@ -1,10 +1,10 @@
#include "script_component.hpp"
-["InitSettingsFromModules", {
+[QEGVAR(common,initSettingsFromModules), {
// TODO This is a basic and limited implementation that mimics some of the functionality from the A3 module framework, but not all of it.
// We have to execute this in the postInit XEH because on object init, the parameters of the modules are not yet available. They are if we execute it at the start of postInit execution.
-
+
private _uniqueModulesHandled = [];
{
[_x] call {
@@ -28,8 +28,8 @@
};
if (_isSingular && {_logicType in _uniqueModulesHandled}) then { //ToDo: should this be an exit?
ACE_LOGWARNING_1("Module [%1] - More than 1 singular module placed", _logicType);
- };
- if (_isSingular) then {_uniqueModulesHandled pushBack _logicType;};
+ };
+ if (_isSingular) then {_uniqueModulesHandled pushBack _logicType;};
if (_isGlobal || isServer) then {
[_logic, (synchronizedObjects _logic), true] call _function;
@@ -44,9 +44,9 @@
};
};
} forEach GVAR(moduleInitCollection);
-
+
if (isServer) then {
GVAR(serverModulesRead) = true;
publicVariable QGVAR(serverModulesRead);
};
-}] call EFUNC(common,addEventhandler);
+}] call CBA_fnc_addEventHandler;
diff --git a/addons/modules/XEH_preInit.sqf b/addons/modules/XEH_preInit.sqf
index 7573d34352..419cd902b5 100644
--- a/addons/modules/XEH_preInit.sqf
+++ b/addons/modules/XEH_preInit.sqf
@@ -2,7 +2,7 @@
ADDON = false;
-PREP(moduleInit);
+#include "XEH_PREP.hpp"
GVAR(moduleInitCollection) = [];
diff --git a/addons/modules/XEH_preStart.sqf b/addons/modules/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/modules/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/modules/config.cpp b/addons/modules/config.cpp
index d25e193d32..543bbe2551 100644
--- a/addons/modules/config.cpp
+++ b/addons/modules/config.cpp
@@ -6,8 +6,9 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_main"};
- author[] = {"Glowbal"};
- authorUrl = "";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"Glowbal"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
@@ -25,4 +26,4 @@ class CfgVehicles {
};
};
-#include "CfgEventHandlers.hpp"
\ No newline at end of file
+#include "CfgEventHandlers.hpp"
diff --git a/addons/movement/CfgEventHandlers.hpp b/addons/movement/CfgEventHandlers.hpp
index e75956f440..083c5bb089 100644
--- a/addons/movement/CfgEventHandlers.hpp
+++ b/addons/movement/CfgEventHandlers.hpp
@@ -1,3 +1,10 @@
+
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
@@ -9,3 +16,9 @@ class Extended_PostInit_EventHandlers {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
};
};
+
+class Extended_DisplayLoad_EventHandlers {
+ class RscDisplayInventory {
+ ADDON = QUOTE(_this call COMPILE_FILE(XEH_inventoryDisplayLoad));
+ };
+};
diff --git a/addons/movement/CfgInventoryGlobalVariable.hpp b/addons/movement/CfgInventoryGlobalVariable.hpp
deleted file mode 100644
index cf25595254..0000000000
--- a/addons/movement/CfgInventoryGlobalVariable.hpp
+++ /dev/null
@@ -1,3 +0,0 @@
-class CfgInventoryGlobalVariable {
- maxSoldierLoad = 1200;
-};
diff --git a/addons/movement/CfgMoves.hpp b/addons/movement/CfgMoves.hpp
index 622b04b269..c8273fcdb2 100644
--- a/addons/movement/CfgMoves.hpp
+++ b/addons/movement/CfgMoves.hpp
@@ -71,6 +71,12 @@ class CfgMovesBasic {
class CfgMovesMaleSdr: CfgMovesBasic {
class StandBase;
class States {
+ // jumping. don't force awkward freelook in mid air.
+ class AovrPercMstpSrasWrflDf;
+ class AovrPercMrunSrasWrflDf: AovrPercMstpSrasWrflDf {
+ forceAim = 0;
+ };
+
// replace link of vault with jump animation
class AmovPercMstpSrasWrflDnon;
class AmovPercMrunSrasWrflDf: AmovPercMstpSrasWrflDnon {
diff --git a/addons/movement/XEH_PREP.hpp b/addons/movement/XEH_PREP.hpp
new file mode 100644
index 0000000000..04913f7670
--- /dev/null
+++ b/addons/movement/XEH_PREP.hpp
@@ -0,0 +1,7 @@
+
+PREP(addLoadToUnitContainer);
+PREP(getWeight);
+PREP(canClimb);
+PREP(climb);
+PREP(handleClimb);
+PREP(handleVirtualMass);
diff --git a/addons/movement/XEH_inventoryDisplayLoad.sqf b/addons/movement/XEH_inventoryDisplayLoad.sqf
new file mode 100644
index 0000000000..ae717e7b39
--- /dev/null
+++ b/addons/movement/XEH_inventoryDisplayLoad.sqf
@@ -0,0 +1,14 @@
+#include "script_component.hpp"
+
+disableSerialization;
+
+[{
+ disableSerialization;
+ params ["_dialog"];
+
+ if (isNull _dialog) exitWith {
+ [_this select 1] call CBA_fnc_removePerFrameHandler;
+ };
+
+ (_dialog displayCtrl 111) ctrlSetText format ["%1 - %2 %3", [ACE_player, false, true] call EFUNC(common,getName), localize LSTRING(Weight), [ACE_player] call FUNC(getWeight)];
+}, 0, _this select 0] call CBA_fnc_addPerFrameHandler;
diff --git a/addons/movement/XEH_postInit.sqf b/addons/movement/XEH_postInit.sqf
index 7825134af3..b0db0d3681 100644
--- a/addons/movement/XEH_postInit.sqf
+++ b/addons/movement/XEH_postInit.sqf
@@ -3,24 +3,10 @@
if (!hasInterface) exitWith {};
-["inventoryDisplayLoaded", {
+["ace_playerChanged", FUNC(handleVirtualMass)] call CBA_fnc_addEventHandler;
+["ace_playerInventoryChanged", FUNC(handleVirtualMass)] call CBA_fnc_addEventHandler;
- [{
- disableSerialization;
- params ["_dialog"];
-
- if (isNull _dialog) exitWith {
- [_this select 1] call CBA_fnc_removePerFrameHandler;
- };
-
- _dialog displayCtrl 111 ctrlSetText format ["%1 - %2 %3", [ACE_player, false, true] call EFUNC(common,getName), localize LSTRING(Weight), [ACE_player] call FUNC(getWeight)];
-
- }, 0, _this select 0] call CBA_fnc_addPerFrameHandler;
-
-}] call EFUNC(common,addEventHandler);
-
-["ACE3 Movement", QGVAR(climb), localize LSTRING(Climb),
-{
+["ACE3 Movement", QGVAR(climb), localize LSTRING(Climb), {
// Conditions: canInteract
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
diff --git a/addons/movement/XEH_preInit.sqf b/addons/movement/XEH_preInit.sqf
index 3047be3518..a7feade1c3 100644
--- a/addons/movement/XEH_preInit.sqf
+++ b/addons/movement/XEH_preInit.sqf
@@ -2,9 +2,6 @@
ADDON = false;
-PREP(getWeight);
-PREP(canClimb);
-PREP(climb);
-PREP(handleClimb);
+#include "XEH_PREP.hpp"
ADDON = true;
diff --git a/addons/movement/XEH_preStart.sqf b/addons/movement/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/movement/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/movement/config.cpp b/addons/movement/config.cpp
index 8ea42fbf0c..247d686978 100644
--- a/addons/movement/config.cpp
+++ b/addons/movement/config.cpp
@@ -6,15 +6,15 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
- author[] = {"commy2","KoffeinFlummi","Tachii"};
- authorUrl = "https://github.com/commy2/";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"commy2","KoffeinFlummi","Tachii"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
#include "CfgEventHandlers.hpp"
#include "CfgFatigue.hpp"
-//#include "CfgInventoryGlobalVariable.hpp"
#include "CfgMoves.hpp"
#include "CfgVehicles.hpp"
#include "ACE_Settings.hpp"
diff --git a/addons/movement/functions/fnc_addLoadToUnitContainer.sqf b/addons/movement/functions/fnc_addLoadToUnitContainer.sqf
new file mode 100644
index 0000000000..a79b2ab917
--- /dev/null
+++ b/addons/movement/functions/fnc_addLoadToUnitContainer.sqf
@@ -0,0 +1,32 @@
+/*
+ * Author: commy2
+ * Add (negative numbers to subtract) a virtual mass to a units container.
+ *
+ * Arguments:
+ * 0: The Unit
+ * 1: The Container
+ * 2: The Virtual Load
+ *
+ * Return Value:
+ * Success?
+ *
+ * Public: No
+ */
+#include "script_component.hpp"
+
+params [["_unit", objNull, [objNull]], ["_container", objNull, [objNull]], ["_virtualLoadToAdd", 0, [0]]];
+
+if !(_container in [
+ _unit,
+ uniformContainer _unit,
+ vestContainer _unit,
+ backpackContainer _unit
+]) exitWith {false};
+
+private _virtualLoad = (_container getVariable [QGVAR(vLoad), 0]) + _virtualLoadToAdd;
+_container setVariable [QGVAR(vLoad), _virtualLoad, true];
+
+// update
+_unit call FUNC(handleVirtualMass);
+
+true
diff --git a/addons/movement/functions/fnc_canClimb.sqf b/addons/movement/functions/fnc_canClimb.sqf
index ec4202dbd5..260f76105b 100644
--- a/addons/movement/functions/fnc_canClimb.sqf
+++ b/addons/movement/functions/fnc_canClimb.sqf
@@ -40,14 +40,29 @@ private _checkPos4end = _checkPos4beg vectorAdd (_dir vectorMultiply 1.3);
private _checkPos5beg = _pos vectorAdd [-0.2 * (_dir select 1), -0.2 * -(_dir select 0), 1.5];
private _checkPos5end = _checkPos5beg vectorAdd (_dir vectorMultiply 1.3);
-/*
-drawLine3D [ASLToATL _checkPos0beg, ASLToATL _checkPos0end, [0,1,0,1]];
-drawLine3D [ASLToATL _checkPos1beg, ASLToATL _checkPos1end, [1,0,0,1]];
-drawLine3D [ASLToATL _checkPos2beg, ASLToATL _checkPos2end, [1,0.5,0.5,1]];
-drawLine3D [ASLToATL _checkPos3beg, ASLToATL _checkPos3end, [1,0.5,0.5,1]];
-drawLine3D [ASLToATL _checkPos4beg, ASLToATL _checkPos4end, [1,0.5,0.5,1]];
-drawLine3D [ASLToATL _checkPos5beg, ASLToATL _checkPos5end, [1,0.5,0.5,1]];
-*/
+#ifdef DEBUG_MODE_FULL
+ [{
+ params ["_args", "_idPFH"];
+
+ if (diag_tickTime > (_args select 0) + 5) exitWith {
+ [_idPFH] call CBA_fnc_removePerFrameHandler;
+ };
+
+ drawLine3D [ASLToATL (_args select 1), ASLToATL (_args select 2), [0,1,0,1]];
+ drawLine3D [ASLToATL (_args select 3), ASLToATL (_args select 4), [1,0,0,1]];
+ drawLine3D [ASLToATL (_args select 5), ASLToATL (_args select 6), [1,0.5,0.5,1]];
+ drawLine3D [ASLToATL (_args select 7), ASLToATL (_args select 8), [1,0.5,0.5,1]];
+ drawLine3D [ASLToATL (_args select 9), ASLToATL (_args select 10), [1,0.5,0.5,1]];
+ drawLine3D [ASLToATL (_args select 11), ASLToATL (_args select 12), [1,0.5,0.5,1]];
+ }, 0, [ diag_tickTime,
+ _checkPos0beg, _checkPos0end,
+ _checkPos1beg, _checkPos1end,
+ _checkPos2beg, _checkPos2end,
+ _checkPos3beg, _checkPos3end,
+ _checkPos4beg, _checkPos4end,
+ _checkPos5beg, _checkPos5end
+ ]] call CBA_fnc_addPerFrameHandler;
+#endif
lineIntersects [_checkPos0beg, _checkPos0end]
&& {!(lineIntersects [_checkPos1beg, _checkPos1end])}
diff --git a/addons/movement/functions/fnc_getWeight.sqf b/addons/movement/functions/fnc_getWeight.sqf
index 11dd8c4ee6..b64abc3623 100644
--- a/addons/movement/functions/fnc_getWeight.sqf
+++ b/addons/movement/functions/fnc_getWeight.sqf
@@ -17,7 +17,18 @@
params ["_unit"];
-private _weight = loadAbs _unit * 0.1;
+private _virtualLoad = 0;
+
+{
+ _virtualLoad = _virtualLoad + (_x getVariable [QGVAR(vLoad), 0]);
+} forEach [
+ _unit,
+ uniformContainer _unit,
+ vestContainer _unit,
+ backpackContainer _unit
+];
+
+private _weight = (loadAbs _unit + _virtualLoad) * 0.1;
if (GVAR(useImperial)) then {
_weight = format ["%1lb", (round (_weight * 100)) / 100];
diff --git a/addons/movement/functions/fnc_handleVirtualMass.sqf b/addons/movement/functions/fnc_handleVirtualMass.sqf
new file mode 100644
index 0000000000..8e33197089
--- /dev/null
+++ b/addons/movement/functions/fnc_handleVirtualMass.sqf
@@ -0,0 +1,45 @@
+/*
+ * Author: commy2
+ * Recalculate the units loadCoef to emulate a mass added to uniform, vest or backpack.
+ *
+ * Arguments:
+ * 0: The Unit (usually the player)
+ *
+ * Return Value:
+ * Nothing
+ *
+ * Public: No
+ */
+#include "script_component.hpp"
+
+params ["_unit"];
+
+if (isNull _unit) exitWith {};
+
+// add sum of virtual loads
+private _virtualLoad = 0;
+
+{
+ _virtualLoad = _virtualLoad + (_x getVariable [QGVAR(vLoad), 0]);
+} forEach [
+ _unit,
+ uniformContainer _unit,
+ vestContainer _unit,
+ backpackContainer _unit
+];
+
+// get absolute vanilla load
+private _absLoad = getNumber (configFile >> "CfgInventoryGlobalVariable" >> "maxSoldierLoad");
+
+// try to preserve other changes to the "LoadCoef" unitTrait
+private _loadCoef = _unit getVariable QGVAR(loadCoef);
+
+if (isNil "_loadCoef") then {
+ _loadCoef = _unit getUnitTrait "loadCoef";
+ _unit setVariable [QGVAR(loadCoef), _loadCoef, true];
+};
+
+// calc. new "virtual" loadCoef
+private _virtualLoadCoef = (1 + _virtualLoad / _absLoad) * _loadCoef;
+
+_unit setUnitTrait ["loadCoef", _virtualLoadCoef];
diff --git a/addons/mx2a/CfgWeapons.hpp b/addons/mx2a/CfgWeapons.hpp
index 6f590e2ed4..7ff5943a88 100644
--- a/addons/mx2a/CfgWeapons.hpp
+++ b/addons/mx2a/CfgWeapons.hpp
@@ -5,9 +5,9 @@ class CfgWeapons {
author = ECSTRING(common,ACETeam);
displayName = CSTRING(DisplayName);
descriptionShort = CSTRING(Description);
- model = PATHTOF(data\ace_mx2a.p3d);
- modelOptics = QUOTE(PATHTOEF(apl,LWTS_optic.p3d));
- picture = PATHTOF(UI\w_mx2a_ca.paa);
+ model = QPATHTOF(data\ace_mx2a.p3d);
+ modelOptics = QPATHTOEF(apl,LWTS_optic.p3d);
+ picture = QPATHTOF(UI\w_mx2a_ca.paa);
opticsZoomMax = 0.1;
distanceZoomMax = 120;
opticsZoomMin = 0.05;
diff --git a/addons/mx2a/config.cpp b/addons/mx2a/config.cpp
index 45b1643ed2..c59dc43dd3 100644
--- a/addons/mx2a/config.cpp
+++ b/addons/mx2a/config.cpp
@@ -6,7 +6,9 @@ class CfgPatches {
weapons[] = {"ACE_MX2A"};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_apl"};
- author[] = {"Spooner", "tcp"};
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"Spooner", "tcp"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
diff --git a/addons/mx2a/stringtable.xml b/addons/mx2a/stringtable.xml
index f45e10bcaa..e2c7ed2dc7 100644
--- a/addons/mx2a/stringtable.xml
+++ b/addons/mx2a/stringtable.xml
@@ -1,4 +1,4 @@
-
+
@@ -11,6 +11,7 @@
MX-2A
MX-2A
MX-2A
+ MX-2A
Thermal imaging device
@@ -22,6 +23,7 @@
Appareil d'imagerie thermique
Hőleképező készülék
Тепловизионный прибор
+ Dispositivo di visione termica
-
+
\ No newline at end of file
diff --git a/addons/nametags/CfgEventHandlers.hpp b/addons/nametags/CfgEventHandlers.hpp
index e75956f440..becf395052 100644
--- a/addons/nametags/CfgEventHandlers.hpp
+++ b/addons/nametags/CfgEventHandlers.hpp
@@ -1,3 +1,10 @@
+
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
diff --git a/addons/nametags/CfgVehicles.hpp b/addons/nametags/CfgVehicles.hpp
index 7ca13b5aeb..6b8b8956ae 100644
--- a/addons/nametags/CfgVehicles.hpp
+++ b/addons/nametags/CfgVehicles.hpp
@@ -8,7 +8,7 @@ class CfgVehicles {
scope = 2;
isGlobal = 1;
isSingular = 1;
- icon = QUOTE(PATHTOF(UI\Icon_Module_NameTags_ca.paa));
+ icon = QPATHTOF(UI\Icon_Module_NameTags_ca.paa);
class Arguments {
class showPlayerNames {
displayName = CSTRING(ShowPlayerNames);
diff --git a/addons/nametags/XEH_PREP.hpp b/addons/nametags/XEH_PREP.hpp
new file mode 100644
index 0000000000..93a8ff6626
--- /dev/null
+++ b/addons/nametags/XEH_PREP.hpp
@@ -0,0 +1,10 @@
+
+PREP(canShow);
+PREP(doShow);
+PREP(drawNameTagIcon);
+PREP(getVehicleData);
+PREP(initIsSpeaking);
+PREP(moduleNameTags);
+PREP(onDraw3d);
+PREP(setText);
+PREP(updateSettings);
diff --git a/addons/nametags/XEH_postInit.sqf b/addons/nametags/XEH_postInit.sqf
index 46d0e287d8..bebe840b47 100644
--- a/addons/nametags/XEH_postInit.sqf
+++ b/addons/nametags/XEH_postInit.sqf
@@ -14,7 +14,7 @@ GVAR(showNamesTime) = -10;
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
// Statement
- GVAR(showNamesTime) = ACE_time;
+ GVAR(showNamesTime) = CBA_missionTime;
if (call FUNC(canShow)) then{ call FUNC(doShow); };
// Return false so it doesn't block other actions
false
@@ -23,15 +23,15 @@ GVAR(showNamesTime) = -10;
[29, [false, false, false]], false] call CBA_fnc_addKeybind; //LeftControl Key
// Wait until the colors are defined before starting to draw the nametags
-["SettingsInitialized", {
+["ace_settingsInitialized", {
// Draw handle
call FUNC(updateSettings);
-}] call EFUNC(common,addEventHandler);
+}] call CBA_fnc_addEventHandler;
// Change settings accordingly when they are changed
-["SettingChanged", {
+["ace_settingChanged", {
params ["_name"];
if (_name == QGVAR(showPlayerNames)) then {
call FUNC(updateSettings);
};
-}] call EFUNC(common,addEventHandler);
+}] call CBA_fnc_addEventHandler;
diff --git a/addons/nametags/XEH_preInit.sqf b/addons/nametags/XEH_preInit.sqf
index 51b926cbb3..a7feade1c3 100644
--- a/addons/nametags/XEH_preInit.sqf
+++ b/addons/nametags/XEH_preInit.sqf
@@ -2,14 +2,6 @@
ADDON = false;
-PREP(canShow);
-PREP(doShow);
-PREP(drawNameTagIcon);
-PREP(getVehicleData);
-PREP(initIsSpeaking);
-PREP(moduleNameTags);
-PREP(onDraw3d);
-PREP(setText);
-PREP(updateSettings);
+#include "XEH_PREP.hpp"
ADDON = true;
diff --git a/addons/nametags/XEH_preStart.sqf b/addons/nametags/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/nametags/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/nametags/config.cpp b/addons/nametags/config.cpp
index a2d38254f1..b02dfa9297 100644
--- a/addons/nametags/config.cpp
+++ b/addons/nametags/config.cpp
@@ -6,8 +6,9 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_interaction"};
- author[] = { "commy2", "esteldunedain" };
- authorUrl = "https://github.com/commy2/";
+ author = ECSTRING(common,ACETeam);
+ authors[] = { "commy2", "esteldunedain" };
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
diff --git a/addons/nametags/functions/common.hpp b/addons/nametags/functions/common.hpp
index 6aeb24fc5a..ef3706cd32 100644
--- a/addons/nametags/functions/common.hpp
+++ b/addons/nametags/functions/common.hpp
@@ -17,6 +17,6 @@
"a3\ui_f\data\IGUI\Cfg\Actions\getindriver_ca.paa", \
"a3\ui_f\data\IGUI\Cfg\Actions\getincommander_ca.paa", \
"a3\ui_f\data\IGUI\Cfg\Actions\getingunner_ca.paa", \
- QUOTE(PATHTOF(UI\icon_position_ffv.paa)), \
+ QPATHTOF(UI\icon_position_ffv.paa), \
"a3\ui_f\data\IGUI\Cfg\Actions\getincargo_ca.paa" \
]
diff --git a/addons/nametags/functions/fnc_doShow.sqf b/addons/nametags/functions/fnc_doShow.sqf
index 615916de7f..18c434f4c6 100644
--- a/addons/nametags/functions/fnc_doShow.sqf
+++ b/addons/nametags/functions/fnc_doShow.sqf
@@ -35,16 +35,16 @@ _turretRoles = _data apply {_x select 1};
_roleType = CARGO;
_toShow = [];
{
- switch (_x) do {
+ switch (_x) do {
case commander _vehicle: {
_roleType = COMMANDER;
};
case gunner _vehicle: {
_roleType = GUNNER;
- };
- case driver _vehicle: {
+ };
+ case driver _vehicle: {
_roleType = if(_isAir) then { PILOT } else { DRIVER };
- };
+ };
default {
_index = _turretUnits find _x;
if(_index !=-1 ) then {
@@ -61,7 +61,7 @@ _toShow = [
_toShow,
[],
{
- _x select 1
+ _x select 1
},
"ASCEND",
{
@@ -71,7 +71,7 @@ _toShow = [
] call BIS_fnc_sortBy;
_roleImages = ROLE_IMAGES;
-{
+{
_unit = _x select 0;
_roleType = _x select 1;
_text = _text + format["%1 ", [_unit] call EFUNC(common,getName), _roleImages select _roleType];
diff --git a/addons/nametags/functions/fnc_drawNameTagIcon.sqf b/addons/nametags/functions/fnc_drawNameTagIcon.sqf
index ac28a427d5..3d26b72ebf 100644
--- a/addons/nametags/functions/fnc_drawNameTagIcon.sqf
+++ b/addons/nametags/functions/fnc_drawNameTagIcon.sqf
@@ -7,74 +7,75 @@
* 1: Target
* 2: Alpha
* 4: Height offset
- * 5: Draw Type
+ * 5: Draw name
+ * 5: Draw rank
+ * 6: Draw soundwave
*
* Return value:
* None
*
* Example:
- * [ACE_player, bob, 0.5, height, ICON_NAME_SPEAK] call ace_nametags_fnc_drawNameTagIcon
+ * [ACE_player, bob, 0.5, height, true, true, true] call ace_nametags_fnc_drawNameTagIcon
*
* Public: No
*/
#include "script_component.hpp"
-params ["_player", "_target", "_alpha", "_heightOffset", "_iconType"];
+TRACE_1("drawName:", _this);
-if ((_iconType == ICON_NONE) || {isObjectHidden _target}) exitWith {}; //Don't waste time if not visable
+params ["", "_target", "", "_heightOffset"];
-private ["_position", "_color", "_name", "_size", "_icon", "_scale"];
+_fnc_parameters = {
+ params ["_player", "_target", "_alpha", "_heightOffset", "_drawName", "_drawRank", "_drawSoundwave"];
-//Set Icon:
-_icon = "";
-_size = 0;
-if (_iconType in [ICON_NAME_SPEAK, ICON_SPEAK]) then {
- _icon = format ["%1%2%3",QUOTE(PATHTOF(UI\soundwave)), floor (random 10), ".paa"];
- _size = 1;
- _alpha = (_alpha max 0.2) + 0.2;//Boost alpha when speaking
-} else {
- if (_iconType == ICON_NAME_RANK) then {
- _icon = format["\A3\Ui_f\data\GUI\Cfg\Ranks\%1_gs.paa",(toLower(rank _target))];
+ //Set Icon:
+ private _icon = "";
+ private _size = 0;
+ if (_drawSoundwave) then {
+ _icon = format [QPATHTOF(UI\soundwave%1.paa), floor random 10];
_size = 1;
+ } else {
+ if (_drawRank && {rank _target != ""}) then {
+ _icon = format["\A3\Ui_f\data\GUI\Cfg\Ranks\%1_gs.paa", toLower rank _target];
+ _size = 1;
+ };
};
+
+ //Set Text:
+ private _name = if (_drawName) then {
+ [_target, true, true] call EFUNC(common,getName)
+ } else {
+ ""
+ };
+
+ //Set Color:
+ private _color = [1, 1, 1, _alpha];
+ if ((group _target) != (group _player)) then {
+ _color = +GVAR(defaultNametagColor); //Make a copy, then multiply both alpha values (allows client to decrease alpha in settings)
+ _color set [3, (_color select 3) * _alpha];
+ } else {
+ _color = [[1, 1, 1, _alpha], [1, 0, 0, _alpha], [0, 1, 0, _alpha], [0, 0, 1, _alpha], [1, 1, 0, _alpha]] select ((["MAIN", "RED", "GREEN", "BLUE", "YELLOW"] find ([assignedTeam _target] param [0, "MAIN"])) max 0);
+ };
+
+ private _scale = [0.333, 0.5, 0.666, 0.83333, 1] select GVAR(tagSize);
+
+ [
+ _icon,
+ _color,
+ [],
+ (_size * _scale),
+ (_size * _scale),
+ 0,
+ _name,
+ 2,
+ (0.05 * _scale),
+ "RobotoCondensed"
+ ]
};
-if (_alpha < 0) exitWith {}; //Don't waste time if not visable
+private _parameters = [_this, _fnc_parameters, _target, QGVAR(drawParameters), 0.1] call EFUNC(common,cachedCall);
+_parameters set [2, _target modelToWorldVisual ((_target selectionPosition "pilot") vectorAdd [0,0,(_heightOffset + .3)])];
-//Set Text:
-_name = if (_iconType in [ICON_NAME, ICON_NAME_RANK, ICON_NAME_SPEAK]) then {
- [_target, true, true] call EFUNC(common,getName)
-} else {
- ""
-};
-//Set Color:
-if ((group _target) != (group _player)) then {
- _color = +GVAR(defaultNametagColor); //Make a copy, then multiply both alpha values (allows client to decrease alpha in settings)
- _color set [3, (_color select 3) * _alpha];
-} else {
- _color = [[1, 1, 1, _alpha], [1, 0, 0, _alpha], [0, 1, 0, _alpha], [0, 0, 1, _alpha], [1, 1, 0, _alpha]] select ((["MAIN", "RED", "GREEN", "BLUE", "YELLOW"] find (assignedTeam _target)) max 0);
-};
-
-if (isNil "_color") then {
- _color = [1, 1, 1, _alpha];
-};
-
-// Convert position to ASLW (expected by drawIcon3D) and add height offsets
-_position = _target modelToWorldVisual ((_target selectionPosition "pilot") vectorAdd [0,0,(_heightOffset + .3)]);
-
-_scale = [0.333, 0.5, 0.666, 0.83333, 1] select GVAR(tagSize);
-
-drawIcon3D [
- _icon,
- _color,
- _position,
- (_size * _scale),
- (_size * _scale),
- 0,
- _name,
- 2,
- (0.05 * _scale),
- "PuristaMedium"
-];
+drawIcon3D _parameters;
diff --git a/addons/nametags/functions/fnc_getVehicleData.sqf b/addons/nametags/functions/fnc_getVehicleData.sqf
index b0e0b1ff34..656cb8dc81 100644
--- a/addons/nametags/functions/fnc_getVehicleData.sqf
+++ b/addons/nametags/functions/fnc_getVehicleData.sqf
@@ -1,6 +1,6 @@
/*
* Author: aeroson
- * Gathers and caches data needed by AGM_CrewInfo_fnc_doShow.
+ * Gathers and caches data needed by ace_nametags_fnc_doShow.
* What really does make difference for the engine is simulation of CfgAmmo.
* Priority of roles is: driver/pilot, gunner, copilot, commander, FFV, cargo.
*
diff --git a/addons/nametags/functions/fnc_initIsSpeaking.sqf b/addons/nametags/functions/fnc_initIsSpeaking.sqf
index 7f9ced67f7..1e6484c7fa 100644
--- a/addons/nametags/functions/fnc_initIsSpeaking.sqf
+++ b/addons/nametags/functions/fnc_initIsSpeaking.sqf
@@ -28,13 +28,13 @@ if (isServer) then {
if (!hasInterface) exitWith {};
-["playerChanged", {
+["ace_playerChanged", {
//When player changes, make sure to reset old unit's variable
params ["", "_oldUnit"];
if ((!isNull _oldUnit) && {_oldUnit getVariable [QGVAR(isSpeakingInGame), false]}) then {
_oldUnit setVariable [QGVAR(isSpeakingInGame), false, true];
};
-}] call EFUNC(common,addEventHandler);
+}] call CBA_fnc_addEventHandler;
if (isClass (configFile >> "CfgPatches" >> "acre_api")) then {
diff --git a/addons/nametags/functions/fnc_onDraw3d.sqf b/addons/nametags/functions/fnc_onDraw3d.sqf
index bbf608b75a..d9d26cd0ac 100644
--- a/addons/nametags/functions/fnc_onDraw3d.sqf
+++ b/addons/nametags/functions/fnc_onDraw3d.sqf
@@ -15,108 +15,145 @@
*/
#include "script_component.hpp"
-private ["_onKeyPressAlphaMax", "_defaultIcon", "_distance", "_alpha", "_icon", "_targets", "_pos2", "_vecy", "_relPos", "_projDist", "_pos", "_target", "_targetEyePosASL", "_ambientBrightness", "_maxDistance"];
+private ["_defaultIcon", "_distance", "_alpha", "_icon", "_targets", "_relPos", "_projDist", "_target"];
-//don't show nametags in spectator or if RscDisplayMPInterrupt is open
+BEGIN_COUNTER(GVAR(onDraw3d));
+
+// Don't show nametags in spectator or if RscDisplayMPInterrupt is open
if ((isNull ACE_player) || {!alive ACE_player} || {!isNull (findDisplay 49)}) exitWith {};
-_ambientBrightness = ((([] call EFUNC(common,ambientBrightness)) + ([0, 0.4] select ((currentVisionMode ace_player) != 0))) min 1) max 0;
-_maxDistance = _ambientBrightness * GVAR(PlayerNamesViewDistance);
-
-_onKeyPressAlphaMax = if ((GVAR(showPlayerNames) in [3,4])) then {
- 2 + (GVAR(showNamesTime) - ACE_time); //after release 1 second of full opacity, 1 second of fading to 0
-} else {
- 1
-};
-
-_defaultIcon = if (GVAR(showPlayerRanks)) then {
- ICON_NAME_RANK;
-} else {
- ICON_NAME;
-};
-
-//When cursorTarget is on a vehicle show the nametag for the commander.
-//If set to "Only On Keypress" settings, fade just like main tags
-if (GVAR(showCursorTagForVehicles) && {_onKeyPressAlphaMax > 0}) then {
- _target = cursorTarget;
- if ((!(_target isKindOf "CAManBase")) && {!(_target in allUnitsUAV)}) then {
- _target = effectiveCommander _target;
- if ((!isNull _target) &&
- {(side (group _target)) == (side (group ACE_player))} &&
- {_target != ACE_player} &&
- {GVAR(showNamesForAI) || {[_target] call EFUNC(common,isPlayer)}} &&
- {!(_target getVariable ["ACE_hideName", false])}) then {
- _distance = ACE_player distance _target;
- _alpha = (((1 - 0.2 * (_distance - _maxDistance)) min 1) * GVAR(playerNamesMaxAlpha)) min _onKeyPressAlphaMax;
- [ACE_player, _target, _alpha, _distance * 0.026, _defaultIcon] call FUNC(drawNameTagIcon);
- };
+// Determine flags from current settings
+private _drawName = true;
+private _drawRank = GVAR(showPlayerRanks);
+private _enabledTagsNearby = false;
+private _enabledTagsCursor = false;
+private _onKeyPressAlphaMax = 1;
+switch (GVAR(showPlayerNames)) do {
+ case 0: {
+ // Player names Disabled
+ _drawName = false;
+ _enabledTagsNearby = (GVAR(showSoundWaves) == 2);
+ _enabledTagsCursor = false;
+ };
+ case 1: {
+ // Player names Enabled
+ _enabledTagsNearby = true;
+ _enabledTagsCursor = false;
+ };
+ case 2: {
+ // Player names Only cursor
+ _enabledTagsNearby = (GVAR(showSoundWaves) == 2);
+ _enabledTagsCursor = true;
+ };
+ case 3: {
+ // Player names Only Keypress
+ _onKeyPressAlphaMax = 2 + (GVAR(showNamesTime) - CBA_missionTime);
+ _enabledTagsNearby = (_onKeyPressAlphaMax) > 0 || (GVAR(showSoundWaves) == 2);
+ _enabledTagsCursor = false;
+ };
+ case 4: {
+ // Player names Only Cursor and Keypress
+ _onKeyPressAlphaMax = 2 + (GVAR(showNamesTime) - CBA_missionTime);
+ _enabledTagsNearby = (GVAR(showSoundWaves) == 2);
+ _enabledTagsCursor = _onKeyPressAlphaMax > 0;
};
};
-//"Only Cursor" mode, only show nametags for humans on cursorTarget
-if ((GVAR(showPlayerNames) in [2,4]) && {_onKeyPressAlphaMax > 0}) then {
+private _ambientBrightness = ((([] call EFUNC(common,ambientBrightness)) + ([0, 0.4] select ((currentVisionMode ace_player) != 0))) min 1) max 0;
+private _maxDistance = _ambientBrightness * GVAR(PlayerNamesViewDistance);
+
+private _camPosAGL = positionCameraToWorld [0, 0, 0];
+private _camPosASL = AGLtoASL _camPosAGL;
+private _vecy = (AGLtoASL positionCameraToWorld [0, 0, 1]) vectorDiff _camPosASL;
+
+// Show nametag for the unit behind the cursor or its commander
+if (_enabledTagsCursor) then {
_target = cursorTarget;
- if ((!isNull _target) &&
- {_target isKindOf "CAManBase"} &&
- {(side (group _target)) == (side (group ACE_player))} &&
- {_target != ACE_player} &&
- {GVAR(showNamesForAI) || {[_target] call EFUNC(common,isPlayer)}} &&
- {!(_target getVariable ["ACE_hideName", false])}) then {
- _distance = ACE_player distance _target;
- if (_distance > (_maxDistance + 5)) exitWith {};
- _alpha = (((1 - 0.2 * (_distance - _maxDistance)) min 1) * GVAR(playerNamesMaxAlpha)) min _onKeyPressAlphaMax;
- _icon = ICON_NONE;
- if (GVAR(showSoundWaves) == 2) then { //icon will be drawn below, so only show name here
- _icon = if (([_target] call FUNC(isSpeaking)) && {(vehicle _target) == _target}) then {ICON_NAME} else {_defaultIcon};
+ if !(_target isKindOf "CAManBase") then {
+ // When cursorTarget is on a vehicle show the nametag for the commander.
+ if !(_target in allUnitsUAV) then {
+ _target = effectiveCommander _target;
} else {
- _icon = if (([_target] call FUNC(isSpeaking)) && {(vehicle _target) == _target} && {GVAR(showSoundWaves) > 0}) then {ICON_NAME_SPEAK} else {_defaultIcon};
+ _target = objNull;
};
+ };
+ if (isNull _target) exitWith {};
- [ACE_player, _target, _alpha, _distance * 0.026, _icon] call FUNC(drawNameTagIcon);
+ if (_target != ACE_player &&
+ {(side group _target) == (side group ACE_player)} &&
+ {GVAR(showNamesForAI) || {[_target] call EFUNC(common,isPlayer)}} &&
+ {lineIntersectsSurfaces [_camPosASL, eyePos _target, ACE_player, _target] isEqualTo []} &&
+ {!isObjectHidden _target}) then {
+
+ _distance = ACE_player distance _target;
+
+ private _drawSoundwave = (GVAR(showSoundWaves) > 0) && {[_target] call FUNC(isSpeaking)};
+ // Alpha:
+ // - base value determined by GVAR(playerNamesMaxAlpha)
+ // - decreases when _distance > _maxDistance
+ // - increases when the unit is speaking
+ // - it's clamped by the value of _onKeyPressAlphaMax
+ private _alpha = (((1 + ([0, 0.2] select _drawSoundwave) - 0.2 * (_distance - _maxDistance)) min 1) * GVAR(playerNamesMaxAlpha)) min _onKeyPressAlphaMax;
+
+ if (_alpha > 0) then {
+ [ACE_player, _target, _alpha, _distance * 0.026, _drawName, _drawRank, _drawSoundwave] call FUNC(drawNameTagIcon);
+ };
};
};
-if (((GVAR(showPlayerNames) in [1,3]) && {_onKeyPressAlphaMax > 0}) || {GVAR(showSoundWaves) == 2}) then {
- _pos = positionCameraToWorld [0, 0, 0];
- _targets = _pos nearObjects ["CAManBase", _maxDistance + 5];
-
- if (!surfaceIsWater _pos) then {
- _pos = ATLtoASL _pos;
- };
- _pos2 = positionCameraToWorld [0, 0, 1];
- if (!surfaceIsWater _pos2) then {
- _pos2 = ATLtoASL _pos2;
- };
- _vecy = _pos2 vectorDiff _pos;
+// Show nametags for nearby units
+if (_enabledTagsNearby) then {
+ // Find valid targets and cache them
+ private _targets = [[], {
+ private _nearMen = _camPosAGL nearObjects ["CAManBase", _maxDistance + 7];
+ _nearMen = _nearMen select {
+ _x != ACE_player &&
+ {(side group _x) == (side group ACE_player)} &&
+ {GVAR(showNamesForAI) || {[_x] call EFUNC(common,isPlayer)}} &&
+ {lineIntersectsSurfaces [_camPosASL, eyePos _x, ACE_player, _x] isEqualTo []} &&
+ {!isObjectHidden _x}
+ };
+ private _crewMen = [];
+ if (vehicle ACE_player != ACE_player) then {
+ _crewMen = (crew vehicle ACE_player) select {
+ _x != ACE_player &&
+ {(side group _x) == (side group ACE_player)} &&
+ {GVAR(showNamesForAI) || {[_x] call EFUNC(common,isPlayer)}} &&
+ {lineIntersectsSurfaces [_camPosASL, eyePos _x, ACE_player, _x, true, 1, "GEOM", "NONE"] isEqualTo []} &&
+ {!isObjectHidden _x}
+ };
+ };
+ (_nearMen + _crewMen)
+ }, missionNamespace, QGVAR(nearMen), 0.5] call EFUNC(common,cachedCall);
{
- _target = _x;
+ private _target = _x;
- _icon = ICON_NONE;
- if ((GVAR(showPlayerNames) in [1,3]) && {_onKeyPressAlphaMax > 0}) then {
- if (([_target] call FUNC(isSpeaking)) && {(vehicle _target) == _target} && {GVAR(showSoundWaves) > 0}) then {_icon = ICON_NAME_SPEAK;} else {_icon = _defaultIcon};
- } else {
- //showSoundWaves must be 2, only draw speak icon
- if (([_target] call FUNC(isSpeaking)) && {(vehicle _target) == _target}) then {_icon = ICON_SPEAK;};
- };
+ if !(isNull _target) then {
+ private _relPos = (visiblePositionASL _target) vectorDiff _camPosASL;
+ private _distance = vectorMagnitude _relPos;
+ private _projDist = _relPos vectorDistance (_vecy vectorMultiply (_relPos vectorDotProduct _vecy));
- if ((_icon != ICON_NONE) &&
- {(side (group _target)) == (side (group ACE_player))} &&
- {_target != ACE_player} &&
- {GVAR(showNamesForAI) || {[_target] call EFUNC(common,isPlayer)}} &&
- {!(_target getVariable ["ACE_hideName", false])}) then {
+ private _drawSoundwave = (GVAR(showSoundWaves) > 0) && {[_target] call FUNC(isSpeaking)};
+ private _alphaMax = _onKeyPressAlphaMax;
+ if ((GVAR(showSoundWaves) == 2) && _drawSoundwave) then {
+ _drawName = _drawSoundwave;
+ _drawRank = false;
+ _alphaMax = 1;
+ };
+ // Alpha:
+ // - base value determined by GVAR(playerNamesMaxAlpha)
+ // - decreases when _distance > _maxDistance
+ // - increases when the unit is speaking
+ // - it's clamped by the value of _onKeyPressAlphaMax unless soundwaves are forced on and the unit is talking
+ private _alpha = (((1 + ([0, 0.2] select _drawSoundwave) - 0.2 * (_distance - _maxDistance)) min 1) * GVAR(playerNamesMaxAlpha)) min _alphaMax;
- _targetEyePosASL = eyePos _target;
- if (lineIntersects [_pos, _targetEyePosASL, ACE_player, _target]) exitWith {}; // Check if there is line of sight
-
- _relPos = (visiblePositionASL _target) vectorDiff _pos;
- _distance = vectorMagnitude _relPos;
- _projDist = _relPos vectorDistance (_vecy vectorMultiply (_relPos vectorDotProduct _vecy));
-
- _alpha = (((1 - 0.2 * (_distance - _maxDistance)) min 1) * GVAR(playerNamesMaxAlpha)) min _onKeyPressAlphaMax;
-
- [ACE_player, _target, _alpha, _distance * 0.026, _icon] call FUNC(drawNameTagIcon);
+ if (_alpha > 0) then {
+ [ACE_player, _target, _alpha, _distance * 0.026, _drawName, _drawRank, _drawSoundwave] call FUNC(drawNameTagIcon);
+ };
};
nil
} count _targets;
};
+
+END_COUNTER(GVAR(onDraw3d));
diff --git a/addons/nametags/stringtable.xml b/addons/nametags/stringtable.xml
index 9016988452..5f048eeb4e 100644
--- a/addons/nametags/stringtable.xml
+++ b/addons/nametags/stringtable.xml
@@ -32,7 +32,7 @@
Zeige Spielernamen nur an, wenn die Maus auf sie gerrichtet ist (benötigt Spielernamen)
Noms uniquement sous le curseur (si noms affichés)
Zobrazit jméno hráče jenom na kurzor (vyžaduje jména hráčů)
- Mostra i nomi solo se puntati (richiede mostra nomi abilitato)
+ Mostra i nomi solo se puntati (insieme ai nomi)
Mostrar nome de jogador somente no cursor (requer nome de jogadores)
Játékosok nevének mutatása csak a kurzoron (a nevek mutatása szükséges)
Показать имена игроков только под курсором (при включенных именах)
@@ -46,7 +46,7 @@
Pokaż imiona graczy tylko po przytrzymaniu klawisza (wymagana opcja Pokaż imiona graczy)
Játékosnevek mutatása csak gombnyomásra (a nevek mutatása szükséges)
Показать имена игроков только по нажатию клавиши (при включенных именах)
- Mostra i nomi solo se si preme il tasto (richiede mostra nomi abilitato)
+ Mostra i nomi solo se si preme il tasto (insieme ai nomi)
Mostrar nomes somente ao pressionar teclar (requer nome de jogadores)
@@ -56,7 +56,7 @@
Mostrar rango de los jugadores (requiere Mostrar nombres de jugadores)
Grade des joueurs (si noms affichés)
Zobrazit hodnosti hráčů (vyžaduje jména hráčů)
- Mostra i gradi (richiede mostra nomi abilitato)
+ Mostra i gradi (insieme ai nomi)
Mostrar patente de jogadores (requer nome de jogadores)
Játékosok rendfokozatának mutatása (a nevek mutatása szükséges)
Показывать звания игроков (при вкл. именах)
@@ -94,7 +94,7 @@
Pokaż fale dźwiękowe (wymagana opcja Pokaż imiona graczy)
Afficher "qui parle" (si noms affichés)
"Hanghullámok" mutatása (a nevek mutatása szükséges)
- Mostra movimento audio (richiede mostra nomi abilitato)
+ Mostra movimento audio (insieme ai nomi)
Mostrar onda sonora (requer nome de jogadores)
@@ -119,6 +119,7 @@
NameTags
Névcímkék
Имена игроков
+ Etichette Nomi
Player Names View Dist.
@@ -130,6 +131,7 @@
Distance de vue des noms de joueurs
Játékosok nevének látótávja
Дистанция отображения имен
+ Distanza Visiva Etichette Nomi
Distance in meters at which player names are shown. Default: 5
@@ -141,6 +143,7 @@
Distance en mètres au delà de laquelle les noms de joueurs ne sont plus affichés. Défaut: 5
Méterben megadott érték a játékosok nevének mutatására. Alapértelmezett: 5
Дистанция в метрах, на которой отображаются имена игроков. По-умолчанию: 5
+ Distanza in metri a cui sono visibili i nomi giocatori. Default: 5
Show name tags for AI?
@@ -152,6 +155,7 @@
Afficher les noms pour les IA?
Névcímkék megjelenítése AI-nál?
Показывать имена ботов?
+ Mostra etichette nomi per IA?
Show the name and rank tags for friendly AI units? Default: Do not force
@@ -163,6 +167,7 @@
Affiche le nom et le rang pour les IA alliées? Défaut : ne pas forcer
Mutassa-e a szövetséges AI egységek nevét és rangját? Alapértelmezett: Nincs felülbírálás
Показывать имена и звания дружественных ботов? По-умолчанию: Не обязывать
+ Mostra etichette nomi ed etichette gradi per unità IA alleate? Default: Non forzare
Force Hide
@@ -174,6 +179,7 @@
Forcer la désactivation
Erőltetett rejtett
Обязательно: Скрывать
+ Forza Nascosto
Force Show
@@ -185,6 +191,7 @@
Forcer l'affichage
Erőltetett látható
Обязательно: Показывать
+ Forza Mostra
Show crew info?
@@ -196,6 +203,7 @@
Afficher les informations de l'équipage?
Legénységi adatok megjelenítése?
Показывать экипаж?
+ Mostra informazioni equipaggio?
Show vehicle crew info, or by default allows players to choose it on their own. Default: Do Not Force
@@ -207,6 +215,7 @@
Afficher les informations sur l'équipage d'un véhicule. Défaut: ne pas forcer
A legénységi adatok mutatása, alapértelmezett esetben a játékos által kiválasztható. Alapértelmezett: Nincs felülbírálás
Показывать информацию об экипаже техники, или по-умолчанию, позволяет игрокам выбрать свою настройку. По-умолчанию: Не обязывать
+ Mostra informazioni sull'equipaggio del veicolo, oppure consenti di default di lasciare che siano i giocatori a scegliere. Default: Non Forzare
Show for Vehicles
@@ -218,6 +227,7 @@
Montrer pour les véhicules
Mutatás járműveknél
Показывать для техники
+ Mostra per Veicoli
Show cursor NameTag for vehicle commander (only if client has name tags enabled) Default: No
@@ -228,6 +238,7 @@
Mostrar o nome no cursor para o comandante do veículo (somente se o cliente tiver etiquetas de nomes ativada). Padrão: Não
Показывать имя командира техники (только, если клиент включил отображение имен). По-умолчанию: Нет
Afficher les étiquettes de nom pour les commandants de véhicule (uniquement si l'affichage est activé pour le client). Défaut: non
+ Mostra il nome sul cursore per il comandante del veicolo (solo se il client ha le Etichette Nomi attive) Default: No
This module allows you to customize settings and range of Name Tags.
@@ -239,6 +250,7 @@
Ce module permet le paramétrage de l'affichage des étiquettes des noms
Ez a modul lehetővé teszi a névcímkék beállításainak testreszabását.
Этот модуль позволяет настроить опции и дистанцию отображения имен игроков.
+ Questo modulo ti consente di personalizzare le impostazioni ed il raggio delle Etichette Nomi
Only on Cursor
@@ -250,6 +262,7 @@
Seulement sous le curseur
Csak kurzorra
Только под курсором
+ Solo su Cursore
Only on Keypress
@@ -261,6 +274,7 @@
Seulement par appui de touche
Csak gombnyomásra
Только по нажатию клавиши
+ Solo quando Premi Tasto
Only on Cursor and Keypress
@@ -272,6 +286,7 @@
Seulement sous le curseur et par appui de touche
Csak kurzorra és gombnyomásra
Под курсором или по нажатию клавиши
+ Solo su Cursore e quando Premi Tasto
Force Show Only on Cursor
@@ -283,6 +298,7 @@
Forcer l'affichage sous le curseur uniquement
Erőltetett látható, csak kurzorra
Обязательно: Только под курсором
+ Forza Mostra solo su Cursore
Force Show Only on Keypress
@@ -294,6 +310,7 @@
Forcer l'affichage par appui de touche uniquement
Erőltetett látható, csak gombnyomásra
Обязательно: Только по нажатию клавиши
+ Forza Mostra solo quando Premi Tasto
Force Show Only on Cursor and Keypress
@@ -305,6 +322,7 @@
Forcer l'affichage sous le curseur et par appui de touche uniquement
Erőltetett látható, csak kurzorra és gombnyomásra
Обязательно: Под курсором или по нажатию клавиши
+ Forza Mostra solo su Cursore e quando Premi Tasto
Use Nametag settings
@@ -316,6 +334,7 @@
Utiliser les paramètre des NamesTags
Névcímkék beállításának használata
Так же, как имена
+ Usa impostazioni Etichette Nomi
Always Show All
@@ -327,6 +346,7 @@
Toujours montrer tout
Mindig minden mutatása
Всегда показывать
+ Mostra Sempre Tutto
Show player names and set their activation. Default: Enabled
@@ -338,6 +358,7 @@
Afficher les noms des joueurs et paramètre son activation. Défaut: activé
Mutassa a játékosok nevét és kezelje az aktivációjukat. Alapértelmezett: Engedélyezve
Показывать имена игроков и установить их активацию. По-умолчанию: Включено
+ Mostra nomi giocatori ed imposta la loro attivazione. Default: Abilitato
Effect of sound waves above the heads of speaking players after holding the PTT key. This option works with TFAR and ACRE2.
@@ -349,6 +370,7 @@
Icone au dessus de la tête du joueur qui parle après avoir utilisé la touche de PTT. Option compatible avec ACRE2 et TFAR
Hanghullám-effekt a beszélő játékosok feje felett a PTT-gomb lenyomásakor. Ez a beállítás TFAR és ACRE2 alatt működik.
Эффект звуковой волны над головами говорящих игроков при удерживании кнопки push-to-talk. Эта опация работает также с рациями TFAR и ACRE2.
+ Effetto delle onde sonore sopra la testa dei giocatori parlanti quando premono il tasto PTT. Questa opzione funziona con TFAR ed ACRE2
Nametags Size
@@ -360,6 +382,7 @@
Taille des noms
Névcímkék mérete
Размер имен игроков
+ Dimensione Etichette Nome
Text and Icon Size Scaling
@@ -371,6 +394,7 @@
Taille du texte et des icones
Szöveg és ikon méretének skálázása
Масштабирование размера текста и иконок
+ Proporzione Dimensioni Testo ed Icone
diff --git a/addons/nightvision/CfgEventHandlers.hpp b/addons/nightvision/CfgEventHandlers.hpp
index 49b87fb4fd..152887a24a 100644
--- a/addons/nightvision/CfgEventHandlers.hpp
+++ b/addons/nightvision/CfgEventHandlers.hpp
@@ -1,3 +1,10 @@
+
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit) );
@@ -6,6 +13,18 @@ class Extended_PreInit_EventHandlers {
class Extended_PostInit_EventHandlers {
class ADDON {
- clientInit = QUOTE(call COMPILE_FILE(XEH_postInitClient) );
+ clientInit = QUOTE(call COMPILE_FILE(XEH_postInitClient));
+ };
+};
+
+class Extended_DisplayLoad_EventHandlers {
+ class RscDisplayCurator {
+ ADDON = QUOTE(_this call FUNC(updatePPEffects));
+ };
+};
+
+class Extended_DisplayUnload_EventHandlers {
+ class RscDisplayCurator {
+ ADDON = QUOTE(displayNull call FUNC(updatePPEffects)); // emulate zeus display being deleted
};
};
diff --git a/addons/nightvision/CfgVehicles.hpp b/addons/nightvision/CfgVehicles.hpp
index 8b489ad64f..c540251dbb 100644
--- a/addons/nightvision/CfgVehicles.hpp
+++ b/addons/nightvision/CfgVehicles.hpp
@@ -19,9 +19,9 @@ class CfgVehicles {
class GVAR(ModuleSettings): ACE_Module {
scope = 2;
displayName = CSTRING(Module_DisplayName);
- icon = QUOTE(PATHTOF(UI\Icon_Module_ca.paa));
+ icon = QPATHTOF(UI\Icon_Module_ca.paa);
category = "ACE";
- function = QUOTE(FUNC(initModule));
+ function = QFUNC(initModule);
functionPriority = 1;
isGlobal = 1;
isTriggerActivated = 0;
diff --git a/addons/nightvision/CfgWeapons.hpp b/addons/nightvision/CfgWeapons.hpp
index 8a053a3262..72be31d8cf 100644
--- a/addons/nightvision/CfgWeapons.hpp
+++ b/addons/nightvision/CfgWeapons.hpp
@@ -47,7 +47,7 @@ class CfgWeapons {
};
class ACE_NVG_Wide: NVGoggles {
author = ECSTRING(common,ACETeam);
- modelOptics = QUOTE(PATHTOF(models\ACE_nvg_wide_optics));
+ modelOptics = QPATHTOF(models\ACE_nvg_wide_optics);
displayName = CSTRING(NVG_FullScreen);
ACE_NightVision_grain = 0.75;
ACE_NightVision_blur = 0.055;
diff --git a/addons/nightvision/XEH_PREP.hpp b/addons/nightvision/XEH_PREP.hpp
new file mode 100644
index 0000000000..251c8cc5dd
--- /dev/null
+++ b/addons/nightvision/XEH_PREP.hpp
@@ -0,0 +1,7 @@
+
+PREP(blending);
+PREP(changeNVGBrightness);
+PREP(initModule);
+PREP(onCameraViewChanged);
+PREP(onVisionModeChanged);
+PREP(updatePPEffects);
diff --git a/addons/nightvision/XEH_postInitClient.sqf b/addons/nightvision/XEH_postInitClient.sqf
index 1f73b12e93..186412cdde 100644
--- a/addons/nightvision/XEH_postInitClient.sqf
+++ b/addons/nightvision/XEH_postInitClient.sqf
@@ -29,18 +29,18 @@ GVAR(ppEffectMuzzleFlash) ppEffectAdjust [1, 1, 0, [0, 0, 0, 0], [0, 0, 0, 1], [
GVAR(ppEffectMuzzleFlash) ppEffectCommit 0;
// Setup the event handlers
-["playerInventoryChanged", {_this call FUNC(updatePPEffects)}] call EFUNC(common,addEventHandler);
-["playerVisionModeChanged", {
+["ace_playerInventoryChanged", FUNC(updatePPEffects)] call CBA_fnc_addEventHandler;
+["ace_playerVisionModeChanged", {
_this call FUNC(updatePPEffects);
_this call FUNC(onVisionModeChanged);
-}] call EFUNC(common,addEventHandler);
-["zeusDisplayChanged", {_this call FUNC(updatePPEffects)}] call EFUNC(common,addEventHandler);
-["cameraViewChanged", {
+}] call CBA_fnc_addEventHandler;
+
+["ace_cameraViewChanged", {
_this call FUNC(updatePPEffects);
_this call FUNC(onCameraViewChanged);
-}] call EFUNC(common,addEventHandler);
-["playerVehicleChanged", {_this call FUNC(updatePPEffects)}] call EFUNC(common,addEventHandler);
-["playerTurretChanged", {_this call FUNC(updatePPEffects)}] call EFUNC(common,addEventHandler);
+}] call CBA_fnc_addEventHandler;
+["ace_playerVehicleChanged", {_this call FUNC(updatePPEffects)}] call CBA_fnc_addEventHandler;
+["ace_playerTurretChanged", {_this call FUNC(updatePPEffects)}] call CBA_fnc_addEventHandler;
// Add keybinds
["ACE3 Equipment", QGVAR(IncreaseNVGBrightness), localize LSTRING(IncreaseNVGBrightness),
@@ -72,5 +72,5 @@ GVAR(ppEffectMuzzleFlash) ppEffectCommit 0;
[209, [false, false, true]], false] call CBA_fnc_addKeybind; //PageDown + ALT
// Register fire event handler
-["firedPlayer", DFUNC(blending)] call EFUNC(common,addEventHandler);
-["firedPlayerVehicle", DFUNC(blending)] call EFUNC(common,addEventHandler);
+["ace_firedPlayer", DFUNC(blending)] call CBA_fnc_addEventHandler;
+["ace_firedPlayerVehicle", DFUNC(blending)] call CBA_fnc_addEventHandler;
diff --git a/addons/nightvision/XEH_preInit.sqf b/addons/nightvision/XEH_preInit.sqf
index ed02b9524e..a7feade1c3 100644
--- a/addons/nightvision/XEH_preInit.sqf
+++ b/addons/nightvision/XEH_preInit.sqf
@@ -2,11 +2,6 @@
ADDON = false;
-PREP(blending);
-PREP(changeNVGBrightness);
-PREP(initModule);
-PREP(onCameraViewChanged);
-PREP(onVisionModeChanged);
-PREP(updatePPEffects);
+#include "XEH_PREP.hpp"
ADDON = true;
diff --git a/addons/nightvision/XEH_preStart.sqf b/addons/nightvision/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/nightvision/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/nightvision/config.cpp b/addons/nightvision/config.cpp
index 1edeca6e5b..9397740e61 100644
--- a/addons/nightvision/config.cpp
+++ b/addons/nightvision/config.cpp
@@ -6,8 +6,9 @@ class CfgPatches {
weapons[] = {"ACE_NVG_Gen1", "ACE_NVG_Gen2", /*"ACE_NVG_Gen3",*/ "ACE_NVG_Gen4", "ACE_NVG_Wide"};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
- author[] = {"commy2", "KoffeinFlummi", "PabstMirror"};
- authorUrl = "https://github.com/commy2/";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"commy2", "KoffeinFlummi", "PabstMirror"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
diff --git a/addons/nightvision/functions/fnc_blending.sqf b/addons/nightvision/functions/fnc_blending.sqf
index b34584a5d0..2616cb83f5 100644
--- a/addons/nightvision/functions/fnc_blending.sqf
+++ b/addons/nightvision/functions/fnc_blending.sqf
@@ -18,44 +18,33 @@
//IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"];
TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile, _vehicle, _gunner, _turret);
-private "_player";
-_player = ACE_player;
+private _player = ACE_player;
-//If our vehicle didn't shoot, or we're not in NVG mode, exit
-if ((currentVisionMode _player) != 1) exitWith {};
+//If we're not in NVG mode, or it's a grenade, exit
+if (currentVisionMode _player != 1 || {toLower _weapon in ["throw", "put"]}) exitWith {};
-private["_darkness", "_nvgBrightnessCoef", "_silencer", "_visibleFire", "_visibleFireCoef", "_visibleFireTime", "_visibleFireTimeCoef"];
+private _silencer = _player weaponAccessories _weapon select 0;
-_silencer = switch (_weapon) do {
- case (primaryWeapon _player): {(primaryWeaponItems _player) select 0};
- case (secondaryWeapon _player): {(secondaryWeaponItems _player) select 0};
- case (handgunWeapon _player): {(handgunItems _player) select 0};
- default {""};
-};
+private _visibleFireCoef = 1;
+private _visibleFireTimeCoef = 1;
-_visibleFireCoef = 1;
-_visibleFireTimeCoef = 1;
if (_silencer != "") then {
_visibleFireCoef = getNumber (configFile >> "CfgWeapons" >> _silencer >> "ItemInfo" >> "AmmoCoef" >> "visibleFire");
_visibleFireTimeCoef = getNumber (configFile >> "CfgWeapons" >> _silencer >> "ItemInfo" >> "AmmoCoef" >> "visibleFireTime");
};
-_visibleFire = getNumber (configFile >> "CfgAmmo" >> _ammo >> "visibleFire");
-_visibleFireTime = getNumber (configFile >> "CfgAmmo" >> _ammo >> "visibleFireTime");
-
-_nvgBrightnessCoef = 1 + (_player getVariable [QGVAR(NVGBrightness), 0]) / 4;
-
-_fnc_isTracer = {
- private ["_indexShot", "_lastRoundsTracer", "_tracersEvery"];
+private _visibleFire = getNumber (configFile >> "CfgAmmo" >> _ammo >> "visibleFire");
+private _visibleFireTime = getNumber (configFile >> "CfgAmmo" >> _ammo >> "visibleFireTime");
+private _fnc_isTracer = {
if (getNumber (configFile >> "CfgAmmo" >> _ammo >> "nvgOnly") > 0) exitWith {false};
- _indexShot = (_player ammo _weapon) + 1;
+ private _indexShot = (_player ammo _weapon) + 1;
- _lastRoundsTracer = getNumber (configFile >> "CfgMagazines" >> _magazine >> "lastRoundsTracer");
+ private _lastRoundsTracer = getNumber (configFile >> "CfgMagazines" >> _magazine >> "lastRoundsTracer");
if (_indexShot <= _lastRoundsTracer) exitWith {true};
- _tracersEvery = getNumber (configFile >> "CfgMagazines" >> _magazine >> "tracersEvery");
+ private _tracersEvery = getNumber (configFile >> "CfgMagazines" >> _magazine >> "tracersEvery");
if (_tracersEvery == 0) exitWith {false};
(_indexShot - _lastRoundsTracer) % _tracersEvery == 0
@@ -66,7 +55,8 @@ if (call _fnc_isTracer) then {
_visibleFireTime = _visibleFireTime + 2;
};
-_darkness = 1 - (call EFUNC(common,ambientBrightness));
+private _darkness = 1 - (call EFUNC(common,ambientBrightness));
+private _nvgBrightnessCoef = 1 + (_player getVariable [QGVAR(NVGBrightness), 0]) / 4;
_visibleFire = _darkness * _visibleFireCoef * _visibleFire * _nvgBrightnessCoef / 10 min 1;
_visibleFireTime = _darkness * _visibleFireTimeCoef * _visibleFireTime * _nvgBrightnessCoef / 10 min 0.5;
diff --git a/addons/nightvision/functions/fnc_updatePPEffects.sqf b/addons/nightvision/functions/fnc_updatePPEffects.sqf
index 72cd6cbd0d..9bf8321353 100644
--- a/addons/nightvision/functions/fnc_updatePPEffects.sqf
+++ b/addons/nightvision/functions/fnc_updatePPEffects.sqf
@@ -17,12 +17,20 @@
if (!hasInterface) exitWith {};
+disableSerialization;
+
+params [["_display", displayNull]];
+
+if !(_display isEqualType displayNull) then {
+ _display = displayNull;
+};
+
private ["_currentVehicle", "_grainSetting", "_blurSetting", "_radBlurSetting", "_config", "_hmd", "_cameraView", "_turret"];
_currentVehicle = vehicle ACE_player;
// If the Zeus display is on or the player has no nightvision
-if ((!isNull findDisplay 312) || ((currentVisionMode ACE_player) != 1)) exitWith {
+if (ctrlIDD _display == 312 || currentVisionMode ACE_player != 1) exitWith {
GVAR(ppEffectFilmGrain) ppEffectEnable false;
GVAR(ppEffectBlur) ppEffectEnable false;
GVAR(ppEffectRadialBlur) ppEffectEnable false;
diff --git a/addons/nightvision/stringtable.xml b/addons/nightvision/stringtable.xml
index 6478b2d847..708860d134 100644
--- a/addons/nightvision/stringtable.xml
+++ b/addons/nightvision/stringtable.xml
@@ -139,6 +139,10 @@
Ночное виденье
Visão Noturna
Noční vidění
+ Noktowizja
+ Visione Notturna
+ Visión Nocturna
+ Vision nocturne
Settings for night vision.
@@ -146,20 +150,32 @@
Настройки ночного виденья
Ajustes para visão noturna.
Nastavení nočního vidění
+ Ustawienia noktowizorów
+ Impostazioni per visione notturna.
+ Parámetros para visión nocturna
+ Réglage pour la vision nocturne
Disable NVGs in scope
- Deakt. NVGs mit Visier
+ Deakt. NS mit Visier
Убирать ПНВ при прицеливании
Desabilitar visão noturna nas lunetas
Zakázat NVG v zaměřovači
+ Wył. NVG przy celowaniu
+ Disabilita NVG nei mirini
+ Desactivar NVG en miras
+ Desactiver les JVN dans les viseurs.
Blocks the usage of night vision goggles whilst aiming down the sight.
- Blockiert das Benutzen von Nachtsichtbrillen beim Benutzen des Visiers.
+ Blockiert die Nachtsichtbrillen beim Verwenden des Visiers.
Блокирует использование головного ПНВ при прицеливании через прицел.
Bloqueia o uso de visão noturna ao utilizar a mira.
Zabraňuje používání nokovizoru v režimu zaměřovače.
+ Uniemożliwia korzystanie z gogli noktowizyjnych przy celowaniu.
+ Blocca l'uso di visori notturni mentre miri con ottiche.
+ Desactiva el uso de gafas visión nocturna cuando se utilizan miras normales.
+ Bloque l'usage des JVN pendant la visée.
\ No newline at end of file
diff --git a/addons/noidle/config.cpp b/addons/noidle/config.cpp
index 3c2ac1a9d6..b0792486f7 100644
--- a/addons/noidle/config.cpp
+++ b/addons/noidle/config.cpp
@@ -6,8 +6,9 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
- author[] = {"commy2"};
- authorUrl = "https://github.com/commy2";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"commy2"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
diff --git a/addons/noradio/XEH_postInit.sqf b/addons/noradio/XEH_postInit.sqf
index 4aeccffd62..1606c674a9 100644
--- a/addons/noradio/XEH_postInit.sqf
+++ b/addons/noradio/XEH_postInit.sqf
@@ -11,7 +11,7 @@ if (isServer) then {
if (!hasInterface) exitWith {};
// mutes/unmutes units when the player changes
-["playerChanged", {
+["ace_playerChanged", {
params ["_newPlayer", "_oldPlayer"];
// mute the new player
@@ -21,4 +21,4 @@ if (!hasInterface) exitWith {};
if (alive _oldPlayer) then {
[_oldPlayer, "isPlayer"] call EFUNC(common,unmuteUnit);
};
-}] call EFUNC(common,addEventhandler);
+}] call CBA_fnc_addEventHandler;
diff --git a/addons/noradio/config.cpp b/addons/noradio/config.cpp
index 86697535f8..0781a4a15e 100644
--- a/addons/noradio/config.cpp
+++ b/addons/noradio/config.cpp
@@ -6,8 +6,9 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
- author[] = {"commy2"};
- authorUrl = "https://github.com/commy2/";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"commy2"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
diff --git a/addons/norearm/config.cpp b/addons/norearm/config.cpp
index 3477258612..2b670e0db1 100644
--- a/addons/norearm/config.cpp
+++ b/addons/norearm/config.cpp
@@ -6,8 +6,9 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
- author[] = {"commy2"};
- authorUrl = "https://github.com/commy2";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"commy2"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
diff --git a/addons/optics/CfgEventHandlers.hpp b/addons/optics/CfgEventHandlers.hpp
index e75956f440..becf395052 100644
--- a/addons/optics/CfgEventHandlers.hpp
+++ b/addons/optics/CfgEventHandlers.hpp
@@ -1,3 +1,10 @@
+
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
diff --git a/addons/optics/CfgRscTitles.hpp b/addons/optics/CfgRscTitles.hpp
index 3bbd6b62bc..42a2326a0e 100644
--- a/addons/optics/CfgRscTitles.hpp
+++ b/addons/optics/CfgRscTitles.hpp
@@ -33,7 +33,7 @@ class RscInGameUI {
style = 48;
size = 1;
sizeEx = 0;
- text = QUOTE(PATHTOF(reticles\ace_shortdot_reticle_1.paa));
+ text = QPATHTOF(reticles\ace_shortdot_reticle_1.paa);
w = 0;
h = 0;
};
@@ -115,73 +115,73 @@ class RscInGameUI {
class ACE_RscWeapon_Hamr: ACE_RscWeapon_base {
class ReticleDay: ReticleDay {
- text = QUOTE(PATHTOF(reticles\hamr-reticle65_ca.paa));
+ text = QPATHTOF(reticles\hamr-reticle65_ca.paa);
};
class ReticleNight: ReticleNight {
- text = QUOTE(PATHTOF(reticles\hamr-reticle65Illum_ca.paa));
+ text = QPATHTOF(reticles\hamr-reticle65Illum_ca.paa);
};
class BodyDay: BodyDay {
- text = QUOTE(PATHTOF(reticles\hamr-body_ca.paa));
+ text = QPATHTOF(reticles\hamr-body_ca.paa);
};
class BodyNight: BodyNight {
- text = QUOTE(PATHTOF(reticles\hamr-bodyNight_ca.paa));
+ text = QPATHTOF(reticles\hamr-bodyNight_ca.paa);
};
};
class ACE_RscWeapon_Arco: ACE_RscWeapon_base {
class ReticleDay: ReticleDay {
- text = QUOTE(PATHTOF(reticles\arco-reticle65_ca.paa));
+ text = QPATHTOF(reticles\arco-reticle65_ca.paa);
};
class ReticleNight: ReticleNight {
- text = QUOTE(PATHTOF(reticles\arco-reticle65Illum_ca.paa));
+ text = QPATHTOF(reticles\arco-reticle65Illum_ca.paa);
};
class BodyDay: BodyDay {
- text = QUOTE(PATHTOF(reticles\arco-body_ca.paa));
+ text = QPATHTOF(reticles\arco-body_ca.paa);
};
class BodyNight: BodyNight {
- text = QUOTE(PATHTOF(reticles\arco-bodyNight_ca.paa));
+ text = QPATHTOF(reticles\arco-bodyNight_ca.paa);
};
};
class ACE_RscWeapon_MRCO: ACE_RscWeapon_base {
class ReticleDay: ReticleDay {
- text = QUOTE(PATHTOF(reticles\mrco-reticle556_ca.paa));
+ text = QPATHTOF(reticles\mrco-reticle556_ca.paa);
};
class ReticleNight: ReticleNight {
- text = QUOTE(PATHTOF(reticles\mrco-reticle556Illum_ca.paa));
+ text = QPATHTOF(reticles\mrco-reticle556Illum_ca.paa);
};
class BodyDay: BodyDay {
- text = QUOTE(PATHTOF(reticles\mrco-body_ca.paa));
+ text = QPATHTOF(reticles\mrco-body_ca.paa);
};
class BodyNight: BodyNight {
- text = QUOTE(PATHTOF(reticles\mrco-bodyNight_ca.paa));
+ text = QPATHTOF(reticles\mrco-bodyNight_ca.paa);
};
};
class ACE_RscWeapon_SOS: ACE_RscWeapon_base {
class ReticleDay: ReticleDay {
- text = QUOTE(PATHTOF(reticles\sos-reticleMLR_ca.paa));
+ text = QPATHTOF(reticles\sos-reticleMLR_ca.paa);
};
class ReticleNight: ReticleNight {
- text = QUOTE(PATHTOF(reticles\sos-reticleMLRIllum_ca.paa));
+ text = QPATHTOF(reticles\sos-reticleMLRIllum_ca.paa);
};
class BodyDay: BodyDay {
- text = QUOTE(PATHTOF(reticles\sos-body_ca.paa));
+ text = QPATHTOF(reticles\sos-body_ca.paa);
};
class BodyNight: BodyNight {
- text = QUOTE(PATHTOF(reticles\sos-bodyNight_ca.paa));
+ text = QPATHTOF(reticles\sos-bodyNight_ca.paa);
};
};
};
diff --git a/addons/optics/CfgWeapons.hpp b/addons/optics/CfgWeapons.hpp
index 1be66d3aa2..75b0319b62 100644
--- a/addons/optics/CfgWeapons.hpp
+++ b/addons/optics/CfgWeapons.hpp
@@ -38,7 +38,7 @@ class CfgWeapons {
weaponInfoType = "ACE_RscWeaponZeroing";
class ItemInfo: ItemInfo {
- modelOptics = QUOTE(PATHTOF(models\ace_shortdot_optics.p3d));
+ modelOptics = QPATHTOF(models\ace_shortdot_optics.p3d);
class OpticsModes: OpticsModes {
class Snip: Snip {
@@ -65,10 +65,10 @@ class CfgWeapons {
};
class ACE_optic_Hamr_2D: optic_Hamr {
- GVAR(BodyDay) = QUOTE(PATHTOF(reticles\hamr-body_ca.paa));
- GVAR(BodyNight) = QUOTE(PATHTOF(reticles\hamr-bodyNight_ca.paa));
- GVAR(ReticleDay) = QUOTE(PATHTOF(reticles\hamr-reticle65_ca.paa));
- GVAR(ReticleNight) = QUOTE(PATHTOF(reticles\hamr-reticle65Illum_ca.paa));
+ GVAR(BodyDay) = QPATHTOF(reticles\hamr-body_ca.paa);
+ GVAR(BodyNight) = QPATHTOF(reticles\hamr-bodyNight_ca.paa);
+ GVAR(ReticleDay) = QPATHTOF(reticles\hamr-reticle65_ca.paa);
+ GVAR(ReticleNight) = QPATHTOF(reticles\hamr-reticle65Illum_ca.paa);
author = ECSTRING(common,ACETeam);
_generalMacro = "ACE_optic_Hamr_2D";
@@ -76,7 +76,7 @@ class CfgWeapons {
weaponInfoType = "ACE_RscWeapon_Hamr";
class ItemInfo: ItemInfo {
- modelOptics = QUOTE(PATHTOF(models\ace_optics_reticle90.p3d));
+ modelOptics = QPATHTOF(models\ace_optics_reticle90.p3d);
class OpticsModes: OpticsModes {
class Hamr2Collimator: Hamr2Collimator {};
@@ -101,7 +101,7 @@ class CfgWeapons {
displayName = CSTRING(hamr_pip);
class ItemInfo: ItemInfo {
- modelOptics = QUOTE(PATHTOF(models\ace_optics_pip.p3d));
+ modelOptics = QPATHTOF(models\ace_optics_pip.p3d);
};
};
@@ -115,10 +115,10 @@ class CfgWeapons {
};
class ACE_optic_Arco_2D: optic_Arco {
- GVAR(BodyDay) = QUOTE(PATHTOF(reticles\arco-body_ca.paa));
- GVAR(BodyNight) = QUOTE(PATHTOF(reticles\arco-bodyNight_ca.paa));
- GVAR(ReticleDay) = QUOTE(PATHTOF(reticles\arco-reticle65_ca.paa));
- GVAR(ReticleNight) = QUOTE(PATHTOF(reticles\arco-reticle65Illum_ca.paa));
+ GVAR(BodyDay) = QPATHTOF(reticles\arco-body_ca.paa);
+ GVAR(BodyNight) = QPATHTOF(reticles\arco-bodyNight_ca.paa);
+ GVAR(ReticleDay) = QPATHTOF(reticles\arco-reticle65_ca.paa);
+ GVAR(ReticleNight) = QPATHTOF(reticles\arco-reticle65Illum_ca.paa);
author = ECSTRING(common,ACETeam);
_generalMacro = "ACE_optic_Arco_2D";
@@ -126,7 +126,7 @@ class CfgWeapons {
weaponInfoType = "ACE_RscWeapon_Arco";
class ItemInfo: ItemInfo {
- modelOptics = QUOTE(PATHTOF(models\ace_optics_reticle90.p3d));
+ modelOptics = QPATHTOF(models\ace_optics_reticle90.p3d);
class OpticsModes: OpticsModes {
class ARCO2collimator: ARCO2collimator {};
@@ -150,7 +150,7 @@ class CfgWeapons {
displayName = CSTRING(arco_pip);
class ItemInfo: ItemInfo {
- modelOptics = QUOTE(PATHTOF(models\ace_optics_pip.p3d));
+ modelOptics = QPATHTOF(models\ace_optics_pip.p3d);
};
};
@@ -164,10 +164,10 @@ class CfgWeapons {
};
class ACE_optic_MRCO_2D: optic_MRCO {
- GVAR(BodyDay) = QUOTE(PATHTOF(reticles\mrco-body_ca.paa));
- GVAR(BodyNight) = QUOTE(PATHTOF(reticles\mrco-bodyNight_ca.paa));
- GVAR(ReticleDay) = QUOTE(PATHTOF(reticles\mrco-reticle556_ca.paa));
- GVAR(ReticleNight) = QUOTE(PATHTOF(reticles\mrco-reticle556Illum_ca.paa));
+ GVAR(BodyDay) = QPATHTOF(reticles\mrco-body_ca.paa);
+ GVAR(BodyNight) = QPATHTOF(reticles\mrco-bodyNight_ca.paa);
+ GVAR(ReticleDay) = QPATHTOF(reticles\mrco-reticle556_ca.paa);
+ GVAR(ReticleNight) = QPATHTOF(reticles\mrco-reticle556Illum_ca.paa);
author = ECSTRING(common,ACETeam);
_generalMacro = "ACE_optic_MRCO_2D";
@@ -175,7 +175,7 @@ class CfgWeapons {
weaponInfoType = "ACE_RscWeapon_MRCO";
class ItemInfo: ItemInfo {
- modelOptics = QUOTE(PATHTOF(models\ace_optics_reticle90.p3d));
+ modelOptics = QPATHTOF(models\ace_optics_reticle90.p3d);
class OpticsModes: OpticsModes {
class MRCOcq: MRCOcq {};
@@ -200,7 +200,7 @@ class CfgWeapons {
displayName = CSTRING(valdada_pip);
class ItemInfo: ItemInfo {
- modelOptics = QUOTE(PATHTOF(models\ace_optics_pip.p3d));
+ modelOptics = QPATHTOF(models\ace_optics_pip.p3d);
};
};
@@ -214,10 +214,10 @@ class CfgWeapons {
};
class ACE_optic_SOS_2D: optic_SOS {
- GVAR(BodyDay) = QUOTE(PATHTOF(reticles\sos-body_ca.paa));
- GVAR(BodyNight) = QUOTE(PATHTOF(reticles\sos-bodyNight_ca.paa));
- GVAR(ReticleDay) = QUOTE(PATHTOF(reticles\sos-reticleMLR_ca.paa));
- GVAR(ReticleNight) = QUOTE(PATHTOF(reticles\sos-reticleMLRIllum_ca.paa));
+ GVAR(BodyDay) = QPATHTOF(reticles\sos-body_ca.paa);
+ GVAR(BodyNight) = QPATHTOF(reticles\sos-bodyNight_ca.paa);
+ GVAR(ReticleDay) = QPATHTOF(reticles\sos-reticleMLR_ca.paa);
+ GVAR(ReticleNight) = QPATHTOF(reticles\sos-reticleMLRIllum_ca.paa);
author = ECSTRING(common,ACETeam);
_generalMacro = "ACE_optic_SOS_2D";
@@ -227,7 +227,13 @@ class CfgWeapons {
class ItemInfo: ItemInfo {
class OpticsModes: OpticsModes {
class Snip: Snip {
- modelOptics[] = {QUOTE(PATHTOF(models\ace_optics_reticle90.p3d)),QUOTE(PATHTOF(models\ace_optics_reticle90.p3d))};
+ modelOptics[] = {QPATHTOF(models\ace_optics_reticle90.p3d),QPATHTOF(models\ace_optics_reticle90.p3d)};
+ useModelOptics = 1;
+ opticsZoomInit = 0.0116;
+ opticsZoomMax = 0.0464;
+ opticsZoomMin = 0.0116;
+ discreteFOV[] = {0.0464, 0.0116};
+ opticsPPEffects[] = {"OpticsCHAbera1","OpticsBlur1","ACE_OpticsRadBlur1"};
opticsDisablePeripherialVision = 0;
};
class Iron: Iron {};
@@ -244,7 +250,7 @@ class CfgWeapons {
class ItemInfo: ItemInfo {
class OpticsModes: OpticsModes {
class Snip: Snip {
- modelOptics[] = {QUOTE(PATHTOF(models\ace_optics_pip.p3d)),QUOTE(PATHTOF(models\ace_optics_pip.p3d))};
+ modelOptics[] = {QPATHTOF(models\ace_optics_pip.p3d),QPATHTOF(models\ace_optics_pip.p3d)};
};
class Iron: Iron {};
};
@@ -260,10 +266,10 @@ class CfgWeapons {
};
class ACE_optic_LRPS_2D: optic_LRPS {
- GVAR(BodyDay) = QUOTE(PATHTOF(reticles\sos-body_ca.paa));
- GVAR(BodyNight) = QUOTE(PATHTOF(reticles\sos-bodyNight_ca.paa));
- GVAR(ReticleDay) = QUOTE(PATHTOF(reticles\sos-reticleMLR_ca.paa));
- GVAR(ReticleNight) = QUOTE(PATHTOF(reticles\sos-reticleMLRIllum_ca.paa));
+ GVAR(BodyDay) = QPATHTOF(reticles\sos-body_ca.paa);
+ GVAR(BodyNight) = QPATHTOF(reticles\sos-bodyNight_ca.paa);
+ GVAR(ReticleDay) = QPATHTOF(reticles\sos-reticleMLR_ca.paa);
+ GVAR(ReticleNight) = QPATHTOF(reticles\sos-reticleMLRIllum_ca.paa);
author = ECSTRING(common,ACETeam);
_generalMacro = "ACE_optic_LRPS_2D";
@@ -273,11 +279,11 @@ class CfgWeapons {
class ItemInfo: ItemInfo {
class OpticsModes: OpticsModes {
class Snip: Snip {
- modelOptics[] = {QUOTE(PATHTOF(models\ace_optics_reticle90.p3d)),QUOTE(PATHTOF(models\ace_optics_reticle90.p3d))};
+ modelOptics[] = {QPATHTOF(models\ace_optics_reticle90.p3d),QPATHTOF(models\ace_optics_reticle90.p3d)};
useModelOptics = 1;
- opticsZoomInit = 0.01234;
- opticsZoomMax = 0.04673;
- opticsZoomMin = 0.01234;
+ opticsZoomInit = 0.0116;
+ opticsZoomMax = 0.0464;
+ opticsZoomMin = 0.0116;
discreteFOV[] = {};
opticsPPEffects[] = {"OpticsCHAbera1","OpticsBlur1","ACE_OpticsRadBlur1"};
opticsDisablePeripherialVision = 0;
@@ -295,7 +301,7 @@ class CfgWeapons {
class ItemInfo: ItemInfo {
class OpticsModes: OpticsModes {
class Snip: Snip {
- modelOptics[] = {QUOTE(PATHTOF(models\ace_optics_pip.p3d)),QUOTE(PATHTOF(models\ace_optics_pip.p3d))};
+ modelOptics[] = {QPATHTOF(models\ace_optics_pip.p3d),QPATHTOF(models\ace_optics_pip.p3d)};
};
};
};
diff --git a/addons/optics/XEH_PREP.hpp b/addons/optics/XEH_PREP.hpp
new file mode 100644
index 0000000000..2b846a552a
--- /dev/null
+++ b/addons/optics/XEH_PREP.hpp
@@ -0,0 +1,4 @@
+
+PREP(handleFired);
+PREP(onDrawScope);
+PREP(onDrawScope2D);
diff --git a/addons/optics/XEH_postInit.sqf b/addons/optics/XEH_postInit.sqf
index c9667f3931..a4f118619b 100644
--- a/addons/optics/XEH_postInit.sqf
+++ b/addons/optics/XEH_postInit.sqf
@@ -5,51 +5,27 @@ if (!hasInterface) exitWith {};
GVAR(camera) = objNull;
-0 = 0 spawn {
- // Workarround for the ThreeDen Editor Camera
- if ((!isNil {is3DEN}) && {is3DEN}) exitWith {
- ACE_LOGINFO("Eden detected: disabling Optics PIP Camera");
- };
-
- waitUntil {!isNull ACE_player};
- waitUntil {sleep 1; {_x != GVAR(camera)} count allMissionObjects "camera" == 0 && {isNull curatorCamera}};
-
- GVAR(camera) cameraEffect ["TERMINATE", "BACK"];
- camDestroy GVAR(camera);
-
- // PiP technique by BadBenson
- GVAR(camera) = "camera" camCreate positionCameraToWorld [0,0,0];
- GVAR(camera) camSetFov 0.7;
- GVAR(camera) camSetTarget ACE_player;
- GVAR(camera) camCommit 1;
-
- "ace_optics_rendertarget0" setPiPEffect [0];
- GVAR(camera) cameraEffect ["INTERNAL", "BACK", "ace_optics_rendertarget0"];
-};
-
// save control for fired EH
-["infoDisplayChanged", {
+["ace_infoDisplayChanged", {
+ TRACE_1("ace_infoDisplayChanged",_this);
if (!isNull ((_this select 0) displayCtrl 1713001)) then {
uiNamespace setVariable [QGVAR(RscWeaponInfo2D), _this select 0];
};
-}] call EFUNC(common,addEventHandler);
+}] call CBA_fnc_addEventHandler;
// camera has to be re-created every time another camera is created. Otherwise r2t is either black or transparent. @todo Add popular custom cameras to the event in ACE_common.
-["activeCameraChanged", {
- if !(_this select 1) then {
- GVAR(camera) cameraEffect ["TERMINATE", "BACK"];
- camDestroy GVAR(camera);
-
- // PiP technique by BadBenson
- GVAR(camera) = "camera" camCreate positionCameraToWorld [0,0,0];
- GVAR(camera) camSetFov 0.7;
- GVAR(camera) camSetTarget ACE_player;
- GVAR(camera) camCommit 1;
-
- "ace_optics_rendertarget0" setPiPEffect [0];
- GVAR(camera) cameraEffect ["INTERNAL", "BACK", "ace_optics_rendertarget0"];
+["ace_activeCameraChanged", {
+ params ["", "_isfeatureCameraActive"];
+ TRACE_1("ace_activeCameraChanged",_isfeatureCameraActive);
+ if (!_isfeatureCameraActive) then {
+ //Destroy the camera, and it will be re-created in the onDrawScope2d helper
+ if (!isNull GVAR(camera)) then {
+ GVAR(camera) cameraEffect ["TERMINATE", "BACK"];
+ camDestroy GVAR(camera);
+ TRACE_1("destroying pip camera for restart",GVAR(camera));
+ };
};
-}] call EFUNC(common,addEventHandler);
+}] call CBA_fnc_addEventHandler;
// Register fire event handler
-["firedPlayer", DFUNC(handleFired)] call EFUNC(common,addEventHandler);
+["ace_firedPlayer", DFUNC(handleFired)] call CBA_fnc_addEventHandler;
diff --git a/addons/optics/XEH_preInit.sqf b/addons/optics/XEH_preInit.sqf
index 9616b7158a..a7feade1c3 100644
--- a/addons/optics/XEH_preInit.sqf
+++ b/addons/optics/XEH_preInit.sqf
@@ -2,8 +2,6 @@
ADDON = false;
-PREP(handleFired);
-PREP(onDrawScope);
-PREP(onDrawScope2D);
+#include "XEH_PREP.hpp"
ADDON = true;
diff --git a/addons/optics/XEH_preStart.sqf b/addons/optics/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/optics/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/optics/config.cpp b/addons/optics/config.cpp
index 79f71842ee..c63049356c 100644
--- a/addons/optics/config.cpp
+++ b/addons/optics/config.cpp
@@ -18,8 +18,9 @@ class CfgPatches {
};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
- author[] = {"Taosenai","KoffeinFlummi","commy2"};
- authorUrl = "http://www.ryanschultz.org/tmr/";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"Taosenai","KoffeinFlummi","commy2"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
diff --git a/addons/optics/functions/fnc_handleFired.sqf b/addons/optics/functions/fnc_handleFired.sqf
index 299b2c30f4..2a740ac54d 100644
--- a/addons/optics/functions/fnc_handleFired.sqf
+++ b/addons/optics/functions/fnc_handleFired.sqf
@@ -16,8 +16,7 @@
TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile, _vehicle, _gunner, _turret);
// check if compatible scope is used
-private "_display";
-_display = uiNamespace getVariable [QGVAR(RscWeaponInfo2D), displayNull];
+private _display = uiNamespace getVariable [QGVAR(RscWeaponInfo2D), displayNull];
if (isNull _display) exitWith {};
diff --git a/addons/optics/functions/fnc_onDrawScope2D.sqf b/addons/optics/functions/fnc_onDrawScope2D.sqf
index 9ea038f877..6e8ba739d8 100644
--- a/addons/optics/functions/fnc_onDrawScope2D.sqf
+++ b/addons/optics/functions/fnc_onDrawScope2D.sqf
@@ -1,12 +1,59 @@
-// by commy2
+/*
+ * Author: commy2
+ * Helper function for updating the 2d and 3d scope controls
+ * Called from a dummy map controls onDraw.
+ *
+ * Arguments:
+ * 0: Display (RscInGameUI for a weapon)
+ *
+ * Return Value:
+ * Nothing
+ *
+ * Example:
+ * [ACE_RscWeapon_Arco's Display] call ace_optics_fnc_onDrawScope2D
+ *
+ * Public: No
+ */
#include "script_component.hpp"
disableSerialization;
-private "_display";
+private _display = _this select 0;
-_display = _this select 0;
+// @todo, all weapon types
+private _optic = (primaryWeaponItems ACE_player) select 2;
+private _isPIP = (getText (configFile >> "CfgWeapons" >> _optic >> "ItemInfo" >> "modelOptics")) == QPATHTOF(models\ace_optics_pip.p3d);
+if (_isPIP) then {
+ GVAR(pipLastFrame) = diag_frameno;
+ if (isNull GVAR(camera)) then {
+ if ((({_x != GVAR(camera)} count allMissionObjects "camera") > 0) || {!isNull curatorCamera}) exitWith {
+ TRACE_1("waiting for feature camera to end",GVAR(camera));
+ };
+
+ // PiP technique by BadBenson
+ GVAR(camera) = "camera" camCreate positionCameraToWorld [0,0,0];
+ GVAR(camera) camSetFov 0.7;
+ GVAR(camera) camSetTarget ACE_player;
+ GVAR(camera) camCommit 1;
+
+ "ace_optics_rendertarget0" setPiPEffect [0];
+ GVAR(camera) cameraEffect ["INTERNAL", "BACK", "ace_optics_rendertarget0"];
+
+ TRACE_2("created new pip camera",GVAR(camera),isNull GVAR(camera));
+
+ //Start a waitUntil to handle destruction after GVAR(pipLastFrame) is no longer updated
+ [{
+ (abs (diag_frameno - GVAR(pipLastFrame))) > 1
+ }, {
+ GVAR(camera) cameraEffect ["TERMINATE", "BACK"];
+ camDestroy GVAR(camera);
+ TRACE_2("destroyed pip camera",GVAR(camera),isNull GVAR(camera));
+ }, []] call CBA_fnc_waitUntilAndExecute;
+ };
+};
+
+//If we are not zoomed into the actual scope (not collimator)
if (!ctrlShown (_display displayCtrl 154)) exitWith {
(_display displayCtrl 1713001) ctrlShow false;
(_display displayCtrl 1713002) ctrlShow false;
@@ -16,11 +63,6 @@ if (!ctrlShown (_display displayCtrl 154)) exitWith {
(_display displayCtrl 1713011) ctrlShow false;
};
-// @todo, all weapon types
-private ["_optic", "_isPIP"];
-_optic = (primaryWeaponItems ACE_player) select 2;
-_isPIP = (getText (configFile >> "CfgWeapons" >> _optic >> "ItemInfo" >> "modelOptics")) == QUOTE(PATHTOF(models\ace_optics_pip.p3d));
-
if (_isPIP) then {
GVAR(camera) setPosATL positionCameraToWorld [0,0,0.4];
GVAR(camera) camPrepareTarget positionCameraToWorld [0,0,50];
@@ -37,10 +79,8 @@ if (_isPIP) then {
};
// calculate lighting
-private ["_dayOpacity", "_nightOpacity"];
-
-_dayOpacity = call EFUNC(common,ambientBrightness);
-_nightOpacity = [1,0] select (_dayOpacity == 1);
+private _dayOpacity = call EFUNC(common,ambientBrightness);
+private _nightOpacity = [1,0] select (_dayOpacity == 1);
// Apply lighting and make layers visible
(_display displayCtrl 1713001) ctrlSetTextColor [1,1,1,1];
diff --git a/addons/optionsmenu/CfgEventHandlers.hpp b/addons/optionsmenu/CfgEventHandlers.hpp
index 917a0acbd7..d6451e638d 100644
--- a/addons/optionsmenu/CfgEventHandlers.hpp
+++ b/addons/optionsmenu/CfgEventHandlers.hpp
@@ -1,10 +1,27 @@
+
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
};
};
+
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
};
};
+
+class Extended_DisplayLoad_EventHandlers {
+ class RscDisplayMain {
+ GVAR(loadMainMenuBox) = QUOTE(_this call COMPILE_FILE(init_loadMainMenuBox));
+
+ //Hide the button if there is no world (-world=empty)
+ GVAR(hideButtonEmptyWorld) = "((_this select 0) displayCtrl 80085) ctrlShow (missionName != '');";
+ };
+};
diff --git a/addons/optionsmenu/XEH_PREP.hpp b/addons/optionsmenu/XEH_PREP.hpp
new file mode 100644
index 0000000000..f1ffe1ed98
--- /dev/null
+++ b/addons/optionsmenu/XEH_PREP.hpp
@@ -0,0 +1,22 @@
+
+PREP(debugDumpToClipboard);
+PREP(onListBoxSettingsChanged);
+PREP(onListBoxShowSelectionChanged);
+PREP(onSettingsMenuOpen);
+PREP(onSliderPosChanged);
+PREP(onServerSaveInputField);
+PREP(onServerSettingsMenuOpen);
+PREP(onServerListBoxShowSelectionChanged);
+PREP(onCategorySelectChanged);
+PREP(resetSettings);
+PREP(serverResetSettings);
+PREP(settingsMenuUpdateKeyView);
+PREP(settingsMenuUpdateList);
+PREP(serverSettingsMenuUpdateKeyView);
+PREP(serverSettingsMenuUpdateList);
+PREP(onServerCategorySelectChanged);
+PREP(updateSetting);
+PREP(exportSettings);
+PREP(toggleIncludeClientSettings);
+PREP(moduleAllowConfigExport);
+PREP(stringEscape);
diff --git a/addons/optionsmenu/XEH_postInit.sqf b/addons/optionsmenu/XEH_postInit.sqf
index 4736d72623..2ef332446a 100644
--- a/addons/optionsmenu/XEH_postInit.sqf
+++ b/addons/optionsmenu/XEH_postInit.sqf
@@ -1,11 +1,11 @@
#include "script_component.hpp"
-["SettingsInitialized", {
+["ace_settingsInitialized", {
GVAR(categories) pushBack ""; //Ensure All Catagories is at top
{
if !(_x select 8 in GVAR(categories)) then {
GVAR(categories) pushBack (_x select 8);
};
}forEach EGVAR(common,settings);
-}] call EFUNC(common,addEventHandler);
+}] call CBA_fnc_addEventHandler;
diff --git a/addons/optionsmenu/XEH_preInit.sqf b/addons/optionsmenu/XEH_preInit.sqf
index 21f64c4f46..8b6f55a0ca 100644
--- a/addons/optionsmenu/XEH_preInit.sqf
+++ b/addons/optionsmenu/XEH_preInit.sqf
@@ -2,27 +2,7 @@
ADDON = false;
-PREP(debugDumpToClipboard);
-PREP(onListBoxSettingsChanged);
-PREP(onListBoxShowSelectionChanged);
-PREP(onSettingsMenuOpen);
-PREP(onSliderPosChanged);
-PREP(onServerSaveInputField);
-PREP(onServerSettingsMenuOpen);
-PREP(onServerListBoxShowSelectionChanged);
-PREP(onCategorySelectChanged);
-PREP(resetSettings);
-PREP(serverResetSettings);
-PREP(settingsMenuUpdateKeyView);
-PREP(settingsMenuUpdateList);
-PREP(serverSettingsMenuUpdateKeyView);
-PREP(serverSettingsMenuUpdateList);
-PREP(onServerCategorySelectChanged);
-PREP(updateSetting);
-PREP(exportSettings);
-PREP(toggleIncludeClientSettings);
-PREP(moduleAllowConfigExport);
-PREP(stringEscape);
+#include "XEH_PREP.hpp"
GVAR(clientSideOptions) = [];
GVAR(clientSideColors) = [];
diff --git a/addons/optionsmenu/XEH_preStart.sqf b/addons/optionsmenu/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/optionsmenu/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/optionsmenu/config.cpp b/addons/optionsmenu/config.cpp
index 4acfef321f..0e564535b9 100644
--- a/addons/optionsmenu/config.cpp
+++ b/addons/optionsmenu/config.cpp
@@ -6,8 +6,9 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
- author[] = {"Glowbal", "PabstMirror"};
- authorUrl = "http://github.com/Glowbal";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"Glowbal", "PabstMirror"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
diff --git a/addons/optionsmenu/functions/fnc_debugDumpToClipboard.sqf b/addons/optionsmenu/functions/fnc_debugDumpToClipboard.sqf
index be771f7a3a..dd2c187bf7 100644
--- a/addons/optionsmenu/functions/fnc_debugDumpToClipboard.sqf
+++ b/addons/optionsmenu/functions/fnc_debugDumpToClipboard.sqf
@@ -17,7 +17,7 @@
private ["_var", "_unit", "_outputText", "_text"];
-#define MIN_ARRAY_SIZE 10
+#define MIN_ARRAY_SIZE 50
_outputText = {
diag_log text (_this select 0);
@@ -30,12 +30,20 @@ time = %1
------Performance------
diag_fps = %2
-count ace_common_waitAndExecArray = %3
-count cba_common_perFrameHandlerArray = %4 (max %5)
-count diag_activeSQFScripts = %6
-count diag_activeSQSScripts = %7
-count diag_activeMissionFSMs = %8",
-time, diag_fps, count ace_common_waitAndExecArray, {!isNil "_x"} count cba_common_perFrameHandlerArray, count cba_common_perFrameHandlerArray, count diag_activeSQFScripts, count diag_activeSQSScripts,count diag_activeMissionFSMs];
+count cba_common_waitAndExecArray = %3
+count cba_common_waitUntilAndExecArray = %4
+count cba_common_perFrameHandlerArray = %5 (max %6)
+count diag_activeSQFScripts = %7
+count diag_activeSQSScripts = %8
+count diag_activeMissionFSMs = %9",
+time,
+diag_fps,
+count cba_common_waitAndExecArray,
+count cba_common_waitUntilAndExecArray,
+{!isNil "_x"} count cba_common_perFrameHandlerArray, count cba_common_perFrameHandlerArray,
+count diag_activeSQFScripts,
+count diag_activeSQSScripts,
+count diag_activeMissionFSMs];
[_text] call _outputText;
diff --git a/addons/optionsmenu/functions/fnc_onCategorySelectChanged.sqf b/addons/optionsmenu/functions/fnc_onCategorySelectChanged.sqf
index 3129e32bef..123a156731 100644
--- a/addons/optionsmenu/functions/fnc_onCategorySelectChanged.sqf
+++ b/addons/optionsmenu/functions/fnc_onCategorySelectChanged.sqf
@@ -22,6 +22,6 @@ disableSerialization;
_settingsMenu = uiNamespace getVariable 'ACE_settingsMenu';
_ctrlComboBox = (_settingsMenu displayCtrl 14);
-GVAR(currentCategorySelection) = lbCurSel _ctrlComboBox;
+GVAR(currentCategorySelection) = _ctrlComboBox lbValue (lbCurSel _ctrlComboBox);
[true] call FUNC(settingsMenuUpdateList);
diff --git a/addons/optionsmenu/functions/fnc_onServerSettingsMenuOpen.sqf b/addons/optionsmenu/functions/fnc_onServerSettingsMenuOpen.sqf
index 8e09608e07..43c17cd619 100644
--- a/addons/optionsmenu/functions/fnc_onServerSettingsMenuOpen.sqf
+++ b/addons/optionsmenu/functions/fnc_onServerSettingsMenuOpen.sqf
@@ -54,7 +54,7 @@ GVAR(serverSideValues) = [];
} forEach EGVAR(common,settings);
//Delay a frame
-[{ [MENU_TAB_SERVER_OPTIONS] call FUNC(onServerListBoxShowSelectionChanged) }, []] call EFUNC(common,execNextFrame);
+[{ [MENU_TAB_SERVER_OPTIONS] call FUNC(onServerListBoxShowSelectionChanged) }, []] call CBA_fnc_execNextFrame;
disableSerialization;
_menu = uiNamespace getVariable "ACE_serverSettingsMenu";
diff --git a/addons/optionsmenu/functions/fnc_onSettingsMenuOpen.sqf b/addons/optionsmenu/functions/fnc_onSettingsMenuOpen.sqf
index 104d8195cf..42157f230f 100644
--- a/addons/optionsmenu/functions/fnc_onSettingsMenuOpen.sqf
+++ b/addons/optionsmenu/functions/fnc_onSettingsMenuOpen.sqf
@@ -21,6 +21,7 @@ private ["_setting", "_menu"];
// Filter only user setable setting
GVAR(clientSideOptions) = [];
GVAR(clientSideColors) = [];
+private _clientSettableCategories = [""];
{
// If the setting is user setable and not forced
@@ -37,11 +38,12 @@ GVAR(clientSideColors) = [];
if ((_x select 1) == "COLOR") then {
GVAR(clientSideColors) pushBack _setting;
};
+ _clientSettableCategories pushBackUnique (_x select 8); //Add to list of user-settable categories
};
} forEach EGVAR(common,settings);
//Delay a frame
-[{ [MENU_TAB_OPTIONS] call FUNC(onListBoxShowSelectionChanged) }, []] call EFUNC(common,execNextFrame);
+[{ [MENU_TAB_OPTIONS] call FUNC(onListBoxShowSelectionChanged) }, []] call CBA_fnc_execNextFrame;
disableSerialization;
_menu = uiNamespace getVariable "ACE_settingsMenu";
@@ -55,10 +57,13 @@ if (GVAR(serverConfigGeneration) == 0) then {
lbClear (_menu displayCtrl 14);
{
- if (_x == "") then {
- _x = localize LSTRING(category_all);
+ if (_x in _clientSettableCategories) then { //only show category if it has user-settable options
+ if (_x == "") then {
+ _x = localize LSTRING(category_all);
+ };
+ private _Index = (_menu displayCtrl 14) lbAdd _x;
+ (_menu displayCtrl 14) lbSetValue [_Index, _forEachIndex];
};
- (_menu displayCtrl 14) lbAdd _x;
} forEach GVAR(categories);
(_menu displayCtrl 14) lbSetCurSel GVAR(currentCategorySelection); //All Catagoies
diff --git a/addons/optionsmenu/gui/define.hpp b/addons/optionsmenu/gui/define.hpp
index 2a3fffc736..c2b1faf9cf 100644
--- a/addons/optionsmenu/gui/define.hpp
+++ b/addons/optionsmenu/gui/define.hpp
@@ -92,6 +92,5 @@ class RscText;
// Listbox styles
#define LB_TEXTURES 0x10
#define LB_MULTI 0x20
-#define FontCSE "PuristaMedium"
#endif
diff --git a/addons/optionsmenu/gui/pauseMenu.hpp b/addons/optionsmenu/gui/pauseMenu.hpp
index 3333c5476f..34f368df4a 100644
--- a/addons/optionsmenu/gui/pauseMenu.hpp
+++ b/addons/optionsmenu/gui/pauseMenu.hpp
@@ -1,13 +1,13 @@
class ACE_Open_SettingsMenu_BtnBase : ACE_gui_buttonBase {
class Attributes {
- font = "PuristaMedium";
+ font = "RobotoCondensed";
color = "#E5E5E5";
align = "left";
shadow = "true";
};
class AttributesImage {
- font = "PuristaMedium";
+ font = "RobotoCondensed";
color = "#E5E5E5";
align = "left";
};
@@ -46,7 +46,7 @@ class ACE_Open_SettingsMenu_BtnBase : ACE_gui_buttonBase {
colorFocused[] = {0,0,0,1};
colorText[] = {1,1,1,1};
default = 0;
- font = "PuristaMedium";
+ font = "RobotoCondensed";
idc = -1;
period = 1.2;
periodFocus = 1.2;
@@ -101,10 +101,6 @@ class RscDisplayMovieInterrupt: RscStandardDisplay {
};
};
class RscDisplayMain: RscStandardDisplay {
- //Hide the button if there is no world (-world=empty)
- //Seems odd to use onMouseMoving, but I don't want to overload onLoad
- onMouseMoving = QUOTE(((_this select 0) displayCtrl 80085) ctrlShow (missionName != ''); _this execVM QUOTE(QUOTE(PATHTOF(script_loadMainMenuBox.sqf))););
-
class controls {
class ACE_Open_settingsMenu_Btn : ACE_Open_SettingsMenu_BtnBase {
action = "if (missionName != '') then {createDialog 'ACE_settingsMenu';};";
@@ -153,17 +149,17 @@ class RscDisplayMain: RscStandardDisplay {
shadow = 0;
class H1 {
- font = "PuristaMedium";
- fontBold = "PuristaLight";
+ font = "RobotoCondensed";
+ fontBold = "RobotoCondensedLight";
sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.4)";
};
class H2: H1 {
sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.2)";
- font = "PuristaLight";
+ font = "RobotoCondensedLight";
};
class P: H1 {
sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
- fontBold = "PuristaLight";
+ fontBold = "RobotoCondensedLight";
};
colorBold[] = {0.6,0.6,0.6,1};
colorLink[] = {"(profilenamespace getVariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getVariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getVariable ['GUI_BCG_RGB_B',0.5])",1};
diff --git a/addons/optionsmenu/gui/settingsMenu.hpp b/addons/optionsmenu/gui/settingsMenu.hpp
index 37950b1c42..e9265e59fd 100644
--- a/addons/optionsmenu/gui/settingsMenu.hpp
+++ b/addons/optionsmenu/gui/settingsMenu.hpp
@@ -30,7 +30,7 @@ class ACE_settingsMenu {
w = W_PART(38);
h = H_PART(1);
style = ST_LEFT + ST_SHADOW;
- font = "PuristaMedium";
+ font = "RobotoCondensed";
SizeEx = H_PART(1);
colorText[] = {0.95, 0.95, 0.95, 0.75};
colorBackground[] = {"(profilenamespace getVariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getVariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getVariable ['GUI_BCG_RGB_B',0.5])", "(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"};
@@ -67,7 +67,7 @@ class ACE_settingsMenu {
w = W_PART(38);
h = H_PART(1);
style = ST_LEFT + ST_SHADOW;
- font = "PuristaMedium";
+ font = "RobotoCondensed";
SizeEx = H_PART(1);
colorText[] = {0.95, 0.95, 0.95, 0.75};
colorBackground[] = {0,0,0,0};
@@ -287,7 +287,7 @@ class ACE_serverSettingsMenu: ACE_settingsMenu {
w = W_PART(38);
h = H_PART(1);
style = ST_LEFT + ST_SHADOW;
- font = "PuristaMedium";
+ font = "RobotoCondensed";
SizeEx = H_PART(1);
colorText[] = {0.95, 0.95, 0.95, 0.75};
colorBackground[] = {0,0,0,0};
diff --git a/addons/optionsmenu/script_loadMainMenuBox.sqf b/addons/optionsmenu/init_loadMainMenuBox.sqf
similarity index 100%
rename from addons/optionsmenu/script_loadMainMenuBox.sqf
rename to addons/optionsmenu/init_loadMainMenuBox.sqf
diff --git a/addons/optionsmenu/stringtable.xml b/addons/optionsmenu/stringtable.xml
index 129f995cd7..b051e3f219 100644
--- a/addons/optionsmenu/stringtable.xml
+++ b/addons/optionsmenu/stringtable.xml
@@ -212,7 +212,7 @@
Měřítko UI v menu nastavení
Размер интерфейса меню настройки
Opción de escalado del menú IU
- UI Skalierung
+ Nutzeroberflächen-Skalierung
Beállításmenü kezelőfelületének skálázása
Escalar o menu de opções
Proporzioni della interfaccia utente
@@ -227,6 +227,7 @@
Autoriser l'exportation de la configuration [ACE]
Konfiguráció-exportálás engedélyezése [ACE]
Разрешить экспорт настроек [ACE]
+ Consenti Esportazione del Config [ACE]
Show News on Main Menu
@@ -399,22 +419,29 @@
Hírek mutatása a főmenüben
Показывать новости в Главном Меню
Zobrazit zprávy v hlavním menu
+ Mostra News nel Menù Princinpale
\ No newline at end of file
diff --git a/addons/overheating/ACE_Settings.hpp b/addons/overheating/ACE_Settings.hpp
index c5a514e5e2..fc3237da0f 100644
--- a/addons/overheating/ACE_Settings.hpp
+++ b/addons/overheating/ACE_Settings.hpp
@@ -1,5 +1,5 @@
class ACE_Settings {
- class GVAR(DisplayTextOnJam) {
+ class GVAR(displayTextOnJam) {
typeName = "BOOL";
isClientSettable = 1;
value = 1;
@@ -26,4 +26,22 @@ class ACE_Settings {
displayName = CSTRING(overheatingDispersion_displayName);
description = CSTRING(overheatingDispersion_description);
};
+ class GVAR(unJamOnreload) {
+ typeName = "BOOL";
+ value = 0;
+ displayName = CSTRING(unJamOnreload_displayName);
+ description = CSTRING(unJamOnreload_description);
+ };
+ class GVAR(unJamFailChance) {
+ typeName = "SCALAR";
+ value = 0.1;
+ displayName = CSTRING(unJamFailChance_displayName);
+ description = CSTRING(unJamFailChance_description);
+ };
+ class GVAR(enabled) {
+ typeName = "BOOL";
+ value = 1;
+ displayName = CSTRING(enabled_displayName);
+ description = CSTRING(enabled_description);
+ };
};
diff --git a/addons/overheating/CfgEventHandlers.hpp b/addons/overheating/CfgEventHandlers.hpp
index 7f43c8b903..5da5fd0dc2 100644
--- a/addons/overheating/CfgEventHandlers.hpp
+++ b/addons/overheating/CfgEventHandlers.hpp
@@ -1,3 +1,10 @@
+
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE( call COMPILE_FILE(XEH_preInit) );
@@ -9,11 +16,3 @@ class Extended_PostInit_EventHandlers {
init = QUOTE( call COMPILE_FILE(XEH_postInit) );
};
};
-
-class Extended_Take_EventHandlers {
- class CAManBase {
- class GVAR(UnjamReload) {
- clientTake = QUOTE( _this call FUNC(handleTakeEH) );
- };
- };
-};
diff --git a/addons/overheating/CfgMagazines.hpp b/addons/overheating/CfgMagazines.hpp
new file mode 100644
index 0000000000..cc040eca0f
--- /dev/null
+++ b/addons/overheating/CfgMagazines.hpp
@@ -0,0 +1,11 @@
+class CfgMagazines {
+ class CA_Magazine;
+ class ACE_SpareBarrel: CA_Magazine {
+ displayName = CSTRING(SpareBarrelName);
+ descriptionshort = CSTRING(SpareBarrelDescription);
+ picture = QUOTE(PATHTOF(UI\spare_barrel_ca.paa));
+ count = 1;
+ mass = 60;
+ ACE_isUnique = 1;
+ };
+};
diff --git a/addons/overheating/CfgSounds.hpp b/addons/overheating/CfgSounds.hpp
index c32fc02abf..bd2831eeb6 100644
--- a/addons/overheating/CfgSounds.hpp
+++ b/addons/overheating/CfgSounds.hpp
@@ -1,26 +1,26 @@
class CfgSounds {
class ACE_BarrelSwap {
- sound[] = {QUOTE(PATHTOF(sounds\barrelswap.ogg)),5,1,200};
+ sound[] = {QPATHTOF(sounds\barrelswap.ogg),5,1,200};
titles[] = {};
};
class GVAR(jamming_rifle) {
name=QGVAR(jamming_rifle);
- sound[]={QUOTE(PATHTOF(sounds\jamming_rifle.wav)),1,1};
+ sound[]={QPATHTOF(sounds\jamming_rifle.wav),1,1};
titles[]={};
};
class GVAR(jamming_pistol) {
name=QGVAR(jamming_pistol);
- sound[]={QUOTE(PATHTOF(sounds\jamming_pistol.wav)),1,1};
+ sound[]={QPATHTOF(sounds\jamming_pistol.wav),1,1};
titles[]={};
};
class GVAR(fixing_rifle) {
name=QGVAR(fixing_rifle);
- sound[]={QUOTE(PATHTOF(sounds\fixing_rifle.wav)),1,1};
+ sound[]={QPATHTOF(sounds\fixing_rifle.wav),1,1};
titles[]={};
};
class GVAR(fixing_pistol) {
name= QGVAR(fixing_pistol);
- sound[]={QUOTE(PATHTOF(sounds\fixing_pistol.wav)),1,1};
+ sound[]={QPATHTOF(sounds\fixing_pistol.wav),1,1};
titles[]={};
};
};
diff --git a/addons/overheating/CfgVehicles.hpp b/addons/overheating/CfgVehicles.hpp
index ec9b07f36c..f7700fd7df 100644
--- a/addons/overheating/CfgVehicles.hpp
+++ b/addons/overheating/CfgVehicles.hpp
@@ -4,21 +4,57 @@ class CfgVehicles {
class CAManBase: Man {
class ACE_SelfActions {
class ACE_Equipment {
- class ACE_SwapBarrel {
+ class GVAR(UnJam) {
+ displayName = CSTRING(UnjamWeapon);
+ condition = QUOTE( GVAR(enabled) && {[_player] call FUNC(canUnjam)} );
+ exceptions[] = {"isNotInside", "isNotSitting"};
+ statement = QUOTE( [ARR_2(_player, currentMuzzle _player)] call FUNC(clearJam); );
+ showDisabled = 0;
+ priority = 4;
+ icon = QPATHTOF(UI\unjam_ca.paa);
+ };
+ class GVAR(SwapBarrel) {
displayName = CSTRING(SwapBarrel);
- condition = QUOTE( 'ACE_SpareBarrel' in items _player && {getNumber (configFile >> 'CfgWeapons' >> currentWeapon _player >> 'ACE_Overheating_allowSwapBarrel') == 1} );
- statement = QUOTE( [ARR_2(_player, currentWeapon _player)] call FUNC(swapBarrel); );
+ condition = QUOTE( GVAR(enabled) && {'ACE_SpareBarrel' in magazines _player} && {getNumber (configFile >> 'CfgWeapons' >> currentWeapon _player >> 'ACE_Overheating_allowSwapBarrel') == 1} );
+ statement = QUOTE( [ARR_3(_player, _player, currentWeapon _player)] call FUNC(swapBarrel); );
showDisabled = 0;
priority = 3;
- icon = QUOTE(PATHTOF(UI\spare_barrel_ca.paa));
+ icon = QPATHTOF(UI\spare_barrel_ca.paa);
};
- class ACE_CheckTemperature {
+ class GVAR(CheckTemperature) {
displayName = CSTRING(CheckTemperatureShort);
- condition = "switch (currentWeapon _player) do {case (''): {false}; case (primaryWeapon _player); case (secondaryWeapon _player); case (handgunWeapon _player): {true}; default {false}}";
+ condition = "ace_overheating_enabled && {switch (currentWeapon _player) do {case (''): {false}; case (primaryWeapon _player); case (handgunWeapon _player): {true}; default {false}}}";
exceptions[] = {"isNotInside", "isNotSitting"};
- statement = QUOTE( [ARR_2(_player, currentWeapon _player)] call FUNC(CheckTemperature); );
+ statement = QUOTE( [ARR_3(_player, _player, currentWeapon _player)] call FUNC(checkTemperature); );
showDisabled = 0;
priority = 2.9;
+ icon = QPATHTOF(UI\temp_ca.paa);
+ };
+ class GVAR(CheckTemperatureSpareBarrels) {
+ displayName = CSTRING(CheckTemperatureSpareBarrelsShort);
+ condition = QUOTE( GVAR(enabled) && {'ACE_SpareBarrel' in magazines _player});
+ exceptions[] = {"isNotInside", "isNotSitting"};
+ statement = QUOTE( [_player] call FUNC(checkSpareBarrelsTemperatures); );
+ showDisabled = 0;
+ priority = 2.8;
+ icon = QUOTE(PATHTOF(UI\temp_ca.paa));
+ };
+ };
+ };
+
+ class ACE_Actions {
+ class ACE_Weapon {
+ class GVAR(SwapBarrel) {
+ displayName = CSTRING(SwapBarrel);
+ condition = QUOTE( GVAR(enabled) && {'ACE_SpareBarrel' in magazines _player} && {getNumber (configFile >> 'CfgWeapons' >> currentWeapon _target >> 'ACE_Overheating_allowSwapBarrel') == 1} );
+ statement = QUOTE([ARR_3(_player, _target, currentWeapon _target)] call FUNC(swapBarrelAssistant););
+ icon = QUOTE(PATHTOF(UI\spare_barrel_ca.paa));
+ };
+ class GVAR(CheckTemperature) {
+ displayName = CSTRING(CheckTemperatureShort);
+ condition = "ace_overheating_enabled && {switch (currentWeapon _target) do {case (''): {false}; case (primaryWeapon _target); case (handgunWeapon _target): {true}; default {false}}}";
+ exceptions[] = {"isNotInside", "isNotSitting"};
+ statement = QUOTE( [ARR_3(_player, _target, currentWeapon _target)] call FUNC(checkTemperature); );
icon = QUOTE(PATHTOF(UI\temp_ca.paa));
};
};
@@ -90,29 +126,4 @@ class CfgVehicles {
MACRO_ADDITEM(ACE_SpareBarrel,6);
};
};
-
- // Add ACE_SpareBarrel to every machine gunner.
- #define MACRO_ADDSPAREBARREL \
- items[] = {"FirstAidKit", "ACE_SpareBarrel"}; \
- respawnitems[] = {"FirstAidKit", "ACE_SpareBarrel"};
-
- // NATO
- class B_Soldier_02_f; class B_soldier_AR_F:B_Soldier_02_f {MACRO_ADDSPAREBARREL};
- class B_Soldier_support_base_F; class B_soldier_AAR_F:B_Soldier_support_base_F {MACRO_ADDSPAREBARREL};
- class B_Soldier_base_F; class B_CTRG_soldier_AR_A_F:B_Soldier_base_F {MACRO_ADDSPAREBARREL};
-
- // Guerrilla
- class I_G_Soldier_base_F; class I_G_Soldier_AR_F:I_G_Soldier_base_F {MACRO_ADDSPAREBARREL};
- class B_G_Soldier_AR_F:I_G_Soldier_AR_F {MACRO_ADDSPAREBARREL};
- class O_G_Soldier_AR_F:I_G_Soldier_AR_F {MACRO_ADDSPAREBARREL};
-
- // Iran
- class O_Soldier_base_F; class O_Soldier_AR_F:O_Soldier_base_F {MACRO_ADDSPAREBARREL};
- class O_Soldier_support_base_F; class O_Soldier_AAR_F:O_Soldier_support_base_F {MACRO_ADDSPAREBARREL};
- class O_Soldier_Urban_base; class O_soldierU_AR_F:O_Soldier_Urban_base {MACRO_ADDSPAREBARREL};
- class O_soldierU_AAR_F:O_Soldier_Urban_base {MACRO_ADDSPAREBARREL};
-
- // Czech
- class I_Soldier_02_F; class I_Soldier_AR_F:I_Soldier_02_F {MACRO_ADDSPAREBARREL};
- class I_Soldier_support_base_F; class I_Soldier_AAR_F:I_Soldier_support_base_F {MACRO_ADDSPAREBARREL};
};
diff --git a/addons/overheating/CfgWeapons.hpp b/addons/overheating/CfgWeapons.hpp
index f59c4d7911..12cfe6e498 100644
--- a/addons/overheating/CfgWeapons.hpp
+++ b/addons/overheating/CfgWeapons.hpp
@@ -6,7 +6,7 @@ class CfgWeapons {
displayname = CSTRING(SpareBarrelName);
descriptionshort = CSTRING(SpareBarrelDescription);
//model = "";
- picture = QUOTE(PATHTOF(UI\spare_barrel_ca.paa));
+ picture = QPATHTOF(UI\spare_barrel_ca.paa);
scope = 2;
class ItemInfo: InventoryItem_Base_F {
mass = 30;
diff --git a/addons/overheating/UI/unjam_ca.paa b/addons/overheating/UI/unjam_ca.paa
new file mode 100644
index 0000000000..45f7dadcea
Binary files /dev/null and b/addons/overheating/UI/unjam_ca.paa differ
diff --git a/addons/overheating/XEH_PREP.hpp b/addons/overheating/XEH_PREP.hpp
new file mode 100644
index 0000000000..44fd931ca0
--- /dev/null
+++ b/addons/overheating/XEH_PREP.hpp
@@ -0,0 +1,20 @@
+
+PREP(calculateCooling);
+PREP(canUnjam);
+PREP(checkSpareBarrelsTemperatures);
+PREP(checkTemperature);
+PREP(clearJam);
+PREP(displayTemperature);
+PREP(firedEH);
+PREP(getWeaponData);
+PREP(handleTakeEH);
+PREP(jamWeapon);
+PREP(loadCoolestSpareBarrel);
+PREP(overheat);
+PREP(sendSpareBarrelsTemperaturesHint);
+PREP(swapBarrel);
+PREP(swapBarrelAssistant);
+PREP(swapBarrelCallback);
+PREP(updateSpareBarrelsTemperaturesThread);
+PREP(updateTemperature);
+PREP(updateTemperatureThread);
diff --git a/addons/overheating/XEH_postInit.sqf b/addons/overheating/XEH_postInit.sqf
index 38c0298b0f..f5a162e075 100644
--- a/addons/overheating/XEH_postInit.sqf
+++ b/addons/overheating/XEH_postInit.sqf
@@ -1,47 +1,69 @@
// by esteldunedain
#include "script_component.hpp"
-if (isServer) then {
- GVAR(pseudoRandomList) = [];
- // Construct a list of pseudo random 2D vectors
- for "_i" from 0 to 30 do {
- GVAR(pseudoRandomList) pushBack [-1 + random 2, -1 + random 2];
- };
- publicVariable QGVAR(pseudoRandomList);
+if (hasInterface) then {
+ // Add keybinds
+ ["ACE3 Weapons", QGVAR(unjamWeapon), localize LSTRING(UnjamWeapon),
+ {
+ // Conditions: canInteract
+ if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
+ // Conditions: specific
+
+ if !(GVAR(enabled) && {[ACE_player] call FUNC(canUnjam)}) exitWith {false};
+
+ // Statement
+ [ACE_player, currentMuzzle ACE_player, false] call FUNC(clearJam);
+ true
+ },
+ {false},
+ [19, [true, false, false]], false] call CBA_fnc_addKeybind; //SHIFT + R Key
};
+["ace_settingsInitialized", {
+ TRACE_1("SettingsInitialized eh", GVAR(enabled));
+ if (!GVAR(enabled)) exitWith {};
-if !(hasInterface) exitWith {};
+ if (isServer) then {
+ GVAR(pseudoRandomList) = [];
+ // Construct a list of pseudo random 2D vectors
+ for "_i" from 0 to 30 do {
+ GVAR(pseudoRandomList) pushBack [-1 + random 2, -1 + random 2];
+ };
+ publicVariable QGVAR(pseudoRandomList);
-GVAR(cacheWeaponData) = createLocation ["ACE_HashLocation", [-10000,-10000,-10000], 0, 0];
-GVAR(cacheWeaponData) setText QGVAR(cacheWeaponData);
+ // Keep track of the temperature of stored spare barrels
+ GVAR(storedSpareBarrels) = [] call CBA_fnc_hashCreate;
-// Add keybinds
-["ACE3 Weapons", QGVAR(unjamWeapon), localize LSTRING(UnjamWeapon),
-{
- // Conditions: canInteract
- if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
- // Conditions: specific
- if !([ACE_player] call EFUNC(common,canUseWeapon) &&
- {currentWeapon ACE_player in (ACE_player getVariable [QGVAR(jammedWeapons), []])}
- ) exitWith {false};
+ // Install event handlers for spare barrels
+ [QGVAR(spareBarrelsSendTemperatureHint), FUNC(sendSpareBarrelsTemperaturesHint)] call CBA_fnc_addEventHandler;
+ [QGVAR(spareBarrelsLoadCoolest), FUNC(loadCoolestSpareBarrel)] call CBA_fnc_addEventHandler;
- // Statement
- [ACE_player, currentMuzzle ACE_player, false] call FUNC(clearJam);
- true
-},
-{false},
-[19, [true, false, false]], false] call CBA_fnc_addKeybind; //SHIFT + R Key
+ // Schedule cool down calculation of stored spare barrels
+ [] call FUNC(updateSpareBarrelsTemperaturesThread);
+ };
+ if !(hasInterface) exitWith {};
-// Schedule cool down calculation of player weapons at (infrequent) regular intervals
-[] call FUNC(updateTemperatureThread);
+ GVAR(cacheWeaponData) = call CBA_fnc_createNamespace;
+ GVAR(cacheAmmoData) = call CBA_fnc_createNamespace;
+ GVAR(cacheSilencerData) = call CBA_fnc_createNamespace;
+
+ //Add Take EH (for reload)
+ ["CAManBase", "Take", {_this call FUNC(handleTakeEH);}] call CBA_fnc_addClassEventHandler;
-["SettingsInitialized", {
// Register fire event handler
- ["firedPlayer", DFUNC(firedEH)] call EFUNC(common,addEventHandler);
+ ["ace_firedPlayer", DFUNC(firedEH)] call CBA_fnc_addEventHandler;
// Only add eh to non local players if dispersion is enabled
if (GVAR(overheatingDispersion)) then {
- ["firedPlayerNonLocal", DFUNC(firedEH)] call EFUNC(common,addEventHandler);
+ ["ace_firedPlayerNonLocal", DFUNC(firedEH)] call CBA_fnc_addEventHandler;
};
-}] call EFUNC(common,addEventHandler);
+
+ // Schedule cool down calculation of player weapons at (infrequent) regular intervals
+ [] call FUNC(updateTemperatureThread);
+
+ // Install event handler to display temp when a barrel was swapped
+ [QGVAR(showWeaponTemperature), DFUNC(displayTemperature)] call CBA_fnc_addEventHandler;
+ // Install event handler to initiate an assisted barrel swap
+ [QGVAR(initiateSwapBarrelAssisted), DFUNC(swapBarrel)] call CBA_fnc_addEventHandler;
+
+}] call CBA_fnc_addEventHandler;
diff --git a/addons/overheating/XEH_preInit.sqf b/addons/overheating/XEH_preInit.sqf
index be9936f214..cdd1fa78dd 100644
--- a/addons/overheating/XEH_preInit.sqf
+++ b/addons/overheating/XEH_preInit.sqf
@@ -2,17 +2,18 @@
ADDON = false;
-PREP(checkTemperature);
-PREP(clearJam);
-PREP(displayTemperature);
-PREP(firedEH);
-PREP(getWeaponData);
-PREP(handleTakeEH);
-PREP(jamWeapon);
-PREP(overheat);
-PREP(swapBarrel);
-PREP(swapBarrelCallback);
-PREP(updateTemperature);
-PREP(updateTemperatureThread);
+#include "XEH_PREP.hpp"
+
+if (isNil "CBA_fnc_getMagazineIndex") then {
+ CBA_fnc_getMagazineIndex = {
+ params [["_unit", objNull, [objNull]], ["_magazine", "", [""]]];
+
+ private _displayName = getText (configFile >> "CfgMagazines" >> _magazine >> "displayName");
+
+ if (_displayName isEqualTo "") exitWith {[]};
+
+ (magazinesDetail _unit select {_x find _displayName == 0}) apply {_x = _x splitString "[:]"; _x select (count _x - 1)};
+ };
+};
ADDON = true;
diff --git a/addons/overheating/XEH_preStart.sqf b/addons/overheating/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/overheating/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/overheating/config.cpp b/addons/overheating/config.cpp
index c57e55913d..576ee1e190 100644
--- a/addons/overheating/config.cpp
+++ b/addons/overheating/config.cpp
@@ -6,8 +6,9 @@ class CfgPatches {
weapons[] = {"ACE_SpareBarrel"};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_interaction"};
- author[] = {"commy2", "KoffeinFlummi", "esteldunedain"};
- authorUrl = "https://github.com/commy2/";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"commy2", "KoffeinFlummi", "esteldunedain"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
@@ -18,6 +19,8 @@ class CfgPatches {
#include "CfgVehicles.hpp"
+#include "CfgMagazines.hpp"
+
#include "CfgWeapons.hpp"
#include "ACE_Settings.hpp"
@@ -47,4 +50,11 @@ class CfgGesturesMale {
speed = 0.3;
};
};
-};
\ No newline at end of file
+};
+class ACE_newEvents {
+ initiateSwapBarrelAssisted = QGVAR(initiateSwapBarrelAssisted);
+ showWeaponTemperature = QGVAR(showWeaponTemperature);
+ spareBarrelsLoadCoolest = QGVAR(spareBarrelsLoadCoolest);
+ spareBarrelsSendTemperatureHint = QGVAR(spareBarrelsSendTemperatureHint);
+ weaponJammed = "ace_weaponJammed";
+};
diff --git a/addons/overheating/functions/fnc_calculateCooling.sqf b/addons/overheating/functions/fnc_calculateCooling.sqf
new file mode 100644
index 0000000000..955c41441e
--- /dev/null
+++ b/addons/overheating/functions/fnc_calculateCooling.sqf
@@ -0,0 +1,58 @@
+/*
+ * Author: esteldunedain
+ * Calculate the cooling down of a weapon over a time interval.
+ *
+ * Argument:
+ * 0: Initial temperature
+ * 1: Barrel mass
+ * 2: Time interval
+ *
+ * Return value:
+ * Final temperature
+ *
+ * Example:
+ * [_temperature, _barrelMass, _totalTime] call ace_overheating_fnc_calculateCooling
+ *
+ * Public: No
+ */
+#include "script_component.hpp"
+
+params ["_temperature", "_barrelMass", "_totalTime"];
+
+// If a long time passed since the last shot, there's no need to calculate anything; the weapon should be cool
+if (_totalTime > 1800) exitWith {0};
+
+//AR-15 (0.00570m bullet diameter) (barrel diameter usually 0.75" or 0.008255m radius)
+//Steel Denisty = 7850 m^3 / kg
+//Area of a cylinder (2/r)*(Pi * r^3 + V) - for a 0.008255m radius barrel -> Area = 210(1/meters) * Volume
+//Adjusted volume for being hollowed out is ~1.1x
+//So Area = 210 * 1.1 * (mass / 7850) = mass * 0.029427 (for steel near that diameter)
+
+private _barrelSurface = _barrelMass * 0.029427;
+
+TRACE_4("cooling",_temperature,_totalTime,_barrelMass,_barrelSurface);
+
+private _time = 0;
+while {true} do {
+ private _deltaTime = (_totalTime - _time) min 20;
+
+ _temperature = _temperature - (
+ // Convective cooling
+ 25 * _barrelSurface * _temperature
+ // Radiative cooling
+ + 0.4 * 5.67e-8 * _barrelSurface *
+ ( (_temperature + 273.15)*(_temperature + 273.15)
+ * (_temperature + 273.15)*(_temperature + 273.15)
+ - 273.15 * 273.15 * 273.15 *273.15 )
+ ) * _deltaTime / (_barrelMass * 466);
+
+ if (_temperature < 1) exitWith {0};
+
+ if (isNil "_temperature") exitWith {
+ diag_log text format ["[ACE] ERROR: _totalTime = %1; _time = %2; _deltaTime = %3;", _totalTime, _time, _deltaTime];
+ 0
+ };
+
+ _time = _time + _deltaTime;
+ if (_time >= _totalTime) exitWith { _temperature max 0 };
+};
diff --git a/addons/overheating/functions/fnc_canUnjam.sqf b/addons/overheating/functions/fnc_canUnjam.sqf
new file mode 100644
index 0000000000..610fa9ca22
--- /dev/null
+++ b/addons/overheating/functions/fnc_canUnjam.sqf
@@ -0,0 +1,25 @@
+/*
+ * Author: Commy2 and esteldunedain
+ * Return true if the unit can unjam it's current weapon
+ *
+ * Arguments:
+ * 0: Player
+ *
+ * Return Value:
+ * Bool
+ *
+ * Public: No
+ */
+#include "script_component.hpp"
+
+params ["_unit"];
+TRACE_1("_unit",_unit);
+
+private _jammedWeapons = _unit getVariable [QGVAR(jammedWeapons), []];
+if !(currentWeapon _unit in _jammedWeapons) exitWith {
+ false
+};
+if !([_unit] call CBA_fnc_canUseWeapon) exitWith {
+ false
+};
+true
diff --git a/addons/overheating/functions/fnc_checkSpareBarrelsTemperatures.sqf b/addons/overheating/functions/fnc_checkSpareBarrelsTemperatures.sqf
new file mode 100644
index 0000000000..be2e1ae1a5
--- /dev/null
+++ b/addons/overheating/functions/fnc_checkSpareBarrelsTemperatures.sqf
@@ -0,0 +1,38 @@
+/*
+ * Author: esteldunedain
+ * Make the player check the temperature of his spare barrels
+ *
+ * Arguments:
+ * 0: Player
+ *
+ * Return Value:
+ * None
+ *
+ *
+ * Public: No
+ */
+#include "script_component.hpp"
+
+params ["_player"];
+
+// Check canInteractWith:
+if (!([_player, objNull, ["isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith))) exitWith {};
+
+// Make the unit go kneeling
+[_player] call EFUNC(common,goKneeling);
+
+// Spawn a progress bar
+[
+ 5.0,
+ [_player],
+ {
+ params ["_args", "_elapsedTime", "_totalTime", "_errorCode"];
+ _args params ["_player"];
+ // Time has enlapsed, ask the server to send the hint
+ [QGVAR(spareBarrelsSendTemperatureHint), [_player, _player]] call CBA_fnc_serverEvent;
+ },
+ {},
+ (localize LSTRING(CheckingSpareBarrelsTemperatures)),
+ {true},
+ ["isNotInside", "isNotSitting"]
+] call EFUNC(common,progressBar);
diff --git a/addons/overheating/functions/fnc_checkTemperature.sqf b/addons/overheating/functions/fnc_checkTemperature.sqf
index f720665620..0fb600f83a 100644
--- a/addons/overheating/functions/fnc_checkTemperature.sqf
+++ b/addons/overheating/functions/fnc_checkTemperature.sqf
@@ -3,8 +3,9 @@
* Make the player check the temperature of his weapon
*
* Arguments:
- * 0: Player
- * 1: Weapon
+ * 0: Unit checking
+ * 1: Unit that has the weapon
+ * 2: Weapon
*
* Return Value:
* None
@@ -16,17 +17,18 @@
*/
#include "script_component.hpp"
-params ["_player", "_weapon"];
-TRACE_2("params",_player,_weapon);
+params ["_assistant", "_gunner", "_weapon"];
+TRACE_3("params",_assistant,_gunner,_weapon);
// Play animation and report temperature
-private _action = getText (configFile >> "CfgWeapons" >> _weapon >> "ACE_checkTemperatureAction");
-
-if (_action == "") then {
- _action = "Gear";
+private _action = "PutDown";
+if (_assistant isEqualTo _gunner) then {
+ _action = getText (configFile >> "CfgWeapons" >> _weapon >> "ACE_checkTemperatureAction");
+ if (_action == "") then {
+ _action = "Gear";
+ };
};
-
-_player playActionNow _action;
+_assistant playActionNow _action;
// Waits a sec before displaying the temperature
-[FUNC(displayTemperature), [_player, _weapon], 1.0] call EFUNC(common,waitAndExecute);
+[FUNC(displayTemperature), [_gunner, _weapon], 1.0] call CBA_fnc_waitAndExecute;
diff --git a/addons/overheating/functions/fnc_clearJam.sqf b/addons/overheating/functions/fnc_clearJam.sqf
index 33039328e4..7011385c02 100644
--- a/addons/overheating/functions/fnc_clearJam.sqf
+++ b/addons/overheating/functions/fnc_clearJam.sqf
@@ -17,24 +17,15 @@
*/
#include "script_component.hpp"
-params ["_unit", "_weapon", "_skipAnim"];
+params ["_unit", "_weapon", ["_skipAnim", false]];
TRACE_3("params",_unit,_weapon,_skipAnim);
private _jammedWeapons = _unit getVariable [QGVAR(jammedWeapons), []];
if (_weapon in _jammedWeapons) then {
- _jammedWeapons = _jammedWeapons - [_weapon];
-
- _unit setVariable [QGVAR(jammedWeapons), _jammedWeapons];
-
- if (_jammedWeapons isEqualTo []) then {
- private _id = _unit getVariable [QGVAR(JammingActionID), -1];
- [_unit, "DefaultAction", _id] call EFUNC(common,removeActionEventHandler);
- _unit setVariable [QGVAR(JammingActionID), -1];
- };
-
+ private _delay = 0;
if !(_skipAnim) then {
-
+ _delay = 2.5;
private _clearJamAction = getText (configFile >> "CfgWeapons" >> _weapon >> "ACE_clearJamAction");
if (_clearJamAction == "") then {
@@ -51,7 +42,27 @@ if (_weapon in _jammedWeapons) then {
};
};
- if (GVAR(DisplayTextOnJam)) then {
- [localize LSTRING(WeaponUnjammed)] call EFUNC(common,displayTextStructured);
+ // Check if the jam will be successfull
+ if (random 1 > GVAR(unJamFailChance)) then {
+ // Success
+ _jammedWeapons = _jammedWeapons - [_weapon];
+ _unit setVariable [QGVAR(jammedWeapons), _jammedWeapons];
+ if (_jammedWeapons isEqualTo []) then {
+ private _id = _unit getVariable [QGVAR(JammingActionID), -1];
+ [_unit, "DefaultAction", _id] call EFUNC(common,removeActionEventHandler);
+ _unit setVariable [QGVAR(JammingActionID), -1];
+ };
+ if (GVAR(DisplayTextOnJam)) then {
+ [{
+ [localize LSTRING(WeaponUnjammed)] call EFUNC(common,displayTextStructured);
+ }, [], _delay] call CBA_fnc_waitAndExecute;
+ };
+ } else {
+ // Failure
+ if (GVAR(DisplayTextOnJam)) then {
+ [{
+ [localize LSTRING(WeaponUnjamFailed)] call EFUNC(common,displayTextStructured);
+ }, [], _delay] call CBA_fnc_waitAndExecute;
+ };
};
};
diff --git a/addons/overheating/functions/fnc_firedEH.sqf b/addons/overheating/functions/fnc_firedEH.sqf
index 604a2bb31d..5bd725b74d 100644
--- a/addons/overheating/functions/fnc_firedEH.sqf
+++ b/addons/overheating/functions/fnc_firedEH.sqf
@@ -65,8 +65,8 @@ if (_unit != ACE_player && (!GVAR(showParticleEffectsForEveryone) || {_unit dist
};
//Particle Effects:
-if (GVAR(showParticleEffects) && {(ACE_time > ((_unit getVariable [QGVAR(lastDrop), -1000]) + 0.40)) && {_scaledTemperature > 0.1}}) then {
- _unit setVariable [QGVAR(lastDrop), ACE_time];
+if (GVAR(showParticleEffects) && {(CBA_missionTime > ((_unit getVariable [QGVAR(lastDrop), -1000]) + 0.40)) && {_scaledTemperature > 0.1}}) then {
+ _unit setVariable [QGVAR(lastDrop), CBA_missionTime];
private _direction = (_unit weaponDirection _weapon) vectorMultiply 0.25;
private _position = (position _projectile) vectorAdd (_direction vectorMultiply (4*(random 0.30)));
@@ -94,7 +94,7 @@ if (GVAR(showParticleEffects) && {(ACE_time > ((_unit getVariable [QGVAR(lastDro
// Only compute jamming for the local player
if (_unit != ACE_player) exitWith {END_COUNTER(firedEH);};
-_jamChance = _jamChance * ([[0.5, 1.5, 7.5, 37.5], 3 * _scaledTemperature] call EFUNC(common,interpolateFromArray));
+_jamChance = _jamChance * ([[0.5, 1.5, 15, 150], 3 * _scaledTemperature] call EFUNC(common,interpolateFromArray));
// increase jam chance on dusty grounds if prone (and at ground level)
if ((stance _unit == "PRONE") && {((getPosATL _unit) select 2) < 1}) then {
diff --git a/addons/overheating/functions/fnc_handleTakeEH.sqf b/addons/overheating/functions/fnc_handleTakeEH.sqf
index 05139119e5..ffcead342f 100644
--- a/addons/overheating/functions/fnc_handleTakeEH.sqf
+++ b/addons/overheating/functions/fnc_handleTakeEH.sqf
@@ -15,6 +15,8 @@
*/
#include "script_component.hpp"
+if !(GVAR(unJamOnreload)) exitWith {};
+
params ["_unit", "_container", "_item"];
TRACE_3("params",_unit,_container,_item);
diff --git a/addons/overheating/functions/fnc_jamWeapon.sqf b/addons/overheating/functions/fnc_jamWeapon.sqf
index 1580ac240e..f41262c4e9 100644
--- a/addons/overheating/functions/fnc_jamWeapon.sqf
+++ b/addons/overheating/functions/fnc_jamWeapon.sqf
@@ -37,16 +37,19 @@ if (_ammo > 0) then {
[{
params ["_unit", "_weapon", "_ammo"];
_unit setAmmo [_weapon, _ammo];
- }, [_unit, _weapon, _ammo]] call EFUNC(common,execNextFrame);
+ }, [_unit, _weapon, _ammo]] call CBA_fnc_execNextFrame;
};
// only display the hint once, after you try to shoot an already jammed weapon
GVAR(knowAboutJam) = false;
+["ace_weaponJammed", [_unit,_weapon]] call CBA_fnc_localEvent;
+
+
if (_unit getVariable [QGVAR(JammingActionID), -1] == -1) then {
private _condition = {
- [_this select 1] call EFUNC(common,canUseWeapon)
+ [_this select 1] call CBA_fnc_canUseWeapon
&& {currentMuzzle (_this select 1) in ((_this select 1) getVariable [QGVAR(jammedWeapons), []])}
&& {!(currentMuzzle (_this select 1) in ((_this select 1) getVariable [QEGVAR(safemode,safedWeapons), []]))}
};
diff --git a/addons/overheating/functions/fnc_loadCoolestSpareBarrel.sqf b/addons/overheating/functions/fnc_loadCoolestSpareBarrel.sqf
new file mode 100644
index 0000000000..098ad70fcc
--- /dev/null
+++ b/addons/overheating/functions/fnc_loadCoolestSpareBarrel.sqf
@@ -0,0 +1,53 @@
+/*
+ * Author: esteldunedain
+ * Collect the temperature of all the spare barrels a unit has and load the
+ * coolest on the unit weapon. Runs on the server.
+ *
+ * Argument:
+ * 0: Unit that has the spare barrels
+ * 1: Unit that has the weapon
+ * 2: Weapon
+ * 3: Weapon temp before switching
+ * 4: Mass of the removed barrel
+ *
+ * Return value:
+ * None
+ *
+ *
+ * Public: No
+ */
+#include "script_component.hpp"
+
+params ["_assistant", "_gunner", "_weapon", "_weaponTemp", "_barrelMass"];
+TRACE_5("loadCoolestSpareBarrel1",_assistant,_gunner,_weapon,_weaponTemp,_barrelMass);
+
+// Find all spare barrel the player has
+private _allBarrels = [_assistant, "ACE_SpareBarrel"] call CBA_fnc_getMagazineIndex;
+TRACE_1("_allBarrels",_allBarrels);
+if ((count _allBarrels) < 1) exitWith {};
+
+// Determine which on is coolest
+private _coolestTemp = 10000;
+private _coolestMag = _allBarrels select 0;
+{
+ private _temp = 0;
+ if ([GVAR(storedSpareBarrels), _x] call CBA_fnc_hashHasKey) then {
+ _temp = ([GVAR(storedSpareBarrels), _x] call CBA_fnc_hashGet) select 0;
+ };
+ TRACE_2("loadCoolestSpareBarrel4",_x,_temp);
+ if (_temp < _coolestTemp) then {
+ _coolestTemp = _temp;
+ _coolestMag = _x;
+ };
+} forEach _allBarrels;
+TRACE_3("loadCoolestSpareBarrel5",_coolestTemp,_coolestMag,_weaponTemp);
+
+// The new weapon temperature is similar to the coolest barrel
+// Publish the new temperature value
+_gunner setVariable [format [QGVAR(%1_temp), _weapon], _coolestTemp, true];
+
+// Heat up the coolest barrel to the former weapon temperature
+[GVAR(storedSpareBarrels), _coolestMag, [_weaponTemp, CBA_missionTime, _barrelMass]] call CBA_fnc_hashSet;
+
+// Send an event so the machines of the assistant and gunner can show the hint
+[QGVAR(showWeaponTemperature), _gunner], [_gunner, _weapon], [_assistant] call CBA_fnc_targetEvent;
diff --git a/addons/overheating/functions/fnc_overheat.sqf b/addons/overheating/functions/fnc_overheat.sqf
index 8c934e80ad..57a4bd7cba 100644
--- a/addons/overheating/functions/fnc_overheat.sqf
+++ b/addons/overheating/functions/fnc_overheat.sqf
@@ -20,22 +20,47 @@
params ["_unit", "_weapon", "", "", "_ammo", "", "_projectile"];
TRACE_4("params",_unit,_weapon,_ammo,_projectile);
-//Only do heat calculations every 3 bullets
+// Only do heat calculations every 3 bullets
if (((_unit ammo _weapon) % 3) != 0) exitWith {};
BEGIN_COUNTER(overheat);
-// Get physical parameters
-private _bulletMass = getNumber (configFile >> "CfgAmmo" >> _ammo >> "ACE_BulletMass");
-if (_bulletMass == 0) then {
- // If the bullet mass is not configured, estimate it
- _bulletMass = 3.4334 + 0.5171 * (getNumber (configFile >> "CfgAmmo" >> _ammo >> "hit") + getNumber (configFile >> "CfgAmmo" >> _ammo >> "caliber"));
+// Get bullet parameters
+private _bulletMass = GVAR(cacheAmmoData) getVariable _ammo;
+if (isNil "_bulletMass") then {
+ _bulletMass = getNumber (configFile >> "CfgAmmo" >> _ammo >> "ACE_BulletMass");
+ if (_bulletMass == 0) then {
+ // If the bullet mass is not configured, estimate it
+ _bulletMass = 3.4334 + 0.5171 * (getNumber (configFile >> "CfgAmmo" >> _ammo >> "hit") + getNumber (configFile >> "CfgAmmo" >> _ammo >> "caliber"));
+ };
+ GVAR(cacheAmmoData) setVariable [_ammo, _bulletMass];
};
-//https://en.wikipedia.org/wiki/Physics_of_firearms - Projectile motion is roughly equal to Barrel heat
-//Muzzle Engergy = 1/2 * m * v^2 (1/2 * 0.001 g/kg * bulletMass (grams) * v^2)
-//Multiple by 3 becase we only calc every 3rd bullet: (3 * 1/2 * 0.001) = 0.0015
+
+// Projectile motion is roughly equal to Barrel heat
+// Ref: https://en.wikipedia.org/wiki/Physics_of_firearms
+// Muzzle Engergy = 1/2 * m * v^2 = (1/2 * 0.001 g/kg * bulletMass (grams) * v^2)
+// Multiple by 3 becase we only calc every 3rd bullet: (3 * 1/2 * 0.001) = 0.0015
private _energyIncrement = 0.0015 * _bulletMass * (vectorMagnitudeSqr velocity _projectile);
+// Increase overheating depending on how obstrusive is the current supressor,
+// if any. Typical arma supressors have visibleFire=0.5 and audibleFire=0.3,
+// so they produce x2.1 overheating
+private _silencer = switch (_weapon) do {
+ case (primaryWeapon _unit) : {(primaryWeaponItems _unit) select 0};
+ case (handgunWeapon _unit) : {(handgunItems _unit) select 0};
+ default {""};
+};
+if (_silencer != "") then {
+ private _silencerCoef = GVAR(cacheSilencerData) getVariable _silencer;
+ if (isNil "_silencerCoef") then {
+ _silencerCoef = 1 +
+ (1 - getNumber (configFile >> "CfgWeapons" >> _silencer >> "ItemInfo" >> "AmmoCoef" >> "audibleFire")) +
+ (1 - getNumber (configFile >> "CfgWeapons" >> _silencer >> "ItemInfo" >> "AmmoCoef" >> "visibleFire"));
+ GVAR(cacheSilencerData) setVariable [_silencer, _silencerCoef];
+ };
+ _energyIncrement = _energyIncrement * _silencerCoef;
+};
+
TRACE_2("heat",_bulletMass,_energyIncrement);
[_unit, _weapon, _energyIncrement] call FUNC(updateTemperature);
diff --git a/addons/overheating/functions/fnc_sendSpareBarrelsTemperaturesHint.sqf b/addons/overheating/functions/fnc_sendSpareBarrelsTemperaturesHint.sqf
new file mode 100644
index 0000000000..f377d0ba12
--- /dev/null
+++ b/addons/overheating/functions/fnc_sendSpareBarrelsTemperaturesHint.sqf
@@ -0,0 +1,76 @@
+/*
+ * Author: esteldunedain
+ * Collect the temperature of all the spare barrels a unit has and send a hint
+ * to a client. Runs on the server.
+ *
+ * Argument:
+ * 0: Target unit of the hint
+ * 1: Unit that has the spare barrels
+ *
+ * Return value:
+ * None
+ *
+ *
+ * Public: No
+ */
+#include "script_component.hpp"
+
+params ["_player","_unit"];
+
+// Find all spare barrel the player has
+TRACE_2("sendSpareBarrelsTemperatureHunt",_player,_unit);
+private _allBarrels = [_unit, "ACE_SpareBarrel"] call CBA_fnc_getMagazineIndex;
+TRACE_1("_allBarrels",_allBarrels);
+if ((count _allBarrels) < 1) exitWith {};
+
+// Determine the temp of each barrel
+private _temps = [];
+{
+ private _temp = 0;
+ if ([GVAR(storedSpareBarrels), _x] call CBA_fnc_hashHasKey) then {
+ _temp = ([GVAR(storedSpareBarrels), _x] call CBA_fnc_hashGet) select 0;
+ };
+ _temps pushBack _temp;
+} forEach _allBarrels;
+TRACE_1("_temps",_temps);
+
+// Count cool
+private _countCool = {_x < 20} count _temps;
+private _countWarm = {(_x >= 20) && (_x < 100)} count _temps;
+private _countHot = {(_x >= 100) && (_x < 200)} count _temps;
+private _countVeryHot = {(_x >= 200) && (_x < 600)} count _temps;
+private _countExtremelyHot = {_x >= 600} count _temps;
+private _output = ["%1 %2%3%4 %5%6%7 %8%9%10 %11%12%13 %14"];
+private _size = 1.0;
+if (_countCool > 0) then {
+ _output pushBack _countCool;
+ _output pushBack LSTRING(BarrelCool);
+ _output pushBack " ";
+ _size = _size + 0.5;
+};
+if (_countWarm > 0) then {
+ _output pushBack _countWarm;
+ _output pushBack LSTRING(BarrelWarm);
+ _output pushBack " ";
+ _size = _size + 0.5;
+};
+if (_countHot > 0) then {
+ _output pushBack _countHot;
+ _output pushBack LSTRING(BarrelHot);
+ _output pushBack " ";
+ _size = _size + 0.5;
+};
+if (_countVeryHot > 0) then {
+ _output pushBack _countVeryHot;
+ _output pushBack LSTRING(BarrelVeryHot);
+ _output pushBack " ";
+ _size = _size + 0.5;
+};
+if (_countExtremelyHot > 0) then {
+ _output pushBack _countExtremelyHot;
+ _output pushBack LSTRING(BarrelExtremelyHot);
+ _size = _size + 0.5;
+};
+
+TRACE_1("_output",_output);
+[QEGVAR(common,displayTextStructured), [_output, _size, _player], [_player]] call CBA_fnc_targetEvent;
diff --git a/addons/overheating/functions/fnc_swapBarrel.sqf b/addons/overheating/functions/fnc_swapBarrel.sqf
index bbdab91705..a63ef5a36a 100644
--- a/addons/overheating/functions/fnc_swapBarrel.sqf
+++ b/addons/overheating/functions/fnc_swapBarrel.sqf
@@ -3,29 +3,35 @@
* Make a unit start swapping it's barrel
*
* Argument:
- * 0: Unit
- * 1: Weapon
+ * 0: Unit initiating the action
+ * 1: Unit that has the weapon
+ * 2: Weapon
*
* Return value:
* None
*
* Example:
- * [player, currentWeapon player] call ace_overheating_fnc_swapBarrel
+ * [cursorTarget, player, currentWeapon player] call ace_overheating_fnc_swapBarrel
*
* Public: No
*/
#include "script_component.hpp"
-params ["_player", "_weapon"];
-TRACE_2("params",_player,_weapon);
+params ["_assistant", "_gunner", "_weapon"];
+TRACE_3("params",_assistant,_gunner,_weapon);
// Make the standing player kneel down
-if (stance _player != "PRONE") then {
- [_player, "amovpknlmstpsraswrfldnon", 1] call EFUNC(common,doAnimation);
+if (stance _gunner != "PRONE") then {
+ [_gunner, "amovpknlmstpsraswrfldnon", 1] call EFUNC(common,doAnimation);
};
// Barrel dismount gesture
-_player playActionNow QGVAR(GestureDismountMuzzle);
+_gunner playActionNow QGVAR(GestureDismountMuzzle);
playSound "ACE_BarrelSwap";
-[5, [_player, _weapon], {(_this select 0) call FUNC(swapBarrelCallback)}, {}, (localize LSTRING(SwappingBarrel))] call EFUNC(common,progressBar);
+private _duration = 3.0;
+if (_assistant isEqualTo _gunner) then {
+ _duration = 5.0;
+};
+
+[_duration, [_assistant,_gunner,_weapon], {(_this select 0) call FUNC(swapBarrelCallback)}, {}, (localize LSTRING(SwappingBarrel))] call EFUNC(common,progressBar);
diff --git a/addons/overheating/functions/fnc_swapBarrelAssistant.sqf b/addons/overheating/functions/fnc_swapBarrelAssistant.sqf
new file mode 100644
index 0000000000..dd6d51d109
--- /dev/null
+++ b/addons/overheating/functions/fnc_swapBarrelAssistant.sqf
@@ -0,0 +1,33 @@
+/*
+ * Author: esteldunedain, Commy2
+ * Make a unit start swapping the barrel of another unit
+ *
+ * Argument:
+ * 0: Unit initiating the action
+ * 1: Unit that has the weapon
+ * 2: Weapon
+ *
+ * Return value:
+ * None
+ *
+ * Example:
+ * [player, cursorTarget, currentWeapon cursorTarget] call ace_overheating_fnc_swapBarrelAssistant
+ *
+ * Public: No
+ */
+#include "script_component.hpp"
+
+params ["_assistant", "_gunner", "_weapon"];
+TRACE_3("params",_assistant,_gunner,_weapon);
+
+// Make the standing player kneel down
+if (stance _assistant != "PRONE") then {
+ [_assistant, "amovpknlmstpsraswrfldnon", 1] call EFUNC(common,doAnimation);
+};
+
+// Barrel dismount gesture
+playSound "ACE_BarrelSwap";
+
+[3, [_assistant, _gunner, _weapon], {}, {}, (localize LSTRING(SwappingBarrel))] call EFUNC(common,progressBar);
+
+[QGVAR(initiateSwapBarrelAssisted), [_assistant, _gunner, _weapon], _gunner] call CBA_fnc_targetEvent;
diff --git a/addons/overheating/functions/fnc_swapBarrelCallback.sqf b/addons/overheating/functions/fnc_swapBarrelCallback.sqf
index 9c62e77f21..a136828b70 100644
--- a/addons/overheating/functions/fnc_swapBarrelCallback.sqf
+++ b/addons/overheating/functions/fnc_swapBarrelCallback.sqf
@@ -1,10 +1,11 @@
/*
- * Author: Commy2
+ * Author: Commy2, esteldunedain
* Swap barrel callback
*
* Argument:
- * 0: Unit
- * 1: Weapon
+ * 0: Unit initiating the action
+ * 1: Unit that has the weapon
+ * 2: Weapon
*
* Return value:
* None
@@ -14,19 +15,29 @@
*
* Public: No
*/
+// #define DEBUG_MODE_FULL
#include "script_component.hpp"
-params ["_player", "_weapon"];
-TRACE_2("params",_player,_weapon);
+params ["_assistant", "_gunner", "_weapon"];
+TRACE_3("params",_assistant,_gunner,_weapon);
-// Barrel mount gesture
-_player playAction QGVAR(GestureMountMuzzle);
-playSound "ACE_BarrelSwap";
+if (_assistant isEqualTo _gunner) then {
+ // Barrel mount gesture
+ _gunner playAction QGVAR(GestureMountMuzzle);
+ playSound "ACE_BarrelSwap";
+};
// don't consume the barrel, but rotate through them.
-[localize LSTRING(SwappedBarrel), QUOTE(PATHTOF(UI\spare_barrel_ca.paa))] call EFUNC(common,displayTextPicture);
+[localize LSTRING(SwappedBarrel), QPATHTOF(UI\spare_barrel_ca.paa)] call EFUNC(common,displayTextPicture);
+
+private _temp = _gunner getVariable [format [QGVAR(%1_temp), _weapon], 0];
+private _barrelMass = 0.50 * (getNumber (configFile >> "CfgWeapons" >> _weapon >> "WeaponSlotsInfo" >> "mass") / 22.0) max 1.0;
+
+// Instruct the server to load the coolest spare barrel into the weapon and
+// store the removed barrel with the former weapon temperature. The server
+// also updates the current weapon temperature to match that of the new
+// loaded barrel.
+[QGVAR(spareBarrelsLoadCoolest), [_assistant, _gunner, _weapon, _temp, _barrelMass]] call CBA_fnc_serverEvent;
-// Publish the temperature variable
-_player setVariable [format [QGVAR(%1_temp), _weapon], 0, true];
// Store the update time
-_player setVariable [format [QGVAR(%1_time), _weapon], ACE_time];
+_gunner setVariable [format [QGVAR(%1_time), _weapon], CBA_missionTime];
diff --git a/addons/overheating/functions/fnc_updateSpareBarrelsTemperaturesThread.sqf b/addons/overheating/functions/fnc_updateSpareBarrelsTemperaturesThread.sqf
new file mode 100644
index 0000000000..602de01c3b
--- /dev/null
+++ b/addons/overheating/functions/fnc_updateSpareBarrelsTemperaturesThread.sqf
@@ -0,0 +1,40 @@
+/*
+ * Author: esteldunedain
+ * Calculate cooldown of all the stored spare barrels.
+ *
+ * Argument:
+ * None
+ *
+ * Return value:
+ * None
+ *
+ * Example:
+ * [] call ace_overheating_fnc_updateSpareBarrelsTemperaturesThread
+ *
+ * Public: No
+ */
+// #define DEBUG_MODE_FULL
+#include "script_component.hpp"
+
+private _pairs = [];
+TRACE_1("updateSpareBarrelsTemperaturesThread1",GVAR(storedSpareBarrels));
+[GVAR(storedSpareBarrels), {_pairs pushBack [_key, _value];}] call CBA_fnc_hashEachPair;
+TRACE_1("updateSpareBarrelsTemperaturesThread2",_pairs);
+{
+ _x params ["_barrelMagazineID","_value"];
+ _value params ["_initialTemp","_initialTime", "_barrelMass"];
+
+ // Calculate cooling
+ private _finalTemp = [_initialTemp, _barrelMass, CBA_missionTime - _initialTime] call FUNC(calculateCooling);
+ TRACE_4("updateSpareBarrelsTemperaturesThread3",_barrelMagazineID,_initialTemp,_finalTemp,_barrelMass);
+ if (_finalTemp < 5) then {
+ // The barrel is cool enough to keep calculating. Remove it from the hash
+ [GVAR(storedSpareBarrels), _barrelMagazineID] call CBA_fnc_hashRem;
+ } else {
+ // Store the new temp
+ [GVAR(storedSpareBarrels), _barrelMagazineID, [_finalTemp, CBA_missionTime, _barrelMass]] call CBA_fnc_hashSet;
+ };
+} forEach _pairs;
+
+// Schedule for execution again after 10 seconds
+[DFUNC(updateSpareBarrelsTemperaturesThread), [], 10] call CBA_fnc_waitAndExecute;
diff --git a/addons/overheating/functions/fnc_updateTemperature.sqf b/addons/overheating/functions/fnc_updateTemperature.sqf
index 89d5975024..d5e29a150b 100644
--- a/addons/overheating/functions/fnc_updateTemperature.sqf
+++ b/addons/overheating/functions/fnc_updateTemperature.sqf
@@ -29,50 +29,9 @@ private _lastTime = _unit getVariable [_timeVarName, 0];
private _barrelMass = 0.50 * (getNumber (configFile >> "CfgWeapons" >> _weapon >> "WeaponSlotsInfo" >> "mass") / 22.0) max 1.0;
-_fnc_cooling = {
- params ["_temperature", "_barrelMass", "_totalTime"];
-
- // If a long time passed since the last shot, there's no need to calculate anything; the weapon should be cool
- if (_totalTime > 1800) exitWith {0};
-
- //AR-15 (0.00570m bullet diameter) (barrel diameter usually 0.75" or 0.008255m radius)
- //Steel Denisty = 7850 m^3 / kg
- //Area of a cylinder (2/r)*(Pi * r^3 + V) - for a 0.008255m radius barrel -> Area = 210(1/meters) * Volume
- //Adjusted volume for being hollowed out is ~1.1x
- //So Area = 210 * 1.1 * (mass / 7850) = mass * 0.029427 (for steel near that diameter)
-
- private _barrelSurface = _barrelMass * 0.029427;
-
- TRACE_4("cooling",_temperature,_totalTime,_barrelMass,_barrelSurface);
-
- private _time = 0;
- while {true} do {
- private _deltaTime = (_totalTime - _time) min 20;
-
- _temperature = _temperature - (
- // Convective cooling
- 25 * _barrelSurface * _temperature
- // Radiative cooling
- + 0.4 * 5.67e-8 * _barrelSurface *
- ( (_temperature + 273.15)*(_temperature + 273.15)
- * (_temperature + 273.15)*(_temperature + 273.15)
- - 273.15 * 273.15 * 273.15 *273.15 )
- ) * _deltaTime / (_barrelMass * 466);
-
- if (_temperature < 1) exitWith {0};
-
- if (isNil "_temperature") exitWith {
- diag_log text format ["[ACE] ERROR: _totalTime = %1; _time = %2; _deltaTime = %3;", _totalTime, _time, _deltaTime];
- 0
- };
-
- _time = _time + _deltaTime;
- if (_time >= _totalTime) exitWith { _temperature max 0 };
- };
-};
-
// Calculate cooling
-_temperature = [_temperature, _barrelMass, ACE_time - _lastTime] call _fnc_cooling;
+_temperature = [_temperature, _barrelMass, CBA_missionTime - _lastTime] call FUNC(calculateCooling);
+
TRACE_1("cooledTo",_temperature);
// Calculate heating
// Steel Heat Capacity = 466 J/(Kg.K)
@@ -81,6 +40,6 @@ _temperature = _temperature + _heatIncrement / (_barrelMass * 466);
// Publish the temperature variable
[_unit, _tempVarName, _temperature, TEMP_TOLERANCE] call EFUNC(common,setApproximateVariablePublic);
// Store the update time locally
-_unit setVariable [_timeVarName, ACE_time];
+_unit setVariable [_timeVarName, CBA_missionTime];
_temperature
diff --git a/addons/overheating/functions/fnc_updateTemperatureThread.sqf b/addons/overheating/functions/fnc_updateTemperatureThread.sqf
index 76a332e480..476ff3e352 100644
--- a/addons/overheating/functions/fnc_updateTemperatureThread.sqf
+++ b/addons/overheating/functions/fnc_updateTemperatureThread.sqf
@@ -22,4 +22,4 @@ if ((_currentWeapon != "") && {_currentWeapon == primaryWeapon ACE_player || {_c
};
// Schedule for execution again after 5 seconds
-[DFUNC(updateTemperatureThread), [], 5] call EFUNC(common,waitAndExecute);
+[DFUNC(updateTemperatureThread), [], 5] call CBA_fnc_waitAndExecute;
diff --git a/addons/overheating/stringtable.xml b/addons/overheating/stringtable.xml
index 646a24fb88..07fdedd681 100644
--- a/addons/overheating/stringtable.xml
+++ b/addons/overheating/stringtable.xml
@@ -27,21 +27,98 @@
Overheating Particle Effects
+ Partikeleffekt bei Überhitzung
+ Efekty cząsteczkowe przegrzania
+ Effetti Particelle Surriscaldamento
+ Efectos de partículas
+ Effet de surchauffe
+ Částicové efekty přehřívání
+ Efeito de parícula de superaquecimento
Show particle effects when weapon overheats
+ Zeige einen Partikeleffekt, wenn die Waffe überhitzt.
+ Pokaż efekty cząsteczkowe kiedy broń się przegrzeje
+ Mostra effetti particellari quando l'arma si surriscalda
+ Muestra efectos de partículas cuando el arma del jugador se sobreacalienta
+ Montrer les effets lorsque l'arme surchauffe.
+ Mostra efeitos de párticula quando a arma superaquece
Overheating Particle Effects for everyone
+ Zeige Partikeleffekt bei Überhitzung für jeden
+ Pokaż efekty cząsteczkowe dla wszystkich
+ Effetti Particellari Surriscaldamento per tutti
+ Efectos de partículas para todos
+ Effets de surchauffe pour tout le monde.
+ Částicové efekty přehřívání pro všechny
+ Efeito de partícula de superaquecimento para todos
Show particle effects when other players weapon overheats
+ Zeigt Partikeleffekt auch bei überhitzten Waffen von Mitspielern.
+ Pokazuje efekty cząsteczkowe kiedy broń innego gracza się przegrzeje
+ Mostra effetti particellari quando l'arma di altri giocatori si surriscalda
+ Muestra efectos de partículas cuando el arma de jugadores cercanos se sobreacalienta
+ Montrer les effets de surchauffe des autres joueurs.
+ Mostra efeito de partículas quando a arma de outros jogadores superaquece
Overheating Dispersion
+ Streuung bei Überhitzung
+ Wpływ na rozrzut
+ Dispersione Surriscaldamento
+ Dispersión
+ Disperssion dûe à la surchauffe
+ Disperção de superaquecimento
Overheated weapons will be less accurate and have decreased muzzle velocity. Applys for all players.
+ Überhitzte Waffen sind weniger genau und verfügen über eine geringere Mündungsgeschwindigkeit. Wird bei allen Spielern angewendet.
+ Przegrzane bronie będą mniej celne oraz będą miały zmniejszoną prędkość pocisku. Wpływa na wszystkich graczy.
+ Armi surriscaldate saranno meno precise ed avranno una ridotta velocità alla volata. Applica per tutti i giocatori.
+ Las armas sobrecalentadas pierden precisión y tienen una velocidad de disparo reducida. Se aplica a todos los jugadores.
+ Les armes en surchauffe seront moins précises et auront une vitesse en sortie de bouche plus faible. S'applique pour tous les joueurs.
+ Armas superaquecidas irão ser menos precisas e ter velocidade de disparo reduzidas. Aplica a todos os jogadores.
+
+
+ Unjam weapon on reload
+ Behebt Ladehemmung beim Nachladen
+ Desencasquillar el arma al recargar.
+ Usuń zacięcie przy przeładowaniu
+ Des-enrayer l'arme au rechargement.
+ Disinceppa l'arma quando si ricarica
+ Uvolnit zbraň při přebití
+ Desemperrar arma no recarregamento
+
+
+ Reloading clears a weapon jam.
+ Nachladen behebt eine Ladehemmung.
+ Recargar el arma la desencasquilla.
+ Przeładowywanie usuwa zacięcie
+ Recharger vide la chambre de l'arme
+ L'arma si disinceppa quando si ricarica
+ Přebití uvolní zaseknutou zbraň.
+ Recarregar desemperra arma.
+
+
+ Chance of unjam failing
+ Wahrscheinlichkeit, dass Ladehemmung nicht behoben wird
+ Probabilidad de falla al desencasquillar.
+ Szansa na porażkę usuw. zacięcia
+ Chance de rater le des-enrayement
+ Probabilità di sbagliare a disinceppare l'arma
+ Šance, že uvolnění zbraně selže
+ Chance de falha de desemperramento
+
+
+ Probability that an unjam action might fail, requiring to be repeated.
+ Wahrscheinlichkeit, dass der Versuch eine Ladehemmung zu beheben fehl schlägt und erneut durchgeführt werden muss.
+ Probabilidad de que el proceso de desencasquille falle, teniendo que repetirlo.
+ Szansa na to, że przy przeładowaniu broni zacięcie nie zostanie usunięte, przez co czynność będzie musiała zostać powtórzona ponownie.
+ Probabilité qu'une action de des-enrayement échoue, nécessitant de recommencer.
+ Probabilità che si possa sbagliare a caso a disinceppare l'arma. Richiede di ripetere.
+ Probabilidade que uma ação de desemperramento falhe, tendo que ser repetida
Spare barrel
@@ -103,6 +180,16 @@
Arma destravada
Arma pronta al fuoco
+
+ Jam failed to clear
+ Ladehemmung nicht behoben
+ Falló el desencasquillado
+ Porażka przy usuwaniu zacięcia
+ Toujours enrayé !
+ Non si è disinceppata!
+ Zbrań se nepodařilo uvolnit
+ Falha no desemperramento
+
Swap barrel
Lauf wechseln
@@ -116,16 +203,16 @@
Sostiuisci la canna
- Swapping barrel ...
- Lauf wird gewechselt ...
- Cambiando el cañón ...
- Wymienianie lufy ...
- Vyměňuji hlaveň ...
- Changement du canon ...
- Смена ствола ...
- Cső kicserélése folyamatban ...
- Substituindo cano ...
- Sto sostituendo la canna ...
+ Swapping barrel...
+ Lauf wird gewechselt...
+ Cambiando el cañón...
+ Wymienianie lufy...
+ Měním hlaveň...
+ Changement du canon...
+ Смена ствола...
+ Cső kicserélése folyamatban...
+ Substituindo cano...
+ Sto sostituendo la canna...
Swapped barrel
@@ -146,7 +233,7 @@
Sprawdź temperaturę broni
Vérifier la température de l'arme
Fegyver hőmérsékletének ellenőrzése
- Zjistit teplotu zbraně
+ Zkontrolovat teplotu zbraně
Conferir temperatura da arma
Controlla la temperatura della canna
Проверить температуру оружия
@@ -164,16 +251,24 @@
Controlla la temperatura della canna
- Checking temperature ...
- Prüfe Temperatur ...
- Verificando temperatura ...
- Sprawdzanie temperatury ...
- Vérification de la température ...
- Hőmérséklet ellenőrzése ...
- Zjišťuju teplotu ...
- Conferindo temperatura ...
- Sto controllando la temperatura ...
- Проверка температуры ...
+ Checking temperature...
+ Prüfe Temperatur...
+ Verificando temperatura...
+ Sprawdzanie temperatury...
+ Vérification de la température...
+ Hőmérséklet ellenőrzése...
+ Zjišťuju teplotu...
+ Conferindo temperatura...
+ Sto controllando la temperatura...
+ Проверка температуры...
+
+
+ Check spare barrels temperatures
+ Verifica temperatura de canos reservas
+
+
+ Checking spare barrels temperatures...
+ Verificando temperatura de canos reservas
Temperature
@@ -187,5 +282,35 @@
Temperatura
Температура
+
+ Cool Spare Barrel/s
+ Cano/s reserva/s frio/s
+
+
+ Warm Spare Barrel/s
+ Cano/s reserva/s morno/s
+
+
+ Hot Spare Barrel/s
+ Cano/s reserva/s quente/s
+
+
+ Very Hot Spare Barrel/s
+ Cano/s reserva/s muito quente/s
+
+
+ Extremely Hot Spare Barrel/s
+ Cano/s reserva/s extremamente quente/s
+
+
+ Overheating Enabled
+ Überhitzen Aktiviert
+ Activada Sobrecalentamiento
+ Superaquecimento ativado
+
+
+ Master enable for the overheating/jamming module
+ Chave mestra para o módulo de superaquecimento/emperramento
+
-
+
\ No newline at end of file
diff --git a/addons/overpressure/CfgEventHandlers.hpp b/addons/overpressure/CfgEventHandlers.hpp
index 0cd959a047..becf395052 100644
--- a/addons/overpressure/CfgEventHandlers.hpp
+++ b/addons/overpressure/CfgEventHandlers.hpp
@@ -1,4 +1,10 @@
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
diff --git a/addons/overpressure/XEH_PREP.hpp b/addons/overpressure/XEH_PREP.hpp
new file mode 100644
index 0000000000..1efd39d6e5
--- /dev/null
+++ b/addons/overpressure/XEH_PREP.hpp
@@ -0,0 +1,6 @@
+
+PREP(getDistance);
+PREP(overpressureDamage);
+PREP(cacheOverPressureValues);
+PREP(firedEHOP);
+PREP(firedEHBB);
diff --git a/addons/overpressure/XEH_postInit.sqf b/addons/overpressure/XEH_postInit.sqf
index f7f0bc2ace..dd74ec5c3a 100644
--- a/addons/overpressure/XEH_postInit.sqf
+++ b/addons/overpressure/XEH_postInit.sqf
@@ -1,7 +1,7 @@
#include "script_component.hpp"
-["overpressure", FUNC(overpressureDamage)] call EFUNC(common,addEventHandler);
+["ace_overpressure", FUNC(overpressureDamage)] call CBA_fnc_addEventHandler;
// Register fire event handler
-["firedPlayer", DFUNC(firedEHBB)] call EFUNC(common,addEventHandler);
-["firedPlayerVehicle", DFUNC(firedEHOP)] call EFUNC(common,addEventHandler);
+["ace_firedPlayer", DFUNC(firedEHBB)] call CBA_fnc_addEventHandler;
+["ace_firedPlayerVehicle", DFUNC(firedEHOP)] call CBA_fnc_addEventHandler;
diff --git a/addons/overpressure/XEH_preInit.sqf b/addons/overpressure/XEH_preInit.sqf
index 37f44a2e9a..a7feade1c3 100644
--- a/addons/overpressure/XEH_preInit.sqf
+++ b/addons/overpressure/XEH_preInit.sqf
@@ -2,9 +2,6 @@
ADDON = false;
-PREP(getDistance);
-PREP(overpressureDamage);
-PREP(cacheOverPressureValues);
-PREP(firedEHOP);
-PREP(firedEHBB);
+#include "XEH_PREP.hpp"
+
ADDON = true;
diff --git a/addons/overpressure/XEH_preStart.sqf b/addons/overpressure/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/overpressure/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/overpressure/config.cpp b/addons/overpressure/config.cpp
index 0524f6e4c9..f4b5fdf951 100644
--- a/addons/overpressure/config.cpp
+++ b/addons/overpressure/config.cpp
@@ -6,11 +6,16 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
- author[] = {"commy2","KoffeinFlummi","esteldunedain"};
- authorUrl = "https://github.com/commy2/";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"commy2","KoffeinFlummi","esteldunedain"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
#include "CfgEventHandlers.hpp"
#include "CfgWeapons.hpp"
+
+class ACE_newEvents {
+ overpressure = "ace_overpressure";
+};
diff --git a/addons/overpressure/functions/fnc_firedEHBB.sqf b/addons/overpressure/functions/fnc_firedEHBB.sqf
index 8dc15e0f0a..aa2997d0e7 100644
--- a/addons/overpressure/functions/fnc_firedEHBB.sqf
+++ b/addons/overpressure/functions/fnc_firedEHBB.sqf
@@ -37,7 +37,7 @@ private _direction = [0, 0, 0] vectorDiff (vectorDir _projectile);
private _affected = (ASLtoAGL _position) nearEntities ["CAManBase", _backblastRange];
// Let each client handle their own affected units
-["overpressure", _affected, [_unit, _position, _direction, _weapon, _magazine, _ammo]] call EFUNC(common,targetEvent);
+["ace_overpressure", [_unit, _position, _direction, _weapon, _magazine, _ammo], _affected] call CBA_fnc_targetEvent;
// Damage to the firer
private _distance = 2 * ([_position, _direction, _backblastRange, _unit] call FUNC(getDistance));
diff --git a/addons/overpressure/functions/fnc_firedEHOP.sqf b/addons/overpressure/functions/fnc_firedEHOP.sqf
index dff9215a52..b8c47a826b 100644
--- a/addons/overpressure/functions/fnc_firedEHOP.sqf
+++ b/addons/overpressure/functions/fnc_firedEHOP.sqf
@@ -40,7 +40,7 @@ private _direction = vectorDir _projectile;
private _affected = (ASLtoAGL _position) nearEntities ["CAManBase", _dangerZoneRange];
// Let each client handle their own affected units
-["overpressure", _affected, [_unit, _position, _direction, _weapon, _magazine, _ammo]] call EFUNC(common,targetEvent);
+["ace_overpressure", [_unit, _position, _direction, _weapon, _magazine, _ammo], _affected] call CBA_fnc_targetEvent;
// Draw debug lines
#ifdef DEBUG_MODE_FULL
diff --git a/addons/overpressure/functions/fnc_getDistance.sqf b/addons/overpressure/functions/fnc_getDistance.sqf
index 341da388ca..616feb8660 100644
--- a/addons/overpressure/functions/fnc_getDistance.sqf
+++ b/addons/overpressure/functions/fnc_getDistance.sqf
@@ -30,7 +30,7 @@ private _distance = 999;
{
_x params ["_intersectPosASL", "_surfaceNormal", "_intersectObject"];
TRACE_3("Intersect",_intersectPosASL,_surfaceNormal,_intersectObject);
-
+
//Hit something solid that can reflect - (Static covers Building) [Need to manually filter out _shoot for FFV shots]
if ((isNull _intersectObject) || {(_intersectObject != _shooter) && {(_intersectObject isKindOf "Static") || {_intersectObject isKindOf "AllVehicles"}}}) exitWith {
_distance = _posASL vectorDistance _intersectPosASL;
diff --git a/addons/parachute/CfgEventHandlers.hpp b/addons/parachute/CfgEventHandlers.hpp
index 7a1f8119ca..f972afc2ca 100644
--- a/addons/parachute/CfgEventHandlers.hpp
+++ b/addons/parachute/CfgEventHandlers.hpp
@@ -1,17 +1,26 @@
+
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
};
};
+
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
};
};
+
class Extended_Respawn_EventHandlers {
class CAManBase {
class ADDON {
respawn = QUOTE(call COMPILE_FILE(XEH_respawn));
};
};
-};
\ No newline at end of file
+};
diff --git a/addons/parachute/CfgVehicles.hpp b/addons/parachute/CfgVehicles.hpp
index c0f1676eb2..e734962a0e 100644
--- a/addons/parachute/CfgVehicles.hpp
+++ b/addons/parachute/CfgVehicles.hpp
@@ -19,7 +19,7 @@ class CfgVehicles {
statement = QUOTE([_player] call FUNC(cutParachute));
showDisabled = 0;
priority = 2.9;
- icon = QUOTE(PATHTOF(UI\cut_ca.paa));
+ icon = QPATHTOF(UI\cut_ca.paa);
};
};
};
@@ -83,7 +83,8 @@ class CfgVehicles {
//model = "\A3\Weapons_F\Ammoboxes\Bags\Backpack_Parachute"; // @todo
// backpackSimulation = "ParachuteNonSteerable"; //ParachuteSteerable //Bis broke this in 1.40
ParachuteClass = "NonSteerable_Parachute_F";
- MACRO_HASRESERVE
+ ace_hasReserveParachute = 1;
+ ace_reserveParachute = "ACE_NonSteerableReserveParachute";
maximumLoad = 0;
mass = 100;
};
@@ -93,10 +94,14 @@ class CfgVehicles {
displayName = CSTRING(ReserveParachute);
scope = 1;
mass = 70;
- ParachuteClass = "NonSteerable_Parachute_F";
+ ParachuteClass = "Steerable_Parachute_F";
ace_reserveParachute = "";
ace_hasReserveParachute = 0;
};
+
+ class ACE_NonSteerableReserveParachute: ACE_ReserveParachute {
+ ParachuteClass = "NonSteerable_Parachute_F";
+ };
class B_Soldier_05_f; class B_Pilot_F: B_Soldier_05_f {backpack = "ACE_NonSteerableParachute";};
class I_Soldier_04_F; class I_pilot_F: I_Soldier_04_F {backpack = "ACE_NonSteerableParachute";};
diff --git a/addons/parachute/CfgWeapons.hpp b/addons/parachute/CfgWeapons.hpp
index 4ca785a1ea..b5dad94425 100644
--- a/addons/parachute/CfgWeapons.hpp
+++ b/addons/parachute/CfgWeapons.hpp
@@ -6,6 +6,6 @@ class CfgWeapons {
author = ECSTRING(common,ACETeam);
descriptionShort = CSTRING(AltimeterDescription);
displayName = CSTRING(AltimeterDisplayName);
- picture = PATHTOF(UI\watch_altimeter.paa);
+ picture = QPATHTOF(UI\watch_altimeter.paa);
};
};
diff --git a/addons/parachute/RscTitles.hpp b/addons/parachute/RscTitles.hpp
index c6f41a7362..277db4d2f9 100644
--- a/addons/parachute/RscTitles.hpp
+++ b/addons/parachute/RscTitles.hpp
@@ -12,7 +12,7 @@ class RscTitles {
class controls {
class AltimeterImage: RscPicture {
idc = 1200;
- text = PATHTOF(UI\watch_altimeter.paa);
+ text = QPATHTOF(UI\watch_altimeter.paa);
x = 0.118437 * safezoneW + safezoneX;
y = 0.621 * safezoneH + safezoneY;
w = 0.20625 * safezoneW;
diff --git a/addons/parachute/XEH_PREP.hpp b/addons/parachute/XEH_PREP.hpp
new file mode 100644
index 0000000000..c2567b8468
--- /dev/null
+++ b/addons/parachute/XEH_PREP.hpp
@@ -0,0 +1,9 @@
+
+PREP(doLanding);
+PREP(handleInfoDisplayChanged);
+PREP(hideAltimeter);
+PREP(onEachFrame);
+PREP(showAltimeter);
+PREP(cutParachute);
+PREP(checkCutParachute);
+PREP(storeParachute);
diff --git a/addons/parachute/XEH_postInit.sqf b/addons/parachute/XEH_postInit.sqf
index 598661a3da..799acf92b6 100644
--- a/addons/parachute/XEH_postInit.sqf
+++ b/addons/parachute/XEH_postInit.sqf
@@ -33,15 +33,14 @@ if (!hasInterface) exitWith {};
[24, [false, false, false]], false] call CBA_fnc_addKeybind;
GVAR(PFH) = false;
-["playerVehicleChanged",{
+["ace_playerVehicleChanged",{
if (!GVAR(PFH) && {(vehicle ACE_player) isKindOf "ParachuteBase"}) then {
GVAR(PFH) = true;
[FUNC(onEachFrame), 0.1, []] call CALLSTACK(CBA_fnc_addPerFrameHandler);
};
-}] call EFUNC(common,addEventHandler);
+}] call CBA_fnc_addEventHandler;
// don't show speed and height when in expert mode
-["infoDisplayChanged", {_this call FUNC(handleInfoDisplayChanged)}] call EFUNC(common,addEventHandler);
+["ace_infoDisplayChanged", {_this call FUNC(handleInfoDisplayChanged)}] call CBA_fnc_addEventHandler;
-//[ACE_Player,([ACE_player] call EFUNC(common,getAllGear))] call FUNC(storeParachute);
-["playerInventoryChanged", FUNC(storeParachute) ] call EFUNC(common,addEventHandler);
+["ace_playerInventoryChanged", FUNC(storeParachute)] call CBA_fnc_addEventHandler;
diff --git a/addons/parachute/XEH_preInit.sqf b/addons/parachute/XEH_preInit.sqf
index 7bc0823215..bffa5623b8 100644
--- a/addons/parachute/XEH_preInit.sqf
+++ b/addons/parachute/XEH_preInit.sqf
@@ -17,12 +17,6 @@
ADDON = false;
-PREP(doLanding);
-PREP(handleInfoDisplayChanged);
-PREP(hideAltimeter);
-PREP(onEachFrame);
-PREP(showAltimeter);
-PREP(cutParachute);
-PREP(checkCutParachute);
-PREP(storeParachute);
+#include "XEH_PREP.hpp"
+
ADDON = true;
diff --git a/addons/parachute/XEH_preStart.sqf b/addons/parachute/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/parachute/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/parachute/config.cpp b/addons/parachute/config.cpp
index 3671177e28..dec722ea96 100644
--- a/addons/parachute/config.cpp
+++ b/addons/parachute/config.cpp
@@ -7,8 +7,9 @@ class CfgPatches {
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
VERSION_CONFIG;
- author[] = {"Garth 'LH' de Wet"};
- authorUrl = "http://garth.snakebiteink.co.za/";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"Garth 'LH' de Wet"};
+ url = ECSTRING(main,URL);
};
};
diff --git a/addons/parachute/functions/fnc_doLanding.sqf b/addons/parachute/functions/fnc_doLanding.sqf
index cc32724e9d..213bf10887 100644
--- a/addons/parachute/functions/fnc_doLanding.sqf
+++ b/addons/parachute/functions/fnc_doLanding.sqf
@@ -20,8 +20,8 @@ GVAR(PFH) = false;
[_unit, "AmovPercMevaSrasWrflDf_AmovPknlMstpSrasWrflDnon", 2] call EFUNC(common,doAnimation);
_unit setVariable [QGVAR(chuteIsCut), false, true];
[{
- if (ACE_time >= ((_this select 0) select 0) + 1) then {
+ if (CBA_missionTime >= ((_this select 0) select 0) + 1) then {
((_this select 0) select 1) playActionNow "Crouch";
[(_this select 1)] call CALLSTACK(CBA_fnc_removePerFrameHandler);
};
-}, 1, [ACE_time,_unit]] call CALLSTACK(CBA_fnc_addPerFrameHandler);
+}, 1, [CBA_missionTime,_unit]] call CALLSTACK(CBA_fnc_addPerFrameHandler);
diff --git a/addons/parachute/functions/fnc_showAltimeter.sqf b/addons/parachute/functions/fnc_showAltimeter.sqf
index 466abfb77e..b8ee8add6d 100644
--- a/addons/parachute/functions/fnc_showAltimeter.sqf
+++ b/addons/parachute/functions/fnc_showAltimeter.sqf
@@ -37,7 +37,7 @@ GVAR(AltimeterActive) = true;
_minute = floor ((daytime - _hour) * 60);
_height = ((getPosASL _unit) select 2) + EGVAR(common,mapAltitude);
- _curTime = ACE_time;
+ _curTime = CBA_missionTime;
_timeDiff = _curTime - _prevTime;
_descentRate = if(_timeDiff > 0) then {floor((_oldHeight - _height) / _timeDiff)} else {0};
@@ -47,4 +47,4 @@ GVAR(AltimeterActive) = true;
(_this select 0) set [2, _height];
(_this select 0) set [3, _curTime];
-}, 0.2, [uiNamespace getVariable ["ACE_Altimeter", displayNull], _unit,floor ((getPosASL _unit) select 2), ACE_time]] call CALLSTACK(CBA_fnc_addPerFrameHandler);
+}, 0.2, [uiNamespace getVariable ["ACE_Altimeter", displayNull], _unit,floor ((getPosASL _unit) select 2), CBA_missionTime]] call CALLSTACK(CBA_fnc_addPerFrameHandler);
diff --git a/addons/parachute/functions/fnc_storeParachute.sqf b/addons/parachute/functions/fnc_storeParachute.sqf
index 42ad18b304..55e887f3e6 100644
--- a/addons/parachute/functions/fnc_storeParachute.sqf
+++ b/addons/parachute/functions/fnc_storeParachute.sqf
@@ -15,16 +15,17 @@
* Public: No
*/
#include "script_component.hpp"
-private ["_unit","_backpack"];
-_unit = _this select 0;
-_backpack = (_this select 1) select 6;
-if ((vehicle _unit) isKindOf "ParachuteBase" && backpack _unit == "" && !(_unit getVariable [QGVAR(chuteIsCut),false]) && (_unit getVariable [QGVAR(hasReserve),false])) then {
+
+params ["_unit", "_gear"];
+private _backpack = _gear select 6;
+
+if ((vehicle _unit) isKindOf "ParachuteBase" && {backpack _unit == ""} && {!(_unit getVariable [QGVAR(chuteIsCut),false])} && {_unit getVariable [QGVAR(hasReserve),false]}) then {
_unit addBackpackGlobal (_unit getVariable[QGVAR(backpackClass),"ACE_NonSteerableParachute"]);
} else {
- if ([false,true] select (getNumber(configFile >> "CfgVehicles" >> _backpack >> "ace_hasReserveParachute"))) then {
+ if ((getNumber(configFile >> "CfgVehicles" >> _backpack >> "ace_hasReserveParachute")) == 1) then {
_unit setVariable[QGVAR(backpackClass),getText(configFile >> "CfgVehicles" >> _backpack >> "ace_reserveParachute"),true];
};
- if (!(_unit getVariable [QGVAR(chuteIsCut),false]) && !(animationState _unit == 'para_pilot')) then {
+ if (!(_unit getVariable [QGVAR(chuteIsCut),false]) && {!(animationState _unit == 'para_pilot')}) then {
_unit setVariable [QGVAR(hasReserve),[false,true] select (getNumber(configFile >> "CfgVehicles" >> _backpack >> "ace_hasReserveParachute")),true];
};
};
diff --git a/addons/parachute/stringtable.xml b/addons/parachute/stringtable.xml
index 3a12f38c8f..880cc55e5f 100644
--- a/addons/parachute/stringtable.xml
+++ b/addons/parachute/stringtable.xml
@@ -59,17 +59,19 @@
Обрезать стропы
Odžíznout padák
Cortar paracaídas
+ Taglia Paracadute
Reserve Parachute
Reserve Fallschirm
- Mettre de coté le parachute (????)
+ Parachute de secours
Spadochron awaryjny
Tartalék ejtőernyő
Para-quedas de reserva
Запасной парашют
Záložní padák
Paracaídas de reserva
+ Paracadute di Riserva
\ No newline at end of file
diff --git a/addons/rangecard/CfgEventHandlers.hpp b/addons/rangecard/CfgEventHandlers.hpp
index 3996e3371d..5da5fd0dc2 100644
--- a/addons/rangecard/CfgEventHandlers.hpp
+++ b/addons/rangecard/CfgEventHandlers.hpp
@@ -1,3 +1,10 @@
+
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE( call COMPILE_FILE(XEH_preInit) );
@@ -8,4 +15,4 @@ class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE( call COMPILE_FILE(XEH_postInit) );
};
-};
\ No newline at end of file
+};
diff --git a/addons/rangecard/CfgVehicles.hpp b/addons/rangecard/CfgVehicles.hpp
index 9e0793e36b..e7df701409 100644
--- a/addons/rangecard/CfgVehicles.hpp
+++ b/addons/rangecard/CfgVehicles.hpp
@@ -8,7 +8,7 @@ class CfgVehicles {
distance = 2.0;
condition = QUOTE(_target call FUNC(canCopy));
statement = QUOTE(_target call FUNC(updateClassNames));
- icon = QUOTE(PATHTOF(UI\RangeCard_Icon.paa));
+ icon = QPATHTOF(UI\RangeCard_Icon.paa);
};
};
};
@@ -20,7 +20,7 @@ class CfgVehicles {
statement = QUOTE(false call FUNC(openRangeCard));
showDisabled = 0;
priority = 0.1;
- icon = QUOTE(PATHTOF(UI\RangeCard_Icon.paa));
+ icon = QPATHTOF(UI\RangeCard_Icon.paa);
exceptions[] = {"notOnMap"};
class GVAR(openCopy) {
displayName = CSTRING(OpenRangeCardCopy);
@@ -28,7 +28,7 @@ class CfgVehicles {
statement = QUOTE(true call FUNC(openRangeCard));
showDisabled = 0;
priority = 0.1;
- icon = QUOTE(PATHTOF(UI\RangeCard_Icon.paa));
+ icon = QPATHTOF(UI\RangeCard_Icon.paa);
exceptions[] = {"notOnMap"};
};
class GVAR(makeCopy) {
@@ -37,7 +37,7 @@ class CfgVehicles {
statement = QUOTE(GVAR(ammoClassCopy) = GVAR(ammoClass); GVAR(magazineClassCopy) = GVAR(magazineClass); GVAR(weaponClassCopy) = GVAR(ammoClass););
showDisabled = 0;
priority = 0.1;
- icon = QUOTE(PATHTOF(UI\RangeCard_Icon.paa));
+ icon = QPATHTOF(UI\RangeCard_Icon.paa);
exceptions[] = {"notOnMap"};
};
};
diff --git a/addons/rangecard/CfgWeapons.hpp b/addons/rangecard/CfgWeapons.hpp
index 7195c0a008..dfc643fa47 100644
--- a/addons/rangecard/CfgWeapons.hpp
+++ b/addons/rangecard/CfgWeapons.hpp
@@ -8,7 +8,7 @@ class CfgWeapons {
scope = 2;
displayName = CSTRING(Name);
descriptionShort = CSTRING(Description);
- picture = PATHTOF(UI\RangeCard_Icon.paa);
+ picture = QPATHTOF(UI\RangeCard_Icon.paa);
icon = "iconObject_circle";
mapSize = 0.034;
diff --git a/addons/rangecard/RscTitles.hpp b/addons/rangecard/RscTitles.hpp
index c4da1862ca..8a2007b2b2 100644
--- a/addons/rangecard/RscTitles.hpp
+++ b/addons/rangecard/RscTitles.hpp
@@ -64,7 +64,7 @@ class ACE_RangeCard_Dialog {
onLoad = "uiNamespace setVariable ['RangleCard_Display', (_this select 0)]";
onUnload = QUOTE(_this call FUNC(onCloseDialog));
objects[] = {};
-
+
class controls {
class BACKGROUND {
moving=1;
@@ -79,7 +79,7 @@ class ACE_RangeCard_Dialog {
h="1.62727";
colorBackground[]={1,1,1,1};
colorText[]={1,1,1,1};
- text=QUOTE(PATHTOF(UI\RangeCard.paa));
+ text=QPATHTOF(UI\RangeCard.paa);
};
class CAPTION_TEXT_1: RangeCard_RscText {
idc=770000;
diff --git a/addons/rangecard/XEH_PREP.hpp b/addons/rangecard/XEH_PREP.hpp
new file mode 100644
index 0000000000..6b13dcc45a
--- /dev/null
+++ b/addons/rangecard/XEH_PREP.hpp
@@ -0,0 +1,9 @@
+
+PREP(calculateSolution);
+PREP(canCopy);
+PREP(canShow);
+PREP(canShowCopy);
+PREP(onCloseDialog);
+PREP(openRangeCard);
+PREP(updateClassNames);
+PREP(updateRangeCard);
diff --git a/addons/rangecard/XEH_preInit.sqf b/addons/rangecard/XEH_preInit.sqf
index 5e5685d30f..a7feade1c3 100644
--- a/addons/rangecard/XEH_preInit.sqf
+++ b/addons/rangecard/XEH_preInit.sqf
@@ -2,13 +2,6 @@
ADDON = false;
-PREP(calculateSolution);
-PREP(canCopy);
-PREP(canShow);
-PREP(canShowCopy);
-PREP(onCloseDialog);
-PREP(openRangeCard);
-PREP(updateClassNames);
-PREP(updateRangeCard);
+#include "XEH_PREP.hpp"
ADDON = true;
diff --git a/addons/rangecard/XEH_preStart.sqf b/addons/rangecard/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/rangecard/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/rangecard/config.cpp b/addons/rangecard/config.cpp
index abe4e859f2..6e4a90c0ad 100644
--- a/addons/rangecard/config.cpp
+++ b/addons/rangecard/config.cpp
@@ -6,7 +6,9 @@ class CfgPatches {
weapons[] = {"ACE_RangeCard"};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ACE_Advanced_Ballistics"};
- author = "Ruthberg";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"Ruthberg"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
@@ -14,4 +16,4 @@ class CfgPatches {
#include "CfgEventHandlers.hpp"
#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"
-#include "RscTitles.hpp"
\ No newline at end of file
+#include "RscTitles.hpp"
diff --git a/addons/rangecard/functions/fnc_calculateSolution.sqf b/addons/rangecard/functions/fnc_calculateSolution.sqf
index ea86d9986e..b921b71ff8 100644
--- a/addons/rangecard/functions/fnc_calculateSolution.sqf
+++ b/addons/rangecard/functions/fnc_calculateSolution.sqf
@@ -45,33 +45,14 @@
* Public: No
*/
#include "script_component.hpp"
-
-private ["_scopeBaseAngle", "_bulletMass", "_boreHeight", "_airFriction", "_muzzleVelocity", "_temperature", "_barometricPressure", "_relativeHumidity", "_simSteps", "_windSpeed1", "_windSpeed2", "_windDirection", "_inclinationAngle", "_targetSpeed", "_targetRange", "_drag", "_bc", "_dragModel", "_atmosphereModel", "_storeRangeCardData", "_stabilityFactor", "_twistDirection", "_latitude", "_directionOfFire", "_rangeCardSlot", "_useABConfig"];
-_scopeBaseAngle = _this select 0;
-_bulletMass = _this select 1;
-_boreHeight = _this select 2;
-_airFriction = _this select 3;
-_muzzleVelocity = _this select 4;
-_temperature = _this select 5;
-_barometricPressure = _this select 6;
-_relativeHumidity = _this select 7;
-_simSteps = _this select 8;
-_windSpeed1 = (_this select 9) select 0;
-_windSpeed2 = (_this select 9) select 1;
-_windDirection = _this select 10;
-_inclinationAngle = _this select 11;
-_targetSpeed = _this select 12;
-_targetRange = _this select 13;
-_bc = _this select 14;
-_dragModel = _this select 15;
-_atmosphereModel = _this select 16;
-_storeRangeCardData = _this select 17;
-_stabilityFactor = _this select 18;
-_twistDirection = _this select 19;
-_latitude = _this select 20;
-_directionOfFire = _this select 21;
-_rangeCardSlot = _this select 22;
-_useABConfig = _this select 23;
+params [
+ "_scopeBaseAngle", "_bulletMass", "_boreHeight", "_airFriction", "_muzzleVelocity",
+ "_temperature", "_barometricPressure", "_relativeHumidity", "_simSteps", "_windSpeed",
+ "_windDirection", "_inclinationAngle", "_targetSpeed", "_targetRange", "_bc", "_dragModel",
+ "_atmosphereModel", "_storeRangeCardData", "_stabilityFactor", "_twistDirection", "_latitude",
+ "_directionOfFire", "_rangeCardSlot", "_useABConfig"
+];
+_windSpeed params ["_windSpeed1", "_windSpeed2"];
if (_storeRangeCardData) then {
GVAR(rangeCardDataMVs) set [_rangeCardSlot, format[" %1", round(_muzzleVelocity)]];
@@ -138,19 +119,19 @@ _bulletVelocity set [2, Sin(_scopeBaseAngle) * _muzzleVelocity];
while {_TOF < 6 && (_bulletPos select 1) < _targetRange} do {
_bulletSpeed = vectorMagnitude _bulletVelocity;
-
+
_speedTotal = _speedTotal + _bulletSpeed;
_stepsTotal = _stepsTotal + 1;
_speedAverage = (_speedTotal / _stepsTotal);
-
+
if (_speedAverage > 450 && _bulletSpeed < _speedOfSound) exitWith {};
if (atan((_bulletPos select 2) / (abs(_bulletPos select 1) + 1)) < -2.254) exitWith {};
-
+
_trueVelocity = _bulletVelocity vectorDiff _wind1;
_trueSpeed = vectorMagnitude _trueVelocity;
-
+
if (_useABConfig) then {
- _drag = if (missionNamespace getVariable [QEGVAR(advanced_ballistics,extensionAvailable), false]) then {
+ private _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))
@@ -215,4 +196,4 @@ if (_targetRange != 0) then {
_kineticEnergy = 0.5 * (_bulletMass / 1000 * (_bulletSpeed ^ 2));
_kineticEnergy = _kineticEnergy * 0.737562149;
-[_elevation * 60, [_windage1 * 60, _windage2 * 60], _lead, _TOF, _bulletSpeed, _kineticEnergy, _verticalCoriolis * 60, _horizontalCoriolis * 60, _spinDrift * 60]
\ No newline at end of file
+[_elevation * 60, [_windage1 * 60, _windage2 * 60], _lead, _TOF, _bulletSpeed, _kineticEnergy, _verticalCoriolis * 60, _horizontalCoriolis * 60, _spinDrift * 60]
diff --git a/addons/rangecard/functions/fnc_openRangeCard.sqf b/addons/rangecard/functions/fnc_openRangeCard.sqf
index 3e886eb97a..ea085ed5b1 100644
--- a/addons/rangecard/functions/fnc_openRangeCard.sqf
+++ b/addons/rangecard/functions/fnc_openRangeCard.sqf
@@ -20,17 +20,17 @@ if (GVAR(RangeCardOpened)) exitWith {};
if (_this) then {
if (GVAR(ammoClassCopy) != "" && GVAR(magazineClassCopy) != "" && GVAR(weaponClassCopy) != "") then {
GVAR(RangeCardOpened) = true;
-
+
createDialog "ACE_RangeCard_Dialog";
-
+
[GVAR(ammoClassCopy), GVAR(magazineClassCopy), GVAR(weaponClassCopy)] call FUNC(updateRangeCard);
};
} else {
if (ACE_player call FUNC(updateClassNames)) then {
GVAR(RangeCardOpened) = true;
-
+
createDialog "ACE_RangeCard_Dialog";
-
+
[GVAR(ammoClass), GVAR(magazineClass), GVAR(weaponClass)] call FUNC(updateRangeCard);
};
};
diff --git a/addons/rangecard/functions/fnc_updateRangeCard.sqf b/addons/rangecard/functions/fnc_updateRangeCard.sqf
index 04317d46d7..a7b0b996e2 100644
--- a/addons/rangecard/functions/fnc_updateRangeCard.sqf
+++ b/addons/rangecard/functions/fnc_updateRangeCard.sqf
@@ -107,7 +107,7 @@ _dragModel = _ammoConfig select 5;
_atmosphereModel = _ammoConfig select 8;
_bulletMass = 5;
_boreHeight = 3.81;
-_zeroRange = 100;
+_zeroRange = 100;
if (_bc == 0) then {
_useABConfig = false;
@@ -169,13 +169,13 @@ if (isNil {_cacheEntry}) then {
{
_mvShift = [_ammoConfig select 9, _x] call EFUNC(advanced_ballistics,calculateAmmoTemperatureVelocityShift);
_mv = _muzzleVelocity + _mvShift;
-
+
[_scopeBaseAngle,_bulletMass,_boreHeight,_airFriction,_mv,_x,_barometricPressure,_relativeHumidity,1000,[4,0],3,0,1,GVAR(rangeCardEndRange),_bc,_dragModel,_atmosphereModel,true,1.5,1,46,23,_forEachIndex,_useABConfig] call FUNC(calculateSolution);
} forEach [-15, -5, 5, 10, 15, 20, 25, 30, 35];
- } else {
+ } else {
[_scopeBaseAngle,_bulletMass,_boreHeight,_airFriction,_muzzleVelocity,15,_barometricPressure,_relativeHumidity,1000,[4,0],3,0,1,GVAR(rangeCardEndRange),_bc,_dragModel,_atmosphereModel,true,1.5,1,46,23,3,_useABConfig] call FUNC(calculateSolution);
};
-
+
for "_i" from 0 to 9 do {
GVAR(lastValidRow) pushBack count (GVAR(rangeCardDataElevation) select _i);
while {count (GVAR(rangeCardDataElevation) select _i) < 50} do {
@@ -190,7 +190,7 @@ if (isNil {_cacheEntry}) then {
};
};
};
-
+
missionNamespace setVariable [format[QGVAR(%1_%2_%3), _ammoClass, _weaponClass, missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]], [GVAR(rangeCardDataElevation), GVAR(rangeCardDataWindage), GVAR(rangeCardDataLead), GVAR(rangeCardDataMVs), GVAR(lastValidRow)]];
} else {
GVAR(rangeCardDataElevation) = _cacheEntry select 0;
@@ -246,4 +246,4 @@ if (_useABConfig) then {
} else {
ctrlSetText [770020, ""];
ctrlSetText [770021, ""];
-};
\ No newline at end of file
+};
diff --git a/addons/rangecard/stringtable.xml b/addons/rangecard/stringtable.xml
index 309241a565..e97a31195e 100644
--- a/addons/rangecard/stringtable.xml
+++ b/addons/rangecard/stringtable.xml
@@ -1,4 +1,4 @@
-
+
@@ -11,6 +11,7 @@
Table de tir
Távolsági kártya
Таблица поправок
+ Tavola Balistica
50 METER increments -- MRAD/MRAD (reticle/turrets)
@@ -22,6 +23,7 @@
Incrément de 50m -- MRAD/MRAD (réticule/tourelle)
50 MÉTERES lépések - MRAD/MRAD (célzó/lövegek)
Шаг 50 МЕТРОВ - MRAD/MRAD (сетка/маховички)
+ Incrementi per 50 METRI - MRAD/MRAD (reticolo/torrette)
Open Range Card
@@ -33,6 +35,7 @@
Ouvrir la table de tir
Távolsági kártya kinyitása
Открыть таблицу поправок
+ Apri Tavola Balistica
Open Range Card Copy
@@ -44,6 +47,7 @@
Ouvrir une copie de la table de tir
Távolsági kártya-másolat kinyitása
Открыть копию таблицы поправок
+ Apri Copia Tavola Balistica
Open Range Card
@@ -55,6 +59,7 @@
Ouvrir la table de tir
Távolsági kártya kinyitása
Открыть таблицу поправок
+ Apri Tavola Balistica
Open Range Card Copy
@@ -66,6 +71,7 @@
Ouvrir une copie de la table de tir
Távolsági kártya-másolat kinyitása
Открыть копию таблицы поправок
+ Apri Copia Tavola Balistica
Copy Range Card
@@ -77,6 +83,7 @@
Recopier la table de tir
Távolsági kártya másolása
Скопировать таблицу поправок
+ Copia Tavola Balistica
-
+
\ No newline at end of file
diff --git a/addons/realisticnames/CfgVehicles.hpp b/addons/realisticnames/CfgVehicles.hpp
index 61864a8259..db42e693bf 100644
--- a/addons/realisticnames/CfgVehicles.hpp
+++ b/addons/realisticnames/CfgVehicles.hpp
@@ -636,12 +636,12 @@ class CfgVehicles {
class Weapon_MMG_02_sand_F: Weapon_Base_F {
displayName = CSTRING(MMG_02_sand);
};*/
-
+
//attachments
-
+
class Item_Base_F;
-
+
class Item_acc_flashlight: Item_Base_F {
- displayName="UTG Defender 126";
- };
+ displayName="UTG Defender 126";
+ };
};
diff --git a/addons/realisticnames/config.cpp b/addons/realisticnames/config.cpp
index 6a8ea59290..d85fe9771d 100644
--- a/addons/realisticnames/config.cpp
+++ b/addons/realisticnames/config.cpp
@@ -6,8 +6,9 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
- author[] = {"KoffeinFlummi","TaoSensai","commy2"};
- authorUrl = "https://github.com/KoffeinFlummi/";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"KoffeinFlummi","TaoSensai","commy2"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
diff --git a/addons/rearm/ACE_Settings.hpp b/addons/rearm/ACE_Settings.hpp
index f4d6562807..798bbd7650 100644
--- a/addons/rearm/ACE_Settings.hpp
+++ b/addons/rearm/ACE_Settings.hpp
@@ -1,5 +1,6 @@
class ACE_Settings {
class GVAR(level) {
+ category = ECSTRING(OptionsMenu,CategoryLogistics);
displayName = CSTRING(RearmSettings_level_DisplayName);
description = CSTRING(RearmSettings_level_Description);
value = 0;
diff --git a/addons/rearm/CfgEventHandlers.hpp b/addons/rearm/CfgEventHandlers.hpp
index 93371889e1..17edc1dc30 100644
--- a/addons/rearm/CfgEventHandlers.hpp
+++ b/addons/rearm/CfgEventHandlers.hpp
@@ -1,10 +1,16 @@
+
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
};
};
-
class Extended_Init_EventHandlers {
class GVAR(defaultCarriedObject) { // TODO check if we need to add all subclasses
class ADDON {
diff --git a/addons/rearm/CfgVehicles.hpp b/addons/rearm/CfgVehicles.hpp
index 30548aed76..44b7fe38af 100644
--- a/addons/rearm/CfgVehicles.hpp
+++ b/addons/rearm/CfgVehicles.hpp
@@ -1,3 +1,4 @@
+
#define MACRO_REARM_ACTIONS \
class ACE_Actions { \
class ACE_MainActions { \
@@ -7,14 +8,14 @@
condition = QUOTE(_this call FUNC(canRearm)); \
statement = QUOTE(_player call FUNC(rearm)); \
exceptions[] = {"isNotInside"}; \
- icon = PATHTOF(ui\icon_rearm_interact.paa); \
+ icon = QPATHTOF(ui\icon_rearm_interact.paa); \
}; \
}; \
};
#define MACRO_REARM_TRUCK_ACTIONS \
- class ACE_Actions : ACE_Actions { \
- class ACE_MainActions : ACE_MainActions { \
+ class ACE_Actions: ACE_Actions { \
+ class ACE_MainActions: ACE_MainActions { \
class GVAR(TakeAmmo) { \
displayName = CSTRING(TakeAmmo); \
distance = REARM_ACTION_DISTANCE; \
@@ -23,7 +24,7 @@
exceptions[] = {"isNotInside"}; \
showDisabled = 0; \
priority = 2; \
- icon = PATHTOF(ui\icon_rearm_interact.paa); \
+ icon = QPATHTOF(ui\icon_rearm_interact.paa); \
}; \
class GVAR(StoreAmmo) { \
displayName = CSTRING(StoreAmmo); \
@@ -31,17 +32,19 @@
condition = QUOTE(_this call FUNC(canStoreAmmo)); \
statement = QUOTE(_this call FUNC(storeAmmo)); \
exceptions[] = {"isNotInside"}; \
- icon = PATHTOF(ui\icon_rearm_interact.paa); \
+ icon = QPATHTOF(ui\icon_rearm_interact.paa); \
}; \
}; \
};
+class CBA_Extended_EventHandlers;
+
class CfgVehicles {
class ACE_Module;
- class ACE_moduleRearmSettings : ACE_Module {
+ class ACE_moduleRearmSettings: ACE_Module {
scope = 2;
displayName = CSTRING(RearmSettings_Module_DisplayName);
- icon = QUOTE(PATHTOF(ui\icon_module_rearm.paa));
+ icon = QPATHTOF(ui\icon_module_rearm.paa);
category = "ACE_Logistics";
function = QFUNC(moduleRearmSettings);
functionPriority = 1;
@@ -76,99 +79,97 @@ class CfgVehicles {
};
class LandVehicle;
- class Car : LandVehicle {
+ class Car: LandVehicle {
MACRO_REARM_ACTIONS
};
- class Tank : LandVehicle {
+ class Tank: LandVehicle {
MACRO_REARM_ACTIONS
};
- class StaticWeapon : LandVehicle {
+ class StaticWeapon: LandVehicle {
MACRO_REARM_ACTIONS
};
class Air;
- class Helicopter : Air {
+ class Helicopter: Air {
MACRO_REARM_ACTIONS
};
- class Plane : Air {
+ class Plane: Air {
MACRO_REARM_ACTIONS
};
class Ship;
- class Ship_F : Ship {
+ class Ship_F: Ship {
MACRO_REARM_ACTIONS
};
// Ammo Vehicles (with full inheritance for granted ACE_Actions)
- class Car_F : Car {};
- class Truck_F : Car_F {};
+ class Car_F: Car {};
+ class Truck_F: Car_F {};
- class Truck_03_base_F : Truck_F {};
- class O_Truck_03_ammo_F : Truck_03_base_F {
+ class Truck_03_base_F: Truck_F {};
+ class O_Truck_03_ammo_F: Truck_03_base_F {
transportAmmo = 0;
MACRO_REARM_TRUCK_ACTIONS
};
- class Truck_02_base_F : Truck_F {};
- class Truck_02_Ammo_base_F : Truck_02_base_F {};
- class I_Truck_02_ammo_F : Truck_02_Ammo_base_F {
+ class Truck_02_base_F: Truck_F {};
+ class Truck_02_Ammo_base_F: Truck_02_base_F {};
+ class I_Truck_02_ammo_F: Truck_02_Ammo_base_F {
transportAmmo = 0;
MACRO_REARM_TRUCK_ACTIONS
};
- class O_Truck_02_Ammo_F : Truck_02_Ammo_base_F {
+ class O_Truck_02_Ammo_F: Truck_02_Ammo_base_F {
transportAmmo = 0;
MACRO_REARM_TRUCK_ACTIONS
};
- class Truck_01_base_F : Truck_F {};
- class B_Truck_01_transport_F : Truck_01_base_F {};
- class B_Truck_01_mover_F : B_Truck_01_transport_F {};
- class B_Truck_01_ammo_F : B_Truck_01_mover_F {
+ class Truck_01_base_F: Truck_F {};
+ class B_Truck_01_transport_F: Truck_01_base_F {};
+ class B_Truck_01_mover_F: B_Truck_01_transport_F {};
+ class B_Truck_01_ammo_F: B_Truck_01_mover_F {
transportAmmo = 0;
MACRO_REARM_TRUCK_ACTIONS
};
- class Helicopter_Base_F : Helicopter {};
- class Helicopter_Base_H : Helicopter_Base_F {};
- class Heli_Transport_04_base_F : Helicopter_Base_H {};
- class O_Heli_Transport_04_ammo_F : Heli_Transport_04_base_F {
+ class Helicopter_Base_F: Helicopter {};
+ class Helicopter_Base_H: Helicopter_Base_F {};
+ class Heli_Transport_04_base_F: Helicopter_Base_H {};
+ class O_Heli_Transport_04_ammo_F: Heli_Transport_04_base_F {
transportAmmo = 0;
MACRO_REARM_TRUCK_ACTIONS
};
- class Pod_Heli_Transport_04_base_F: StaticWeapon {};
+ class ThingX;
+ class ReammoBox_F: ThingX {
+ class ACE_Actions {
+ class ACE_MainActions {};
+ };
+ };
+ class Slingload_base_F: ReammoBox_F {};
+ class Slingload_01_Base_F: Slingload_base_F {};
+
+ class Pod_Heli_Transport_04_base_F: Slingload_base_F {};
class Land_Pod_Heli_Transport_04_ammo_F: Pod_Heli_Transport_04_base_F {
transportAmmo = 0;
MACRO_REARM_TRUCK_ACTIONS
};
- class Slingload_base_F;
- class Slingload_01_Base_F: Slingload_base_F {
- class ACE_Actions {
- class ACE_MainActions {
- displayName = ECSTRING(interaction,MainAction);
- selection = "";
- distance = 10;
- condition = "true";
- };
- };
- };
-
- class B_Slingload_01_Ammo_F : Slingload_01_Base_F {
- XEH_ENABLED;
+ class B_Slingload_01_Ammo_F: Slingload_01_Base_F {
transportAmmo = 0;
MACRO_REARM_TRUCK_ACTIONS
};
// Dummy Vehicles
- class ThingX;
- class GVAR(defaultCarriedObject) : ThingX {
- XEH_ENABLED;
+ class GVAR(defaultCarriedObject): ThingX {
+ class EventHandlers {
+ class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
+ };
+
displayName = QGVAR(dummy_obj);
scope = 1;
scopeCurator = 1;
@@ -183,63 +184,63 @@ class CfgVehicles {
exceptions[] = {"isNotInside"};
showDisabled = 0;
priority = 2;
- icon = PATHTOF(ui\icon_rearm_interact.paa);
+ icon = QPATHTOF(ui\icon_rearm_interact.paa);
};
};
};
- class GVAR(Bo_GBU12_LGB) : GVAR(defaultCarriedObject) {
+ class GVAR(Bo_GBU12_LGB): GVAR(defaultCarriedObject) {
model = "\A3\Weapons_F\Ammo\Bomb_01_F.p3d";
};
- class GVAR(Bo_Mk82) : GVAR(defaultCarriedObject) {
+ class GVAR(Bo_Mk82): GVAR(defaultCarriedObject) {
model = "\A3\Weapons_F\Ammo\Bomb_02_F";
};
- class GVAR(Bomb_04_F) : GVAR(defaultCarriedObject) {
+ class GVAR(Bomb_04_F): GVAR(defaultCarriedObject) {
model = "\A3\Weapons_F_EPC\Ammo\Bomb_04_F.p3d";
};
- class GVAR(Bomb_03_F) : GVAR(defaultCarriedObject) {
+ class GVAR(Bomb_03_F): GVAR(defaultCarriedObject) {
model = "\A3\Weapons_F_EPC\Ammo\Bomb_03_F.p3d";
};
- class GVAR(Missile_AA_04_F) : GVAR(defaultCarriedObject) {
+ class GVAR(Missile_AA_04_F): GVAR(defaultCarriedObject) {
model = "\A3\Weapons_F_EPC\Ammo\Missile_AA_04_F.p3d";
};
- class GVAR(Missile_AA_03_F) : GVAR(defaultCarriedObject) {
+ class GVAR(Missile_AA_03_F): GVAR(defaultCarriedObject) {
model = "\A3\Weapons_F_EPC\Ammo\Missile_AA_03_F.p3d";
};
- class GVAR(Missile_AGM_02_F) : GVAR(defaultCarriedObject) {
+ class GVAR(Missile_AGM_02_F): GVAR(defaultCarriedObject) {
model = "\A3\Weapons_F_EPC\Ammo\Missile_AGM_02_F.p3d";
};
- class GVAR(Missile_AGM_01_F) : GVAR(defaultCarriedObject) {
+ class GVAR(Missile_AGM_01_F): GVAR(defaultCarriedObject) {
model = "\A3\Weapons_F_EPC\Ammo\Missile_AGM_01_F.p3d";
};
- class GVAR(R_230mm_fly) : GVAR(defaultCarriedObject) {
+ class GVAR(R_230mm_fly): GVAR(defaultCarriedObject) {
model = "\A3\Weapons_F\Ammo\Missile_AT_02_F";
};
- class GVAR(R_230mm_HE) : GVAR(defaultCarriedObject) {
+ class GVAR(R_230mm_HE): GVAR(defaultCarriedObject) {
model = "\A3\Weapons_F\Ammo\Missile_AT_02_F";
};
- class GVAR(M_PG_AT) : GVAR(defaultCarriedObject) {
+ class GVAR(M_PG_AT): GVAR(defaultCarriedObject) {
model = "\A3\Weapons_F\Ammo\Rocket_01_F";
};
- class GVAR(Rocket_04_HE_F) : GVAR(defaultCarriedObject) {
+ class GVAR(Rocket_04_HE_F): GVAR(defaultCarriedObject) {
model = "\A3\Weapons_F_EPC\Ammo\Rocket_04_HE_F.p3d";
};
- class GVAR(Rocket_03_HE_F) : GVAR(defaultCarriedObject) {
+ class GVAR(Rocket_03_HE_F): GVAR(defaultCarriedObject) {
model = "\A3\Weapons_F_EPC\Ammo\Rocket_03_HE_F.p3d";
};
- class GVAR(Rocket_04_AP_F) : GVAR(defaultCarriedObject) {
+ class GVAR(Rocket_04_AP_F): GVAR(defaultCarriedObject) {
model = "\A3\Weapons_F_EPC\Ammo\Rocket_04_AP_F.p3d";
};
- class GVAR(Rocket_03_AP_F) : GVAR(defaultCarriedObject) {
+ class GVAR(Rocket_03_AP_F): GVAR(defaultCarriedObject) {
model = "\A3\Weapons_F_EPC\Ammo\Rocket_03_AP_F.p3d";
};
// Using wrong model
- class GVAR(R_80mm_HE) : GVAR(defaultCarriedObject) {
+ class GVAR(R_80mm_HE): GVAR(defaultCarriedObject) {
model = "\A3\Weapons_F_EPC\Ammo\Rocket_03_HE_F.p3d";
};
- class GVAR(R_60mm_HE) : GVAR(defaultCarriedObject) {
+ class GVAR(R_60mm_HE): GVAR(defaultCarriedObject) {
model = "\A3\Weapons_F_EPC\Ammo\Rocket_03_HE_F.p3d";
};
- class GVAR(R_Hydra_HE) : GVAR(defaultCarriedObject) {
+ class GVAR(R_Hydra_HE): GVAR(defaultCarriedObject) {
model = "\A3\Weapons_F_EPC\Ammo\Rocket_03_HE_F.p3d";
};
};
diff --git a/addons/rearm/XEH_PREP.hpp b/addons/rearm/XEH_PREP.hpp
new file mode 100644
index 0000000000..8e3c10cd2c
--- /dev/null
+++ b/addons/rearm/XEH_PREP.hpp
@@ -0,0 +1,26 @@
+
+PREP(addRearmActions);
+PREP(canRearm);
+PREP(canStoreAmmo);
+PREP(canTakeAmmo);
+PREP(createDummy);
+PREP(disable);
+PREP(dropAmmo);
+PREP(getConfigMagazines);
+PREP(getMaxMagazines);
+PREP(getNeedRearmMagazines);
+PREP(grabAmmo);
+PREP(handleKilled);
+PREP(handleUnconscious);
+PREP(makeDummy);
+PREP(moduleRearmSettings);
+PREP(pickUpAmmo);
+PREP(rearm);
+PREP(rearmEntireVehicle);
+PREP(rearmEntireVehicleSuccess);
+PREP(rearmEntireVehicleSuccessLocal);
+PREP(rearmSuccess);
+PREP(rearmSuccessLocal);
+PREP(storeAmmo);
+PREP(takeAmmo);
+PREP(takeSuccess);
diff --git a/addons/rearm/XEH_postInit.sqf b/addons/rearm/XEH_postInit.sqf
index 607b768b15..a3038494da 100644
--- a/addons/rearm/XEH_postInit.sqf
+++ b/addons/rearm/XEH_postInit.sqf
@@ -1,4 +1,8 @@
#include "script_component.hpp"
-["medical_onUnconscious", {_this call FUNC(handleUnconscious)}] call EFUNC(common,addEventHandler);
-["playerVehicleChanged", {params ["_unit"]; [_unit] call FUNC(dropAmmo)}] call EFUNC(common,addEventHandler);
+["ace_unconscious", {_this call FUNC(handleUnconscious)}] call CBA_fnc_addEventHandler;
+["ace_playerVehicleChanged", {params ["_unit"]; [_unit] call FUNC(dropAmmo)}] call CBA_fnc_addEventHandler;
+
+if (isServer) then {
+ addMissionEventHandler ["HandleDisconnect", {params ["_unit"]; [_unit] call FUNC(dropAmmo)}];
+};
diff --git a/addons/rearm/XEH_preInit.sqf b/addons/rearm/XEH_preInit.sqf
index c52423f67f..a7feade1c3 100644
--- a/addons/rearm/XEH_preInit.sqf
+++ b/addons/rearm/XEH_preInit.sqf
@@ -2,29 +2,6 @@
ADDON = false;
-PREP(addRearmActions);
-PREP(canRearm);
-PREP(canStoreAmmo);
-PREP(canTakeAmmo);
-PREP(createDummy);
-PREP(dropAmmo);
-PREP(getConfigMagazines);
-PREP(getMaxMagazines);
-PREP(getNeedRearmMagazines);
-PREP(grabAmmo);
-PREP(handleKilled);
-PREP(handleUnconscious);
-PREP(makeDummy);
-PREP(moduleRearmSettings);
-PREP(pickUpAmmo);
-PREP(rearm);
-PREP(rearmEntireVehicle);
-PREP(rearmEntireVehicleSuccess);
-PREP(rearmEntireVehicleSuccessLocal);
-PREP(rearmSuccess);
-PREP(rearmSuccessLocal);
-PREP(storeAmmo);
-PREP(takeAmmo);
-PREP(takeSuccess);
+#include "XEH_PREP.hpp"
ADDON = true;
diff --git a/addons/rearm/XEH_preStart.sqf b/addons/rearm/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/rearm/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/rearm/config.cpp b/addons/rearm/config.cpp
index c15721c9df..bd0a4980e2 100644
--- a/addons/rearm/config.cpp
+++ b/addons/rearm/config.cpp
@@ -6,8 +6,9 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_interaction"};
- author[] = {"GitHawk", "Jonpas"};
- authorUrl = "https://ace3mod.com";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"GitHawk", "Jonpas"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
diff --git a/addons/rearm/functions/fnc_addRearmActions.sqf b/addons/rearm/functions/fnc_addRearmActions.sqf
index 2011cc73de..6040fd6fc5 100644
--- a/addons/rearm/functions/fnc_addRearmActions.sqf
+++ b/addons/rearm/functions/fnc_addRearmActions.sqf
@@ -16,7 +16,7 @@
#include "script_component.hpp"
private ["_vehicleActions", "_actions", "_action", "_vehicles", "_vehicle", "_needToAdd", "_magazineHelper", "_turretPath", "_magazines", "_magazine", "_icon", "_cnt"];
-params ["_target"];
+params [["_target", objNull, [objNull]]];
_vehicles = nearestObjects [_target, ["AllVehicles"], 20];
if (count _vehicles < 2) exitWith {false}; // Rearming needs at least 2 vehicles
@@ -31,16 +31,11 @@ _vehicleActions = [];
_magazineHelper = [];
{
_turretPath = _x;
- _magazines = [];
- if (_turretPath isEqualTo [-1]) then {
- _magazines = [_vehicle, _turretPath] call FUNC(getConfigMagazines);
- } else {
- _magazines = _vehicle magazinesTurret _turretPath;
- };
+ _magazines = [_vehicle, _turretPath] call FUNC(getConfigMagazines);
{
_magazine = _x;
- _cnt = { _x == _magazine } count (_vehicle magazinesTurret _turretPath);
- if ((_cnt < ([_vehicle, _turretPath, _magazine] call FUNC(getMaxMagazines))) && !(_magazine in _magazineHelper)) then {
+ _currentMagazines = { _x == _magazine } count (_vehicle magazinesTurret _turretPath);
+ if ((_currentMagazines < ([_vehicle, _turretPath, _magazine] call FUNC(getMaxMagazines))) && !(_magazine in _magazineHelper)) then {
_action = [_magazine,
getText(configFile >> "CfgMagazines" >> _magazine >> "displayName"),
getText(configFile >> "CfgMagazines" >> _magazine >> "picture"),
diff --git a/addons/rearm/functions/fnc_canRearm.sqf b/addons/rearm/functions/fnc_canRearm.sqf
index 834e6a9202..202524dd10 100644
--- a/addons/rearm/functions/fnc_canRearm.sqf
+++ b/addons/rearm/functions/fnc_canRearm.sqf
@@ -17,7 +17,7 @@
#include "script_component.hpp"
private ["_dummy","_magazineClass"];
-params ["_target", "_unit"];
+params [["_target", objNull, [objNull]], ["_unit", objNull, [objNull]]];
if (GVAR(level) == 0 || {isNull _unit} || {!(_unit isKindOf "CAManBase")} || {!local _unit} || {_target distance _unit > REARM_ACTION_DISTANCE} || {_target getVariable [QGVAR(disabled), false]}) exitWith {false};
diff --git a/addons/rearm/functions/fnc_canStoreAmmo.sqf b/addons/rearm/functions/fnc_canStoreAmmo.sqf
index 4018775d43..a3139d6f11 100644
--- a/addons/rearm/functions/fnc_canStoreAmmo.sqf
+++ b/addons/rearm/functions/fnc_canStoreAmmo.sqf
@@ -16,7 +16,7 @@
*/
#include "script_component.hpp"
-params ["_target", "_unit"];
+params [["_target", objNull, [objNull]], ["_unit", objNull, [objNull]]];
!(isNull _unit ||
{!(_unit isKindOf "CAManBase")} ||
diff --git a/addons/rearm/functions/fnc_canTakeAmmo.sqf b/addons/rearm/functions/fnc_canTakeAmmo.sqf
index 43a96515e5..496e7a12a4 100644
--- a/addons/rearm/functions/fnc_canTakeAmmo.sqf
+++ b/addons/rearm/functions/fnc_canTakeAmmo.sqf
@@ -16,7 +16,7 @@
*/
#include "script_component.hpp"
-params ["_target", "_unit"];
+params [["_target", objNull, [objNull]], ["_unit", objNull, [objNull]]];
!(isNull _unit ||
{!(_unit isKindOf "CAManBase")} ||
diff --git a/addons/rearm/functions/fnc_createDummy.sqf b/addons/rearm/functions/fnc_createDummy.sqf
index f9d335c08a..38955fb806 100644
--- a/addons/rearm/functions/fnc_createDummy.sqf
+++ b/addons/rearm/functions/fnc_createDummy.sqf
@@ -17,7 +17,7 @@
#include "script_component.hpp"
private ["_ammo", "_dummyName", "_dummy"];
-params ["_unit", "_magazineClass"];
+params [["_unit", objNull, [objNull]], ["_magazineClass", "", [""]]];
_ammo = getText (configFile >> "CfgMagazines" >> _magazineClass >> "ammo");
_dummyName = getText (configFile >> "CfgAmmo" >> _ammo >> QGVAR(dummy));
diff --git a/addons/rearm/functions/fnc_disable.sqf b/addons/rearm/functions/fnc_disable.sqf
new file mode 100644
index 0000000000..b5e8b77d04
--- /dev/null
+++ b/addons/rearm/functions/fnc_disable.sqf
@@ -0,0 +1,21 @@
+/*
+ * Author: GitHawk
+ * Disables rearm for a vehicle.
+ *
+ * Arguments:
+ * 0: Target
+ * 1: Disable
+ *
+ * Return Value:
+ * None
+ *
+ * Example:
+ * [tank] call ace_rearm_fnc_disable
+ * [tank, false] call ace_rearm_fnc_disable
+ *
+ * Public: Yes
+ */
+#include "script_component.hpp"
+
+params [["_target", objNull, [objNull]], ["_disable", true, [true]]];
+_target setVariable [QGVAR(disabled), _disable, true];
diff --git a/addons/rearm/functions/fnc_dropAmmo.sqf b/addons/rearm/functions/fnc_dropAmmo.sqf
index dff8463e27..48433c2f4a 100644
--- a/addons/rearm/functions/fnc_dropAmmo.sqf
+++ b/addons/rearm/functions/fnc_dropAmmo.sqf
@@ -18,7 +18,7 @@
#include "script_component.hpp"
private ["_dummy", "_actionID"];
-params ["_unit", ["_delete", false], ["_unholster", true]];
+params [["_unit", objNull, [objNull]], ["_delete", false, [false]], ["_unholster", true, [true]]];
_dummy = _unit getVariable [QGVAR(dummy), objNull];
if !(isNull _dummy) then {
diff --git a/addons/rearm/functions/fnc_getConfigMagazines.sqf b/addons/rearm/functions/fnc_getConfigMagazines.sqf
index 9662f30ce7..dce6c5da64 100644
--- a/addons/rearm/functions/fnc_getConfigMagazines.sqf
+++ b/addons/rearm/functions/fnc_getConfigMagazines.sqf
@@ -16,7 +16,7 @@
*/
#include "script_component.hpp"
-params ["_target", "_turretPath"];
+params [["_target", objNull, [objNull]], ["_turretPath", [], [[]]]];
if (isNull _target) exitWith {[]};
diff --git a/addons/rearm/functions/fnc_getMaxMagazines.sqf b/addons/rearm/functions/fnc_getMaxMagazines.sqf
index 632b5e5918..b6211333f0 100644
--- a/addons/rearm/functions/fnc_getMaxMagazines.sqf
+++ b/addons/rearm/functions/fnc_getMaxMagazines.sqf
@@ -18,7 +18,7 @@
#include "script_component.hpp"
private ["_count", "_cfg"];
-params ["_target", "_turretPath", "_magazineClass"];
+params [["_target", objNull, [objNull]], ["_turretPath", [], [[]]], ["_magazineClass", "", [""]]];
if (isNull _target) exitWith {0};
diff --git a/addons/rearm/functions/fnc_getNeedRearmMagazines.sqf b/addons/rearm/functions/fnc_getNeedRearmMagazines.sqf
index 7a591c6c32..f56b437708 100644
--- a/addons/rearm/functions/fnc_getNeedRearmMagazines.sqf
+++ b/addons/rearm/functions/fnc_getNeedRearmMagazines.sqf
@@ -10,7 +10,7 @@
* Return Value
* 0: Can Rearm
* 1: TurretPath
- * 2: Magazine Classname
+ * 2: Number of current magazines in turret path
*
* Example:
* [tank, "mag"] call ace_rearm_fnc_getNeedRearmMagazines
@@ -19,27 +19,22 @@
*/
#include "script_component.hpp"
-private ["_return", "_magazines", "_cnt"];
+private ["_return", "_magazines", "_currentMagazines"];
params ["_target", "_magazineClass"];
_return = [false, [], 0];
{
- _magazines = [];
- if (_x isEqualTo [-1]) then {
- _magazines = [_target, _x] call FUNC(getConfigMagazines);
- } else {
- _magazines = _target magazinesTurret _x;
- };
+ _magazines = [_target, _x] call FUNC(getConfigMagazines);
if (_magazineClass in _magazines) then {
- _cnt = {_x == _magazineClass} count (_target magazinesTurret _x);
+ _currentMagazines = {_x == _magazineClass} count (_target magazinesTurret _x);
if ((_target magazineTurretAmmo [_magazineClass, _x]) < getNumber (configFile >> "CfgMagazines" >> _magazineClass >> "count")) exitWith {
- _return = [true, _x, _cnt];
+ _return = [true, _x, _currentMagazines];
};
- if (_cnt < ([_target, _x, _magazineClass] call FUNC(getMaxMagazines))) exitWith {
- _return = [true, _x, _cnt];
+ if (_currentMagazines < ([_target, _x, _magazineClass] call FUNC(getMaxMagazines))) exitWith {
+ _return = [true, _x, _currentMagazines];
};
};
diff --git a/addons/rearm/functions/fnc_grabAmmo.sqf b/addons/rearm/functions/fnc_grabAmmo.sqf
index 0b62cb69d5..161627da28 100644
--- a/addons/rearm/functions/fnc_grabAmmo.sqf
+++ b/addons/rearm/functions/fnc_grabAmmo.sqf
@@ -16,7 +16,7 @@
*/
#include "script_component.hpp"
-params ["_dummy", "_unit"];
+params [["_dummy", objNull, [objNull]], ["_unit", objNull, [objNull]]];
REARM_HOLSTER_WEAPON
[_unit, "forceWalk", QGVAR(vehRearm), true] call EFUNC(common,statusEffect_set);
diff --git a/addons/rearm/functions/fnc_handleKilled.sqf b/addons/rearm/functions/fnc_handleKilled.sqf
index b0cdabaed5..5f80246f52 100644
--- a/addons/rearm/functions/fnc_handleKilled.sqf
+++ b/addons/rearm/functions/fnc_handleKilled.sqf
@@ -15,7 +15,7 @@
*/
#include "script_component.hpp"
-params ["_unit"];
+params [["_unit", objNull, [objNull]]];
if (!local _unit) exitWith {};
diff --git a/addons/rearm/functions/fnc_handleUnconscious.sqf b/addons/rearm/functions/fnc_handleUnconscious.sqf
index f9d703f4ec..eab25fcf64 100644
--- a/addons/rearm/functions/fnc_handleUnconscious.sqf
+++ b/addons/rearm/functions/fnc_handleUnconscious.sqf
@@ -16,7 +16,7 @@
*/
#include "script_component.hpp"
-params ["_unit", "_isUnconscious"];
+params [["_unit", objNull, [objNull]], ["_isUnconscious", false, [false]]];
if (!local _unit || {!_isUnconscious}) exitWith {};
diff --git a/addons/rearm/functions/fnc_makeDummy.sqf b/addons/rearm/functions/fnc_makeDummy.sqf
index 97ab46fdbc..5c19f8f12d 100644
--- a/addons/rearm/functions/fnc_makeDummy.sqf
+++ b/addons/rearm/functions/fnc_makeDummy.sqf
@@ -16,8 +16,8 @@
*/
#include "script_component.hpp"
-params ["_obj", "_dirAndUp"];
+params [["_obj", objNull, [objNull]], ["_dirAndUp", [[1,0,0],[0,0,1]], [[]]]];
_obj setVectorDirAndUp _dirAndUp;
_obj allowDamage false;
-player disableCollisionWith _obj;
+ACE_player disableCollisionWith _obj;
diff --git a/addons/rearm/functions/fnc_moduleRearmSettings.sqf b/addons/rearm/functions/fnc_moduleRearmSettings.sqf
index ec5edd1666..af627862da 100644
--- a/addons/rearm/functions/fnc_moduleRearmSettings.sqf
+++ b/addons/rearm/functions/fnc_moduleRearmSettings.sqf
@@ -17,7 +17,7 @@
*/
#include "script_component.hpp"
-params ["_logic", "", "_activated"];
+params ["_logic", "", ["_activated", false, [false]]];
if (!_activated) exitWith {};
diff --git a/addons/rearm/functions/fnc_pickUpAmmo.sqf b/addons/rearm/functions/fnc_pickUpAmmo.sqf
index eaaa55ade6..546fc318b7 100644
--- a/addons/rearm/functions/fnc_pickUpAmmo.sqf
+++ b/addons/rearm/functions/fnc_pickUpAmmo.sqf
@@ -17,7 +17,7 @@
#include "script_component.hpp"
private ["_magazineClass"];
-params ["_target", "_unit"];
+params [["_target", objNull, [objNull]], ["_unit", objNull, [objNull]]];
_dummy = _unit getVariable [QGVAR(dummy), objNull];
if !(isNull _dummy) exitWith {};
diff --git a/addons/rearm/functions/fnc_rearm.sqf b/addons/rearm/functions/fnc_rearm.sqf
index 3208dbfb6f..61009b085d 100644
--- a/addons/rearm/functions/fnc_rearm.sqf
+++ b/addons/rearm/functions/fnc_rearm.sqf
@@ -16,7 +16,7 @@
#include "script_component.hpp"
private ["_magazineClass", "_ammo", "_tmpCal", "_cal", "_idx", "_needRearmMags", "_magazineDisplayName"];
-params ["_unit"];
+params [["_unit", objNull, [objNull]]];
_dummy = _unit getVariable [QGVAR(dummy), objNull];
if (isNull _dummy) exitwith {false};
diff --git a/addons/rearm/functions/fnc_rearmEntireVehicle.sqf b/addons/rearm/functions/fnc_rearmEntireVehicle.sqf
index c1c08dce52..27fd20c528 100644
--- a/addons/rearm/functions/fnc_rearmEntireVehicle.sqf
+++ b/addons/rearm/functions/fnc_rearmEntireVehicle.sqf
@@ -16,8 +16,7 @@
* Public: No
*/
#include "script_component.hpp"
-
-params ["_target", "_unit", "_vehicle"]; // _target is for future possible finite ammo, _unit placeholder
+params [["_target", objNull, [objNull]], ["_unit", objNull, [objNull]], ["_vehicle", objNull, [objNull]]]; // _target is for future possible finite ammo, _unit placeholder
[
10,
diff --git a/addons/rearm/functions/fnc_rearmEntireVehicleSuccess.sqf b/addons/rearm/functions/fnc_rearmEntireVehicleSuccess.sqf
index cddce3ac3a..c12286516c 100644
--- a/addons/rearm/functions/fnc_rearmEntireVehicleSuccess.sqf
+++ b/addons/rearm/functions/fnc_rearmEntireVehicleSuccess.sqf
@@ -16,7 +16,7 @@
#include "script_component.hpp"
private ["_turretPath", "_magazines", "_magazine", "_currentMagazines", "_maxMagazines", "_maxRounds", "_currentRounds"];
-params ["_vehicle"];
+params [["_vehicle", objNull, [objNull]]];
if (isServer) then {
{
diff --git a/addons/rearm/functions/fnc_rearmEntireVehicleSuccessLocal.sqf b/addons/rearm/functions/fnc_rearmEntireVehicleSuccessLocal.sqf
index 962ffa4c0a..7ebd4b8eba 100644
--- a/addons/rearm/functions/fnc_rearmEntireVehicleSuccessLocal.sqf
+++ b/addons/rearm/functions/fnc_rearmEntireVehicleSuccessLocal.sqf
@@ -4,6 +4,7 @@
*
* Arguments:
* 0: Vehicle
+ * 1: TurretPath
*
* Return Value:
* None
@@ -16,14 +17,9 @@
#include "script_component.hpp"
private ["_magazines", "_magazine", "_currentMagazines", "_maxMagazines", "_maxRounds", "_currentRounds"];
-params ["_vehicle", "_turretPath"];
+params [["_vehicle", objNull, [objNull]], ["_turretPath", [], [[]]]];
-_magazines = [];
-if (_turretPath isEqualTo [-1]) then {
- _magazines = [_vehicle, _turretPath] call FUNC(getConfigMagazines);
-} else {
- _magazines = _vehicle magazinesTurret _turretPath;
-};
+_magazines = [_vehicle, _turretPath] call FUNC(getConfigMagazines);
{
_magazine = _x;
_currentMagazines = { _x == _magazine } count (_vehicle magazinesTurret _turretPath);
diff --git a/addons/rearm/functions/fnc_rearmSuccess.sqf b/addons/rearm/functions/fnc_rearmSuccess.sqf
index 7c9b151a39..81cda9f262 100644
--- a/addons/rearm/functions/fnc_rearmSuccess.sqf
+++ b/addons/rearm/functions/fnc_rearmSuccess.sqf
@@ -22,7 +22,7 @@
#include "script_component.hpp"
private ["_dummy", "_weaponSelect", "_turretOwnerID"];
-params ["_args"];
+params [["_args", [objNull, objNull, [], 0, "", 0], [[]], [6]]];
_args params ["_target", "_unit", "_turretPath", "_numMagazines", "_magazineClass", "_numRounds"];
//hint format ["Target: %1\nTurretPath: %2\nNumMagazines: %3\nMagazine: %4\nNumRounds: %5", _target, _turretPath, _numMagazines, _magazineClass, _numRounds];
diff --git a/addons/rearm/functions/fnc_rearmSuccessLocal.sqf b/addons/rearm/functions/fnc_rearmSuccessLocal.sqf
index f869690808..44761d3d17 100644
--- a/addons/rearm/functions/fnc_rearmSuccessLocal.sqf
+++ b/addons/rearm/functions/fnc_rearmSuccessLocal.sqf
@@ -21,8 +21,8 @@
*/
#include "script_component.hpp"
-private ["_rounds", "_currentRounds", "_maxMagazines", "_dummy", "_weaponSelect"];
-params ["_args"];
+private ["_rounds", "_currentRounds", "_maxMagazines", "_currentMagazines", "_dummy", "_weaponSelect"];
+params [["_args", [objNull, objNull, [], 0, "", 0], [[]], [6]]];
_args params ["_target", "_unit", "_turretPath", "_numMagazines", "_magazineClass", "_numRounds"];
//hint format ["Target: %1\nTurretPath: %2\nNumMagazines: %3\nMagazine: %4\nNumRounds: %5\nUnit: %6", _target, _turretPath, _numMagazines, _magazineClass, _numRounds, _unit];
@@ -32,23 +32,39 @@ _currentRounds = 0;
_maxMagazines = [_target, _turretPath, _magazineClass] call FUNC(getMaxMagazines);
if (_maxMagazines == 1) then {
+ _currentMagazines = { _x == _magazineClass } count (_target magazinesTurret _turretPath);
+ if (_currentMagazines == 0 && {!(_turretPath isEqualTo [-1])}) then {
+ // Driver gun will always retain it's magazines
+ _target addMagazineTurret [_magazineClass, _turretPath];
+ };
if (GVAR(level) == 1) then {
// Fill magazine completely
_target setMagazineTurretAmmo [_magazineClass, _rounds, _turretPath];
- ["displayTextStructured", [_unit], [[LSTRING(Hint_RearmedTriple), _rounds,
+ [QEGVAR(common,displayTextStructured),
+ [
+ [LSTRING(Hint_RearmedTriple), _rounds,
getText(configFile >> "CfgMagazines" >> _magazineClass >> "displayName"),
- getText(configFile >> "CfgVehicles" >> (typeOf _target) >> "displayName")], 3, _unit]] call EFUNC(common,targetEvent);
+ getText(configFile >> "CfgVehicles" >> (typeOf _target) >> "displayName")], 3, _unit
+ ],
+ [_unit]] call CBA_fnc_targetEvent;
} else {
// Fill only at most _numRounds
_target setMagazineTurretAmmo [_magazineClass, ((_target magazineTurretAmmo [_magazineClass, _turretPath]) + _numRounds) min _rounds, _turretPath];
- ["displayTextStructured", [_unit], [[LSTRING(Hint_RearmedTriple), _numRounds,
+ [QEGVAR(common,displayTextStructured),
+ [
+ [LSTRING(Hint_RearmedTriple), _numRounds,
getText(configFile >> "CfgMagazines" >> _magazineClass >> "displayName"),
- getText(configFile >> "CfgVehicles" >> (typeOf _target) >> "displayName")], 3, _unit]] call EFUNC(common,targetEvent);
+ getText(configFile >> "CfgVehicles" >> (typeOf _target) >> "displayName")], 3, _unit
+ ],
+ [_unit]] call CBA_fnc_targetEvent;
};
} else {
- for "_idx" from 1 to _maxMagazines do {
+ for "_idx" from 1 to (_maxMagazines+1) do {
_currentRounds = _target magazineTurretAmmo [_magazineClass, _turretPath];
- if (_currentRounds > 0) exitWith {
+ if (_currentRounds > 0 || {_idx == (_maxMagazines+1)}) exitWith {
+ if (_idx == (_maxMagazines+1) && {!(_turretPath isEqualTo [-1])}) then {
+ _target addMagazineTurret [_magazineClass, _turretPath];
+ };
if (GVAR(level) == 2) then {
//hint format ["Target: %1\nTurretPath: %2\nNumMagazines: %3\nMaxMagazines %4\nMagazine: %5\nNumRounds: %6\nMagazine: %7", _target, _turretPath, _numMagazines, _maxMagazines, _currentRounds, _numRounds, _magazineClass];
// Fill only at most _numRounds
@@ -61,9 +77,13 @@ if (_maxMagazines == 1) then {
} else {
_target setMagazineTurretAmmo [_magazineClass, _currentRounds + _numRounds, _turretPath];
};
- ["displayTextStructured", [_unit], [[LSTRING(Hint_RearmedTriple), _numRounds,
+ [QEGVAR(common,displayTextStructured),
+ [
+ [LSTRING(Hint_RearmedTriple), _numRounds,
getText(configFile >> "CfgMagazines" >> _magazineClass >> "displayName"),
- getText(configFile >> "CfgVehicles" >> (typeOf _target) >> "displayName")], 3, _unit]] call EFUNC(common,targetEvent);
+ getText(configFile >> "CfgVehicles" >> (typeOf _target) >> "displayName")], 3, _unit
+ ],
+ [_unit]] call CBA_fnc_targetEvent;
} else {
// Fill current magazine completely and fill next magazine partially
_target setMagazineTurretAmmo [_magazineClass, _rounds, _turretPath];
@@ -71,9 +91,13 @@ if (_maxMagazines == 1) then {
_target addMagazineTurret [_magazineClass, _turretPath];
_target setMagazineTurretAmmo [_magazineClass, _currentRounds, _turretPath];
};
- ["displayTextStructured", [_unit], [[LSTRING(Hint_RearmedTriple), _rounds,
+ [QEGVAR(common,displayTextStructured),
+ [
+ [LSTRING(Hint_RearmedTriple), _rounds,
getText(configFile >> "CfgMagazines" >> _magazineClass >> "displayName"),
- getText(configFile >> "CfgVehicles" >> (typeOf _target) >> "displayName")], 3, _unit]] call EFUNC(common,targetEvent);
+ getText(configFile >> "CfgVehicles" >> (typeOf _target) >> "displayName")], 3, _unit
+ ],
+ [_unit]] call CBA_fnc_targetEvent;
};
};
_target removeMagazineTurret [_magazineClass, _turretPath];
diff --git a/addons/rearm/functions/fnc_storeAmmo.sqf b/addons/rearm/functions/fnc_storeAmmo.sqf
index e23efe0d7c..262affb1ef 100644
--- a/addons/rearm/functions/fnc_storeAmmo.sqf
+++ b/addons/rearm/functions/fnc_storeAmmo.sqf
@@ -17,12 +17,11 @@
#include "script_component.hpp"
private "_dummy";
-params ["_target", "_unit"];
+params [["_target", objNull, [objNull]], ["_unit", objNull, [objNull]]];
_dummy = _unit getVariable [QGVAR(dummy), objNull];
if (isNull _dummy) exitwith {};
-
[
5,
_unit,
diff --git a/addons/rearm/functions/fnc_takeAmmo.sqf b/addons/rearm/functions/fnc_takeAmmo.sqf
index 4f3ef7c9ef..d2de1e1b59 100644
--- a/addons/rearm/functions/fnc_takeAmmo.sqf
+++ b/addons/rearm/functions/fnc_takeAmmo.sqf
@@ -21,7 +21,7 @@
private ["_ammo", "_tmpCal", "_cal", "_idx"];
-params ["_target", "_unit", "_args"];
+params [["_target", objNull, [objNull]], ["_unit", objNull, [objNull]], ["_args", ["", objNull], [[]]]];
_args params ["_magazineClass", "_vehicle"];
_ammo = getText (configFile >> "CfgMagazines" >> _magazineClass >> "ammo");
diff --git a/addons/rearm/functions/fnc_takeSuccess.sqf b/addons/rearm/functions/fnc_takeSuccess.sqf
index 3ced9a729a..6d5966c9f9 100644
--- a/addons/rearm/functions/fnc_takeSuccess.sqf
+++ b/addons/rearm/functions/fnc_takeSuccess.sqf
@@ -19,7 +19,7 @@
#include "script_component.hpp"
private ["_ammo", "_dummyName", "_dummy", "_actionID"];
-params ["_args"];
+params [["_args", [objNull, "", objNull], [[]]]];
_args params ["_unit", "_magazineClass", "_target"]; // _target is for future possible finite ammo
[_unit, "forceWalk", QGVAR(vehRearm), true] call EFUNC(common,statusEffect_set);
diff --git a/addons/rearm/script_component.hpp b/addons/rearm/script_component.hpp
index dad20ed535..5d69987a56 100644
--- a/addons/rearm/script_component.hpp
+++ b/addons/rearm/script_component.hpp
@@ -33,4 +33,4 @@
#define REARM_UNHOLSTER_WEAPON \
_weaponSelect = _unit getVariable QGVAR(selectedWeaponOnRearm); \
_unit selectWeapon _weaponSelect; \
- _unit setVariable [QGVAR(selectedWeaponOnRefuel), nil];
+ _unit setVariable [QGVAR(selectedWeaponOnRearm), nil];
diff --git a/addons/rearm/stringtable.xml b/addons/rearm/stringtable.xml
index 26faace503..7806735c57 100644
--- a/addons/rearm/stringtable.xml
+++ b/addons/rearm/stringtable.xml
@@ -8,6 +8,9 @@
Настройки перевооружения
Ajustes de rearme
Nastavení přezbrojení
+ Impostazioni Riarmo
+ Parámetros de rearme
+ Options de réarmement
This module allows you to tweak rearm system settings.
@@ -16,6 +19,9 @@
Этот модуль позволяет изменить настройки системы перевооружения.
Este módulo permite que você ajuste o sistema de rearme.
Tento modul umožňuje upravovat systém přezbrojení.
+ Questo modulo ti consente di cambiare le impostazioni del sistema Riarmo.
+ Este módulo permite cambiar los parámetros de rearme.
+ Ce module autorise l'amélioration du système de réarmement.
Rearm Amount
@@ -24,6 +30,9 @@
Количество вооружения
Quantidade de rearme
Rychlost přezbrojení
+ Ammontare Riarmo
+ Velocidad de rearme
+ Quantité à réarmer
How fast should a vehicle be rearmed?
@@ -32,6 +41,9 @@
Как быстро техника должна перевооружаться?
Quão rápido o veículo deve ser rearmado?
Jak rychle bude vozidlo přezbrojeno?
+ Quanto velocemente dovrebbe essere riarmato un veicolo?
+ Cuán rápido es el proceso de rearme?
+ A quelle vitesse devrait être réarmé un véhicule ?
Entire Vehicle
@@ -40,6 +52,9 @@
Полностью техника
Todo o veículo
Celé vozidlo
+ Tutto il Veicolo
+ Vehículo completo
+ Véhicule entier
Entire Magazine
@@ -48,6 +63,9 @@
Полный магазин
Todo o carregador
Celý zásobník
+ Tutto il Caricatore
+ Cargador completo
+ Chargeur entier
Amount based on caliber
@@ -56,6 +74,9 @@
Количество зависит от калибра
Quantidade baseada no calibre
Rychlost závisí na ráži
+ Ammontare basato sul calibro
+ Cantidad basada en el calibre
+ Quantité basée sur le calibre
Rearm
@@ -64,30 +85,42 @@
Перевооружить
Rearmar
Přezbrojit
+ Riarma
+ Rearmar
+ Réarmer
- Rearming %1 with %2 ...
- Munitioniere %1 auf mit %2 ...
- Przezbrajanie %1 przy pomocy %2 ...
- Перевооружается %1 снарядами %2 ...
- Rearmando %1 com %2 ...
- Přezbrojuji %1 za pomoci %2 ...
+ Rearming %1 with %2...
+ Munitioniere %1 auf mit %2...
+ Przezbrajanie %1 przy pomocy %2...
+ Перевооружается %1 снарядами %2...
+ Rearmando %1 com %2...
+ Přezbrojuji %1 za pomoci %2...
+ Sto Riarmando %1 con %2...
+ Rearmando %1 con %2...
+ Réarmement de %1 avec %2...
- Rearming %1 ...
- Munitioniere %1 auf ...
- Przezbrajanie %1 ...
- Перевооружается %1 ...
- Rearmando %1 ...
- Přezbrojuji %1 ...
+ Rearming %1...
+ Munitioniere %1 auf...
+ Przezbrajanie %1...
+ Перевооружается %1...
+ Rearmando %1...
+ Přezbrojuji %1...
+ Riarmando %1...
+ Rearmando %1...
+ Réarmement de %1...
- Taking %1 for %2 ...
- Nehme %1 für %2 ...
- Pobieranie %1 dla %2 ...
- Забираем %1 для %2 ...
- Pegando %1 para %2 ...
- Beru %1 pro %2 ...
+ Taking %1 for %2...
+ Nehme %1 für %2...
+ Pobieranie %1 dla %2...
+ Забираем %1 для %2...
+ Pegando %1 para %2...
+ Beru %1 pro %2...
+ Sto prendendo %1 per %2...
+ Tomando %1 para %2...
+ Prend %1 pour %2...
Take ammo
@@ -96,6 +129,9 @@
Взять боекомплект
Tomar munição
Vít munici
+ Prendi munizioni
+ Tomar munición
+ Prendre la munition
Pick up ammo
@@ -104,6 +140,9 @@
Поднять боекомплект
Pegar munição
Sebrat munici
+ Raccogli munizioni
+ Levantar munición
+ Ramasser la munition
Store ammo
@@ -112,21 +151,30 @@
Сохранить боекомплект
Guardar munição
Uskladnit munici
+ Riponi munizioni
+ Guardar munición
+ Stocker la munition
- Storing %1 in %2 ...
- Verstaue %1 in %2 ...
- Przechowywanie %1 w %2 ...
- Сохраняется %1 в %2 ...
- Guardando %1 em %2 ...
- Ukládám %1 v %2 ...
+ Storing %1 in %2...
+ Verstaue %1 in %2...
+ Przechowywanie %1 w %2...
+ Сохраняется %1 в %2...
+ Guardando %1 em %2...
+ Ukládám %1 v %2...
+ Sto riponendo %1 in %2...
+ Guardando %1 en %2...
+ Stocke %1 dans %2...
- Picking up ammo ...
- Nehme Munition ...
- Podnoszenie amunicji ...
- Поднятие боекомплекта ...
- Pegando munição ...
+ Picking up ammo...
+ Nehme Munition...
+ Podnoszenie amunicji...
+ Поднятие боекомплекта...
+ Pegando munição...
+ Sto raccogliendo le munizioni...
+ Levantando munición...
+ Ramassage des munitions...
Rearmed %1 rounds of %2 on %3
@@ -135,6 +183,9 @@
Перевооружено %1 снарядов %2 на %3
Rearmando %1 cartuchos de %2 em %3
Přezbrojeno % nábojů z %2 u %3
+ Riarmati %1 colpi di %2 su %3
+ Rearmadas %1 rondas de %2 en %3
+ %1 balles réarmées de %2 dans %3
Smoke Screen
@@ -165,6 +216,9 @@
30мм ОФЗ
30mm HEI
30mm HEI
+ 30mm HEI
+ 30mm HEI
+ 30mm HEI
30mm HEI-T
@@ -173,6 +227,9 @@
30мм ОФЗТ
30mm HEI-T
30mm HEI-T
+ 30mm HEI-T
+ 30mm HEI-T
+ 30mm HEI-T
AIM-9 Sidewinder
@@ -181,6 +238,9 @@
AIM-9 Sidewinder
AIM-9 Sidewinder
AIM-9 Sidewinder
+ AIM-9 Sidewinder
+ AIM-9 Sidewinder
+ AIM-9 Sidewinder
Wympel R-73
@@ -189,6 +249,9 @@
Р-73 (Вымпел)
Wympel R-73
Wympel R-73
+ Wympel R-73
+ Wympel R-73
+ Wympel R-73
AGM-65 Maverick
@@ -197,6 +260,9 @@
AGM-65 Maverick
AGM-65 Maverick
AGM-65 Maverick
+ AGM-65 Maverick
+ AGM-65 Maverick
+ AGM-65 Maverick
Kh-25MTP
@@ -205,6 +271,9 @@
Х-25МТП
Ch-25MTP
Kh-25MTP
+ Kh-25MTP
+ Kh-25MTP
+ Kh-25MTP
Hydra 70 HE
@@ -213,6 +282,9 @@
Hydra 70 HE
Hydra 70 HE
Hydra 70 HE
+ Hydra 70 HE
+ Hydra 70 HE
+ Hydra 70 HE
S-8 HE
@@ -221,6 +293,9 @@
С-8 ОФ
S-8 HE
S-8 HE
+ S-8 HE
+ S-8 HE
+ S-8 HE
Hydra 70 AP
@@ -229,6 +304,9 @@
Hydra 70 AP
Hydra 70 AP
Hydra 70 AP
+ Hydra 70 AP
+ Hydra 70 AP
+ Hydra 70 AP
S-8 AP
@@ -237,6 +315,9 @@
С-8КОМ
S-8 AP
S-8 AP
+ S-8 AP
+ S-8 AP
+ S-8 AP
GBU-12
@@ -245,6 +326,9 @@
GBU-12
GBU-12
GBU-12
+ GBU-12
+ GBU-12
+ GBU-12
FAB-250M-54
@@ -253,6 +337,9 @@
ФАБ-250М-54
FAB-250M-54
FAB-250M-54
+ FAB-250M-54
+ FAB-250M-54
+ FAB-250M-54
\ No newline at end of file
diff --git a/addons/recoil/CfgEventHandlers.hpp b/addons/recoil/CfgEventHandlers.hpp
index 76963cf182..c0726f161a 100644
--- a/addons/recoil/CfgEventHandlers.hpp
+++ b/addons/recoil/CfgEventHandlers.hpp
@@ -1,3 +1,10 @@
+
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
diff --git a/addons/recoil/CfgMoves.hpp b/addons/recoil/CfgMoves.hpp
index ecad382cb5..29bca9c81a 100644
--- a/addons/recoil/CfgMoves.hpp
+++ b/addons/recoil/CfgMoves.hpp
@@ -7,7 +7,7 @@
// Go through all modes that have a camshakefire defined and change it to ours.
class CfgMovesBasic {
class Default {
- camShakeFire = ACE_CAMSHAKEFIRE_NORMAL;
+ camShakeFire = ACE_CAMSHAKEFIRE_BASE;
};
};
@@ -69,7 +69,7 @@ class CfgMovesMaleSdr: CfgMovesBasic {
class AmovPknlMstpSrasWrflDnon;
class AmovPknlMwlkSrasWrflDf: AmovPknlMstpSrasWrflDnon {
- camShakeFire = ACE_CAMSHAKEFIRE_NORMAL;
+ camShakeFire = ACE_CAMSHAKEFIRE_BASE;
};
class AmovPknlMrunSrasWrflDf;
diff --git a/addons/recoil/XEH_PREP.hpp b/addons/recoil/XEH_PREP.hpp
new file mode 100644
index 0000000000..9e34c47492
--- /dev/null
+++ b/addons/recoil/XEH_PREP.hpp
@@ -0,0 +1,2 @@
+
+PREP(camshake);
diff --git a/addons/recoil/XEH_postInit.sqf b/addons/recoil/XEH_postInit.sqf
index e6b694646f..29e5464612 100644
--- a/addons/recoil/XEH_postInit.sqf
+++ b/addons/recoil/XEH_postInit.sqf
@@ -1,4 +1,4 @@
#include "script_component.hpp"
// Register fire event handler
-["firedPlayer", DFUNC(camShake)] call EFUNC(common,addEventHandler);
+["ace_firedPlayer", DFUNC(camShake)] call CBA_fnc_addEventHandler;
diff --git a/addons/recoil/XEH_preInit.sqf b/addons/recoil/XEH_preInit.sqf
index f6d04886c1..c503c2edbc 100644
--- a/addons/recoil/XEH_preInit.sqf
+++ b/addons/recoil/XEH_preInit.sqf
@@ -3,6 +3,6 @@
ADDON = false;
-PREP(camshake);
+#include "XEH_PREP.hpp"
ADDON = true;
diff --git a/addons/recoil/XEH_preStart.sqf b/addons/recoil/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/recoil/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/recoil/config.cpp b/addons/recoil/config.cpp
index 5b8002bc37..e6eee4a9af 100644
--- a/addons/recoil/config.cpp
+++ b/addons/recoil/config.cpp
@@ -6,8 +6,9 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
- author[] = {"commy2"};
- authorUrl = "";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"commy2"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
diff --git a/addons/refuel/ACE_Settings.hpp b/addons/refuel/ACE_Settings.hpp
index 0ae0accaad..b38a880641 100644
--- a/addons/refuel/ACE_Settings.hpp
+++ b/addons/refuel/ACE_Settings.hpp
@@ -1,5 +1,6 @@
class ACE_Settings {
class GVAR(rate) {
+ category = ECSTRING(OptionsMenu,CategoryLogistics);
displayName = CSTRING(RefuelSettings_speed_DisplayName);
description = CSTRING(RefuelSettings_speed_Description);
value = 1;
diff --git a/addons/refuel/CfgEventHandlers.hpp b/addons/refuel/CfgEventHandlers.hpp
index f1a9f1a3c8..c6f26efe1a 100644
--- a/addons/refuel/CfgEventHandlers.hpp
+++ b/addons/refuel/CfgEventHandlers.hpp
@@ -1,3 +1,10 @@
+
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
diff --git a/addons/refuel/CfgVehicles.hpp b/addons/refuel/CfgVehicles.hpp
index 5b6d9f483b..6774140cc7 100644
--- a/addons/refuel/CfgVehicles.hpp
+++ b/addons/refuel/CfgVehicles.hpp
@@ -1,3 +1,4 @@
+
#define MACRO_REFUEL_ACTIONS \
class ACE_Actions: ACE_Actions { \
class ACE_MainActions: ACE_MainActions { \
@@ -8,41 +9,41 @@
statement = ""; \
showDisabled = 0; \
priority = 2; \
- icon = PATHTOF(ui\icon_refuel_interact.paa); \
+ icon = QPATHTOF(ui\icon_refuel_interact.paa); \
class GVAR(TakeNozzle) { \
displayName = CSTRING(TakeNozzle); \
condition = QUOTE([ARR_2(_player,_target)] call FUNC(canTakeNozzle)); \
statement = QUOTE([ARR_3(_player,_target,objNull)] call FUNC(TakeNozzle)); \
exceptions[] = {"isNotInside"}; \
- icon = PATHTOF(ui\icon_refuel_interact.paa); \
+ icon = QPATHTOF(ui\icon_refuel_interact.paa); \
}; \
class GVAR(CheckFuelCounter) { \
displayName = CSTRING(CheckFuelCounter); \
condition = "true"; \
statement = QUOTE([ARR_2(_player,_target)] call FUNC(readFuelCounter)); \
exceptions[] = {"isNotInside"}; \
- icon = PATHTOF(ui\icon_refuel_interact.paa); \
+ icon = QPATHTOF(ui\icon_refuel_interact.paa); \
}; \
class GVAR(CheckFuel) { \
displayName = CSTRING(CheckFuel); \
condition = QUOTE([ARR_2(_player,_target)] call FUNC(canCheckFuel)); \
statement = QUOTE([ARR_2(_player,_target)] call FUNC(checkFuel)); \
exceptions[] = {"isNotInside"}; \
- icon = PATHTOF(ui\icon_refuel_interact.paa); \
+ icon = QPATHTOF(ui\icon_refuel_interact.paa); \
}; \
class GVAR(Connect) { \
displayName = CSTRING(Connect); \
condition = QUOTE([ARR_2(_player,_target)] call FUNC(canConnectNozzle)); \
statement = QUOTE([ARR_2(_player,_target)] call DFUNC(connectNozzle)); \
exceptions[] = {"isNotInside"}; \
- icon = PATHTOF(ui\icon_refuel_interact.paa); \
+ icon = QPATHTOF(ui\icon_refuel_interact.paa); \
}; \
class GVAR(Return) { \
displayName = CSTRING(Return); \
condition = QUOTE([ARR_2(_player,_target)] call FUNC(canReturnNozzle)); \
statement = QUOTE([ARR_2(_player,_target)] call DFUNC(returnNozzle)); \
exceptions[] = {"isNotInside"}; \
- icon = PATHTOF(ui\icon_refuel_interact.paa); \
+ icon = QPATHTOF(ui\icon_refuel_interact.paa); \
}; \
}; \
}; \
@@ -58,13 +59,13 @@
statement = ""; \
showDisabled = 0; \
priority = 2; \
- icon = PATHTOF(ui\icon_refuel_interact.paa); \
+ icon = QPATHTOF(ui\icon_refuel_interact.paa); \
class GVAR(Connect) { \
displayName = CSTRING(Connect); \
condition = QUOTE([ARR_2(_player,_target)] call FUNC(canConnectNozzle)); \
statement = QUOTE([ARR_2(_player,_target)] call DFUNC(connectNozzle)); \
exceptions[] = {"isNotInside"}; \
- icon = PATHTOF(ui\icon_refuel_interact.paa); \
+ icon = QPATHTOF(ui\icon_refuel_interact.paa); \
}; \
}; \
}; \
@@ -79,44 +80,46 @@
statement = ""; \
showDisabled = 0; \
priority = 2; \
- icon = PATHTOF(ui\icon_refuel_interact.paa); \
+ icon = QPATHTOF(ui\icon_refuel_interact.paa); \
class GVAR(PickUpNozzle) { \
displayName = CSTRING(TakeNozzle); \
condition = QUOTE([ARR_2(_player,_target)] call FUNC(canTakeNozzle)); \
statement = QUOTE([ARR_3(_player,objNull,_target)] call FUNC(TakeNozzle)); \
exceptions[] = {"isNotInside"}; \
- icon = PATHTOF(ui\icon_refuel_interact.paa); \
+ icon = QPATHTOF(ui\icon_refuel_interact.paa); \
}; \
class GVAR(TurnOn) { \
displayName = CSTRING(TurnOn); \
condition = QUOTE([ARR_2(_player,_target)] call FUNC(canTurnOn)); \
statement = QUOTE([ARR_2(_player,_target)] call DFUNC(turnOn)); \
exceptions[] = {"isNotInside"}; \
- icon = PATHTOF(ui\icon_refuel_interact.paa); \
+ icon = QPATHTOF(ui\icon_refuel_interact.paa); \
}; \
class GVAR(TurnOff) { \
displayName = CSTRING(TurnOff); \
condition = QUOTE([ARR_2(_player,_target)] call FUNC(canTurnOff)); \
statement = QUOTE([ARR_2(_player,_target)] call DFUNC(turnOff)); \
exceptions[] = {"isNotInside"}; \
- icon = PATHTOF(ui\icon_refuel_interact.paa); \
+ icon = QPATHTOF(ui\icon_refuel_interact.paa); \
}; \
class GVAR(Disconnect) { \
displayName = CSTRING(Disconnect); \
condition = QUOTE([ARR_2(_player,_target)] call FUNC(canDisconnect)); \
statement = QUOTE([ARR_2(_player,_target)] call DFUNC(disconnect)); \
exceptions[] = {"isNotInside"}; \
- icon = PATHTOF(ui\icon_refuel_interact.paa); \
+ icon = QPATHTOF(ui\icon_refuel_interact.paa); \
}; \
}; \
};
+class CBA_Extended_EventHandlers;
+
class CfgVehicles {
class ACE_Module;
class ACE_moduleRefuelSettings: ACE_Module {
scope = 2;
displayName = CSTRING(RefuelSettings_Module_DisplayName);
- icon = QUOTE(PATHTOF(ui\icon_module_refuel.paa));
+ icon = QPATHTOF(ui\icon_module_refuel.paa);
category = "ACE_Logistics";
function = QFUNC(moduleRefuelSettings);
functionPriority = 1;
@@ -135,29 +138,28 @@ class CfgVehicles {
class ThingX;
class ACE_refuel_fuelNozzle: ThingX {
- XEH_ENABLED;
+ class EventHandlers {
+ class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
+ };
+
MACRO_NOZZLE_ACTIONS
displayName = QGVAR(fuelNozzle);
scope = 1;
scopeCurator = 1;
- model = PATHTOF(data\nozzle.p3d);
+ model = QPATHTOF(data\nozzle.p3d);
};
class All;
-
class Static: All {};
-
class Building: Static {};
-
class NonStrategic: Building {};
-
class HouseBase: NonStrategic {};
-
class House: HouseBase {};
-
class House_F: House {};
class House_Small_F: House_F {
+ class EventHandlers;
+
class ACE_Actions {
class ACE_MainActions {
displayName = ECSTRING(interaction,MainAction);
@@ -478,20 +480,23 @@ class CfgVehicles {
GVAR(fuelCargo) = 10000;
};
- class Slingload_base_F;
- class Slingload_01_Base_F: Slingload_base_F {
+ class ReammoBox_F: ThingX {
class ACE_Actions {
- class ACE_MainActions {
- displayName = ECSTRING(interaction,MainAction);
- selection = "";
- distance = 10;
- condition = "true";
- };
+ class ACE_MainActions {};
};
};
+ class Slingload_base_F: ReammoBox_F {};
- class B_Slingload_01_Fuel_F: Slingload_01_Base_F {
- XEH_ENABLED;
+ class Pod_Heli_Transport_04_base_F: Slingload_base_F {};
+ class Land_Pod_Heli_Transport_04_fuel_F: Pod_Heli_Transport_04_base_F {
+ transportFuel = 0; //3k
+ MACRO_REFUEL_ACTIONS
+ GVAR(hooks)[] = {{-1.49,1.41,-.3}};
+ GVAR(fuelCargo) = 10000;
+ };
+
+ class Slingload_01_Base_F: Slingload_base_F {};
+ class B_Slingload_01_Fuel_F: Slingload_01_Base_F {
transportFuel = 0; //3k
MACRO_REFUEL_ACTIONS
GVAR(hooks)[] = {{0.55,3.02,-0.5},{-0.52,3.02,-0.5}};
@@ -505,13 +510,6 @@ class CfgVehicles {
GVAR(fuelCargo) = 10000;
};
- class Pod_Heli_Transport_04_base_F: StaticWeapon {};
- class Land_Pod_Heli_Transport_04_fuel_F: Pod_Heli_Transport_04_base_F {
- transportFuel = 0; //3k
- MACRO_REFUEL_ACTIONS
- GVAR(hooks)[] = {{-1.49,1.41,-.3}};
- GVAR(fuelCargo) = 10000;
- };
class StorageBladder_base_F: NonStrategic {
class ACE_Actions {
@@ -524,7 +522,10 @@ class CfgVehicles {
};
};
class Land_StorageBladder_01_F: StorageBladder_base_F {
- XEH_ENABLED;
+ class EventHandlers {
+ class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
+ };
+
MACRO_REFUEL_ACTIONS
transportFuel = 0; //60k
GVAR(hooks)[] = {{-3.35,2.45,0.17}};
@@ -533,7 +534,10 @@ class CfgVehicles {
// Vanilla buildings
class Land_Fuelstation_Feed_F: House_Small_F {
- XEH_ENABLED;
+ class EventHandlers {
+ class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
+ };
+
transportFuel = 0; //50k
MACRO_REFUEL_ACTIONS
GVAR(hooks)[] = {{0,0,-0.5}};
@@ -541,7 +545,10 @@ class CfgVehicles {
};
class Land_fs_feed_F: House_Small_F {
- XEH_ENABLED;
+ class EventHandlers {
+ class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
+ };
+
transportFuel = 0; //50k
MACRO_REFUEL_ACTIONS
GVAR(hooks)[] = {{-0.4,0.022,-.23}};
diff --git a/addons/refuel/XEH_PREP.hpp b/addons/refuel/XEH_PREP.hpp
new file mode 100644
index 0000000000..dac451da17
--- /dev/null
+++ b/addons/refuel/XEH_PREP.hpp
@@ -0,0 +1,28 @@
+
+PREP(canCheckFuel);
+PREP(canConnectNozzle);
+PREP(canDisconnect);
+PREP(canReturnNozzle);
+PREP(canTakeNozzle);
+PREP(canTurnOff);
+PREP(canTurnOn);
+PREP(checkFuel);
+PREP(connectNozzle);
+PREP(connectNozzleAction);
+PREP(disconnect);
+PREP(dropNozzle);
+PREP(getFuel);
+PREP(handleDisconnect);
+PREP(handleKilled);
+PREP(handleUnconscious);
+PREP(makeJerryCan);
+PREP(moduleRefuelSettings);
+PREP(readFuelCounter);
+PREP(refuel);
+PREP(reset);
+PREP(resetLocal);
+PREP(returnNozzle);
+PREP(setFuel);
+PREP(takeNozzle);
+PREP(turnOff);
+PREP(turnOn);
diff --git a/addons/refuel/XEH_postInit.sqf b/addons/refuel/XEH_postInit.sqf
index d823fcf039..8c28464287 100644
--- a/addons/refuel/XEH_postInit.sqf
+++ b/addons/refuel/XEH_postInit.sqf
@@ -1,3 +1,11 @@
#include "script_component.hpp"
-["medical_onUnconscious", {_this call FUNC(handleUnconscious)}] call EFUNC(common,addEventHandler);
+["ace_unconscious", {_this call FUNC(handleUnconscious)}] call CBA_fnc_addEventHandler;
+
+if (isServer) then {
+ addMissionEventHandler ["HandleDisconnect", {_this call FUNC(handleDisconnect)}];
+};
+
+[QGVAR(resetLocal), {
+ _this call FUNC(resetLocal);
+}] call CBA_fnc_addEventHandler;
diff --git a/addons/refuel/XEH_preInit.sqf b/addons/refuel/XEH_preInit.sqf
index 691df0478d..a7feade1c3 100644
--- a/addons/refuel/XEH_preInit.sqf
+++ b/addons/refuel/XEH_preInit.sqf
@@ -2,31 +2,6 @@
ADDON = false;
-PREP(canCheckFuel);
-PREP(canConnectNozzle);
-PREP(canDisconnect);
-PREP(canReturnNozzle);
-PREP(canTakeNozzle);
-PREP(canTurnOff);
-PREP(canTurnOn);
-PREP(checkFuel);
-PREP(connectNozzle);
-PREP(connectNozzleAction);
-PREP(disconnect);
-PREP(dropNozzle);
-PREP(getFuel);
-PREP(handleKilled);
-PREP(handleUnconscious);
-PREP(makeJerryCan);
-PREP(moduleRefuelSettings);
-PREP(readFuelCounter);
-PREP(refuel);
-PREP(reset);
-PREP(resetLocal);
-PREP(returnNozzle);
-PREP(setFuel);
-PREP(takeNozzle);
-PREP(turnOff);
-PREP(turnOn);
+#include "XEH_PREP.hpp"
ADDON = true;
diff --git a/addons/refuel/XEH_preStart.sqf b/addons/refuel/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/refuel/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/refuel/config.cpp b/addons/refuel/config.cpp
index 6140cefe8c..2ace24fb92 100644
--- a/addons/refuel/config.cpp
+++ b/addons/refuel/config.cpp
@@ -6,8 +6,9 @@ class CfgPatches {
weapons[] = {"ACE_refuel_fuelNozzle"};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_interaction"};
- author[] = {"GitHawk"};
- authorUrl = "";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"GitHawk"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
diff --git a/addons/refuel/functions/fnc_canConnectNozzle.sqf b/addons/refuel/functions/fnc_canConnectNozzle.sqf
index a8495d3cd2..396931d9ba 100644
--- a/addons/refuel/functions/fnc_canConnectNozzle.sqf
+++ b/addons/refuel/functions/fnc_canConnectNozzle.sqf
@@ -19,8 +19,13 @@
params [["_unit", objNull, [objNull]], ["_target", objNull, [objNull]]];
private _nozzle = _unit getVariable [QGVAR(nozzle), objNull];
+private _engine = false;
+
+if (_target isKindOf "AllVehicles") then {
+ _engine = isEngineOn _target;
+};
!(isNull _nozzle ||
- {isEngineOn _target} ||
+ {_engine} ||
{(_target distance _unit) > REFUEL_ACTION_DISTANCE} ||
{!isNull (_target getVariable [QGVAR(nozzle), objNull])}) // TODO verify cant connect multiple fuel lines
diff --git a/addons/refuel/functions/fnc_canTurnOn.sqf b/addons/refuel/functions/fnc_canTurnOn.sqf
index 98173e0fa4..e9de5c205c 100644
--- a/addons/refuel/functions/fnc_canTurnOn.sqf
+++ b/addons/refuel/functions/fnc_canTurnOn.sqf
@@ -27,4 +27,5 @@ if (isNull _unit ||
!(_nozzle getVariable [QGVAR(isRefueling), false]) &&
{[_nozzle getVariable QGVAR(source)] call FUNC(getFuel) != 0} &&
{!isNull (_nozzle getVariable [QGVAR(sink), objNull])} &&
- {(fuel (_nozzle getVariable QGVAR(sink))) < 1}
+ {(fuel (_nozzle getVariable QGVAR(sink))) < 1} &&
+ {!(isEngineOn (_nozzle getVariable QGVAR(sink)))}
diff --git a/addons/refuel/functions/fnc_checkFuel.sqf b/addons/refuel/functions/fnc_checkFuel.sqf
index 6ba7a4928e..49d62b1e44 100644
--- a/addons/refuel/functions/fnc_checkFuel.sqf
+++ b/addons/refuel/functions/fnc_checkFuel.sqf
@@ -27,9 +27,9 @@ private _fuel = [_target] call FUNC(getFuel);
params ["_args"];
_args params [["_unit", objNull, [objNull]], ["_target", objNull, [objNull]], ["_fuel", 0, [0]]];
if (_fuel > 0 ) then {
- ["displayTextStructured", [_unit], [[LSTRING(Hint_RemainingFuel), _fuel], 2, _unit]] call EFUNC(common,targetEvent);
+ [QEGVAR(common,displayTextStructured), [[LSTRING(Hint_RemainingFuel), _fuel], 2, _unit], _unit] call CBA_fnc_targetEvent;
} else {
- ["displayTextStructured", [_unit], [LSTRING(Hint_Empty), 2, _unit]] call EFUNC(common,targetEvent);
+ [QEGVAR(common,displayTextStructured), [LSTRING(Hint_Empty), 2, _unit], _unit] call CBA_fnc_targetEvent;
};
true
},
diff --git a/addons/refuel/functions/fnc_connectNozzle.sqf b/addons/refuel/functions/fnc_connectNozzle.sqf
index d6b599b771..a124a331d5 100644
--- a/addons/refuel/functions/fnc_connectNozzle.sqf
+++ b/addons/refuel/functions/fnc_connectNozzle.sqf
@@ -28,7 +28,7 @@ if (isNull _nozzle) exitWith {};
GVAR(placeAction) = PLACE_WAITING;
-[{[localize LSTRING(Connect_Action), ""] call EFUNC(interaction,showMouseHint)}, []] call EFUNC(common,execNextFrame);
+[{[localize LSTRING(Connect_Action), ""] call EFUNC(interaction,showMouseHint)}, []] call CBA_fnc_execNextFrame;
_unit setVariable [QGVAR(placeActionEH), [_unit, "DefaultAction", {true}, {GVAR(placeAction) = PLACE_APPROVE;}] call EFUNC(common,AddActionEventHandler)];
private _actionID = _unit addAction [format ["%1 ", localize LSTRING(Cancel)], {GVAR(placeAction) = PLACE_CANCEL;}];
diff --git a/addons/refuel/functions/fnc_connectNozzleAction.sqf b/addons/refuel/functions/fnc_connectNozzleAction.sqf
index a4509ae4af..250da51e21 100644
--- a/addons/refuel/functions/fnc_connectNozzleAction.sqf
+++ b/addons/refuel/functions/fnc_connectNozzleAction.sqf
@@ -60,7 +60,7 @@ while {(_closeInMax - _closeInMin) > 0.01} do {
_closeInDistance = (_closeInMax + _closeInMin) / 2;
//Checks (too close to center or can't attach)
-if (((_startDistanceFromCenter - _closeInDistance) < 0.1) || {!([_target, _unit, _itemClassname] call FUNC(canAttach))}) exitWith {
+if ((_startDistanceFromCenter - _closeInDistance) < 0.1) exitWith {
TRACE_2("no valid spot found",_closeInDistance,_startDistanceFromCenter);
[localize LSTRING(Failed)] call EFUNC(common,displayTextStructured);
};
@@ -77,7 +77,7 @@ _endPosTestOffset set [2, (_startingOffset select 2)];
{
params ["_args"];
_args params [["_unit", objNull, [objNull]], ["_nozzle", objNull, [objNull]], ["_target", objNull, [objNull]], ["_endPosTestOffset", [0,0,0], [[]], 3]];
- _unit setVariable [QGVAR(nozzle), nil];
+ _unit setVariable [QGVAR(nozzle), nil, true];
_unit setVariable [QGVAR(isRefueling), false];
[_unit, "forceWalk", "ACE_refuel", false] call EFUNC(common,statusEffect_set);
REFUEL_UNHOLSTER_WEAPON
@@ -119,13 +119,18 @@ _endPosTestOffset set [2, (_startingOffset select 2)];
};
};
};
- [[_nozzle, _dirAndUp], "{(_this select 0) setVectorDirAndUp (_this select 1)}", 2] call EFUNC(common,execRemoteFnc);
+ [QEGVAR(common,setVectorDirAndUp), [_nozzle, _dirAndUp], _nozzle] call CBA_fnc_targetEvent;
_nozzle setVariable [QGVAR(sink), _target, true];
_nozzle setVariable [QGVAR(isConnected), true, true];
_target setVariable [QGVAR(nozzle), _nozzle, true];
_source = _nozzle getVariable QGVAR(source);
- _source setVariable [QGVAR(fuelCounter), [_source] call FUNC(getFuel), true];
+ private _fuel = [_source] call FUNC(getFuel);
+ if (_fuel == REFUEL_INFINITE_FUEL) then {
+ _source setVariable [QGVAR(fuelCounter), 0, true];
+ } else {
+ _source setVariable [QGVAR(fuelCounter), _fuel, true];
+ };
[_unit, _target, _nozzle, _endPosTestOffset] call FUNC(refuel);
},
diff --git a/addons/refuel/functions/fnc_getFuel.sqf b/addons/refuel/functions/fnc_getFuel.sqf
index 47c9992788..863c017102 100644
--- a/addons/refuel/functions/fnc_getFuel.sqf
+++ b/addons/refuel/functions/fnc_getFuel.sqf
@@ -11,12 +11,14 @@
* Example:
* [fuelTruck] call ace_refuel_fnc_getFuel
*
- * Public: No
+ * Public: Yes
*/
#include "script_component.hpp"
params [["_target", objNull, [objNull]]];
+if (isNull _target) exitWith {0};
+
private _fuel = _target getVariable QGVAR(currentFuelCargo);
if (isNil "_fuel") then {
diff --git a/addons/refuel/functions/fnc_handleDisconnect.sqf b/addons/refuel/functions/fnc_handleDisconnect.sqf
new file mode 100644
index 0000000000..edc3393cb4
--- /dev/null
+++ b/addons/refuel/functions/fnc_handleDisconnect.sqf
@@ -0,0 +1,26 @@
+/*
+ * Author: GitHawk
+ * Cleans up refuel
+ *
+ * Arguments:
+ * 0: Player
+ *
+ * Return Value:
+ * None
+ *
+ * Example:
+ * [player] call ace_refuel_fnc_handleDisconnect
+ *
+ * Public: No
+ */
+#include "script_component.hpp"
+
+params [["_disconnectedPlayer", objNull, [objNull]]];
+
+if (isNull _disconnectedPlayer) exitWith {};
+
+private _nozzle = _disconnectedPlayer getVariable [QGVAR(nozzle), objNull];
+
+if (isNull _nozzle) exitWith {};
+
+[_disconnectedPlayer, _nozzle] call FUNC(dropNozzle);
diff --git a/addons/refuel/functions/fnc_makeJerryCan.sqf b/addons/refuel/functions/fnc_makeJerryCan.sqf
index 23bf5395a4..c826948fa2 100644
--- a/addons/refuel/functions/fnc_makeJerryCan.sqf
+++ b/addons/refuel/functions/fnc_makeJerryCan.sqf
@@ -12,7 +12,7 @@
* Example:
* [can] call ace_refuel_fnc_makeJerryCan
*
- * Public: No
+ * Public: Yes
*/
#include "script_component.hpp"
@@ -29,7 +29,7 @@ _target setVariable [QGVAR(source), _target, true];
// Main Action
private _action = [QGVAR(Refuel),
localize LSTRING(Refuel),
- QUOTE(PATHTOF(ui\icon_refuel_interact.paa)),
+ QPATHTOF(ui\icon_refuel_interact.paa),
{},
{true},
{},
@@ -41,7 +41,7 @@ private _action = [QGVAR(Refuel),
// Add pickup
_action = [QGVAR(PickUpNozzle),
localize LSTRING(TakeNozzle),
- QUOTE(PATHTOF(ui\icon_refuel_interact.paa)),
+ QPATHTOF(ui\icon_refuel_interact.paa),
{[_player, objNull, _target] call FUNC(TakeNozzle)},
{[_player, _target] call FUNC(canTakeNozzle)},
{},
@@ -53,7 +53,7 @@ _action = [QGVAR(PickUpNozzle),
// Add turnOn
_action = [QGVAR(TurnOn),
localize LSTRING(TurnOn),
- QUOTE(PATHTOF(ui\icon_refuel_interact.paa)),
+ QPATHTOF(ui\icon_refuel_interact.paa),
{[_player, _target] call FUNC(turnOn)},
{[_player, _target] call FUNC(canTurnOn)},
{},
@@ -65,7 +65,7 @@ _action = [QGVAR(TurnOn),
// Add turnOff
_action = [QGVAR(TurnOff),
localize LSTRING(TurnOff),
- QUOTE(PATHTOF(ui\icon_refuel_interact.paa)),
+ QPATHTOF(ui\icon_refuel_interact.paa),
{[_player, _target] call FUNC(turnOff)},
{[_player, _target] call FUNC(canTurnOff)},
{},
@@ -77,7 +77,7 @@ _action = [QGVAR(TurnOff),
// Add disconnect
_action = [QGVAR(Disconnect),
localize LSTRING(Disconnect),
- QUOTE(PATHTOF(ui\icon_refuel_interact.paa)),
+ QPATHTOF(ui\icon_refuel_interact.paa),
{[_player, _target] call FUNC(disconnect)},
{[_player, _target] call FUNC(canDisconnect)},
{},
diff --git a/addons/refuel/functions/fnc_readFuelCounter.sqf b/addons/refuel/functions/fnc_readFuelCounter.sqf
index ac7a84f97a..519b07897d 100644
--- a/addons/refuel/functions/fnc_readFuelCounter.sqf
+++ b/addons/refuel/functions/fnc_readFuelCounter.sqf
@@ -26,8 +26,13 @@ params [["_unit", objNull, [objNull]], ["_target", objNull, [objNull]]];
_args params [["_unit", objNull, [objNull]], ["_target", objNull, [objNull]]];
private _currentFuel = [_target] call FUNC(getFuel);
- private _fuelCounter = 0.01 * round (100 * ((_target getVariable [QGVAR(fuelCounter), _currentFuel]) - _currentFuel));
- [[LSTRING(Hint_FuelCounter), _fuelCounter], 1.5, _unit] call EFUNC(common,displayTextStructured);
+ if (_currentFuel == REFUEL_INFINITE_FUEL) then {
+ private _fuelCounter = 0.01 * round (100 * (_target getVariable [QGVAR(fuelCounter), 0]));
+ [[LSTRING(Hint_FuelCounter), _fuelCounter], 1.5, _unit] call EFUNC(common,displayTextStructured);
+ } else {
+ private _fuelCounter = 0.01 * round (100 * ((_target getVariable [QGVAR(fuelCounter), _currentFuel]) - _currentFuel));
+ [[LSTRING(Hint_FuelCounter), _fuelCounter], 1.5, _unit] call EFUNC(common,displayTextStructured);
+ };
},
"",
localize LSTRING(CheckFuelCounterAction),
diff --git a/addons/refuel/functions/fnc_refuel.sqf b/addons/refuel/functions/fnc_refuel.sqf
index ed986f8025..2f7131bd9f 100644
--- a/addons/refuel/functions/fnc_refuel.sqf
+++ b/addons/refuel/functions/fnc_refuel.sqf
@@ -16,7 +16,7 @@
#include "script_component.hpp"
-#define PFH_STEPSIZE 0.1
+#define PFH_STEPSIZE 1
params [["_unit", objNull, [objNull]], ["_target", objNull, [objNull]], ["_nozzle", objNull, [objNull]], ["_connectToPoint", [0,0,0], [[]], 3]];
@@ -52,6 +52,9 @@ private _maxFuel = getNumber (configFile >> "CfgVehicles" >> (typeOf _target) >>
private _finished = false;
private _fueling = _nozzle getVariable [QGVAR(isRefueling), false];
if (_fueling) then {
+ if (isEngineOn _sink) exitWith {
+ _nozzle setVariable [QGVAR(isRefueling), false, true];
+ };
private _fuelInSource = [_source] call FUNC(getFuel);
if (_fuelInSource == 0) exitWith {
[LSTRING(Hint_SourceEmpty), 2, _unit] call EFUNC(common,displayTextStructured);
@@ -59,8 +62,10 @@ private _maxFuel = getNumber (configFile >> "CfgVehicles" >> (typeOf _target) >>
};
if !(_fuelInSource == REFUEL_INFINITE_FUEL) then {
_fuelInSource = _fuelInSource - _rate;
+ } else {
+ _source setVariable [QGVAR(fuelCounter), (_source getVariable [QGVAR(fuelCounter), 0]) + _rate, true];
};
- if (_fuelInSource < 0 && {_fuelInSource > -1}) then {
+ if (_fuelInSource < 0 && {_fuelInSource > REFUEL_INFINITE_FUEL}) then {
_fuelInSource = 0;
_finished = true;
[LSTRING(Hint_SourceEmpty), 2, _unit] call EFUNC(common,displayTextStructured);
@@ -74,11 +79,7 @@ private _maxFuel = getNumber (configFile >> "CfgVehicles" >> (typeOf _target) >>
};
_unit setVariable [QGVAR(tempFuel), _fuelInSink];
- if !(local _sink) then {
- [[_sink, _fuelInSink], "{(_this select 0) setFuel (_this select 1)}", _sink] call EFUNC(common,execRemoteFnc);
- } else {
- _sink setFuel _fuelInSink;
- };
+ [QEGVAR(common,setFuel), [_sink, _fuelInSink], _sink] call CBA_fnc_targetEvent;
[_source, _fuelInSource] call FUNC(setFuel);
} else {
_unit setVariable [QGVAR(tempFuel), fuel _sink];
diff --git a/addons/refuel/functions/fnc_reset.sqf b/addons/refuel/functions/fnc_reset.sqf
index dee28e4301..d58f0a48ad 100644
--- a/addons/refuel/functions/fnc_reset.sqf
+++ b/addons/refuel/functions/fnc_reset.sqf
@@ -11,18 +11,13 @@
* Example:
* [truck] call ace_refuel_fnc_reset
*
- * Public: No
+ * Public: Yes
*/
#include "script_component.hpp"
params [["_target", objNull, [objNull]]];
-if (local _target) then {
- _target setHitPointDamage ["HitEngine", _target getVariable [QGVAR(engineHit), 0]];
-} else {
- [[_target, ["HitEngine", _target getVariable [QGVAR(engineHit), 0]]], "{(_this select 0) setHitPointDamage (_this select 1)}", _target] call EFUNC(common,execRemoteFnc);
-};
-_target setVariable [QGVAR(engineHit), nil, true];
+[_target, "blockEngine", "ACE_Refuel", false] call EFUNC(common,statusEffect_set);
_target setVariable [QGVAR(isConnected), false, true];
private _nozzle = _target getVariable [QGVAR(ownedNozzle), nil];
@@ -32,17 +27,13 @@ if !(isNil "_nozzle") then {
_nozzleTarget setVariable [QGVAR(nozzle), nil, true];
};
- private _rope = _nozzle getVariable [QGVAR(rope), nil];
- if !(isNil "_rope") then {
+ private _rope = _nozzle getVariable [QGVAR(rope), objNull];
+ if !(isNull _rope) then {
ropeDestroy _rope;
};
{
- if (local _x) then {
- [_x, _nozzle] call FUNC(resetLocal);
- } else {
- [[_x, _nozzle], "{_this call FUNC(resetLocal)}", _x] call EFUNC(common,execRemoteFnc);
- };
+ [QGVAR(resetLocal), [_x, _nozzle], _x] call CBA_fnc_targetEvent;
} count allPlayers;
deleteVehicle _nozzle;
};
diff --git a/addons/refuel/functions/fnc_resetLocal.sqf b/addons/refuel/functions/fnc_resetLocal.sqf
index 599ee61344..2e80ab98d7 100644
--- a/addons/refuel/functions/fnc_resetLocal.sqf
+++ b/addons/refuel/functions/fnc_resetLocal.sqf
@@ -32,5 +32,5 @@ if (_actionID != -1) then {
_unit removeAction _actionID;
_unit setVariable [QGVAR(isRefueling), false, true];
_unit setVariable [QGVAR(ReleaseActionID), nil];
- _unit setVariable [QGVAR(nozzle), nil];
+ _unit setVariable [QGVAR(nozzle), nil, true];
};
diff --git a/addons/refuel/functions/fnc_returnNozzle.sqf b/addons/refuel/functions/fnc_returnNozzle.sqf
index d56b7b731a..1bd364eafb 100644
--- a/addons/refuel/functions/fnc_returnNozzle.sqf
+++ b/addons/refuel/functions/fnc_returnNozzle.sqf
@@ -29,7 +29,7 @@ if (isNull _nozzle || {_source != _target}) exitWith {false};
{
params ["_args"];
_args params [["_unit", objNull, [objNull]], ["_nozzle", objNull, [objNull]], ["_target", objNull, [objNull]]];
- _unit setVariable [QGVAR(nozzle), nil];
+ _unit setVariable [QGVAR(nozzle), nil, true];
detach _nozzle;
[_unit, "forceWalk", "ACE_refuel", false] call EFUNC(common,statusEffect_set);
REFUEL_UNHOLSTER_WEAPON
@@ -42,15 +42,13 @@ if (isNull _nozzle || {_source != _target}) exitWith {false};
_target setVariable [QGVAR(isConnected), false, true];
_target setVariable [QGVAR(ownedNozzle), nil, true];
- ropeDestroy (_nozzle getVariable QGVAR(rope));
+ private _rope = _nozzle getVariable [QGVAR(rope), objNull];
+ if !(isNull _rope) then {
+ ropeDestroy _rope;
+ };
deleteVehicle _nozzle;
- if !(local _target) then {
- [[_target, ["HitEngine", _target getVariable [QGVAR(engineHit), 0]]], "{(_this select 0) setHitPointDamage (_this select 1)}", _sink] call EFUNC(common,execRemoteFnc);
- } else {
- _target setHitPointDamage ["HitEngine", _target getVariable [QGVAR(engineHit), 0]];
- };
- _target setVariable [QGVAR(engineHit), nil, true];
+ [_target, "blockEngine", "ACE_Refuel", false] call EFUNC(common,statusEffect_set);
},
"",
localize LSTRING(ReturnAction),
diff --git a/addons/refuel/functions/fnc_setFuel.sqf b/addons/refuel/functions/fnc_setFuel.sqf
index b5276454fa..6033660a48 100644
--- a/addons/refuel/functions/fnc_setFuel.sqf
+++ b/addons/refuel/functions/fnc_setFuel.sqf
@@ -12,7 +12,7 @@
* Example:
* [fuelTruck, 42] call ace_refuel_fnc_setFuel
*
- * Public: No
+ * Public: Yes
*/
#include "script_component.hpp"
diff --git a/addons/refuel/functions/fnc_takeNozzle.sqf b/addons/refuel/functions/fnc_takeNozzle.sqf
index 96ac5249bb..87a212cd44 100644
--- a/addons/refuel/functions/fnc_takeNozzle.sqf
+++ b/addons/refuel/functions/fnc_takeNozzle.sqf
@@ -18,22 +18,16 @@
*/
#include "script_component.hpp"
-params [["_unit", objNull, [objNull]], ["_target", objNull, [objNull]], ["_nozzle", objNull, [objNull]]];
-
-[_unit, "forceWalk", "ACE_refuel", true] call EFUNC(common,statusEffect_set);
+params [
+ ["_unit", objNull, [objNull]],
+ ["_target", objNull, [objNull]],
+ ["_nozzle", objNull, [objNull]]
+];
REFUEL_HOLSTER_WEAPON
private _endPosOffset = [0, 0, 0];
if (isNull _nozzle) then { // func is called on fuel truck
- _target setVariable [QGVAR(engineHit), _target getHitPointDamage "HitEngine", true];
- if !(local _target) then {
- [[_target, ["HitEngine", 1]], "{(_this select 0) setHitPointDamage (_this select 1)}", _sink] call EFUNC(common,execRemoteFnc);
- } else {
- _target setHitPointDamage ["HitEngine", 1];
- };
-
- _target setVariable [QGVAR(isConnected), true, true];
_endPosOffset = getArray (configFile >> "CfgVehicles" >> typeOf _target >> QGVAR(hooks));
if (count _endPosOffset == 2) then {
if (_unit distance (_target modelToWorld (_endPosOffset select 0)) < _unit distance (_target modelToWorld (_endPosOffset select 1))) then {
@@ -49,18 +43,29 @@ if (isNull _nozzle) then { // func is called on fuel truck
[_unit, _target, _endPosOffset],
{
params ["_args"];
- _args params [["_unit", objNull, [objNull]], ["_target", objNull, [objNull]], ["_endPosOffset", [0,0,0], [[]], 3]];
+ _args params [
+ ["_unit", objNull, [objNull]],
+ ["_target", objNull, [objNull]],
+ ["_endPosOffset", [0, 0, 0], [[]], 3]
+ ];
private _newNozzle = "ACE_refuel_fuelNozzle" createVehicle position _unit;
_newNozzle attachTo [_unit, [-0.02,0.05,-0.12], "righthandmiddle1"];
- _unit setVariable [QGVAR(nozzle), _newNozzle];
+ _unit setVariable [QGVAR(nozzle), _newNozzle, true];
- private _rope = ropeCreate [_target, _endPosOffset, _newNozzle, [0, -0.20, 0.12], REFUEL_HOSE_LENGTH];
+ if (_target isKindOf "AllVehicles") then {
+ // Currently ropeCreate requires its first parameter to be a real vehicle
+ private _rope = ropeCreate [_target, _endPosOffset, _newNozzle, [0, -0.20, 0.12], REFUEL_HOSE_LENGTH];
+ _newNozzle setVariable [QGVAR(rope), _rope, true];
+ };
_newNozzle setVariable [QGVAR(attachPos), _endPosOffset, true];
_newNozzle setVariable [QGVAR(source), _target, true];
- _newNozzle setVariable [QGVAR(rope), _rope, true];
+
+ [_target, "blockEngine", "ACE_Refuel", true] call EFUNC(common,statusEffect_set);
+ _target setVariable [QGVAR(isConnected), true, true];
_target setVariable [QGVAR(ownedNozzle), _newNozzle, true];
+ [_unit, "forceWalk", "ACE_refuel", true] call EFUNC(common,statusEffect_set);
_unit setVariable [QGVAR(isRefueling), true];
private _actionID = _unit getVariable [QGVAR(ReleaseActionID), -1];
if (_actionID != -1) then {
@@ -83,20 +88,25 @@ if (isNull _nozzle) then { // func is called on fuel truck
{true},
["isnotinside"]
] call EFUNC(common,progressBar);
-} else { // func is called in muzzle either connected or on ground
+} else { // func is called on muzzle either connected or on ground
[
2,
[_unit, _nozzle],
{
params ["_args"];
- _args params [["_unit", objNull, [objNull]], ["_nozzle", objNull, [objNull]]];
+ _args params [
+ ["_unit", objNull, [objNull]],
+ ["_nozzle", objNull, [objNull]]
+ ];
+
if (_nozzle getVariable [QGVAR(jerryCan), false]) then {
_nozzle attachTo [_unit, [0,1,0], "pelvis"];
} else {
_nozzle attachTo [_unit, [-0.02,0.05,-0.12], "righthandmiddle1"];
};
- _unit setVariable [QGVAR(nozzle), _nozzle];
+ _unit setVariable [QGVAR(nozzle), _nozzle, true];
+ [_unit, "forceWalk", "ACE_refuel", true] call EFUNC(common,statusEffect_set);
_unit setVariable [QGVAR(isRefueling), true];
private _actionID = _unit getVariable [QGVAR(ReleaseActionID), -1];
if (_actionID != -1) then {
@@ -125,18 +135,29 @@ if (isNull _nozzle) then { // func is called on fuel truck
};
if !(_nozzle getVariable [QGVAR(jerryCan), false]) then {
[{
- private ["_nozzle"];
params ["_args", "_pfID"];
- _args params ["_unit", "_source", "_endPosOffset"];
+ _args params [
+ ["_unit", player, [objNull]],
+ ["_source", objNull, [objNull]],
+ ["_endPosOffset", [0, 0, 0], [[]], 3],
+ ["_nozzle", _unit getVariable [QGVAR(nozzle), objNull], [objNull]]
+ ];
- if (_unit distance (_source modelToWorld _endPosOffset) > (REFUEL_HOSE_LENGTH - 2)) exitWith {
- _nozzle = _unit getVariable [QGVAR(nozzle), objNull];
+ if (isNull _source || {_unit distance (_source modelToWorld _endPosOffset) > (REFUEL_HOSE_LENGTH - 2)} || {!alive _source}) exitWith {
if !(isNull _nozzle) then {
[_unit, _nozzle] call FUNC(dropNozzle);
REFUEL_UNHOLSTER_WEAPON
[_unit, "forceWalk", "ACE_refuel", false] call EFUNC(common,statusEffect_set);
- [LSTRING(Hint_TooFar), 2, _unit] call EFUNC(common,displayTextStructured);
+ if (isNull _source || {!alive _source}) then {
+ private _rope = _nozzle getVariable [QGVAR(rope), objNull];
+ if !(isNull _rope) then {
+ ropeDestroy _rope;
+ };
+ deleteVehicle _nozzle;
+ } else {
+ [LSTRING(Hint_TooFar), 2, _unit] call EFUNC(common,displayTextStructured);
+ };
};
[_pfID] call cba_fnc_removePerFrameHandler;
};
diff --git a/addons/refuel/script_component.hpp b/addons/refuel/script_component.hpp
index 0c24c3915b..f05018d3e8 100644
--- a/addons/refuel/script_component.hpp
+++ b/addons/refuel/script_component.hpp
@@ -16,12 +16,13 @@
#include "\z\ace\addons\main\script_macros.hpp"
-#define REFUEL_INFINITE_FUEL -1
+#define REFUEL_INFINITE_FUEL -10
#define REFUEL_ACTION_DISTANCE 7
#define REFUEL_HOSE_LENGTH 12
#define REFUEL_HOLSTER_WEAPON \
_unit setVariable [QGVAR(selectedWeaponOnRefuel), currentWeapon _unit]; \
+ _unit call EFUNC(common,fixLoweredRifleAnimation); \
_unit action ["SwitchWeapon", _unit, _unit, 99];
#define REFUEL_UNHOLSTER_WEAPON \
diff --git a/addons/refuel/stringtable.xml b/addons/refuel/stringtable.xml
index f9fc52267f..2df51ea540 100644
--- a/addons/refuel/stringtable.xml
+++ b/addons/refuel/stringtable.xml
@@ -3,11 +3,14 @@
Refuel Settings
- Betankungseinst.
+ Betankungseinstellungen
Ustawienia tankowania
Настройки дозаправки
Ajustes de reabastecimento
Nastavení tankování
+ Impostazioni Rifornimento
+ Parámetros de reabastecimiento
+ Réglages de ravitaillement
Flow Rate
@@ -16,6 +19,9 @@
Скорость заправки
Velocidade da vazão
Rychlost tankování
+ Rateo Flusso
+ Caudal de llenado
+ Vitesse du ravitaillement
How fast should a vehicle be refueled?
@@ -24,6 +30,9 @@
Как быстро техника должна быть заправлена?
Quão rápido deve ser o veículo reabastecido?
Jak rychle bude vozidlo natankováno?
+ Quanto velocemente dovrebbe essere rifornito un veicolo?
+ Cuán rápido se reabastecen los vehículos?
+ A quelle vitesse devrait être ravitaillé un véhicule ?
Refuel
@@ -32,6 +41,9 @@
Дозаправка
Reabastecimento
Natankovat
+ Rifornisci
+ Reabastecer
+ Ravitaillement
Take fuel nozzle
@@ -40,14 +52,20 @@
Взять топливный шланг
Pegar o bocal de combustível
Vzít výdejní pistoli
+ Prenti manica benzina
+ Tomar surtidor
+ Prendre la pompe
- Taking fuel nozzle ...
- Nehme Zapfpistole ...
- Pobieranie nalewaka ...
- Берем топливный шланг ...
+ Taking fuel nozzle...
+ Nehme Zapfpistole...
+ Pobieranie nalewaka...
+ Берем топливный шланг...
Pegando o bocal de combustível...
- Beru výdejní pistoli ...
+ Beru výdejní pistoli...
+ Sto prendendo manica benzina...
+ Tomando surtidor...
+ Prise de la pompe...
Connect fuel nozzle
@@ -56,14 +74,20 @@
Присоединить топливный шланг
Conectar o bocal de combustível
Připojit výdejní pistoli
+ Collega manica benzina
+ Conectar surtidor
+ Connecter la pompe
- Connecting fuel nozzle ...
- Zapfpistole anschließen ...
- Podłączanie nalewaka ...
- Присоединяем топливный шланг ...
+ Connecting fuel nozzle...
+ Zapfpistole anschließen...
+ Podłączanie nalewaka...
+ Присоединяем топливный шланг...
Conectando o bocal de combustível...
- Připojuji výdejní pistoli ...
+ Připojuji výdejní pistoli...
+ Sto collegando la manica benzina...
+ Conectando surtidor...
+ Connection de la pompe...
Disconnect fuel nozzle
@@ -72,6 +96,9 @@
Отсоединить топливный шланг
Desconectar o bocal de combustível
Odpojit výdejní pistoli
+ Scollega manica benzina
+ Desconectar surtidor
+ Déconnecter la pompe
Connect
@@ -80,6 +107,9 @@
Присоединить
Conectar
Připojit
+ Collega
+ Conectar
+ Connecter
Check remaining fuel
@@ -88,14 +118,20 @@
Проверить остаток топлива
Verificar combustível restante
Zkontrolovat zůstatek paliva
+ Controlla benzina rimanente
+ Verificar combustible remanente
+ Vérifier le carburant restant
- Checking remaining fuel ...
- Überprüfe verbleibenden Kraftstoff ...
- Sprawdzanie ilości paliwa ...
- Проверяем остаток топлива ...
+ Checking remaining fuel...
+ Überprüfe verbleibenden Kraftstoff...
+ Sprawdzanie ilości paliwa...
+ Проверяем остаток топлива...
Verificando combustível restante...
- Kontroluji zůstatek paliva ...
+ Kontroluji zůstatek paliva...
+ Sto controllando la benzina rimanente...
+ Verificando combustible remanente,,,
+ Vérifie le carburant restant...
There are %1 liters left.
@@ -104,6 +140,9 @@
Осталось %1 л.
Há %1 litros restantes.
Zbývá ještě %1 litrů.
+ Sono rimasti %1 litri.
+ Quedan %1 litros.
+ Il reste %1 litres.
There is no fuel left.
@@ -112,6 +151,9 @@
Топлива нет.
Não há combustível
Bez paliva.
+ Non è rimasta più benzina.
+ No queda combustible.
+ Il n'y a plus de carburant.
Cancel
@@ -120,6 +162,9 @@
Отменить
Cancelar
Zrušit
+ Cancella
+ Cancelar
+ Annuler
Failed
@@ -128,6 +173,9 @@
Не удалось
Falhou
Neúspěšný
+ Fallito
+ Falló
+ Echoué
Stop fueling
@@ -136,14 +184,20 @@
Остановить заправку
Parar reabastecimento
Zastavit tankování
+ Ferma rifornimento
+ Detener reabastecimiento
+ Arrêter le ravitaillement
- Stopping fueling ...
- Stoppe Betankung ...
- Zatrzymywanie tankowania ...
- Останавливаем заправку ...
+ Stopping fueling...
+ Stoppe Betankung...
+ Zatrzymywanie tankowania...
+ Останавливаем заправку...
Parando reabastecimento...
- Zastavuji tankování ...
+ Zastavuji tankování...
+ Sto fermando il rifornimento...
+ Deteniendo reabastecimiento...
+ Arrête le ravitaillement...
Start fueling
@@ -152,14 +206,20 @@
Начать заправку
Começar reabastecimento
Začít tankovat
+ Inizia rifornimento
+ Comenzar reabastecimiento
+ Débute le ravitaillement
- Starting fueling ...
- Beginne Betankung ...
- Rozpoczynanie tankowania ...
- Начинаем заправку ...
+ Starting fueling...
+ Beginne Betankung...
+ Rozpoczynanie tankowania...
+ Начинаем заправку...
Começando reabastecimento...
- Spouštím tankování ...
+ Spouštím tankování...
+ Sto iniziando il rifornimento...
+ Comenzando reabastecimiento...
+ Début du ravitaillement...
%1 Liters fueled
@@ -168,6 +228,9 @@
%1 литров заправлено
%1 litros abastecidos
%1 litrů natankováno
+ %1 litri riforniti
+ %1 lt reabastecido
+ %1 litres ravitaillés
The fuel source is empty.
@@ -176,6 +239,9 @@
Источник топлива пустой.
A fonte de combustível está vazia.
Zdroj paliva je prázdný.
+ La fonte di benzina èvuota.
+ La fuente de combustible está vacía.
+ La source de carburant est vide.
Maximum fuel hose length reached.
@@ -184,6 +250,9 @@
Достигнута максимальная длина шланга.
Distância máxima da mangueira de combustível alcançada.
Dosažena maximální délka hadice
+ Distanza massima della manica raggiunta.
+ Máxima longitud de manguera alcanzada.
+ Tuyau tendu au maximum
Fueling completed
@@ -192,6 +261,9 @@
Заправка завершена
Reabastecimento completo
Tankování dokončeno
+ Rifornimento completato
+ Reabastecimiento completado
+ Ravitaillement terminé
Fueling stopped
@@ -200,6 +272,9 @@
Заправка остановлена
Reabastecimento parado
Tankování zastaveno
+ Rifornimento fermato
+ Reabastecimiento detenido
+ Ravitaillement stoppé
Fueling started
@@ -208,6 +283,9 @@
Заправка начата
Reabastecimento iniciado
Tankování zahájeno
+ Rifornimento iniziato
+ Comenzó el reabastecimiento
+ Ravitaillement débuté
Return fuel nozzle
@@ -216,14 +294,20 @@
Вернуть топливный шланг
Retornar bocal de combustível
Vrátit výdejní pistoli
+ Riponi manica benzina
+ Devolver surtidor
+ Retourner la pompe
- Returning fuel nozzle ...
- Stecke Zapfpistole zurück ...
- Zwracanie nalewaka ...
- Возвращаем топливный шланг ...
+ Returning fuel nozzle...
+ Stecke Zapfpistole zurück...
+ Zwracanie nalewaka...
+ Возвращаем топливный шланг...
Retornando bocal de combustível...
- Vracím výdejní pistoli ...
+ Vracím výdejní pistoli...
+ Sto riponendo la manica della benzina...
+ Devolviendo el surtidor...
+ Retourne la pompe
Check fuel counter
@@ -232,14 +316,20 @@
Проверить счетчик топлива
Verificar contador de combustível
Zkonrolovat palivoměr
+ Controlla indicatore livello benzina
+ Verificar el contador de combustible
+ Vérifier le compteur
- Checking fuel counter ...
- Betrachte Tankuhr ...
- Sprawdzanie wskaźnika paliwa ...
- Проверяем счетчик топлива ...
+ Checking fuel counter...
+ Betrachte Tankuhr...
+ Sprawdzanie wskaźnika paliwa...
+ Проверяем счетчик топлива...
Verificando contador de combustível...
- Konroluji palivoměr ...
+ Konroluji palivoměr...
+ Sto controllando l'indicatore del livello benzina...
+ Verificando el contador de combustible
+ Vérification du compteur...
%1 liters have been fueled.
@@ -248,6 +338,9 @@
Было заправлено %1 л.
%1 litros foram abastecidos.
%1 litrů bylo natankováno.
+ %1 litri sono stati riforniti.
+ Se reabastecieron %1 lt
+ %1 litres ont été écoulés.
-
\ No newline at end of file
+
diff --git a/addons/reload/ACE_Settings.hpp b/addons/reload/ACE_Settings.hpp
index 7b60527449..72d26b46cf 100644
--- a/addons/reload/ACE_Settings.hpp
+++ b/addons/reload/ACE_Settings.hpp
@@ -1,5 +1,5 @@
class ACE_Settings {
- class GVAR(DisplayText) {
+ class GVAR(displayText) {
typeName = "BOOL";
isClientSettable = 1;
value = 1;
diff --git a/addons/reload/ACE_UI.hpp b/addons/reload/ACE_UI.hpp
new file mode 100644
index 0000000000..6dae3e5147
--- /dev/null
+++ b/addons/reload/ACE_UI.hpp
@@ -0,0 +1,7 @@
+class ACE_UI {
+ class ammoCount {
+ class conditions {
+ ADDON = "false";
+ };
+ };
+};
diff --git a/addons/reload/CfgEventHandlers.hpp b/addons/reload/CfgEventHandlers.hpp
index 75c2280e24..a3dd6de29b 100644
--- a/addons/reload/CfgEventHandlers.hpp
+++ b/addons/reload/CfgEventHandlers.hpp
@@ -1,3 +1,10 @@
+
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
diff --git a/addons/reload/RscInGameUI.hpp b/addons/reload/RscInGameUI.hpp
deleted file mode 100644
index 7310690f16..0000000000
--- a/addons/reload/RscInGameUI.hpp
+++ /dev/null
@@ -1,24 +0,0 @@
-
-class RscControlsGroup;
-class RscText;
-
-class RscInGameUI {
- class RscUnitInfo {
- // Soldiers
- class WeaponInfoControlsGroupLeft: RscControlsGroup {
- class controls {
- class CA_AmmoCount: RscText {
- sizeEx = 0;
- };
- };
- };
- // Vehicles
- /*class WeaponInfoControlsGroupRight: RscControlsGroup {
- class controls {
- class CA_AmmoCount: RscText {
- sizeEx = 0;
- };
- };
- };*/
- };
-};
diff --git a/addons/reload/XEH_PREP.hpp b/addons/reload/XEH_PREP.hpp
new file mode 100644
index 0000000000..bfd89b098e
--- /dev/null
+++ b/addons/reload/XEH_PREP.hpp
@@ -0,0 +1,6 @@
+
+PREP(canCheckAmmo);
+PREP(canLinkBelt);
+PREP(checkAmmo);
+PREP(displayAmmo);
+PREP(startLinkingBelt);
diff --git a/addons/reload/XEH_postInit.sqf b/addons/reload/XEH_postInit.sqf
index 8667d9815e..193fdaf79b 100644
--- a/addons/reload/XEH_postInit.sqf
+++ b/addons/reload/XEH_postInit.sqf
@@ -9,7 +9,7 @@ if (!hasInterface) exitWith {};
// Conditions: canInteract
if !([ACE_player, vehicle ACE_player, ["isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
- if !(ACE_player call EFUNC(common,canUseWeapon) || {(vehicle ACE_player) isKindOf "StaticWeapon"}) exitWith {false};
+ if !(ACE_player call CBA_fnc_canUseWeapon || {(vehicle ACE_player) isKindOf "StaticWeapon"}) exitWith {false};
// Statement
[ACE_player] call FUNC(checkAmmo);
@@ -18,16 +18,16 @@ if (!hasInterface) exitWith {};
{false},
[19, [false, true, false]], false] call CBA_fnc_addKeybind;
-["setAmmoSync", {
+[QGVAR(syncAmmo), {
//To propagate the setAmmo change, do it on all clients
params ["_unit", "_weapon", "_ammo"];
- TRACE_3("setAmmoSync EH",_unit,_weapon,_ammo);
+ TRACE_3("syncAmmo EH",_unit,_weapon,_ammo);
_unit setAmmo [_weapon, _ammo];
-}] call EFUNC(common,addEventhandler);
+}] call CBA_fnc_addEventHandler;
// Listen for attempts to link ammo
-["linkedAmmo", {
+[QGVAR(linkedAmmo), {
params ["_receiver", "_giver", "_magazine"];
private _magazineType = currentMagazine _receiver;
@@ -35,7 +35,7 @@ if (!hasInterface) exitWith {};
// Return the magazine if it's the wrong type
if (_magazineType != (_magazine select 0)) exitWith {
- ["returnedAmmo", [_giver], [_giver,_receiver,_magazine]] call EFUNC(common,targetEvent);
+ [QGVAR(returnedAmmo), [_giver,_receiver,_magazine], [_giver]] call CBA_fnc_targetEvent;
};
private _ammoCount = _receiver ammo currentWeapon _receiver;
@@ -43,22 +43,22 @@ if (!hasInterface) exitWith {};
// Return the magazine if the belt is full or empty
if ((_ammoCount == 0) || _ammoMissing == 0) exitWith {
- ["returnedAmmo", [_giver], [_giver,_receiver,_magazine]] call EFUNC(common,targetEvent);
+ [QGVAR(returnedAmmo), [_giver,_receiver,_magazine], [_giver]] call CBA_fnc_targetEvent;
};
// Add the ammo
private _ammoAdded = _ammoMissing min (_magazine select 1);
- ["setAmmoSync", [_receiver, currentWeapon _receiver, _ammoCount + _ammoAdded]] call EFUNC(common,globalEvent);
+ [QGVAR(syncAmmo), [_receiver, currentWeapon _receiver, _ammoCount + _ammoAdded]] call CBA_fnc_globalEvent;
if ((_magazine select 1) - _ammoAdded > 0) then {
- ["returnedAmmo", [_giver], [_giver, _receiver, [_magazineType, (_magazine select 1) - _ammoAdded]]] call EFUNC(common,targetEvent);
+ [QGVAR(returnedAmmo), [_giver, _receiver, [_magazineType, (_magazine select 1) - _ammoAdded]], [_giver]] call CBA_fnc_targetEvent;
};
-}] call EFUNC(common,addEventhandler);
+}] call CBA_fnc_addEventHandler;
// Listen for returned magazines
-["returnedAmmo", {
+[QGVAR(returnedAmmo), {
params ["_receiver", "", "_magazine"];
TRACE_2("returnedAmmo EH",_receiver,_magazine);
_receiver addMagazine _magazine;
-}] call EFUNC(common,addEventhandler);
+}] call CBA_fnc_addEventHandler;
diff --git a/addons/reload/XEH_preInit.sqf b/addons/reload/XEH_preInit.sqf
index 278abf7bd2..a7feade1c3 100644
--- a/addons/reload/XEH_preInit.sqf
+++ b/addons/reload/XEH_preInit.sqf
@@ -2,10 +2,6 @@
ADDON = false;
-PREP(canCheckAmmo);
-PREP(canLinkBelt);
-PREP(checkAmmo);
-PREP(displayAmmo);
-PREP(startLinkingBelt);
+#include "XEH_PREP.hpp"
ADDON = true;
diff --git a/addons/reload/XEH_preStart.sqf b/addons/reload/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/reload/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/reload/config.cpp b/addons/reload/config.cpp
index 6ded1cd687..d3015f9dfa 100644
--- a/addons/reload/config.cpp
+++ b/addons/reload/config.cpp
@@ -6,20 +6,22 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_interaction"};
- author[] = {"commy2","KoffeinFlummi","esteldunedain"};
- authorUrl = "https://github.com/commy2/";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"commy2","KoffeinFlummi","esteldunedain"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
#include "CfgVehicles.hpp"
-
#include "CfgMagazines.hpp"
-
#include "CfgEventHandlers.hpp"
-
#include "CfgActions.hpp"
-
-#include "RscInGameUI.hpp"
-
#include "ACE_Settings.hpp"
+#include "ACE_UI.hpp"
+
+class ACE_newEvents {
+ setAmmoSync = QGVAR(syncAmmo);
+ returnedAmmo = QGVAR(returnedAmmo);
+ linkedAmmo = QGVAR(linkedAmmo);
+};
diff --git a/addons/reload/functions/fnc_checkAmmo.sqf b/addons/reload/functions/fnc_checkAmmo.sqf
index b0581a143a..8edfd172c0 100644
--- a/addons/reload/functions/fnc_checkAmmo.sqf
+++ b/addons/reload/functions/fnc_checkAmmo.sqf
@@ -34,4 +34,4 @@ if (_unit == _target) then {
_unit playActionNow "Gear";
};
-[FUNC(displayAmmo), [_target], 1, 0.1] call EFUNC(common,waitAndExecute);
+[FUNC(displayAmmo), [_target], 1, 0.1] call CBA_fnc_waitAndExecute;
diff --git a/addons/reload/functions/fnc_startLinkingBelt.sqf b/addons/reload/functions/fnc_startLinkingBelt.sqf
index 5924e1b4e1..8b8768dbba 100644
--- a/addons/reload/functions/fnc_startLinkingBelt.sqf
+++ b/addons/reload/functions/fnc_startLinkingBelt.sqf
@@ -46,7 +46,7 @@ private _onFinish = {
(_this select 0) params ["_player", "_target", "_magazine"];
// Raise event on remote unit
- ["linkedAmmo", [_target], [_target, _player, _magazine]] call EFUNC(common,targetEvent);
+ [QGVAR(linkedAmmo), [_target, _player, _magazine], [_target]] call CBA_fnc_targetEvent;
};
private _onFailure = {
diff --git a/addons/reload/script_component.hpp b/addons/reload/script_component.hpp
index 09993faaa4..eece5acec7 100644
--- a/addons/reload/script_component.hpp
+++ b/addons/reload/script_component.hpp
@@ -14,4 +14,4 @@
#define DEBUG_SETTINGS DEBUG_ENABLED_RELOAD
#endif
-#include "\z\ace\addons\main\script_macros.hpp"
\ No newline at end of file
+#include "\z\ace\addons\main\script_macros.hpp"
diff --git a/addons/reload/stringtable.xml b/addons/reload/stringtable.xml
index fc0c534e93..647322e8e6 100644
--- a/addons/reload/stringtable.xml
+++ b/addons/reload/stringtable.xml
@@ -65,10 +65,10 @@
Linking belt...
Attache d'une bande...
Enlazando cinta...
- Сцепка лент ...
+ Сцепка лент...
Spojuji pás...
Podłączanie taśmy...
- Gurt anhängen ...
+ Gurt anhängen...
Töltényheveder összekötése folyamatban...
Attacco la tracolla...
Ligando cintos...
diff --git a/addons/reloadlaunchers/CfgEventHandlers.hpp b/addons/reloadlaunchers/CfgEventHandlers.hpp
index 0cd959a047..becf395052 100644
--- a/addons/reloadlaunchers/CfgEventHandlers.hpp
+++ b/addons/reloadlaunchers/CfgEventHandlers.hpp
@@ -1,4 +1,10 @@
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
diff --git a/addons/reloadlaunchers/XEH_PREP.hpp b/addons/reloadlaunchers/XEH_PREP.hpp
new file mode 100644
index 0000000000..b730d2780e
--- /dev/null
+++ b/addons/reloadlaunchers/XEH_PREP.hpp
@@ -0,0 +1,6 @@
+
+PREP(addMissileReloadActions);
+PREP(canLoad);
+PREP(getLoadableMissiles);
+PREP(load);
+PREP(reloadLauncher);
diff --git a/addons/reloadlaunchers/XEH_postInit.sqf b/addons/reloadlaunchers/XEH_postInit.sqf
index 437927602a..8c18d430c4 100644
--- a/addons/reloadlaunchers/XEH_postInit.sqf
+++ b/addons/reloadlaunchers/XEH_postInit.sqf
@@ -1,4 +1,4 @@
// by commy2
#include "script_component.hpp"
-["reloadLauncher", {_this call DFUNC(reloadLauncher)}] call EFUNC(common,addEventhandler);
+[QGVAR(reloadLauncher), {_this call DFUNC(reloadLauncher)}] call CBA_fnc_addEventHandler;
diff --git a/addons/reloadlaunchers/XEH_preInit.sqf b/addons/reloadlaunchers/XEH_preInit.sqf
index 3b60f99b8e..a7feade1c3 100644
--- a/addons/reloadlaunchers/XEH_preInit.sqf
+++ b/addons/reloadlaunchers/XEH_preInit.sqf
@@ -2,10 +2,6 @@
ADDON = false;
-PREP(addMissileReloadActions);
-PREP(canLoad);
-PREP(getLoadableMissiles);
-PREP(load);
-PREP(reloadLauncher);
+#include "XEH_PREP.hpp"
ADDON = true;
diff --git a/addons/reloadlaunchers/XEH_preStart.sqf b/addons/reloadlaunchers/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/reloadlaunchers/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/reloadlaunchers/config.cpp b/addons/reloadlaunchers/config.cpp
index 6a04f6339a..ff4c00bb22 100644
--- a/addons/reloadlaunchers/config.cpp
+++ b/addons/reloadlaunchers/config.cpp
@@ -6,8 +6,9 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_interaction"};
- author[] = {"commy2"};
- authorUrl = "https://github.com/commy2";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"commy2"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
@@ -16,3 +17,7 @@ class CfgPatches {
#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"
+
+class ACE_newEvents {
+ reloadLauncher = QGVAR(reloadLauncher);
+};
diff --git a/addons/reloadlaunchers/functions/fnc_addMissileReloadActions.sqf b/addons/reloadlaunchers/functions/fnc_addMissileReloadActions.sqf
index a07afe8e22..f6cd923845 100644
--- a/addons/reloadlaunchers/functions/fnc_addMissileReloadActions.sqf
+++ b/addons/reloadlaunchers/functions/fnc_addMissileReloadActions.sqf
@@ -3,28 +3,31 @@
* Create one action per reloadable missile
*
* Argument:
- * 1: Player (Object)
- * 0: Target (Object)
- * 2: Parameters ??? (Array)
+ * 1: Target (Object)
+ * 0: Player (Object)
*
* Return value:
* Children actions (Array)
*
+ * Public: No
+ *
*/
#include "script_component.hpp"
-private ["_unit", "_target", "_parameters"];
+params ["_target", "_unit"];
+TRACE_2("params",_target,_unit);
-_unit = _this select 1;
-_target = _this select 0;
-_parameters = _this select 2; // ???
+//Fast exit for common case:
+private _weapon = secondaryWeapon _target;
+if ((_weapon == "") || {(getNumber (configFile >> "CfgWeapons" >> _weapon >> QGVAR(enabled))) == 0}) exitWith {
+ TRACE_1("weapon not supported",_weapon);
+ []
+};
-private ["_actions", "_weapon", "_loadableMissiles"];
+private _actions = [];
-_actions = [];
-
-_weapon = secondaryWeapon _target;
-_loadableMissiles = [_unit, _weapon] call FUNC(getLoadableMissiles);
+private _loadableMissiles = [_unit, _weapon] call FUNC(getLoadableMissiles);
+TRACE_2("",_weapon,_loadableMissiles);
{
private ["_name", "_displayName", "_statement", "_condition", "_action"];
@@ -45,4 +48,5 @@ _loadableMissiles = [_unit, _weapon] call FUNC(getLoadableMissiles);
_actions pushBack [_action, [], _unit];
} forEach _loadableMissiles;
+TRACE_1("return",_actions);
_actions
diff --git a/addons/reloadlaunchers/functions/fnc_canLoad.sqf b/addons/reloadlaunchers/functions/fnc_canLoad.sqf
index 5bbfe4dd87..116a900092 100644
--- a/addons/reloadlaunchers/functions/fnc_canLoad.sqf
+++ b/addons/reloadlaunchers/functions/fnc_canLoad.sqf
@@ -1,6 +1,5 @@
/*
* Author: commy2
- *
* Check of the unit can reload the launcher of target unit.
*
* Argument:
@@ -11,15 +10,13 @@
*
* Return value:
* NONE
+ *
+ * Public: No
*/
#include "script_component.hpp"
-private ["_unit", "_target", "_weapon", "_magazine"];
-
-_unit = _this select 0;
-_target = _this select 1;
-_weapon = _this select 2;
-_magazine = _this select 3;
+params ["_unit", "_target", "_weapon", "_magazine"];
+TRACE_4("params",_unit,_target,_weapon,_magazine);
if (!alive _target) exitWith {false};
if (vehicle _target != _target) exitWith {false};
diff --git a/addons/reloadlaunchers/functions/fnc_getLoadableMissiles.sqf b/addons/reloadlaunchers/functions/fnc_getLoadableMissiles.sqf
index e75d826513..f466490b64 100644
--- a/addons/reloadlaunchers/functions/fnc_getLoadableMissiles.sqf
+++ b/addons/reloadlaunchers/functions/fnc_getLoadableMissiles.sqf
@@ -1,6 +1,5 @@
/*
* Author: commy2
- *
* Return all magazine types from reloaders inventory that are compatible with given weapon.
*
* Argument:
@@ -9,17 +8,16 @@
*
* Return value:
* Reloable magazines (Array)
+ *
+ * Public: No
*/
#include "script_component.hpp"
-private ["_unit", "_weapon"];
-
-_unit = _this select 0;
-_weapon = _this select 1;
+params ["_unit", "_weapon"];
+TRACE_2("params",_unit,_weapon);
// get available magazines of reloader, Note: "magazines" does not include currently loaded magazines
-private "_magazines";
-_magazines = magazines _unit;
+private _magazines = magazines _unit;
// case sensitvity
_magazines = _magazines apply {toLower _x};
diff --git a/addons/reloadlaunchers/functions/fnc_load.sqf b/addons/reloadlaunchers/functions/fnc_load.sqf
index ce7b743df5..863d1e9189 100644
--- a/addons/reloadlaunchers/functions/fnc_load.sqf
+++ b/addons/reloadlaunchers/functions/fnc_load.sqf
@@ -1,6 +1,5 @@
/*
* Author: commy2
- *
* Reload a launcher
*
* Argument:
@@ -11,18 +10,19 @@
*
* Return value:
* NONE
+ *
+ * Public: No
*/
#include "script_component.hpp"
-private ["_unit", "_target", "_weapon", "_magazine"];
+params ["_unit", "_target", "_weapon", "_magazine"];
+TRACE_4("params",_unit,_target,_weapon,_magazine);
-_unit = _this select 0;
-_target = _this select 1;
-_weapon = _this select 2;
-_magazine = _this select 3;
-
-private "_reloadTime";
-_reloadTime = getNumber (configFile >> "CfgWeapons" >> _weapon >> "magazineReloadTime");
+private _reloadTime = if (isNumber (configFile >> "CfgWeapons" >> _weapon >> QGVAR(buddyReloadTime))) then {
+ getNumber (configFile >> "CfgWeapons" >> _weapon >> QGVAR(buddyReloadTime))
+} else {
+ 2.5
+};
// do animation
[_unit] call EFUNC(common,goKneeling);
@@ -32,7 +32,7 @@ private ["_onSuccess", "_onFailure", "_condition"];
_onSuccess = {
(_this select 0 select 0) removeMagazine (_this select 0 select 3);
- ["reloadLauncher", _this select 0 select 1, _this select 0] call DEFUNC(common,targetEvent);
+ [QGVAR(reloadLauncher), _this select 0, _this select 0 select 1] call CBA_fnc_targetEvent;
[localize LSTRING(LauncherLoaded)] call DEFUNC(common,displayTextStructured);
};
diff --git a/addons/reloadlaunchers/functions/fnc_reloadLauncher.sqf b/addons/reloadlaunchers/functions/fnc_reloadLauncher.sqf
index fc802a025c..2aec180d22 100644
--- a/addons/reloadlaunchers/functions/fnc_reloadLauncher.sqf
+++ b/addons/reloadlaunchers/functions/fnc_reloadLauncher.sqf
@@ -1,6 +1,5 @@
/*
* Author: commy2
- *
* Reload a launcher
*
* Argument:
@@ -11,10 +10,13 @@
*
* Return value:
* NONE
+ *
+ * Public: No
*/
#include "script_component.hpp"
-PARAMS_4(_unit,_target,_weapon,_magazine);
+params ["_unit","_target","_weapon","_magazine"];
+TRACE_4("params",_unit,_target,_weapon,_magazine);
_target selectWeapon _weapon;
diff --git a/addons/reloadlaunchers/stringtable.xml b/addons/reloadlaunchers/stringtable.xml
index d82970a3d5..72193d48e2 100644
--- a/addons/reloadlaunchers/stringtable.xml
+++ b/addons/reloadlaunchers/stringtable.xml
@@ -14,15 +14,15 @@
Recarregar lançador
- Loading launcher ...
- Chargement du lanceur ...
- Panzerabwehr wird geladen ...
- Cargando lanzador ...
- Зарядка ПУ ...
- Nabíjím odpalovač ...
- Ładowanie wyrzutni ...
- Kilövő betöltés alatt ...
- Carico il lanciamissili ...
+ Loading launcher...
+ Chargement du lanceur...
+ Panzerabwehr wird geladen...
+ Cargando lanzador...
+ Зарядка ПУ...
+ Nabíjím odpalovač...
+ Ładowanie wyrzutni...
+ Kilövő betöltés alatt...
+ Carico il lanciamissili...
Recarregando lançador...
diff --git a/addons/repair/ACE_Repair.hpp b/addons/repair/ACE_Repair.hpp
index d47773cd83..6e5eac4fa8 100644
--- a/addons/repair/ACE_Repair.hpp
+++ b/addons/repair/ACE_Repair.hpp
@@ -12,7 +12,7 @@ class ACE_Repair {
condition = QUOTE(call FUNC(canReplaceWheel));
itemConsumed = 0;
claimObjects[] = {{"ACE_Wheel"}};
-
+
callbackSuccess = QUOTE(call FUNC(doReplaceWheel));
callbackFailure = "";
callbackProgress = "";
diff --git a/addons/repair/ACE_Settings.hpp b/addons/repair/ACE_Settings.hpp
index c3c8daad16..46228e2e44 100644
--- a/addons/repair/ACE_Settings.hpp
+++ b/addons/repair/ACE_Settings.hpp
@@ -1,5 +1,5 @@
class ACE_Settings {
- class GVAR(DisplayTextOnRepair) {
+ class GVAR(displayTextOnRepair) {
displayName = CSTRING(SettingDisplayTextName);
description = CSTRING(SettingDisplayTextDesc);
typeName = "BOOL";
@@ -7,7 +7,7 @@ class ACE_Settings {
value = 1;
category = ECSTRING(OptionsMenu,CategoryLogistics);
};
- class GVAR(engineerSetting_Repair) {
+ class GVAR(engineerSetting_repair) {
displayName = CSTRING(enginerSetting_Repair_name);
description = CSTRING(enginerSetting_Repair_description);
typeName = "SCALAR";
@@ -15,7 +15,7 @@ class ACE_Settings {
values[] = {CSTRING(engineerSetting_anyone), CSTRING(engineerSetting_EngineerOnly), CSTRING(engineerSetting_RepairSpecialistOnly)};
category = ECSTRING(OptionsMenu,CategoryLogistics);
};
- class GVAR(engineerSetting_Wheel) {
+ class GVAR(engineerSetting_wheel) {
displayName = CSTRING(enginerSetting_Wheel_name);
description = CSTRING(enginerSetting_Wheel_description);
typeName = "SCALAR";
@@ -30,14 +30,14 @@ class ACE_Settings {
value = 0.6;
category = ECSTRING(OptionsMenu,CategoryLogistics);
};
- class GVAR(repairDamageThreshold_Engineer) {
+ class GVAR(repairDamageThreshold_engineer) {
displayName = CSTRING(repairDamageThreshold_Engineer_name);
description = CSTRING(repairDamageThreshold_Engineer_description);
typeName = "SCALAR";
value = 0.4;
category = ECSTRING(OptionsMenu,CategoryLogistics);
};
- class GVAR(consumeItem_ToolKit) {
+ class GVAR(consumeItem_toolKit) {
displayName = CSTRING(consumeItem_ToolKit_name);
description = CSTRING(consumeItem_ToolKit_description);
typeName = "SCALAR";
@@ -77,4 +77,9 @@ class ACE_Settings {
values[] = {"None", "ToolKit"};
_values[] = {{}, {"ToolKit"}};
};
+ class GVAR(autoShutOffEngineWhenStartingRepair) {
+ typeName = "BOOL";
+ value = 0;
+ category = ECSTRING(OptionsMenu,CategoryLogistics);
+ };
};
diff --git a/addons/repair/CfgEden.hpp b/addons/repair/CfgEden.hpp
new file mode 100644
index 0000000000..ca315d68ec
--- /dev/null
+++ b/addons/repair/CfgEden.hpp
@@ -0,0 +1,71 @@
+class ctrlToolbox;
+
+class Cfg3DEN {
+ class Attributes {
+ class Default;
+ class Title: Default {
+ class Controls {
+ class Title;
+ };
+ };
+ class GVAR(isEngineerControl): Title {
+ attributeLoad = "(_this controlsGroupCtrl 100) lbsetcursel (((_value + 1) min 3) max 0);";
+ attributeSave = "(missionnamespace getvariable ['ace_isEng_temp',0]) - 1;";
+ class Controls: Controls {
+ class Title: Title{};
+ class Value: ctrlToolbox {
+ idc = 100;
+ style = "0x02";
+ x = "48 * (pixelW * pixelGrid * 0.25)";
+ w = "82 * (pixelW * pixelGrid * 0.25)";
+ h = "5 * (pixelH * pixelGrid * 0.25)";
+ rows = 1;
+ columns = 4;
+ strings[] = {"$STR_3DEN_Attributes_Lock_Default_text", CSTRING(AssignEngineerRole_role_none), CSTRING(AssignEngineerRole_role_engineer), CSTRING(AssignEngineerRole_role_specialist)};
+ onToolboxSelChanged = "missionnamespace setvariable ['ace_isEng_temp',_this select 1];";
+ };
+ };
+ };
+ };
+
+ class Object {
+ class AttributeCategories {
+ class ace_attributes {
+ class Attributes {
+ class ace_isEngineer {
+ property = QUOTE(ace_isEngineer);
+ displayName = CSTRING(AssignEngineerRole_role_DisplayName);
+ tooltip = CSTRING(AssignEngineerRole_role_Description);
+ expression = "if (_value != -1) then {_this setVariable ['%s',_value, true];}";
+ typeName = "NUMBER";
+ condition = "objectBrain";
+ defaultValue = "-1";
+ control = QGVAR(isEngineerControl);
+ };
+ class ace_isRepairVehicle {
+ property = QUOTE(ace_isRepairVehicle);
+ value = 0;
+ control = "CheckboxNumber";
+ displayName = CSTRING(AssignRepairVehicle_role_DisplayName);
+ tooltip = CSTRING(AssignRepairVehicle_role_Description);
+ expression = "_this setVariable ['%s',_value, true];";
+ typeName = "NUMBER";
+ condition = "objectVehicle";
+ defaultValue = 0;
+ };
+ class ace_isRepairFacility {
+ property = QUOTE(ace_isRepairFacility);
+ value = 0;
+ control = "CheckboxNumber";
+ displayName = CSTRING(AssignRepairFacility_role_DisplayName);
+ tooltip = CSTRING(AssignRepairFacility_role_Description);
+ expression = "_this setVariable ['%s',_value, true];";
+ typeName = "NUMBER";
+ condition = "(1 - objectBrain) * (1 - objectVehicle)";
+ defaultValue = 0;
+ };
+ };
+ };
+ };
+ };
+};
diff --git a/addons/repair/CfgEventHandlers.hpp b/addons/repair/CfgEventHandlers.hpp
index 798a10316a..94d7d7ea45 100644
--- a/addons/repair/CfgEventHandlers.hpp
+++ b/addons/repair/CfgEventHandlers.hpp
@@ -1,3 +1,10 @@
+
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
@@ -15,31 +22,34 @@ class Extended_InitPost_EventHandlers {
class Car {
class ADDON {
init = QUOTE(_this call DFUNC(addRepairActions));
- serverInit = QUOTE(_this call DFUNC(addSpareParts));
+ serverInit = QUOTE([ARR_3(_this select 0,1,'ACE_Wheel')] call DFUNC(addSpareParts));
};
};
class Tank {
class ADDON {
init = QUOTE(_this call DFUNC(addRepairActions));
- serverInit = QUOTE(_this call DFUNC(addSpareParts));
+ serverInit = QUOTE([ARR_3(_this select 0,1,'ACE_Track')] call DFUNC(addSpareParts));
+ };
+ };
+ class Motorcycle {
+ class ADDON {
+ init = QUOTE(_this call DFUNC(addRepairActions));
};
};
class Helicopter {
class ADDON {
init = QUOTE(_this call DFUNC(addRepairActions));
- serverInit = QUOTE(_this call DFUNC(addSpareParts));
+ exclude[] = {QEGVAR(fastroping,helper), "ACE_friesBase"};
};
};
class Plane {
class ADDON {
init = QUOTE(_this call DFUNC(addRepairActions));
- serverInit = QUOTE(_this call DFUNC(addSpareParts));
};
};
class Ship_F {
class ADDON {
init = QUOTE(_this call DFUNC(addRepairActions));
- serverInit = QUOTE(_this call DFUNC(addSpareParts));
};
};
};
diff --git a/addons/repair/CfgVehicles.hpp b/addons/repair/CfgVehicles.hpp
index 1968023881..c2f2bfacc7 100644
--- a/addons/repair/CfgVehicles.hpp
+++ b/addons/repair/CfgVehicles.hpp
@@ -15,12 +15,14 @@
}; \
};
+class CBA_Extended_EventHandlers;
+
class CfgVehicles {
class ACE_Module;
class ACE_moduleRepairSettings: ACE_Module {
scope = 2;
displayName = CSTRING(moduleName);
- icon = QUOTE(PATHTOF(ui\Icon_Module_Repair_ca.paa));
+ icon = QPATHTOF(ui\Icon_Module_Repair_ca.paa);
category = "ACE_Logistics";
function = QFUNC(moduleRepairSettings);
functionPriority = 1;
@@ -118,7 +120,7 @@ class CfgVehicles {
class ACE_moduleAssignEngineerRoles: Module_F {
scope = 2;
displayName = CSTRING(AssignEngineerRole_Module_DisplayName);
- icon = QUOTE(PATHTOF(ui\Icon_Module_Repair_ca.paa));
+ icon = QPATHTOF(ui\Icon_Module_Repair_ca.paa);
category = "ACE_Logistics";
function = QFUNC(moduleAssignEngineer);
functionPriority = 10;
@@ -162,7 +164,7 @@ class CfgVehicles {
class ACE_moduleAssignRepairVehicle: Module_F {
scope = 2;
displayName = CSTRING(AssignRepairVehicle_Module_DisplayName);
- icon = QUOTE(PATHTOF(ui\Icon_Module_Repair_ca.paa));
+ icon = QPATHTOF(ui\Icon_Module_Repair_ca.paa);
category = "ACE_Logistics";
function = QFUNC(moduleAssignRepairVehicle);
functionPriority = 10;
@@ -234,7 +236,7 @@ class CfgVehicles {
class ACE_moduleAddSpareParts: Module_F {
scope = 2;
displayName = CSTRING(AddSpareParts_Module_DisplayName);
- icon = QUOTE(PATHTOF(ui\Icon_Module_Repair_ca.paa));
+ icon = QPATHTOF(ui\Icon_Module_Repair_ca.paa);
category = "ACE_Logistics";
function = QFUNC(moduleAddSpareParts);
functionPriority = 10;
@@ -288,6 +290,10 @@ class CfgVehicles {
MACRO_REPAIRVEHICLE
};
+ class Motorcycle: LandVehicle {
+ MACRO_REPAIRVEHICLE
+ };
+
class Air;
class Helicopter: Air {
MACRO_REPAIRVEHICLE
@@ -304,7 +310,10 @@ class CfgVehicles {
class ThingX;
class ACE_RepairItem_Base: ThingX {
- XEH_ENABLED;
+ class EventHandlers {
+ class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
+ };
+
icon = "iconObject_circle";
mapSize = 0.7;
accuracy = 0.2;
@@ -317,7 +326,7 @@ class CfgVehicles {
EGVAR(cargo,canLoad) = 1;
author = "Hawkins";
scope = 2;
- model = QUOTE(PATHTOF(data\ace_track.p3d));
+ model = QPATHTOF(data\ace_track.p3d);
displayName = CSTRING(SpareTrack);
};
@@ -326,9 +335,9 @@ class CfgVehicles {
EGVAR(cargo,canLoad) = 1;
author = "Hawkins";
scope = 2;
- model = QUOTE(PATHTOF(data\ace_wheel.p3d));
+ model = QPATHTOF(data\ace_wheel.p3d);
displayName = CSTRING(SpareWheel);
- picture = QUOTE(PATHTOF(ui\tire_ca.paa));
+ picture = QPATHTOF(ui\tire_ca.paa);
};
// disable vanilla repair
@@ -342,7 +351,7 @@ class CfgVehicles {
class Helicopter_Base_H;
class Heli_Transport_04_base_F: Helicopter_Base_H {
- GVAR(hitpointGroups[]) = { {"HitEngine", {"HitEngine1", "HitEngine2"}}, {"Glass_1_hitpoint", {"Glass_2_hitpoint", "Glass_3_hitpoint", "Glass_4_hitpoint", "Glass_5_hitpoint", "Glass_6_hitpoint", "Glass_7_hitpoint", "Glass_8_hitpoint", "Glass_9_hitpoint", "Glass_10_hitpoint", "Glass_11_hitpoint", "Glass_12_hitpoint", "Glass_13_hitpoint", "Glass_14_hitpoint", "Glass_15_hitpoint", "Glass_16_hitpoint", "Glass_17_hitpoint", "Glass_18_hitpoint", "Glass_19_hitpoint", "Glass_20_hitpoint"}} };
+ GVAR(hitpointGroups)[] = { {"HitEngine", {"HitEngine1", "HitEngine2"}}, {"Glass_1_hitpoint", {"Glass_2_hitpoint", "Glass_3_hitpoint", "Glass_4_hitpoint", "Glass_5_hitpoint", "Glass_6_hitpoint", "Glass_7_hitpoint", "Glass_8_hitpoint", "Glass_9_hitpoint", "Glass_10_hitpoint", "Glass_11_hitpoint", "Glass_12_hitpoint", "Glass_13_hitpoint", "Glass_14_hitpoint", "Glass_15_hitpoint", "Glass_16_hitpoint", "Glass_17_hitpoint", "Glass_18_hitpoint", "Glass_19_hitpoint", "Glass_20_hitpoint"}} };
};
class O_Heli_Transport_04_repair_F: Heli_Transport_04_base_F {
GVAR(canRepair) = 1;
@@ -357,12 +366,12 @@ class CfgVehicles {
class Heli_Transport_02_base_F;
class I_Heli_Transport_02_F: Heli_Transport_02_base_F {
- GVAR(hitpointPositions[]) = {{"HitVRotor", {-1,-9.4,1.8}}, {"HitHRotor", {0,1.8,1.3}}};
+ GVAR(hitpointPositions)[] = {{"HitVRotor", {-1,-9.4,1.8}}, {"HitHRotor", {0,1.8,1.3}}};
};
class Helicopter_Base_F;
class Heli_light_03_base_F: Helicopter_Base_F {
- GVAR(hitpointPositions[]) = {{"HitVRotor", {-0.5,-5.55,1.2}}, {"HitHRotor", {0,1.8,1.5}}};
+ GVAR(hitpointPositions)[] = {{"HitVRotor", {-0.5,-5.55,1.2}}, {"HitHRotor", {0,1.8,1.5}}};
};
class B_APC_Tracked_01_base_F;
@@ -372,12 +381,12 @@ class CfgVehicles {
};
class B_APC_Tracked_01_AA_F: B_APC_Tracked_01_base_F {
- GVAR(hitpointPositions[]) = {{"HitTurret", {0,-2,0}}};
+ GVAR(hitpointPositions)[] = {{"HitTurret", {0,-2,0}}};
};
class Car_F;
class Offroad_01_base_F: Car_F {
- GVAR(hitpointGroups[]) = { {"HitGlass1", {"HitGlass2"}} };
+ GVAR(hitpointGroups)[] = { {"HitGlass1", {"HitGlass2"}} };
};
class Offroad_01_repair_base_F: Offroad_01_base_F {
GVAR(canRepair) = 1;
@@ -385,7 +394,7 @@ class CfgVehicles {
};
class MRAP_01_base_F: Car_F {
- GVAR(hitpointGroups[]) = { {"HitGlass1", {"HitGlass2", "HitGlass3", "HitGlass4", "HitGlass5", "HitGlass6"}} };
+ GVAR(hitpointGroups)[] = { {"HitGlass1", {"HitGlass2", "HitGlass3", "HitGlass4", "HitGlass5", "HitGlass6"}} };
};
class B_Truck_01_mover_F;
@@ -416,9 +425,9 @@ class CfgVehicles {
class Quadbike_01_base_F;
class B_Quadbike_01_F: Quadbike_01_base_F {
- GVAR(hitpointPositions[]) = { {"HitEngine", {0, 0.5, -0.7}}, {"HitFuel", {0, 0, -0.5}} };
+ GVAR(hitpointPositions)[] = { {"HitEngine", {0, 0.5, -0.7}}, {"HitFuel", {0, 0, -0.5}} };
};
class Hatchback_01_base_F: Car_F {
- GVAR(hitpointPositions[]) = {{"HitBody", {0, 0.7, -0.5}}, {"HitFuel", {0, -1.75, -0.75}}};
+ GVAR(hitpointPositions)[] = {{"HitBody", {0, 0.7, -0.5}}, {"HitFuel", {0, -1.75, -0.75}}};
};
};
diff --git a/addons/repair/XEH_PREP.hpp b/addons/repair/XEH_PREP.hpp
new file mode 100644
index 0000000000..e3604c95a7
--- /dev/null
+++ b/addons/repair/XEH_PREP.hpp
@@ -0,0 +1,39 @@
+
+PREP(addRepairActions);
+PREP(addSpareParts);
+PREP(canMiscRepair);
+PREP(canRemove);
+PREP(canRepair);
+PREP(canRepairTrack);
+PREP(canReplaceTrack);
+PREP(canReplaceWheel);
+PREP(doFullRepair);
+PREP(doRemoveTrack);
+PREP(doRemoveWheel);
+PREP(doRepair);
+PREP(doRepairTrack);
+PREP(doReplaceTrack);
+PREP(doReplaceWheel);
+PREP(getClaimObjects);
+PREP(getHitPointString);
+PREP(getPostRepairDamage);
+PREP(getWheelHitPointsWithSelections);
+PREP(hasItems);
+PREP(isEngineer);
+PREP(isInRepairFacility);
+PREP(isNearRepairVehicle);
+PREP(isRepairVehicle);
+PREP(moduleAddSpareParts);
+PREP(moduleAssignEngineer);
+PREP(moduleAssignRepairVehicle);
+PREP(moduleAssignRepairFacility);
+PREP(moduleRepairSettings);
+PREP(normalizeHitPoints);
+PREP(repair);
+PREP(repair_failure);
+PREP(repair_success);
+PREP(setDamage);
+PREP(setHitPointDamage);
+PREP(spawnObject);
+PREP(useItem);
+PREP(useItems);
diff --git a/addons/repair/XEH_postInit.sqf b/addons/repair/XEH_postInit.sqf
index 44ca157b0c..2f0bbe7869 100644
--- a/addons/repair/XEH_postInit.sqf
+++ b/addons/repair/XEH_postInit.sqf
@@ -1,7 +1,7 @@
#include "script_component.hpp"
-["setVehicleDamage", {_this call FUNC(setDamage)}] call EFUNC(common,addEventHandler);
-["setVehicleHitPointDamage", {_this call FUNC(setHitPointDamage)}] call EFUNC(common,addEventHandler);
+[QGVAR(setVehicleDamage), {_this call FUNC(setDamage)}] call CBA_fnc_addEventHandler;
+[QGVAR(setVehicleHitPointDamage), {_this call FUNC(setHitPointDamage)}] call CBA_fnc_addEventHandler;
// wheels
-["setWheelHitPointDamage", {(_this select 0) setHitPointDamage [_this select 1, _this select 2]}] call EFUNC(common,addEventHandler);
+[QGVAR(setWheelHitPointDamage), {(_this select 0) setHitPointDamage [_this select 1, _this select 2]}] call CBA_fnc_addEventHandler;
diff --git a/addons/repair/XEH_preInit.sqf b/addons/repair/XEH_preInit.sqf
index 8efa47e7b3..a7feade1c3 100644
--- a/addons/repair/XEH_preInit.sqf
+++ b/addons/repair/XEH_preInit.sqf
@@ -2,43 +2,6 @@
ADDON = false;
-PREP(addRepairActions);
-PREP(addSpareParts);
-PREP(canMiscRepair);
-PREP(canRemove);
-PREP(canRepair);
-PREP(canRepairTrack);
-PREP(canReplaceTrack);
-PREP(canReplaceWheel);
-PREP(doFullRepair);
-PREP(doRemoveTrack);
-PREP(doRemoveWheel);
-PREP(doRepair);
-PREP(doRepairTrack);
-PREP(doReplaceTrack);
-PREP(doReplaceWheel);
-PREP(getClaimObjects);
-PREP(getHitPointString);
-PREP(getPostRepairDamage);
-PREP(getWheelHitPointsWithSelections);
-PREP(hasItems);
-PREP(isEngineer);
-PREP(isInRepairFacility);
-PREP(isNearRepairVehicle);
-PREP(isRepairVehicle);
-PREP(moduleAddSpareParts);
-PREP(moduleAssignEngineer);
-PREP(moduleAssignRepairVehicle);
-PREP(moduleAssignRepairFacility);
-PREP(moduleRepairSettings);
-PREP(normalizeHitPoints);
-PREP(repair);
-PREP(repair_failure);
-PREP(repair_success);
-PREP(setDamage);
-PREP(setHitPointDamage);
-PREP(spawnObject);
-PREP(useItem);
-PREP(useItems);
+#include "XEH_PREP.hpp"
ADDON = true;
diff --git a/addons/repair/XEH_preStart.sqf b/addons/repair/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/repair/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/repair/config.cpp b/addons/repair/config.cpp
index 2e991b54a6..56465ba1f5 100644
--- a/addons/repair/config.cpp
+++ b/addons/repair/config.cpp
@@ -6,8 +6,9 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_interaction"};
- author[] = {"commy2", "Glowbal", "Jonpas"};
- authorUrl = "https://ace3mod.com";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"commy2", "Glowbal", "Jonpas"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
@@ -17,3 +18,11 @@ class CfgPatches {
#include "CfgEventHandlers.hpp"
#include "CfgActions.hpp"
#include "CfgVehicles.hpp"
+#include "CfgEden.hpp"
+
+class ACE_newEvents {
+ setWheelHitPointDamage = QGVAR(setWheelHitPointDamage);
+ setVehicleHitPointDamage = QGVAR(setVehicleHitPointDamage);
+ setVehicleDamage = QGVAR(setVehicleDamage);
+ AddCargoByClass = "ace_addCargoByClass";
+};
diff --git a/addons/repair/functions/fnc_addSpareParts.sqf b/addons/repair/functions/fnc_addSpareParts.sqf
index 74ea0d4c10..2d133da3c1 100644
--- a/addons/repair/functions/fnc_addSpareParts.sqf
+++ b/addons/repair/functions/fnc_addSpareParts.sqf
@@ -21,8 +21,8 @@
params ["_vehicle", ["_amount", 1], ["_part", ""], ["_force", false]];
TRACE_2("params",_vehicle,_amount);
-// Exit if ace_cargo is not loaded
-if !(["ace_cargo"] call EFUNC(common,isModLoaded)) exitWith {};
+// Exit if ace_cargo is not loaded or no part supplied
+if (!(["ace_cargo"] call EFUNC(common,isModLoaded)) || {_part == ""}) exitWith {};
// Collect until SettingsInitialized
if (!EGVAR(common,settingsInitFinished)) exitWith {
@@ -32,13 +32,5 @@ if (!EGVAR(common,settingsInitFinished)) exitWith {
// Exit if not forced and add spare parts is disabled (after settings initted to make sure it really is)
if (!_force && !GVAR(addSpareParts)) exitWith {};
-// Select appropriate part
-if (_part == "") then {
- if (_vehicle isKindOf "Car") then { _part = "ACE_Wheel" };
- if (_vehicle isKindOf "Tank") then { _part = "ACE_Track" };
-};
-// Exit if no appropriate part
-if (_part == "") exitWith {};
-
// Load
-["AddCargoByClass", [_part, _vehicle, _amount]] call EFUNC(common,localEvent);
+["ace_addCargoByClass", [_part, _vehicle, _amount]] call CBA_fnc_localEvent;
diff --git a/addons/repair/functions/fnc_canRepair.sqf b/addons/repair/functions/fnc_canRepair.sqf
index f7c3f60a8a..6027a34fd5 100644
--- a/addons/repair/functions/fnc_canRepair.sqf
+++ b/addons/repair/functions/fnc_canRepair.sqf
@@ -25,7 +25,8 @@ private ["_config", "_engineerRequired", "_items", "_return", "_condition", "_ve
_config = (ConfigFile >> "ACE_Repair" >> "Actions" >> _className);
if !(isClass _config) exitWith {false}; // or go for a default?
-if(isEngineOn _target) exitWith {false};
+
+// if(isEngineOn _target) exitWith {false}; // Ignore here so action shows, then exit and show warning when selected #3348
_engineerRequired = if (isNumber (_config >> "requiredEngineer")) then {
getNumber (_config >> "requiredEngineer");
diff --git a/addons/repair/functions/fnc_doRemoveTrack.sqf b/addons/repair/functions/fnc_doRemoveTrack.sqf
index d36407b197..ca6ac58ffd 100644
--- a/addons/repair/functions/fnc_doRemoveTrack.sqf
+++ b/addons/repair/functions/fnc_doRemoveTrack.sqf
@@ -27,14 +27,14 @@ private _hitPointDamage = _vehicle getHitPointDamage _hitPoint;
if (_hitPointDamage >= 1) exitWith {};
// don't die by spawning / moving the wheel
-["fixCollision", _unit] call EFUNC(common,localEvent);
+[QEGVAR(common,fixCollision), _unit] call CBA_fnc_localEvent;
// spawn track
private _newTrack = ["ACE_Track", getPosASL _unit, _hitPointDamage] call FUNC(spawnObject);
TRACE_2("new track created",_newTrack,damage _newTrack);
// raise event to set the new hitpoint damage
-["setWheelHitPointDamage", _vehicle, [_vehicle, _hitPoint, 1]] call EFUNC(common,targetEvent);
+[QGVAR(setWheelHitPointDamage), [_vehicle, _hitPoint, 1], _vehicle] call CBA_fnc_targetEvent;
// display text message if enabled
if (GVAR(DisplayTextOnRepair)) then {
diff --git a/addons/repair/functions/fnc_doRemoveWheel.sqf b/addons/repair/functions/fnc_doRemoveWheel.sqf
index 21a152c597..dafe603a18 100644
--- a/addons/repair/functions/fnc_doRemoveWheel.sqf
+++ b/addons/repair/functions/fnc_doRemoveWheel.sqf
@@ -27,14 +27,14 @@ private _hitPointDamage = _vehicle getHitPointDamage _hitPoint;
if (_hitPointDamage >= 1) exitWith {};
// don't die by spawning / moving the wheel
-["fixCollision", _unit] call EFUNC(common,localEvent);
+[QEGVAR(common,fixCollision), _unit] call CBA_fnc_localEvent;
// spawn wheel
private _newWheel = ["ACE_Wheel", getPosASL _unit, _hitPointDamage] call FUNC(spawnObject);
TRACE_2("new wheel created",_newWheel,damage _newWheel);
// raise event to set the new hitpoint damage
-["setWheelHitPointDamage", _vehicle, [_vehicle, _hitPoint, 1]] call EFUNC(common,targetEvent);
+[QGVAR(setWheelHitPointDamage), [_vehicle, _hitPoint, 1], _vehicle] call CBA_fnc_targetEvent;
// display text message if enabled
if (GVAR(DisplayTextOnRepair)) then {
diff --git a/addons/repair/functions/fnc_doRepair.sqf b/addons/repair/functions/fnc_doRepair.sqf
index 4c063c6c73..ede096a1fb 100644
--- a/addons/repair/functions/fnc_doRepair.sqf
+++ b/addons/repair/functions/fnc_doRepair.sqf
@@ -34,7 +34,7 @@ private _hitPointNewDamage = (_hitPointCurDamage - 0.5) max _postRepairDamageMin
if (_hitPointNewDamage < _hitPointCurDamage) then {
// raise event to set the new hitpoint damage
TRACE_3("repairing main point", _vehicle, _hitPointIndex, _hitPointNewDamage);
- ["setVehicleHitPointDamage", _vehicle, [_vehicle, _hitPointIndex, _hitPointNewDamage]] call EFUNC(common,targetEvent);
+ [QGVAR(setVehicleHitPointDamage), [_vehicle, _hitPointIndex, _hitPointNewDamage], _vehicle] call CBA_fnc_targetEvent;
_hitPointCurDamage = _hitPointNewDamage;
};
@@ -55,7 +55,7 @@ if (isArray _hitpointGroupConfig) then {
private _subPointNewDamage = (_subPointCurDamage - 0.5) max _postRepairDamageMin;
if (_subPointNewDamage < _subPointCurDamage) then {
TRACE_3("repairing sub point", _vehicle, _subHitIndex, _subPointNewDamage);
- ["setVehicleHitPointDamage", _vehicle, [_vehicle, _subHitIndex, _subPointNewDamage]] call EFUNC(common,targetEvent);
+ [QGVAR(setVehicleHitPointDamage), [_vehicle, _subHitIndex, _subPointNewDamage], _vehicle] call CBA_fnc_targetEvent;
};
};
} forEach _subHitArray;
diff --git a/addons/repair/functions/fnc_doRepairTrack.sqf b/addons/repair/functions/fnc_doRepairTrack.sqf
index 46c94c29f9..34f29506a3 100644
--- a/addons/repair/functions/fnc_doRepairTrack.sqf
+++ b/addons/repair/functions/fnc_doRepairTrack.sqf
@@ -41,7 +41,7 @@ _hitPointDamage = (_hitPointDamage - _damageRepaired) min 0;
deleteVehicle _track;
// raise event to set the new hitpoint damage
-["setWheelHitPointDamage", _vehicle, [_vehicle, _hitPoint, _hitPointDamage]] call EFUNC(common,targetEvent);
+[QGVAR(setWheelHitPointDamage), [_vehicle, _hitPoint, _hitPointDamage], _vehicle] call CBA_fnc_targetEvent;
// display text message if enabled
if (GVAR(DisplayTextOnRepair)) then {
diff --git a/addons/repair/functions/fnc_doReplaceTrack.sqf b/addons/repair/functions/fnc_doReplaceTrack.sqf
index 9eafe68c9e..b0b71e5b61 100644
--- a/addons/repair/functions/fnc_doReplaceTrack.sqf
+++ b/addons/repair/functions/fnc_doReplaceTrack.sqf
@@ -44,7 +44,7 @@ if (_newHitPointDamage >= 1) exitWith {};
deleteVehicle _track;
// raise event to set the new hitpoint damage
-["setWheelHitPointDamage", _vehicle, [_vehicle, _hitPoint, _newHitPointDamage]] call EFUNC(common,targetEvent);
+[QGVAR(setWheelHitPointDamage), [_vehicle, _hitPoint, _newHitPointDamage], _vehicle] call CBA_fnc_targetEvent;
// display text message if enabled
if (GVAR(DisplayTextOnRepair)) then {
diff --git a/addons/repair/functions/fnc_doReplaceWheel.sqf b/addons/repair/functions/fnc_doReplaceWheel.sqf
index ce5e9220dd..24b995a45f 100644
--- a/addons/repair/functions/fnc_doReplaceWheel.sqf
+++ b/addons/repair/functions/fnc_doReplaceWheel.sqf
@@ -44,7 +44,7 @@ if (_newHitPointDamage >= 1) exitWith {};
deleteVehicle _wheel;
// raise event to set the new hitpoint damage
-["setWheelHitPointDamage", _vehicle, [_vehicle, _hitPoint, _newHitPointDamage]] call EFUNC(common,targetEvent);
+[QGVAR(setWheelHitPointDamage), [_vehicle, _hitPoint, _newHitPointDamage], _vehicle] call CBA_fnc_targetEvent;
// display text message if enabled
if (GVAR(DisplayTextOnRepair)) then {
diff --git a/addons/repair/functions/fnc_getWheelHitPointsWithSelections.sqf b/addons/repair/functions/fnc_getWheelHitPointsWithSelections.sqf
index 2611d10b38..2ed50c5d0e 100644
--- a/addons/repair/functions/fnc_getWheelHitPointsWithSelections.sqf
+++ b/addons/repair/functions/fnc_getWheelHitPointsWithSelections.sqf
@@ -70,6 +70,8 @@ _wheelHitPointSelections = [];
_bestIndex = -1;
{
if (_x != "") then {
+ //Filter out things that definitly aren't wheeels (#3759)
+ if ((toLower (_hitPoints select _forEachIndex)) in ["hitengine", "hitfuel", "hitbody"]) exitWith {TRACE_1("filter",_x)};
_xPos = _vehicle selectionPosition _x;
if (_xPos isEqualTo [0,0,0]) exitWith {};
_xDist = _wheelCenterPos distance _xPos;
diff --git a/addons/repair/functions/fnc_repair.sqf b/addons/repair/functions/fnc_repair.sqf
index 25e58151c5..5577057241 100644
--- a/addons/repair/functions/fnc_repair.sqf
+++ b/addons/repair/functions/fnc_repair.sqf
@@ -36,7 +36,14 @@ _engineerRequired = if (isNumber (_config >> "requiredEngineer")) then {
0;
};
if !([_caller, _engineerRequired] call FUNC(isEngineer)) exitWith {false};
-if (isEngineOn _target) exitWith {false};
+
+if ((isEngineOn _target) && {GVAR(autoShutOffEngineWhenStartingRepair)}) then {
+ [QEGVAR(common,engineOn), [_target, false], _target] call CBA_fnc_targetEvent;
+};
+if ((isEngineOn _target) && {!GVAR(autoShutOffEngineWhenStartingRepair)}) exitWith {
+ [LSTRING(shutOffEngineWarning), 1.5, _caller] call EFUNC(common,displayTextStructured);
+ false
+};
//Items can be an array of required items or a string to a ACE_Setting array
_items = if (isArray (_config >> "items")) then {
@@ -228,7 +235,7 @@ if (_target != _caller) then {
};
if (_displayText != "") then {
- ["displayTextStructured", [_caller], [[_displayText, [_caller] call EFUNC(common,getName), [_target] call EFUNC(common,getName)], 1.5, _caller]] call EFUNC(common,targetEvent);
+ [QEGVAR(common,displayTextStructured), [[_displayText, [_caller] call EFUNC(common,getName), [_target] call EFUNC(common,getName)], 1.5, _caller], [_caller]] call CBA_fnc_targetEvent;
};
true;
diff --git a/addons/repair/functions/fnc_repair_failure.sqf b/addons/repair/functions/fnc_repair_failure.sqf
index 3fabb58e80..8616dd4808 100644
--- a/addons/repair/functions/fnc_repair_failure.sqf
+++ b/addons/repair/functions/fnc_repair_failure.sqf
@@ -63,6 +63,7 @@ if (isNil _callback) then {
} else {
_callback = missionNamespace getVariable _callback;
};
+if (!(_callback isEqualType {})) then {_callback = {TRACE_1("callback was NOT code",_callback)};};
_args call _callback;
diff --git a/addons/repair/functions/fnc_repair_success.sqf b/addons/repair/functions/fnc_repair_success.sqf
index 9625dad1df..c18116f862 100644
--- a/addons/repair/functions/fnc_repair_success.sqf
+++ b/addons/repair/functions/fnc_repair_success.sqf
@@ -58,6 +58,8 @@ if (isNil _callback) then {
} else {
_callback = missionNamespace getVariable _callback;
};
+if (!(_callback isEqualType {})) then {_callback = {TRACE_1("callback was NOT code",_callback)};};
+
_args call _callback;
//todo: repair litter?
diff --git a/addons/repair/functions/fnc_setDamage.sqf b/addons/repair/functions/fnc_setDamage.sqf
index 410a9b0396..78c7cae709 100644
--- a/addons/repair/functions/fnc_setDamage.sqf
+++ b/addons/repair/functions/fnc_setDamage.sqf
@@ -23,23 +23,15 @@ TRACE_2("params",_vehicle,_damage);
if !(local _vehicle) exitWith {};
// save array with damage values of all hitpoints
-private ["_hitPoints", "_hitPointDamages"];
-
-_hitPoints = [_vehicle] call EFUNC(common,getHitpoints);
-
-_hitPointDamages = [];
-
-{
- _hitPointDamages set [_forEachIndex, _vehicle getHitPointDamage _x];
-} forEach _hitPoints;
+(getAllHitPointsDamage _vehicle) params [["_allHitPoints", []], ["_allHitPointsSelections", []], ["_allHitPointDamages", []]];
// set damage of the vehicle
_vehicle setDamage _damage;
// restore original hitpoint damage values
{
- _vehicle setHitPointDamage [_x, _hitPointDamages select _forEachIndex];
-} forEach _hitPoints;
+ _vehicle setHitIndex [_forEachIndex, _x];
+} forEach _allHitPointDamages;
// normalize hitpoints
[_vehicle] call FUNC(normalizeHitPoints);
diff --git a/addons/repair/functions/fnc_setHitPointDamage.sqf b/addons/repair/functions/fnc_setHitPointDamage.sqf
index ba04cdb7eb..0f809b345c 100644
--- a/addons/repair/functions/fnc_setHitPointDamage.sqf
+++ b/addons/repair/functions/fnc_setHitPointDamage.sqf
@@ -1,7 +1,7 @@
/*
* Author: commy2
* Set the hitpoint damage and change the structural damage acordingly, requires local vehicle.
- * Handles the "setVehicleHitPointDamage" event
+ * Handles the "ace_repair_setVehicleHitPointDamage" event
*
* Arguments:
* 0: Local Vehicle to Damage
diff --git a/addons/repair/functions/fnc_spawnObject.sqf b/addons/repair/functions/fnc_spawnObject.sqf
index 86d0b563ac..e927a19651 100644
--- a/addons/repair/functions/fnc_spawnObject.sqf
+++ b/addons/repair/functions/fnc_spawnObject.sqf
@@ -28,7 +28,7 @@ _newObject setPosASL _position;
_newObject setDamage _damage;
-["fixCollision", _newObject] call EFUNC(common,localEvent);
-["fixPosition", _newObject] call EFUNC(common,localEvent);
+[QEGVAR(common,fixCollision), _newObject] call CBA_fnc_localEvent;
+[QEGVAR(common,fixPosition), _newObject] call CBA_fnc_localEvent;
_newObject
diff --git a/addons/repair/functions/fnc_useItem.sqf b/addons/repair/functions/fnc_useItem.sqf
index 024ee76c29..02daeed33e 100644
--- a/addons/repair/functions/fnc_useItem.sqf
+++ b/addons/repair/functions/fnc_useItem.sqf
@@ -20,7 +20,7 @@ params ["_unit", "_item"];
TRACE_2("params",_unit,_item);
if ([_unit, _item] call EFUNC(common,hasItem)) exitWith {
- [[_unit, _item], QUOTE(EFUNC(common,useItem)), _unit] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
+ ["ace_useItem", [_unit, _item], _unit] call CBA_fnc_targetEvent;
[true, _unit];
};
diff --git a/addons/repair/stringtable.xml b/addons/repair/stringtable.xml
index b79f25bd65..48a647290f 100644
--- a/addons/repair/stringtable.xml
+++ b/addons/repair/stringtable.xml
@@ -38,13 +38,15 @@
Vyměnit kolo
- Replacing Wheel ...
- Ersetze Reifen ...
- Wymienianie koła ...
+ Replacing Wheel...
+ Ersetze Reifen...
+ Wymienianie koła...
Trocando roda...
- Замена колеса ...
- Měním kolo ...
- Cambiando rueda ...
+ Замена колеса...
+ Měním kolo...
+ Cambiando rueda...
+ Sto sostituendo la ruota...
+ Remplacement de la roue...
Wheel replaced
@@ -54,6 +56,8 @@
Колесо заменено
Kolo vyměněno
Rueda cambiada
+ Ruota sostituita
+ Roue remplacée
Remove Wheel
@@ -68,13 +72,15 @@
Снять колесо
- Removing Wheel ...
- Entferne Reifen ...
- Zdejmowanie koła ...
+ Removing Wheel...
+ Entferne Reifen...
+ Zdejmowanie koła...
Removendo roda...
- Снятие колеса ...
- Odstraňuji kolo ...
- Quitando rueda ...
+ Снятие колеса...
+ Odstraňuji kolo...
+ Quitando rueda...
+ Sto rimuovendo la ruota...
+ Démontage de la roue...
Wheel removed
@@ -84,6 +90,8 @@
Колесо снято
Kolo odstraněno
Rueda quitada
+ Ruota rimossa
+ Roue démontée
Change Track
@@ -93,15 +101,19 @@
Заменить гусеницу
Vyměnit pás
Cambiar oruga
+ Cambia cingolo
+ Changer la chenille
- Replacing Track ...
- Tausche Kette aus ...
- Wymienianie gąsienicy ...
+ Replacing Track...
+ Tausche Kette aus...
+ Wymienianie gąsienicy...
Trocando esteira...
- Замена гусеницы ...
- Měním pás ...
- Cambiando oruga ...
+ Замена гусеницы...
+ Měním pás...
+ Cambiando oruga...
+ Sto sostituendo il cingolo...
+ Remplacement de la chenille...
Track replaced
@@ -111,6 +123,8 @@
Гусеница заменена
Pás vyměněn
Oruga cambiada
+ Cingolo sostituito
+ Chenille remplacée
Remove Track
@@ -120,15 +134,19 @@
Снять гусеницу
Odstranit pás
Quitar oruga
+ Rimuovi cingolo
+ Enlever la chenille
- Removing Track ...
- Entferne Kette ...
- Zdejmowanie gąsienicy ...
+ Removing Track...
+ Entferne Kette...
+ Zdejmowanie gąsienicy...
Removendo esteira...
- Снятие гусеницы ...
- Odstraňuji pás ...
- Quitando oruga ...
+ Снятие гусеницы...
+ Odstraňuji pás...
+ Quitando oruga...
+ Sto rimuovendo il cingolo...
+ Enlèvement de la chenille...
Track removed
@@ -138,6 +156,8 @@
Гусеница снята
Pás odstraněn
Oruga quitada
+ Cingolo rimosso
+ Chenille enlevée
Full Repair
@@ -147,15 +167,19 @@
Полный ремонт
Kompletní oprava
Reparación completa
+ Riparazione completa
+ Réparations complètes
- Repairing Vehicle ...
- Entferne Fahrzeug ...
- Naprawianie pojazdu ...
+ Repairing Vehicle...
+ Entferne Fahrzeug...
+ Naprawianie pojazdu...
Reparando veículo...
- Ремонт транспорта ...
- Opravuji vozidlo ...
- Reparando vehículo ...
+ Ремонт транспорта...
+ Opravuji vozidlo...
+ Reparando vehículo...
+ Sto riparando il veicolo...
+ Réparation du véhicule...
Full Repair Locations
@@ -165,6 +189,8 @@
Места полного ремонта
Oblast pro kompletní opravu
Lugares de reparación completa
+ Luoghi Riparazione Completa
+ Lieu de réparation complète
At what locations can a vehicle be fully repaired?
@@ -174,6 +200,8 @@
В каких местах транспорт может быть полностью отремеонтирован?
¿En qué lugares puede un vehículo ser reparado totalmente?
V které oblasti může být vozidlo plně opraveno?
+ In quali luoghi è possibile riparare completamente un veicolo?
+ Où peuvent être réparés complètement les véhicules ?
Allow Full Repair
@@ -183,6 +211,8 @@
Полный ремонт выполняют
Povolit kompletní opravu
Permitir reparación completa
+ Consenti Riparazione Completa
+ Autoriser les réparations complètes.
Who can perform a full repair on a vehicle?
@@ -192,6 +222,8 @@
Quem pode reparar o veículo por completo?
¿Quién puede realizar una reparación completa de un vehículo?
Kdo může provést úplné opravy na vozidle?
+ Chi può eseguire una riparazione completa su un veicolo?
+ Qui peut faire une réparation complète ?
Add Spare Parts
@@ -201,6 +233,8 @@
Añadir repuestos
Добавлять запчасти
Přidat náhradní díly
+ Aggiungi Parti di Ricambio
+ Ajouter des pièces de rechange
Add spare parts to vehicles (requires Cargo component)?
@@ -210,6 +244,8 @@
¿Añadir repuestos para vehículos (requiere componente de carga)?
Добавлять запасные части в технику (требуется модуль Грузоперевозок)?
Přidat náhradní díly do vozidla (vyžaduje úložný prostor)?
+ Aggiungi parti di ricambio ai veicoli (richiede componente Cargo)?
+ Ajouter des pièces de rechage aux véhicules ? (à besoin du système de cargaison)
Repair >>
@@ -231,6 +267,8 @@
Отображать текст при ремонте
Zobrazit text při opravě
Mostrar texto en la reparación
+ Mostra testo mentre ripari
+ Afficher du texte pendant la réparation
Display a notification whenever you repair a vehicle
@@ -240,30 +278,32 @@
Отображать оповещение каждый раз, когда вы ремонтируете транспорт
Mostrar una notificación cada vez que se reparare un vehículo
Zobrazit oznámení kdykoliv opravíš vozidlo
+ Mostra una notifica quando stai riparando un veicolo
+ Afficher une notification lorsque l'on répare un véhicule
- Repairing ...
- Reparieren ...
- Reparando ...
- Réparation ...
+ Repairing...
+ Reparieren...
+ Reparando...
+ Réparation...
Naprawianie...
- Opravuji ...
+ Opravuji...
Reparando...
- Sto riparando ...
- javítása ...
- Ремонтируем ...
+ Sto riparando...
+ javítása...
+ Ремонтируем...
- Repairing %1 ...
- Repariere %1 ...
- Reparando %1 ...
- Réparation %1 ...
+ Repairing %1...
+ Repariere %1...
+ Reparando %1...
+ Réparation %1...
Naprawianie %1...
- Opravuji %1 ...
+ Opravuji %1...
Reparando %1...
- Sto riparando %1 ...
- %1 javítása ...
- Ремонтируем %1 ...
+ Sto riparando %1...
+ %1 javítása...
+ Ремонтируем %1...
Repaired %1
@@ -285,6 +325,8 @@
Полностью отремонтированная часть
Kompletně opravená část
Parte totalmente reparado
+ Parte riparata completamente
+ Pièce entièrement réparée
Partially repaired %1
@@ -294,6 +336,8 @@
Частично отремонтировано: %1
Parcialmente reparada %1
%1 - částečně opraveno
+ %1 parzialmente riparato
+ %1 pratiquement réparée
Fully repaired %1
@@ -303,6 +347,8 @@
Полностью отремонтировано: %1
%1 - kompletně opraveno
Totalmente reparada %1
+ %1 completamente riparato
+ %1 entièrement réparée
Partially repaired %1
@@ -312,6 +358,8 @@
Частично отремонтировано: %1
Parcialmente reparada %1
%1 - částečně opraveno
+ %1 parzialmente riparato
+ %1 pratiquement réparée
Body
@@ -356,6 +404,9 @@
Estabilizador Horizontal Esquerdo
Estabilizador horizontal izquierdo
Levý horizontální stabilizátor
+ Stabilizzatore Orizzontale Sinistro
+ Stabilisateur horizontal gauche
+ Linkes Höhenleitwerk
Right Horizontal Stabilizer
@@ -364,6 +415,9 @@
Estabilizador Horizontal Direito
Estabilizador horizontal derecho
Pravý horizontální stabilizátor
+ Stabilizzatore Orizzontale Destro
+ Stabilisateur horizontal droit
+ Rechtes Höhenleitwerk
Vertical Stabilizer
@@ -372,6 +426,9 @@
Вертикальный стабилизатор
Estabilizador Vertical
Estabilizador vertical
+ Stabilizzatore Verticale
+ Stabilisateur vertical
+ Seitenleitwerk
Fuel Tank
@@ -393,6 +450,8 @@
Трансмиссия
Transmissão
Transmisión
+ Trasmissione
+ Instruments
Gear
@@ -402,6 +461,8 @@
Engrenagem
Rueda
Podvozek
+ Motore
+ Trains d'attérissage
Starter
@@ -411,6 +472,8 @@
Стартер
Arranque
Motor de arranque
+ Motore d'avviamento
+ Démarreur
Tail
@@ -420,6 +483,8 @@
Хвост
Tail
Cauda
+ Coda
+ Queue
Pitot Tube
@@ -429,6 +494,8 @@
Кокпит
Tubo de Pitot
Tubo del pitot
+ Tubo di Pitot
+ Sonde pitot
Static Port
@@ -438,6 +505,8 @@
Porta Estática
Puerto estático
Statický port
+ Porta Statica
+ Port statique
Ammo
@@ -447,6 +516,8 @@
Боеприпасы
Munição
Munición
+ Munizioni
+ Munitions
Turret
@@ -480,6 +551,8 @@
Rakety
Rakiety
Misiles
+ Missili
+ Missiles
Left Track
@@ -645,6 +718,8 @@
Лебедка
Cabrestante
Naviják
+ Gancio
+ Treuil
Glass (right)
@@ -685,6 +760,12 @@
ERA
ERA
+ ERA
+ ERA
+ Reaktivpanzerung
+ ERA
+ ERA
+ ERA
Repair Settings
@@ -694,6 +775,8 @@
Ремонт
Ajustes de reparación
Nastavení oprav
+ Impostazioni Riparazioni
+ Réglages de réparation
Provides a repair system for all types of vehicles.
@@ -703,6 +786,8 @@
Предоставляет систему ремонта для всех типов транспортных средств.
Proporciona un sistema de reparación para todo tipo de vehículos.
Poskytuje rozsáhlý systém oprav pro všechny typy vozidel.
+ Fornisce un sistema di riparazione per tutti i tipi di veicoli.
+ Fournit un système de réparation pour tous les types de véhicules.
Anyone
@@ -712,6 +797,8 @@
Кто угодно
Kdokoliv
Cualquiera
+ Chiunque
+ Tout le monde
Engineer only
@@ -721,6 +808,8 @@
Только инженеры
Pouze inženýr
Solo ingeniero
+ Solo Geniere
+ Ingénieurs seulement
Repair Specialist only
@@ -730,6 +819,8 @@
Только ремонтные специалисты
Pouze specialista na opravování
Solo especialista en reparación
+ Solo Specialista Riparazioni
+ Spécialistes de réparation seulement
Allow Wheel
@@ -739,6 +830,8 @@
Разрешить замену колес
Možnost Výměny Kol
Permitir rueda
+ Consenti Ruota
+ Autoriser les roues
Who can remove and replace wheels?
@@ -748,6 +841,8 @@
Кто может снимать и заменять колеса?
Kdo může odstranit a vyměnit kola?
¿Quién puede quitar y cambiar las ruedas?
+ Chi può rimuovere e sostituire le ruote?
+ Qui peut enlever et remplacer les roues ?
Allow Repair
@@ -757,6 +852,8 @@
Разрешить ремонт
Možnost Opravování
Permitir reparación
+ Consenti Riparazioni
+ Autoriser les réparations
Who can perform repair actions?
@@ -766,6 +863,8 @@
Кто может выполнять ремонт?
Kdo může provádět opravy?
¿Quién puede realizar reparaciones?
+ Chi può eseguire riparazioni?
+ Qui peut réparer ?
Repair Threshold
@@ -775,6 +874,8 @@
Лимит ремкомплекта
Umbral de reparación
Práh oprav
+ Limite Riparazioni
+ Seuil de réparation
What is the maximum damage that can be repaired with a toolkit?
@@ -784,6 +885,8 @@
Какой максимальный урон можно починить с помощью ремкомплекта?
¿Cuál es el daño máximo que puede ser reparado con una caja de herramientas?
Jaké maximální poškození může být opraveno pomocí opravárenské sady?
+ Qual'è il danno massimo che può essere riparato con il Toolkit?
+ Quel est le maximum de dommages réparable par une trousse à outils ?
Repair Threshold (Engineer)
@@ -793,6 +896,8 @@
Лимит инженера
Umbral de Reparación (Ingeniero)
Práh oprav (Inženýr)
+ Limite Riparazioni (Geniere)
+ Seuil de réparatoin (ingénieur)
What is the maximum damage that can be repaired by an engineer?
@@ -802,6 +907,8 @@
Какой максимальный урон может починить инженер?
¿Cuál es el daño máximo que puede ser reparado por un ingeniero?
Jaké maximální poškození může být opraveno pomoci inženýra?
+ Qual'è il danno massimo che può essere riparato da un Geniere?
+ Quel est le maximum de dommages qui peuvent être réparés par un ingénieur ?
Remove toolkit on use
@@ -811,6 +918,8 @@
Удалять ремкомплект после использования
Eliminar conjunto de herramientas al usarlo
Odstranit sadu nástrojů po použití
+ Rimuovi Toolkit dopo l'uso
+ Enlever la trousse à outils après usage
Should the toolkit be removed on usage?
@@ -820,6 +929,8 @@
Следует ли удалять ремкомплект после использования?
¿Deben retirarse las herramientas al usarlas?
Má být odstraněna sada nástroju po použití?
+ Il Toolkit dev'essere rimosso dopo l'uso?
+ La trousse à outils devrait-elle être enlevée après usage ?
Anywhere
@@ -829,6 +940,8 @@
Где угодно
Kdekoliv
En cualquier sitio
+ Ovunque
+ N'importe où
Repair Vehicle only
@@ -838,6 +951,8 @@
Только у ремонтного транспорта
Reparar solo en vehículo
Pouze opravárenské vozidlo
+ Solo Veicoli Riparazioni
+ Véhicule de réparation seulement
Repair Facility only
@@ -847,6 +962,8 @@
Только у ремонтных сооружений
Reparar solo en instalación
Pouze opravárenské zařízení
+ Solo Strutture Riparazioni
+ Installation de réparation seulement
Repair Facility or Vehicle
@@ -856,6 +973,8 @@
Только у ремонтного транспорта или ремонтных сооружений
Reparar en instalación o vehículo
Opravárenské zařízení nebo vozidlo
+ Strutture Riparazioni o Veicoli
+ Installations ou véhicule de réparation
Assign Engineer
@@ -865,6 +984,8 @@
Назначить инженером
Přiřadit Inženýra
Asignar ingeniero
+ Assegna Geniere
+ Assigner le rôle d'ingénieur
List
@@ -874,6 +995,8 @@
Список
Seznam
Lista
+ Lista
+ Liste
List of unit names that will be classified as engineer, separated by commas.
@@ -883,6 +1006,8 @@
Список имен юнитов, которые будут классифицированы как инженеры, разделенный запятыми.
Lista de los nombres de las unidades que serán clasificados como ingeniero, separados por comas.
Seznam jmen jednotek, které budou klasifikovány jako inženýr, oddělit čárkami.
+ Lista di unità che verranno classificate come genieri, separate da virgole.
+ Liste des noms d'unités qui seront considérées ingénieurs. Séparé par des virgules
Is Engineer
@@ -892,6 +1017,8 @@
Это инженер
Es un ingeniero
Inženýr
+ E' Geniere
+ Est ingénieur
Select the engineering skill level of the unit
@@ -901,6 +1028,8 @@
Укажите уровень инженерного мастерства для юнита
Selecciona el nivel de conocimientos de ingeniería de la unidad
Vyberte úroveň dovednosti inženýra pro jednotku
+ Seleziona il livello di abilità geniere dell'unità
+ Sélectionner le niveau d'habilité en réparation de l'unité
None
@@ -910,6 +1039,8 @@
Нет
Nikdo
Ningún
+ Nessuna
+ Aucun
Engineer
@@ -919,6 +1050,8 @@
Инженер
Inženýr
Ingeniero
+ Geniere
+ Ingénieur
Specialist
@@ -928,6 +1061,8 @@
Специалист
Specialista
Especialista
+ Specialista Riparazioni
+ Spécialiste
Assign one or multiple units as an engineer
@@ -937,6 +1072,8 @@
Назначить одного или нескольких юнитов инженерами
Asignar una o varias unidades como ingeniero
Přiřaďte jednu nebo více osob jako inženýra
+ Assegna una o più unità come genieri
+ Assigner un ou plusieurs unités comme ingénieur
Assign Repair Vehicle
@@ -946,6 +1083,8 @@
Назначить ремонтный транспорт
Asignar vehículo de reparación
Přiřaďte opraváresnké vozidlo
+ Assegna Veicolo Riparazioni
+ Assigner en tant que véhicule de réparation
List
@@ -955,6 +1094,8 @@
Список
Seznam
Lista
+ Lista
+ Liste
List of vehicles that will be classified as repair vehicle, separated by commas.
@@ -964,6 +1105,8 @@
Список транспортных средств, которые будут классифицированы как ремонтные, разделенный запятыми.
Lista de los vehículos que se clasifican como vehículo de reparación, separados por comas.
Seznam vozidel, která budou klasifikována jako opravárenská, oddělit čárkami.
+ Lista di Veicoli che verranno considerati veicoli riparazioni, separati da virgole.
+ Liste de véhicules qui seront considérés comme véhicules de réparation. Séparé par des virgules.
Is Repair Vehicle
@@ -973,6 +1116,8 @@
Это ремонтный транспорт
Es un vehículo de reparación
Opravárenské vozidlo
+ E' Veicolo Riparazioni
+ Est un véhicule de réparation
Is the vehicle classified as a repair vehicle?
@@ -982,6 +1127,8 @@
Классифицируется ли этот транспорт как ремонтный?
¿Está el vehículo clasificado como un vehículo de reparación?
Je vozidlo klasifikováno jako opravárenské?
+ Il veicolo è classificato dome veicolo riparazioni?
+ Le véhicule est-il considéré comme un véhicule de réparation ?
Assign one or multiple vehicles as a repair vehicle
@@ -991,6 +1138,8 @@
Назначить одно или несколько транспортных средств ремонтными
Asignar uno o varios vehículos como vehículo de reparación
Přiřaďte jedno nebo více vozidel jako opravárenské vozidlo
+ Assegna uno o più veicoli come veicoli riparazioni
+ Assigner un ou plusieurs véhicules en tant que véhicule de réparation
Assign Repair Facility
@@ -1000,6 +1149,8 @@
Назначить ремонтное сооружение
Asignar instalación de reparación
Přiřaďte opravárenské zařízení
+ Assegna Struttura Riparazioni
+ Assigner en tant qu'installation de réparation
List
@@ -1009,6 +1160,8 @@
Список
Seznam
Lista
+ Lista
+ Liste
List of objects that will be classified as repair Facility, separated by commas.
@@ -1018,6 +1171,8 @@
Список объектов, которые будут классифицированы как ремонтные, разделенный запятыми.
Lista de los objetos que se clasifican como instalaciones para la reparación, separados por comas.
Seznam objektů, které budou klasifikovány jako opravárenské zařízení, oddělit čárkami.
+ Lista di oggetti che verranno classificati come strutture riparazioni, separate da virgole.
+ Liste des objets considérés comme installations de réparation. Séparé par des virgules
Is Repair Facility
@@ -1027,6 +1182,8 @@
Это ремонтное сооружение
Es una instalación de reparación
Opravárenské zařízení
+ E' Struttura Riparazioni
+ Est une installation de réparation
Is the object classified as a repair Facility?
@@ -1036,6 +1193,8 @@
Классифицируется ли этот объект как ремонтное сооружение?
¿Está el objeto clasificado como una instalación de reparación?
Je objekt klasifikován jako opravárenské zařízení?
+ L'oggetto è classificato come struttura riparazioni?
+ L'objet est-il considéré comme une installation de réparation ?
Assign one or multiple objects as a repair Facility
@@ -1045,6 +1204,8 @@
Definir um ou mais objetos como instalação de reparos
Asignar uno o varios objetos como una instalación de reparación
Přiřaďte jeden nebo více objektů jako opravárenské zařízení
+ Assegna uno o più oggetti come strutture riparazioni
+ Assigner un ou plusieurs objets en tant que véhicule de réparation
Add Spare Parts
@@ -1054,6 +1215,8 @@
Añadir repuestos
Добавить запчасти
Přidat náhradní díly
+ Aggiungi Parti di Ricambio
+ Ajouter des pièces de rechange
Add spare parts to one or multiple objects
@@ -1063,6 +1226,8 @@
Añadir repuestos a uno o varios objetos
Добавить запасные части в одно или несколько транспортных средств
Přidat náhradní díly do jednoho nebo více objektů
+ Aggiungi parti di ricambio ad uno o più oggetti
+ Ajouter des pièces de rechange à un ou plusieurs objets
List
@@ -1072,6 +1237,8 @@
Lista
Список
Seznam
+ Lista
+ Liste
List of objects that will get spare parts added, separated by commas.
@@ -1081,6 +1248,8 @@
Lista de los objetos que tendrán repuestos añadidos, separados por comas.
Список транспортных средств, в которые будут добавляться запчасти, разделенный запятыми.
Seznam objektů, které dostanou náhradní díly, oddělit čárkami.
+ Lista di oggetti a cui verranno aggiunte parti di ricambio, separate da virgole.
+ Liste des objets qui recevront des pièces de réparation en plus. Séparé par des virgules
Part
@@ -1090,6 +1259,8 @@
Pieza
Запчасть
Díl
+ Parte
+ Pièce
Spare part.
@@ -1099,6 +1270,8 @@
Pieza de recambio.
Запасная часть.
Náhradní díl.
+ Parte di ricambio.
+ Pièce de rechange
Amount
@@ -1108,6 +1281,8 @@
Cantidad
Количество
Množství
+ Quantità
+ Quantité
Number of selected spare parts.
@@ -1117,6 +1292,8 @@
Número de piezas de repuesto seleccionados.
Число выбранных запасных частей.
Počet vybraných náhradních dílů.
+ Numero di parti di ricambio selezionate.
+ Nombre de pièces de rechange séléctionnées
Wheel repair requirements
@@ -1126,6 +1303,8 @@
Для ремонта колес требуется
Requerimentos para reparo de rodas
Vyžaduje opravu kol
+ Requisiti riparazione ruote
+ Exigences de réparation de roue
Items required to remove/replace wheels
@@ -1135,6 +1314,15 @@
Предметы, которые требуются для снятия/замены колес
Itens requeridos para remover/trocar rodas
Položka vyžaduje odstraněná/vyměněná kola
+ Oggetti richiesti per riparare/rimuovere ruote
+ Items exigés pour enlever/remplacer les roues
+
+
+ Engine must be off to repair
+ Motor muss ausgeschaltet zu reparieren sein
+ El motor necesita desactivado para la reparación
+ Pro opravu je zapotřebí vypnout motor
+ O motor deve estar desligado para manutenção
\ No newline at end of file
diff --git a/addons/respawn/ACE_Settings.hpp b/addons/respawn/ACE_Settings.hpp
index f704d25412..7f0c4f9d96 100644
--- a/addons/respawn/ACE_Settings.hpp
+++ b/addons/respawn/ACE_Settings.hpp
@@ -1,14 +1,18 @@
class ACE_Settings {
- class GVAR(SavePreDeathGear) {
+ class GVAR(savePreDeathGear) {
+ displayName = CSTRING(SavePreDeathGear_DisplayName);
+ description = CSTRING(SavePreDeathGear_Description);
value = 0;
typeName = "BOOL";
};
- class GVAR(RemoveDeadBodiesDisconnected) {
+ class GVAR(removeDeadBodiesDisconnected) {
+ displayName = CSTRING(RemoveDeadBodiesDisconnected_DisplayName);
+ description = CSTRING(RemoveDeadBodiesDisconnected_Description);
value = 1;
typeName = "BOOL";
};
- class GVAR(BodyRemoveTimer) {
+ class GVAR(bodyRemoveTimer) {
value = 0;
typeName = "SCALAR";
};
diff --git a/addons/respawn/CfgEventHandlers.hpp b/addons/respawn/CfgEventHandlers.hpp
index 00b6f01cea..481d36cf30 100644
--- a/addons/respawn/CfgEventHandlers.hpp
+++ b/addons/respawn/CfgEventHandlers.hpp
@@ -1,4 +1,10 @@
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
@@ -8,6 +14,7 @@ class Extended_PreInit_EventHandlers {
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
+ serverInit = QUOTE(call COMPILE_FILE(XEH_serverPostInit));
};
};
@@ -30,37 +37,37 @@ class Extended_Respawn_EventHandlers {
class Extended_Init_EventHandlers {
class ACE_Rallypoint_West {
class ADDON {
- init = QUOTE((_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_nato_CO.paa'; [ARR_3(_this select 0,'',west)] call FUNC(initRallypoint));
+ init = QUOTE([ARR_3(_this select 0,'',west)] call FUNC(initRallypoint));
};
};
class ACE_Rallypoint_East {
class ADDON {
- init = QUOTE((_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_CSAT_CO.paa'; [ARR_3(_this select 0,'',east)] call FUNC(initRallypoint));
+ init = QUOTE([ARR_3(_this select 0,'',east)] call FUNC(initRallypoint));
};
};
class ACE_Rallypoint_Independent {
class ADDON {
- init = QUOTE((_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_AAF_CO.paa'; [ARR_3(_this select 0,'',independent)] call FUNC(initRallypoint));
+ init = QUOTE([ARR_3(_this select 0,'',independent)] call FUNC(initRallypoint));
};
};
class ACE_Rallypoint_West_Base {
class ADDON {
- init = QUOTE((_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_nato_CO.paa'; [ARR_3(_this select 0,'respawn_west',west)] call FUNC(initRallypoint));
+ init = QUOTE([ARR_3(_this select 0,'respawn_west',west)] call FUNC(initRallypoint));
};
};
class ACE_Rallypoint_East_Base {
class ADDON {
- init = QUOTE((_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_CSAT_CO.paa'; [ARR_3(_this select 0,'respawn_east',east)] call FUNC(initRallypoint));
+ init = QUOTE([ARR_3(_this select 0,'respawn_east',east)] call FUNC(initRallypoint));
};
};
class ACE_Rallypoint_Independent_Base {
class ADDON {
- init = QUOTE((_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_AAF_CO.paa'; [ARR_3(_this select 0,'respawn_guerrila',independent)] call FUNC(initRallypoint)); //respawn_civilian
+ init = QUOTE([ARR_3(_this select 0,'respawn_guerrila',independent)] call FUNC(initRallypoint)); //respawn_civilian
};
};
};
diff --git a/addons/respawn/CfgVehicles.hpp b/addons/respawn/CfgVehicles.hpp
index 8fdfb5f0fc..103fab0537 100644
--- a/addons/respawn/CfgVehicles.hpp
+++ b/addons/respawn/CfgVehicles.hpp
@@ -1,4 +1,6 @@
+class CBA_Extended_EventHandlers;
+
class CfgVehicles {
class ACE_Module;
class ACE_ModuleRespawn: ACE_Module {
@@ -8,7 +10,7 @@ class CfgVehicles {
function = QFUNC(module);
scope = 2;
isGlobal = 0;
- icon = QUOTE(PATHTOF(UI\Icon_Module_Respawn_ca.paa));
+ icon = QPATHTOF(UI\Icon_Module_Respawn_ca.paa);
class Arguments {
class SavePreDeathGear {
@@ -38,7 +40,7 @@ class CfgVehicles {
function = QFUNC(moduleFriendlyFire);
scope = 2;
isGlobal = 1;
- icon = QUOTE(PATHTOF(UI\Icon_Module_FriendlyFire_ca.paa));
+ icon = QPATHTOF(UI\Icon_Module_FriendlyFire_ca.paa);
class Arguments {};
class ModuleDescription {
@@ -53,7 +55,7 @@ class CfgVehicles {
function = QFUNC(moduleRallypoint);
scope = 2;
isGlobal = 1;
- icon = QUOTE(PATHTOF(UI\Icon_Module_Rallypoint_ca.paa));
+ icon = QPATHTOF(UI\Icon_Module_Rallypoint_ca.paa);
class Arguments {};
class ModuleDescription {
@@ -78,20 +80,25 @@ class CfgVehicles {
// rallypoints
class FlagCarrier;
class Flag_NATO_F: FlagCarrier {
+ class EventHandlers;
class ACE_Actions;
};
class Flag_CSAT_F: FlagCarrier {
+ class EventHandlers;
class ACE_Actions;
};
class Flag_AAF_F: FlagCarrier {
+ class EventHandlers;
class ACE_Actions;
};
// static
class ACE_Rallypoint_West_Base: Flag_NATO_F {
- XEH_ENABLED;
+ class EventHandlers: EventHandlers {
+ class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
+ };
author = ECSTRING(common,ACETeam);
displayName = CSTRING(RallypointWestBase);
@@ -111,7 +118,9 @@ class CfgVehicles {
};
class ACE_Rallypoint_East_Base: Flag_CSAT_F {
- XEH_ENABLED;
+ class EventHandlers: EventHandlers {
+ class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
+ };
author = ECSTRING(common,ACETeam);
displayName = CSTRING(RallypointEastBase);
@@ -131,7 +140,9 @@ class CfgVehicles {
};
class ACE_Rallypoint_Independent_Base: Flag_AAF_F {
- XEH_ENABLED;
+ class EventHandlers: EventHandlers {
+ class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
+ };
author = ECSTRING(common,ACETeam);
displayName = CSTRING(RallypointIndependentBase);
@@ -152,7 +163,9 @@ class CfgVehicles {
// moveable
class ACE_Rallypoint_West: Flag_NATO_F {
- XEH_ENABLED;
+ class EventHandlers: EventHandlers {
+ class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
+ };
author = ECSTRING(common,ACETeam);
displayName = CSTRING(RallypointWest);
@@ -172,7 +185,9 @@ class CfgVehicles {
};
class ACE_Rallypoint_East: Flag_CSAT_F {
- XEH_ENABLED;
+ class EventHandlers: EventHandlers {
+ class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
+ };
author = ECSTRING(common,ACETeam);
displayName = CSTRING(RallypointEast);
@@ -192,7 +207,9 @@ class CfgVehicles {
};
class ACE_Rallypoint_Independent: Flag_AAF_F {
- XEH_ENABLED;
+ class EventHandlers: EventHandlers {
+ class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
+ };
author = ECSTRING(common,ACETeam);
displayName = CSTRING(RallypointIndependent);
diff --git a/addons/respawn/XEH_PREP.hpp b/addons/respawn/XEH_PREP.hpp
new file mode 100644
index 0000000000..f9707c3181
--- /dev/null
+++ b/addons/respawn/XEH_PREP.hpp
@@ -0,0 +1,15 @@
+
+PREP(canMoveRallypoint);
+PREP(handleKilled);
+PREP(handlePlayerChanged);
+PREP(handleRespawn);
+PREP(handleInitPostServer);
+PREP(initRallypoint);
+PREP(module);
+PREP(moduleFriendlyFire);
+PREP(moduleRallypoint);
+PREP(moveRallypoint);
+PREP(restoreGear);
+PREP(showFriendlyFireMessage);
+PREP(teleportToRallypoint);
+PREP(updateRallypoint);
diff --git a/addons/respawn/XEH_postInit.sqf b/addons/respawn/XEH_postInit.sqf
index 22be7b86ac..f589d5abac 100644
--- a/addons/respawn/XEH_postInit.sqf
+++ b/addons/respawn/XEH_postInit.sqf
@@ -1,5 +1,7 @@
// by commy2
#include "script_component.hpp"
-["rallypointMoved", {_this call FUNC(updateRallypoint)}] call EFUNC(common,addEventhandler);
-["playerChanged", {_this call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler); // hide enemy rallypoint markers
+["ace_rallypointMoved", {_this call FUNC(updateRallypoint)}] call CBA_fnc_addEventHandler;
+["ace_playerChanged", {_this call FUNC(handlePlayerChanged)}] call CBA_fnc_addEventHandler; // hide enemy rallypoint markers
+
+[QGVAR(showFriendlyFireMessageEvent), DFUNC(showFriendlyFireMessage)] call CBA_fnc_addEventHandler;
diff --git a/addons/respawn/XEH_preInit.sqf b/addons/respawn/XEH_preInit.sqf
index eda5293876..a7feade1c3 100644
--- a/addons/respawn/XEH_preInit.sqf
+++ b/addons/respawn/XEH_preInit.sqf
@@ -2,20 +2,6 @@
ADDON = false;
-PREP(canMoveRallypoint);
-PREP(handleKilled);
-PREP(handlePlayerChanged);
-PREP(handleRespawn);
-PREP(handleInitPostServer);
-PREP(initRallypoint);
-PREP(module);
-PREP(moduleFriendlyFire);
-PREP(moduleRallypoint);
-PREP(moveRallypoint);
-PREP(removeBody);
-PREP(restoreGear);
-PREP(showFriendlyFireMessage);
-PREP(teleportToRallypoint);
-PREP(updateRallypoint);
+#include "XEH_PREP.hpp"
ADDON = true;
diff --git a/addons/respawn/XEH_preStart.sqf b/addons/respawn/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/respawn/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/respawn/XEH_serverPostInit.sqf b/addons/respawn/XEH_serverPostInit.sqf
new file mode 100644
index 0000000000..727b04d68d
--- /dev/null
+++ b/addons/respawn/XEH_serverPostInit.sqf
@@ -0,0 +1,17 @@
+#include "script_component.hpp"
+
+["ace_settingsInitialized", {
+ if (GVAR(RemoveDeadBodiesDisconnected)) then {
+ addMissionEventHandler ["HandleDisconnect", {
+ [{
+ params ["_unit"];
+
+ if (!alive _unit) then {
+ deleteVehicle _unit;
+ };
+ },
+ _this, 4] call CBA_fnc_waitAndExecute;
+ false
+ }];
+ };
+}] call CBA_fnc_addEventHandler;
diff --git a/addons/respawn/config.cpp b/addons/respawn/config.cpp
index 4a23d1f650..3a887b48b2 100644
--- a/addons/respawn/config.cpp
+++ b/addons/respawn/config.cpp
@@ -6,8 +6,9 @@ class CfgPatches {
weapons[] = {"ACE_Rallypoint_West", "ACE_Rallypoint_East", "ACE_Rallypoint_Independent", "ACE_Rallypoint_West_Base", "ACE_Rallypoint_East_Base", "ACE_Rallypoint_Independent_Base"};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = { "ace_common" };
- author[] = { "bux578", "commy2" };
- authorUrl = "https://github.com/bux578/";
+ author = ECSTRING(common,ACETeam);
+ authors[] = { "bux578", "commy2" };
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
@@ -17,3 +18,8 @@ class CfgPatches {
#include "CfgVehicleClasses.hpp"
#include "CfgVehicles.hpp"
#include "ACE_Settings.hpp"
+
+class ACE_newEvents {
+ rallypointMoved = "ace_rallypointMoved";
+ killedByFriendly = "ace_killedByFriendly";
+};
diff --git a/addons/respawn/functions/fnc_handleKilled.sqf b/addons/respawn/functions/fnc_handleKilled.sqf
index cd1ad33491..6ca816e8a4 100644
--- a/addons/respawn/functions/fnc_handleKilled.sqf
+++ b/addons/respawn/functions/fnc_handleKilled.sqf
@@ -19,15 +19,11 @@
params ["_unit"];
// Saves the gear when the player! (and only him) is killed
-if (ACE_player == _unit) then {
- GVAR(unitGear) = [];
-
- if (GVAR(SavePreDeathGear)) then {
- GVAR(unitGear) = [_unit] call EFUNC(common,getAllGear);
- GVAR(unitGear) append [currentWeapon _unit, currentMuzzle _unit, currentWeaponMode _unit];
- };
+if (ACE_player == _unit && {GVAR(SavePreDeathGear)}) then {
+ _unit setVariable [QGVAR(unitGear), getUnitLoadout _unit];
+ _unit setVariable [QGVAR(activeWeaponAndMuzzle), [currentWeapon _unit, currentMuzzle _unit, currentWeaponMode _unit]];
};
if (missionNamespace getVariable [QGVAR(showFriendlyFireMessage), false]) then {
- [_this, QUOTE(DFUNC(showFriendlyFireMessage)), 2] call EFUNC(common,execRemoteFnc);
+ [QGVAR(showFriendlyFireMessageEvent), _this] call CBA_fnc_globalEvent;
};
diff --git a/addons/respawn/functions/fnc_handleRespawn.sqf b/addons/respawn/functions/fnc_handleRespawn.sqf
index ab5ecedbda..3b1ae1c86f 100644
--- a/addons/respawn/functions/fnc_handleRespawn.sqf
+++ b/addons/respawn/functions/fnc_handleRespawn.sqf
@@ -20,7 +20,11 @@ params ["_unit"];
// Restores the gear when the player respawns
if (GVAR(SavePreDeathGear)) then {
- [_unit, GVAR(unitGear)] call FUNC(restoreGear);
+ [
+ _unit,
+ _unit getVariable QGVAR(unitGear),
+ _unit getVariable QGVAR(activeWeaponAndMuzzle)
+ ] call FUNC(restoreGear);
};
// fix for setVariable public being lost on respawn for machines that JIP after the command was broadcasted
diff --git a/addons/respawn/functions/fnc_initRallypoint.sqf b/addons/respawn/functions/fnc_initRallypoint.sqf
index dba1ae5d0a..b012344379 100644
--- a/addons/respawn/functions/fnc_initRallypoint.sqf
+++ b/addons/respawn/functions/fnc_initRallypoint.sqf
@@ -19,49 +19,46 @@
params ["_rallypoint", "_respawnMarker", "_side"];
-private "_name";
-_name = typeOf _rallypoint;
+private _name = typeOf _rallypoint;
+
+if (isNil _name) then {
+ missionNamespace setVariable [_name, _rallypoint];
+
+ _rallypoint setVariable [QGVAR(side), _side];
+
+ if (isServer) then {
+ if (_respawnMarker != "" && {!(_respawnMarker in allMapMarkers)}) then {
+ createMarker [_respawnMarker, _rallypoint];
+ };
+
+ ["ace_rallypointMoved", [_rallypoint, _side]] call CBA_fnc_globalEvent;
+ };
+} else {
+ deleteVehicle _rallypoint;
+ ACE_LOGERROR("Multiple Rallypoints of same type.");
+};
// init visible marker
if (hasInterface) then {
[{
params ["_rallypoint", "_respawnMarker", "_side", "_name"];
- private ["_marker", "_type", "_date"];
-
- _marker = format ["ACE_Marker_%1", _name];
+ private _marker = format ["ACE_Marker_%1", _name];
// exit if marker already exist
if (_marker in allMapMarkers) exitWith {};
_marker = createMarkerLocal [_marker, getPosASL _rallypoint];
- _type = ["selector_selectedFriendly", "selector_selectedEnemy"] select (_respawnMarker == "");
+
+ private _type = ["selector_selectedFriendly", "selector_selectedEnemy"] select (_respawnMarker == "");
_marker setMarkerTypeLocal _type;
_marker setMarkerAlphaLocal ([0,1] select (_side == playerSide)); // playerSide to guarantee init
- _date = _rallypoint getVariable [QGVAR(markerDate), ""];
+ private _date = _rallypoint getVariable [QGVAR(markerDate), ""];
_marker setMarkerTextLocal _date;
_rallypoint setVariable [QGVAR(marker), _marker];
- }, [_rallypoint, _respawnMarker, _side, _name], 0.1] call EFUNC(common,waitAndExecute);
-};
-
-if (!isServer) exitWith {};
-
-if (isNil _name) then {
- missionNamespace setVariable [_name, _rallypoint];
- publicVariable _name;
-
- _rallypoint setVariable [QGVAR(side), _side, true];
-
- if (_respawnMarker != "" && {!(_respawnMarker in allMapMarkers)}) then {
- createMarker [_respawnMarker, _rallypoint];
- };
-
- ["rallypointMoved", [_rallypoint, _side]] call EFUNC(common,globalEvent);
-} else {
- deleteVehicle _rallypoint;
- ACE_LOGERROR("Multiple Rallypoints of same type.");
+ }, [_rallypoint, _respawnMarker, _side, _name], 0.1] call CBA_fnc_waitAndExecute;
};
diff --git a/addons/respawn/functions/fnc_module.sqf b/addons/respawn/functions/fnc_module.sqf
index ea6ba555d5..bc4f197c07 100644
--- a/addons/respawn/functions/fnc_module.sqf
+++ b/addons/respawn/functions/fnc_module.sqf
@@ -19,25 +19,9 @@
params ["_logic", "_units", "_activated"];
-if !(_activated) exitWith {};
+if (!_activated) exitWith {};
-GVAR(Module) = true;
-
-[_logic, QGVAR(SavePreDeathGear), "SavePreDeathGear"] call EFUNC(common,readSettingFromModule);
+[_logic, QGVAR(SavePreDeathGear), "SavePreDeathGear"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(RemoveDeadBodiesDisconnected), "RemoveDeadBodiesDisconnected"] call EFUNC(common,readSettingFromModule);
-if (isServer && {GVAR(RemoveDeadBodiesDisconnected)}) then {
- addMissionEventHandler ["HandleDisconnect", {
- [{
- params ["_unit"];
-
- if (!alive _unit) then {
- deleteVehicle _unit;
- };
- },
- _this, 4] call EFUNC(common,waitAndExecute);
- false
- }];
-};
-
ACE_LOGINFO("Respawn Module Initialized.");
diff --git a/addons/respawn/functions/fnc_moduleFriendlyFire.sqf b/addons/respawn/functions/fnc_moduleFriendlyFire.sqf
index f5b982f0ea..3c3c02b3c9 100644
--- a/addons/respawn/functions/fnc_moduleFriendlyFire.sqf
+++ b/addons/respawn/functions/fnc_moduleFriendlyFire.sqf
@@ -27,7 +27,7 @@ if (isServer) then {
missionNamespace setVariable [QGVAR(showFriendlyFireMessage), true];
publicVariable QGVAR(showFriendlyFireMessage);
},
- [], 0.1] call EFUNC(common,waitAndExecute);
+ [], 0.1] call CBA_fnc_waitAndExecute;
};
ACE_LOGINFO("Friendly Fire Messages Module Initialized.");
diff --git a/addons/respawn/functions/fnc_moveRallypoint.sqf b/addons/respawn/functions/fnc_moveRallypoint.sqf
index fa8aae40a5..353d90e56a 100644
--- a/addons/respawn/functions/fnc_moveRallypoint.sqf
+++ b/addons/respawn/functions/fnc_moveRallypoint.sqf
@@ -48,7 +48,7 @@ _position set [2, 0];
_rallypoint setVariable [QGVAR(markerDate), [dayTime, "HH:MM"] call BIS_fnc_timeToString, true];
- ["rallypointMoved", [_rallypoint, _side, _position]] call EFUNC(common,globalEvent);
+ ["ace_rallypointMoved", [_rallypoint, _side, _position]] call CBA_fnc_globalEvent;
[localize LSTRING(Deployed)] call EFUNC(common,displayTextStructured);
-}, [_rallypoint, _unit, _position], 5] call EFUNC(common,waitAndExecute);
+}, [_rallypoint, _unit, _position], 5] call CBA_fnc_waitAndExecute;
diff --git a/addons/respawn/functions/fnc_removeBody.sqf b/addons/respawn/functions/fnc_removeBody.sqf
deleted file mode 100644
index e9676696a1..0000000000
--- a/addons/respawn/functions/fnc_removeBody.sqf
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Author: bux578, commy2
- * Removes a given body.
- *
- * Arguments:
- * 0: Body
- *
- * Return Value:
- * None
- *
- * Example:
- * [corpse] call ace_respawn_fnc_removeBody
- *
- * Public: No
- */
-#include "script_component.hpp"
-
-params ["_body", "_forceRemove"];
-
-private "_bodyRemoveTimer";
-_bodyRemoveTimer = [GVAR(BodyRemoveTimer) max 0, 2] select _forceRemove; // could be used for SpecOps missions.
-
-[{
- // hideBody takes ~20s till body is fully underground
- // a better hideBody would make this more aesthetic
- deleteVehicle _this;
-}, _body, _bodyRemoveTimer] call EFUNC(common,waitAndExecute);
diff --git a/addons/respawn/functions/fnc_restoreGear.sqf b/addons/respawn/functions/fnc_restoreGear.sqf
index af3acb7fb4..a035bdd52d 100644
--- a/addons/respawn/functions/fnc_restoreGear.sqf
+++ b/addons/respawn/functions/fnc_restoreGear.sqf
@@ -19,30 +19,35 @@
params ["_unit", "_allGear", "_activeWeaponAndMuzzle"];
// restore all gear
-[_unit, _allGear, true, true] call EFUNC(common,setAllGear);
+if (!isNil "_allGear") then {
+ _unit setUnitLoadout _allGear;
+};
// restore the last active weapon, muzzle and weaponMode
-_activeWeaponAndMuzzle params ["_activeWeapon", "_activeMuzzle", "_activeWeaponMode"];
+if (!isNil "_activeWeaponAndMuzzle") then {
+ // @todo, replace this with CBA_fnc_selectWeapon after next CBA update
+ _activeWeaponAndMuzzle params ["_activeWeapon", "_activeMuzzle", "_activeWeaponMode"];
-if (
- (_activeMuzzle != "") &&
- {_activeMuzzle != _activeWeapon} &&
- {_activeMuzzle in getArray (configFile >> "CfgWeapons" >> _activeWeapon >> "muzzles")}
-) then {
- _unit selectWeapon _activeMuzzle;
-} else {
- if (_activeWeapon != "") then {
- _unit selectWeapon _activeWeapon;
- };
-};
-
-if (currentWeapon _unit != "") then {
- private _index = 0;
-
- while {
- _index < 100 && {currentWeaponMode _unit != _activeWeaponMode}
- } do {
- _unit action ["SwitchWeapon", _unit, _unit, _index];
- _index = _index + 1;
+ if (
+ (_activeMuzzle != "") &&
+ {_activeMuzzle != _activeWeapon} &&
+ {_activeMuzzle in getArray (configFile >> "CfgWeapons" >> _activeWeapon >> "muzzles")}
+ ) then {
+ _unit selectWeapon _activeMuzzle;
+ } else {
+ if (_activeWeapon != "") then {
+ _unit selectWeapon _activeWeapon;
+ };
+ };
+
+ if (currentWeapon _unit != "") then {
+ private _index = 0;
+
+ while {
+ _index < 100 && {currentWeaponMode _unit != _activeWeaponMode}
+ } do {
+ _unit action ["SwitchWeapon", _unit, _unit, _index];
+ _index = _index + 1;
+ };
};
};
diff --git a/addons/respawn/functions/fnc_showFriendlyFireMessage.sqf b/addons/respawn/functions/fnc_showFriendlyFireMessage.sqf
index 1079ef6e6d..388302150d 100644
--- a/addons/respawn/functions/fnc_showFriendlyFireMessage.sqf
+++ b/addons/respawn/functions/fnc_showFriendlyFireMessage.sqf
@@ -22,5 +22,5 @@ if (_unit != _killer && {side group _unit in [side group ACE_player, civilian]}
systemChat format ["%1 was killed by %2", [_unit, false, true] call EFUNC(common,getName), [_killer, false, true] call EFUNC(common,getName)];
// Raise ACE globalEvent
- ["killedByFriendly", [_unit, _killer]] call EFUNC(common,globalEvent);
+ ["ace_killedByFriendly", [_unit, _killer]] call CBA_fnc_globalEvent;
};
diff --git a/addons/respawn/functions/fnc_teleportToRallypoint.sqf b/addons/respawn/functions/fnc_teleportToRallypoint.sqf
index 88bd0d6d52..8e766ce0e3 100644
--- a/addons/respawn/functions/fnc_teleportToRallypoint.sqf
+++ b/addons/respawn/functions/fnc_teleportToRallypoint.sqf
@@ -22,7 +22,7 @@ params ["_unit", "_side", "_rallypoint"];
private "_toBase";
_toBase = _rallypoint find "_Base" != -1;
-_rallypoint = missionNamespace getVariable [_rallypoint, objNull],
+_rallypoint = missionNamespace getVariable [_rallypoint, objNull];
if (isNull _rallypoint) exitWith {};
diff --git a/addons/respawn/stringtable.xml b/addons/respawn/stringtable.xml
index 42bd14945f..e0d04aabfa 100644
--- a/addons/respawn/stringtable.xml
+++ b/addons/respawn/stringtable.xml
@@ -1,17 +1,17 @@
-
+
- Deploy in 5 seconds ...
- Déploiement dans 5 secondes ...
- Wird in 5 Sekunden errichtet ...
- Despliegue en 5 segundos ...
- Возрождение через 5 секунд ...
- Rozmieszczenie za 5 sekund ...
+ Deploy in 5 seconds...
+ Déploiement dans 5 secondes...
+ Wird in 5 Sekunden errichtet...
+ Despliegue en 5 segundos...
+ Возрождение через 5 секунд...
+ Rozmieszczenie za 5 sekund...
Respawn za 5 sekund...
- Kihelyezés 5 másodperc múlva ...
- Dispiegamento in 5 secondi ...
- Será posicionado em 5 segundos ...
+ Kihelyezés 5 másodperc múlva...
+ Dispiegamento in 5 secondi...
+ Será posicionado em 5 segundos...
Rallypoint deployed
@@ -155,6 +155,7 @@
Système de Respawn
Respawn-rendszer
Возрождение
+ Sistema Respawn
Save Gear?
@@ -166,6 +167,7 @@
Sauver l'équipement?
Felszerelés elmentése?
Сохранять снаряжение?
+ Salva Equipaggiamento?
Respawn with the gear a soldier had just before his death?
@@ -177,6 +179,7 @@
Conserve l'équipement au Respawn
Az egység halála előtti felszerelésével való respawnolása?
Возрождать солдата с тем же снаряжением, которое было на нем при смерти?
+ Respawna con l'equipaggiamento che il soldato aveva appena prima di morire?
Remove bodies?
@@ -188,6 +191,7 @@
Enlever les coprs?
Holttestek eltávolítása?
Удалять трупы?
+ Rimuovi corpi?
Remove player bodies after disconnect?
@@ -199,6 +203,7 @@
Enlève les corps de joueurs après déconnection
Játékosi testek eltávolítása távozás után?
Удалять трупы игроков после дисконнекта?
+ Rimuovi i corpi dei giocatori quando si disconnettono?
This module enables you to configure ACE functionality specific to respawns.
@@ -208,6 +213,8 @@
Este módulo permite que você personalize as configurações do renascimento (Spawn).
Этот модуль позволяет настроить систему возрождения.
Ce module permet de régler les options de Respawn
+ Questo modulo ti permette di configurare le funzionalità ACE specifiche dei respawn.
+ Este módulo permite configurar parámetros relacionados con la reaparición
Friendly Fire Messages
@@ -219,6 +226,7 @@
Message de tirs fraticides
Baráti tűz üzenetek
Сообщения об огне по своим
+ Messaggi Fuoco Amico
Using this module in your mission will make it so any friendly fire kills will be displayed in form of a message in chat.
@@ -228,6 +236,8 @@
Usando este módulo em uma missão para exibir mensagens chat, no caso de quando você faz um fogo amigo - então a mensagem será exibida mostrando quem matou quem.
Отображает сообщение в чате, в случае, когда убивают союзных игроков. В докладе указывается, кто стрелял, в кого. Кто кого убил.
Ce module permet l'affiche de message dans le chat lors d'un tir fraticide et indique qui a tué qui.
+ Usando questo modulo nella tua missione farà in modo che ogni uccisione per fuoco amico venga mostrata in forma di messaggio in chat.
+ El usar este módulo, todas las muertes por fuego amigo serán indicadas en el chat.
Rallypoint System
@@ -239,6 +249,7 @@
Système de point de ralliement
Gyülekezőpont-rendszer
Система точек сбора
+ Sistema Punto di Raccolta
This module allows you to use rally points in missions, to which you can quickly teleport from base flag. Requires placing special objects on map - base and flag. Both available in category Empty -> ACE Respawn.
@@ -247,6 +258,9 @@
Tento modul umožňuje určit místo shromaždiště, kam se mohou jednokty rychle teleportovat ze "základny". Toto vyžaduje vhodné objekty v mapě - základna a vlajka. Oba dva můžete najít v kategorii Prázdné -> ACE Oživení.
Este módulo permite que você aplique em uma missão "pontos de encontro", que pode rapidamente se teletransportar para a "base". Ele requer colocar objetos apropriados no mapa - base e bandeiras. Ambos estão disponíveis na categoria em branco -> ACE Revival.
Этот модуль позволяет вам указать место сбора, куда вы можете быстро телепортироваться с "базы". Требуется наличие соответствующих объектов на карте - базы и флага. Они могут быть найдены в категории Пусто -> ACE Возрождения.
+ Questo modulo ti consente di usare Punti di Raccolta in missione, a cui ti puoi teleportare rapidamente dalla bandiera in base. Richiede il piazzamento di oggetti speciali in mappa - base e bandiera. Entrambi disponibili nella categoria Vuoto -> Respawn ACE
+ Este módulo permite usar puntos de reunión en la misión, a los que pueden teletransportarse las unidades desde la bandera de base. Requiere colocar objetos especiales en el mapa: las banderas de base y de reunión, ambas disponibles en la categoría Vacio-> Reaparición ACE
+ Ce module vous permet d'utiliser les "rally points" auxquels vous pouvez vous téléporter rapidement depuis un drapeau à la base. Il nécessite le placement d'objets spéciaux sur la carte - base et drapeau, disponibles dans la catégorie Vide -> ACE Respawn.
Move Rallypoint
@@ -258,6 +272,7 @@
Bouger le point de ralliement
Gyülekezőpont mozgatása
Двигать точку сбора
+ Sposta Punto di Raccolta
ACE Respawn
@@ -269,6 +284,7 @@
ACE Respawn
ACE Respawn
ACE Возрождение
+ Respawn ACE
-
+
\ No newline at end of file
diff --git a/addons/safemode/CfgEventHandlers.hpp b/addons/safemode/CfgEventHandlers.hpp
index 0cd959a047..becf395052 100644
--- a/addons/safemode/CfgEventHandlers.hpp
+++ b/addons/safemode/CfgEventHandlers.hpp
@@ -1,4 +1,10 @@
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
diff --git a/addons/safemode/XEH_PREP.hpp b/addons/safemode/XEH_PREP.hpp
new file mode 100644
index 0000000000..ab2a755a66
--- /dev/null
+++ b/addons/safemode/XEH_PREP.hpp
@@ -0,0 +1,5 @@
+
+PREP(lockSafety);
+PREP(playChangeFiremodeSound);
+PREP(setSafeModeVisual);
+PREP(unlockSafety);
diff --git a/addons/safemode/XEH_postInit.sqf b/addons/safemode/XEH_postInit.sqf
index f3ab06d20e..42f9dc3dd5 100644
--- a/addons/safemode/XEH_postInit.sqf
+++ b/addons/safemode/XEH_postInit.sqf
@@ -11,9 +11,9 @@ if (!hasInterface) exitWith {};
["ACE3 Weapons", QGVAR(safeMode), localize LSTRING(SafeMode),
{
// Conditions: canInteract
- if !([ACE_player, objNull, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
+ if !([ACE_player, objNull, ["isNotEscorting", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
- if !([ACE_player] call EFUNC(common,canUseWeapon) && {currentWeapon ACE_player != binocular ACE_player}) exitWith {false};
+ if !([ACE_player] call CBA_fnc_canUseWeapon && {currentWeapon ACE_player != binocular ACE_player} && {currentWeapon ACE_player != ""}) exitWith {false};
// Statement
[ACE_player, currentWeapon ACE_player, currentMuzzle ACE_player] call FUNC(lockSafety);
diff --git a/addons/safemode/XEH_preInit.sqf b/addons/safemode/XEH_preInit.sqf
index e6eb91b8bd..a7feade1c3 100644
--- a/addons/safemode/XEH_preInit.sqf
+++ b/addons/safemode/XEH_preInit.sqf
@@ -2,9 +2,6 @@
ADDON = false;
-PREP(lockSafety);
-PREP(playChangeFiremodeSound);
-PREP(setSafeModeVisual);
-PREP(unlockSafety);
+#include "XEH_PREP.hpp"
ADDON = true;
diff --git a/addons/safemode/XEH_preStart.sqf b/addons/safemode/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/safemode/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/safemode/config.cpp b/addons/safemode/config.cpp
index 8371e7f35f..05510a53a5 100644
--- a/addons/safemode/config.cpp
+++ b/addons/safemode/config.cpp
@@ -6,8 +6,9 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
- author[] = {"commy2"};
- authorUrl = "https://github.com/commy2/";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"commy2"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
diff --git a/addons/safemode/functions/fnc_lockSafety.sqf b/addons/safemode/functions/fnc_lockSafety.sqf
index 4d4b89759a..2675068e94 100644
--- a/addons/safemode/functions/fnc_lockSafety.sqf
+++ b/addons/safemode/functions/fnc_lockSafety.sqf
@@ -38,7 +38,7 @@ if (_unit getVariable [QGVAR(actionID), -1] == -1) then {
_unit setVariable [QGVAR(actionID), [
_unit, "DefaultAction", {
if (
- [_this select 1] call EFUNC(common,canUseWeapon)
+ [_this select 1] call CBA_fnc_canUseWeapon
&& {
if (currentMuzzle (_this select 1) in ((_this select 1) getVariable [QGVAR(safedWeapons), []])) then {
if (inputAction "nextWeapon" > 0) exitWith {
diff --git a/addons/sandbag/CfgEventHandlers.hpp b/addons/sandbag/CfgEventHandlers.hpp
index da53514f3b..32d4ac80f4 100644
--- a/addons/sandbag/CfgEventHandlers.hpp
+++ b/addons/sandbag/CfgEventHandlers.hpp
@@ -1,4 +1,10 @@
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
@@ -26,3 +32,9 @@ class Extended_Killed_EventHandlers {
};
};
};
+
+class Extended_DisplayLoad_EventHandlers {
+ class RscDisplayMission {
+ ADDON = QUOTE(_this call COMPILE_FILE(XEH_missionDisplayLoad));
+ };
+};
diff --git a/addons/sandbag/CfgVehicles.hpp b/addons/sandbag/CfgVehicles.hpp
index 494ff355e7..df18b42c06 100644
--- a/addons/sandbag/CfgVehicles.hpp
+++ b/addons/sandbag/CfgVehicles.hpp
@@ -1,4 +1,6 @@
+class CBA_Extended_EventHandlers;
+
class CfgVehicles {
class Man;
class CAManBase: Man {
@@ -7,11 +9,11 @@ class CfgVehicles {
displayName = CSTRING(DeploySandbag);
condition = QUOTE(_this call FUNC(canDeploy));
//wait a frame to handle "Do When releasing action menu key" option
- statement = QUOTE([ARR_2({_this call FUNC(deploy)},_this)] call EFUNC(common,execNextFrame));
+ statement = QUOTE([ARR_2({_this call FUNC(deploy)},_this)] call CBA_fnc_execNextFrame);
exceptions[] = {"isNotSwimming"};
showDisabled = 0;
priority = 4;
- icon = PATHTOF(UI\icon_sandbag_ca.paa);
+ icon = QPATHTOF(UI\icon_sandbag_ca.paa);
};
};
};
@@ -44,18 +46,21 @@ class CfgVehicles {
class ThingX;
class ACE_SandbagObject: ThingX {
+ class EventHandlers {
+ class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
+ };
+
author = ECSTRING(common,ACETeam);
- XEH_ENABLED;
scope = 2;
- side = -1;
- model = PATHTOF(data\ace_sandbag_build.p3d);
+ side = 3;
+ model = QPATHTOF(data\ace_sandbag_build.p3d);
displayName = CSTRING(sandbag_displayName);
vehicleClass = "ACE_Logistics_Items";
typicalCargo[] = {};
armor = 12000; // Withstand 200 5.56 bullets before sandbag hull is cheese
mapSize = 0.4;
nameSound = "Bunker";
- icon = PATHTOF(UI\icon_sandbag_ca.paa);
+ icon = QPATHTOF(UI\icon_sandbag_ca.paa);
accuracy = 1000;
destrType = "DestructDefault";
@@ -85,7 +90,7 @@ class CfgVehicles {
showDisabled = 0;
exceptions[] = {};
priority = 5;
- icon = PATHTOF(UI\icon_sandbag_ca.paa);
+ icon = QPATHTOF(UI\icon_sandbag_ca.paa);
};
};
};
@@ -93,7 +98,7 @@ class CfgVehicles {
class ACE_SandbagObject_NoGeo: ACE_SandbagObject {
scope = 1;
- model = PATHTOF(data\ace_sandbag_nogeo.p3d);
+ model = QPATHTOF(data\ace_sandbag_nogeo.p3d);
};
class Box_NATO_Support_F;
diff --git a/addons/sandbag/CfgWeapons.hpp b/addons/sandbag/CfgWeapons.hpp
index 1a26fc78d4..6a5fe29b79 100644
--- a/addons/sandbag/CfgWeapons.hpp
+++ b/addons/sandbag/CfgWeapons.hpp
@@ -7,9 +7,9 @@ class CfgWeapons {
author = ECSTRING(common,ACETeam);
scope = 2;
displayName = CSTRING(sandbagEmpty_displayName);
- model = PATHTOF(data\ace_sandbag_m.p3d);
- picture = PATHTOF(data\m_sandbag_ca.paa);
-
+ model = QPATHTOF(data\ace_sandbag_m.p3d);
+ picture = QPATHTOF(data\m_sandbag_ca.paa);
+
class ItemInfo: InventoryItem_Base_F {
mass = 8;
};
@@ -19,9 +19,9 @@ class CfgWeapons {
author = ECSTRING(common,ACETeam);
scope = 2;
displayName = CSTRING(sandbag_displayName);
- model = PATHTOF(data\ace_sandbag_build.p3d);
- picture = PATHTOF(data\m_sandbag_ca.paa);
-
+ model = QPATHTOF(data\ace_sandbag_build.p3d);
+ picture = QPATHTOF(data\m_sandbag_ca.paa);
+
class ItemInfo: InventoryItem_Base_F {
mass = 160;
};
diff --git a/addons/sandbag/XEH_PREP.hpp b/addons/sandbag/XEH_PREP.hpp
new file mode 100644
index 0000000000..399655a891
--- /dev/null
+++ b/addons/sandbag/XEH_PREP.hpp
@@ -0,0 +1,12 @@
+
+PREP(canDeploy);
+PREP(deploy);
+PREP(deployCancel);
+PREP(deployConfirm);
+PREP(handleInteractMenuOpened);
+PREP(handleKilled);
+PREP(handlePlayerChanged);
+PREP(handlePlayerInventoryChanged);
+PREP(handleScrollWheel);
+PREP(handleUnconscious);
+PREP(pickup);
diff --git a/addons/sandbag/XEH_missionDisplayLoad.sqf b/addons/sandbag/XEH_missionDisplayLoad.sqf
new file mode 100644
index 0000000000..cb85ffb9fb
--- /dev/null
+++ b/addons/sandbag/XEH_missionDisplayLoad.sqf
@@ -0,0 +1,6 @@
+#include "script_component.hpp"
+
+params ["_display"];
+
+_display displayAddEventHandler ["MouseZChanged", {(_this select 1) call FUNC(handleScrollWheel)}];
+_display displayAddEventHandler ["MouseButtonDown", {[ACE_player, _this select 1] call FUNC(deployCancel)}];
diff --git a/addons/sandbag/XEH_postInit.sqf b/addons/sandbag/XEH_postInit.sqf
index c3f99c2a9b..0bc5b6d2b1 100644
--- a/addons/sandbag/XEH_postInit.sqf
+++ b/addons/sandbag/XEH_postInit.sqf
@@ -11,17 +11,15 @@ GVAR(sandBag) = objNull;
GVAR(deployPFH) = -1;
GVAR(deployDirection) = 0;
-[{_this call FUNC(handleScrollWheel)}] call EFUNC(common,addScrollWheelEventHandler);
-
// Cancel deploy sandbag if interact menu opened
-["interactMenuOpened", {[ACE_player] call FUNC(handleInteractMenuOpened)}] call EFUNC(common,addEventHandler);
+["ace_interactMenuOpened", {[ACE_player] call FUNC(handleInteractMenuOpened)}] call CBA_fnc_addEventHandler;
// Cancel deploy on player change. This does work when returning to lobby, but not when hard disconnecting.
-["playerChanged", {_this call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler);
-["playerInventoryChanged", {_this call FUNC(handlePlayerInventoryChanged)}] call EFUNC(common,addEventhandler);
-["playerVehicleChanged", {[ACE_player, objNull] call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler);
+["ace_playerChanged", {_this call FUNC(handlePlayerChanged)}] call CBA_fnc_addEventHandler;
+["ace_playerInventoryChanged", {_this call FUNC(handlePlayerInventoryChanged)}] call CBA_fnc_addEventHandler;
+["ace_playerVehicleChanged", {[ACE_player, objNull] call FUNC(handlePlayerChanged)}] call CBA_fnc_addEventHandler;
// handle waking up dragged unit and falling unconscious while dragging
-["medical_onUnconscious", {_this call FUNC(handleUnconscious)}] call EFUNC(common,addEventhandler);
+["ace_unconscious", {_this call FUNC(handleUnconscious)}] call CBA_fnc_addEventHandler;
//@todo Captivity?
diff --git a/addons/sandbag/XEH_preInit.sqf b/addons/sandbag/XEH_preInit.sqf
index 444dca7ae0..a7feade1c3 100644
--- a/addons/sandbag/XEH_preInit.sqf
+++ b/addons/sandbag/XEH_preInit.sqf
@@ -2,16 +2,6 @@
ADDON = false;
-PREP(canDeploy);
-PREP(deploy);
-PREP(deployCancel);
-PREP(deployConfirm);
-PREP(handleInteractMenuOpened);
-PREP(handleKilled);
-PREP(handlePlayerChanged);
-PREP(handlePlayerInventoryChanged);
-PREP(handleScrollWheel);
-PREP(handleUnconscious);
-PREP(pickup);
+#include "XEH_PREP.hpp"
ADDON = true;
diff --git a/addons/sandbag/XEH_preStart.sqf b/addons/sandbag/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/sandbag/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/sandbag/config.cpp b/addons/sandbag/config.cpp
index 6b7ce1a456..cb8884ac7e 100644
--- a/addons/sandbag/config.cpp
+++ b/addons/sandbag/config.cpp
@@ -6,11 +6,17 @@ class CfgPatches {
weapons[] = {"ACE_Sandbag", "ACE_Sandbag_empty"};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_interaction"};
- author[] = {"Rocko", "Ruthberg"};
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"Rocko", "Ruthberg"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
#include "CfgEventHandlers.hpp"
#include "CfgVehicles.hpp"
-#include "CfgWeapons.hpp"
\ No newline at end of file
+#include "CfgWeapons.hpp"
+
+class ACE_newEvents {
+ interactMenuOpened = "ace_interactMenuOpened";
+};
diff --git a/addons/sandbag/data/bag_co.paa b/addons/sandbag/data/bag_co.paa
index 436b8af955..f560a18278 100644
Binary files a/addons/sandbag/data/bag_co.paa and b/addons/sandbag/data/bag_co.paa differ
diff --git a/addons/sandbag/functions/fnc_deploy.sqf b/addons/sandbag/functions/fnc_deploy.sqf
index 1a539929ff..0cbe0c5012 100644
--- a/addons/sandbag/functions/fnc_deploy.sqf
+++ b/addons/sandbag/functions/fnc_deploy.sqf
@@ -27,7 +27,7 @@ _sandBag = createVehicle ["ACE_SandbagObject_NoGeo", [0, 0, 0], [], 0, "NONE"];
GVAR(sandBag) = _sandBag;
// prevent collisions with sandbag
-["enableSimulationGlobal", [_sandBag, false]] call EFUNC(common,serverEvent);
+[QEGVAR(common,enableSimulationGlobal), [_sandBag, false]] call CBA_fnc_serverEvent;
GVAR(deployDirection) = 0;
@@ -52,10 +52,4 @@ _unit setVariable [QGVAR(Deploy), [
{[_this select 0] call FUNC(deployConfirm)}
] call EFUNC(common,addActionEventHandler)];
-_unit setVariable [QGVAR(Cancel), [
- _unit, "zoomtemp",
- {GVAR(deployPFH) != -1},
- {[_this select 0] call FUNC(deployCancel)}
-] call EFUNC(common,addActionEventHandler)];
-
_unit setVariable [QGVAR(isDeploying), true, true];
diff --git a/addons/sandbag/functions/fnc_deployCancel.sqf b/addons/sandbag/functions/fnc_deployCancel.sqf
index bb9d691fa9..6cb38e4f73 100644
--- a/addons/sandbag/functions/fnc_deployCancel.sqf
+++ b/addons/sandbag/functions/fnc_deployCancel.sqf
@@ -3,7 +3,8 @@
* Cancels sandbag deployment
*
* Arguments:
- * 0: unit
+ * 0: Unit
+ * 1: Key
*
* Return Value:
* None
@@ -15,7 +16,9 @@
*/
#include "script_component.hpp"
-params ["_unit"];
+params ["_unit", "_key"];
+
+if (_key != 1 || {GVAR(deployPFH) == -1}) exitWith {};
// enable running again
[_unit, "forceWalk", "ACE_Sandbag", false] call EFUNC(common,statusEffect_set);
diff --git a/addons/sandbag/functions/fnc_deployConfirm.sqf b/addons/sandbag/functions/fnc_deployConfirm.sqf
index 8c789fd124..c37e0ed0d9 100644
--- a/addons/sandbag/functions/fnc_deployConfirm.sqf
+++ b/addons/sandbag/functions/fnc_deployConfirm.sqf
@@ -41,7 +41,7 @@ _unit removeItem "ACE_Sandbag_empty";
_sandBag setDir _direction;
GVAR(sandBag) = objNull;
-}, [_unit], 1] call EFUNC(common,waitAndExecute);
+}, [_unit], 1] call CBA_fnc_waitAndExecute;
// remove deployment pfh
[GVAR(deployPFH)] call CBA_fnc_removePerFrameHandler;
@@ -51,7 +51,6 @@ GVAR(deployPFH) = -1;
call EFUNC(interaction,hideMouseHint);
[_unit, "DefaultAction", _unit getVariable [QGVAR(Deploy), -1]] call EFUNC(common,removeActionEventHandler);
-[_unit, "zoomtemp", _unit getVariable [QGVAR(Cancel), -1]] call EFUNC(common,removeActionEventHandler);
// play animation
_unit playActionNow "PutDown";
diff --git a/addons/sandbag/functions/fnc_handleScrollWheel.sqf b/addons/sandbag/functions/fnc_handleScrollWheel.sqf
index 94697d7691..20d403a7a1 100644
--- a/addons/sandbag/functions/fnc_handleScrollWheel.sqf
+++ b/addons/sandbag/functions/fnc_handleScrollWheel.sqf
@@ -15,9 +15,9 @@
*/
#include "script_component.hpp"
-params ["_scroll"];
+if (GVAR(deployPFH) == -1) exitWith {false};
-if (GETMVAR(ACE_Modifier,0) == 0 || GVAR(deployPFH) == -1) exitWith { false };
+params ["_scroll"];
GVAR(deployDirection) = GVAR(deployDirection) + (_scroll * 5);
diff --git a/addons/sandbag/functions/fnc_pickup.sqf b/addons/sandbag/functions/fnc_pickup.sqf
index 7e04d047fd..fd4560fdec 100644
--- a/addons/sandbag/functions/fnc_pickup.sqf
+++ b/addons/sandbag/functions/fnc_pickup.sqf
@@ -37,4 +37,4 @@ _unit setVariable [QGVAR(isUsingSandbag), true];
} count (_unit nearObjects ["ACE_SandbagObject", 5]);
[_unit, "ACE_Sandbag_empty"] call EFUNC(common,addToInventory);
-}, [_unit, _sandbag], 1.5] call EFUNC(common,waitAndExecute);
+}, [_unit, _sandbag], 1.5] call CBA_fnc_waitAndExecute;
diff --git a/addons/sandbag/stringtable.xml b/addons/sandbag/stringtable.xml
index c67173466c..99be2bddf1 100644
--- a/addons/sandbag/stringtable.xml
+++ b/addons/sandbag/stringtable.xml
@@ -146,16 +146,16 @@
Aqui não tem areia
- +Ctrl rotate
- +Strg drehen
- +Ctrl girar
- +Ctrl tourner
- +Ctrl rotazione
- +Ctrl otočit
- +Ctrl forgatás
- +Ctrl obrót
- +Ctrl rotaciona
- +Ctrl Bращать
+ Rotate
+ Drehen
+ Girar
+ Tourner
+ Rotazione
+ Otočit
+ Forgatás
+ Obrót
+ Rotaciona
+ Bращать
-
\ No newline at end of file
+
diff --git a/addons/scopes/CfgEventHandlers.hpp b/addons/scopes/CfgEventHandlers.hpp
index e75956f440..becf395052 100644
--- a/addons/scopes/CfgEventHandlers.hpp
+++ b/addons/scopes/CfgEventHandlers.hpp
@@ -1,3 +1,10 @@
+
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
diff --git a/addons/scopes/CfgSounds.hpp b/addons/scopes/CfgSounds.hpp
index 9063c7f730..2da106d79b 100644
--- a/addons/scopes/CfgSounds.hpp
+++ b/addons/scopes/CfgSounds.hpp
@@ -1,12 +1,12 @@
class CfgSounds {
class ACE_Sound_Click;
class ACE_Scopes_Click_1: ACE_Sound_Click {
- sound[] = {QUOTE(PATHTOF(sounds\ACE_scopes_click.wav)),3, 2, 200};
+ sound[] = {QPATHTOF(sounds\ACE_scopes_click.wav),3, 2, 200};
};
class ACE_Scopes_Click_2: ACE_Scopes_Click_1 {
- sound[] = {QUOTE(PATHTOF(sounds\ACE_scopes_click.wav)), 3.3, 1.8, 200};
+ sound[] = {QPATHTOF(sounds\ACE_scopes_click.wav), 3.3, 1.8, 200};
};
class ACE_Scopes_Click_3: ACE_Scopes_Click_1 {
- sound[] = {QUOTE(PATHTOF(sounds\ACE_scopes_click.wav)), 2.8, 2.3, 200};
+ sound[] = {QPATHTOF(sounds\ACE_scopes_click.wav), 2.8, 2.3, 200};
};
};
diff --git a/addons/scopes/CfgVehicles.hpp b/addons/scopes/CfgVehicles.hpp
index 81756249e1..8a17384933 100644
--- a/addons/scopes/CfgVehicles.hpp
+++ b/addons/scopes/CfgVehicles.hpp
@@ -10,7 +10,7 @@ class CfgVehicles {
statement = QUOTE([ACE_player] call FUNC(adjustZero));
showDisabled = 0;
priority = 0.2;
- //icon = QUOTE(PATHTOF(UI\...)); // TODO
+ //icon = QPATHTOF(UI\...); // TODO
exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"};
};
};
diff --git a/addons/scopes/CfgWeapons.hpp b/addons/scopes/CfgWeapons.hpp
index 442d4c39d0..cd87167f22 100644
--- a/addons/scopes/CfgWeapons.hpp
+++ b/addons/scopes/CfgWeapons.hpp
@@ -1,16 +1,20 @@
class CfgWeapons {
class ItemCore;
class InventoryOpticsItem_Base_F;
-
+
class optic_LRPS : ItemCore {
- ACE_ScopeAdjust_Vertical[] = { -4, 30 };
- ACE_ScopeAdjust_Horizontal[] = { -6, 6 };
+ ACE_ScopeAdjust_Vertical[] = {-4, 30};
+ ACE_ScopeAdjust_Horizontal[] = {-6, 6};
ACE_ScopeAdjust_VerticalIncrement = 0.1;
ACE_ScopeAdjust_HorizontalIncrement = 0.1;
class ItemInfo : InventoryOpticsItem_Base_F {
class OpticsModes {
class Snip {
- discreteDistance[] = { 100 };
+ opticsZoomMin = 0.011;
+ opticsZoomMax = 0.045;
+ opticsZoomInit = 0.045;
+ discretefov[] = {0.045, 0.011};
+ discreteDistance[] = {100};
discreteDistanceInitIndex = 0;
};
};
@@ -18,14 +22,14 @@ class CfgWeapons {
};
class optic_SOS : ItemCore {
- ACE_ScopeAdjust_Vertical[] = { -4, 30 };
- ACE_ScopeAdjust_Horizontal[] = { -6, 6 };
+ ACE_ScopeAdjust_Vertical[] = {-4, 30};
+ ACE_ScopeAdjust_Horizontal[] = {-6, 6};
ACE_ScopeAdjust_VerticalIncrement = 0.1;
ACE_ScopeAdjust_HorizontalIncrement = 0.1;
class ItemInfo : InventoryOpticsItem_Base_F {
class OpticsModes {
class Snip {
- discreteDistance[] = { 100 };
+ discreteDistance[] = {100};
discreteDistanceInitIndex = 0;
};
};
@@ -33,59 +37,71 @@ class CfgWeapons {
};
class optic_DMS : ItemCore {
- ACE_ScopeAdjust_Vertical[] = { -4, 20 };
- ACE_ScopeAdjust_Horizontal[] = { -6, 6 };
+ ACE_ScopeAdjust_Vertical[] = {-4, 20};
+ ACE_ScopeAdjust_Horizontal[] = {-6, 6};
ACE_ScopeAdjust_VerticalIncrement = 0.1;
ACE_ScopeAdjust_HorizontalIncrement = 0.1;
class ItemInfo : InventoryOpticsItem_Base_F {
class OpticsModes {
class Snip {
- discreteDistance[] = { 100 };
+ discreteDistance[] = {100};
discreteDistanceInitIndex = 0;
};
};
};
};
-
+
class optic_AMS_base : ItemCore {
- ACE_ScopeAdjust_Vertical[] = { -4, 30 };
- ACE_ScopeAdjust_Horizontal[] = { -6, 6 };
+ ACE_ScopeAdjust_Vertical[] = {-4, 30};
+ ACE_ScopeAdjust_Horizontal[] = {-6, 6};
ACE_ScopeAdjust_VerticalIncrement = 0.1;
ACE_ScopeAdjust_HorizontalIncrement = 0.1;
class ItemInfo : InventoryOpticsItem_Base_F {
class OpticsModes {
class AMS {
- discreteDistance[] = { 100 };
+ opticsZoomMin = 0.0285;
+ opticsZoomMax = 0.085;
+ opticsZoomInit = 0.085;
+ discretefov[] = {0.085, 0.0285};
+ discreteDistance[] = {100};
discreteDistanceInitIndex = 0;
};
};
};
};
-
+
class optic_KHS_base : ItemCore {
- ACE_ScopeAdjust_Vertical[] = { -4, 30 };
- ACE_ScopeAdjust_Horizontal[] = { -6, 6 };
+ ACE_ScopeAdjust_Vertical[] = {-4, 30};
+ ACE_ScopeAdjust_Horizontal[] = {-6, 6};
ACE_ScopeAdjust_VerticalIncrement = 0.1;
ACE_ScopeAdjust_HorizontalIncrement = 0.1;
class ItemInfo : InventoryOpticsItem_Base_F {
class OpticsModes {
class KHS {
- discreteDistance[] = { 100 };
+ opticsZoomMin = 0.026;
+ opticsZoomMax = 0.06;
+ opticsZoomInit = 0.06;
+ discretefov[] = {0.06, 0.026};
+ discreteDistance[] = {100};
discreteDistanceInitIndex = 0;
};
};
};
};
-
+
class optic_KHS_old : ItemCore {
- ACE_ScopeAdjust_Vertical[] = { -4, 30 };
- ACE_ScopeAdjust_Horizontal[] = { -6, 6 };
+ ACE_ScopeAdjust_Vertical[] = {-4, 30};
+ ACE_ScopeAdjust_Horizontal[] = {-6, 6};
ACE_ScopeAdjust_VerticalIncrement = 0.1;
ACE_ScopeAdjust_HorizontalIncrement = 0.1;
class ItemInfo : InventoryOpticsItem_Base_F {
class OpticsModes {
class KHS {
- discreteDistance[] = { 100 };
+ opticsZoomMin = 0.026;
+ opticsZoomMax = 0.06;
+ opticsZoomInit = 0.06;
+ discretefov[] = {0.06, 0.026};
+ discreteDistance[] = {100};
discreteDistanceInitIndex = 0;
};
};
diff --git a/addons/scopes/RscTitles.hpp b/addons/scopes/RscTitles.hpp
index 3b83022dcb..1a4bcc99c3 100644
--- a/addons/scopes/RscTitles.hpp
+++ b/addons/scopes/RscTitles.hpp
@@ -1,5 +1,6 @@
class RscText;
+class RscPicture;
class RscTitles {
class ACE_Scopes_Zeroing {
@@ -12,17 +13,15 @@ class RscTitles {
fadein = 0;
fadeout = 0;
name = QGVAR(Zeroing);
- class RscPicture;
- class RscText;
class controls {
class ACE_Scopes_Zeroing_BG : RscPicture {
idc = 11;
type = 0;
- text = PATHTOF(UI\scopes_bg.paa);
+ text = QPATHTOF(UI\scopes_bg.paa);
style = 48 + 0x800;
scale = 1;
sizeEx = 1;
- font = "PuristaMedium";
+ font = "RobotoCondensed";
colorText[] = { 1, 1, 1, 1 };
colorBackground[] = { 1, 1, 1, 1 };
shadow = 1;
@@ -38,7 +37,7 @@ class RscTitles {
style = 2;
sizeEx = 0.04;
lineSpacing = 1;
- font = "PuristaMedium";
+ font = "RobotoCondensed";
text = "";
colorText[] = { 1, 1, 1, 0.9 };
colorBackground[] = { 1, 0, 0, 0 };
@@ -55,7 +54,7 @@ class RscTitles {
style = 0;
sizeEx = 0.04;
lineSpacing = 1;
- font = "PuristaMedium";
+ font = "RobotoCondensed";
text = "";
colorText[] = { 1, 1, 1, 0.9 };
colorBackground[] = { 1, 0, 0, 0 };
@@ -69,13 +68,3 @@ class RscTitles {
};
};
};
-
-/*
-class RscInGameUI {
- class RscUnitInfo;
- class RscWeaponZeroing : RscUnitInfo {
- onLoad = QUOTE([ARR_4('onLoad',_this,'RscUnitInfo','IGUI')] call compile preprocessfilelinenumbers 'A3\ui_f\scripts\initDisplay.sqf'; uiNamespace setVariable [ARR_2('ACE_dlgWeaponZeroing', _this select 0)]; );
- //onLoad = "[""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""; uiNamespace setVariable ['ACE_dlgWeaponZeroing', _this select 0];";
- };
-};
-*/
diff --git a/addons/scopes/XEH_PREP.hpp b/addons/scopes/XEH_PREP.hpp
new file mode 100644
index 0000000000..908d8064f0
--- /dev/null
+++ b/addons/scopes/XEH_PREP.hpp
@@ -0,0 +1,9 @@
+
+PREP(adjustScope);
+PREP(adjustZero);
+PREP(applyScopeAdjustment);
+PREP(canAdjustZero);
+PREP(firedEH);
+PREP(getOptics);
+PREP(inventoryCheck);
+PREP(showZeroing);
diff --git a/addons/scopes/XEH_postInit.sqf b/addons/scopes/XEH_postInit.sqf
index 8f2adeb0b7..4ebfe39bf3 100644
--- a/addons/scopes/XEH_postInit.sqf
+++ b/addons/scopes/XEH_postInit.sqf
@@ -10,13 +10,10 @@
if (!hasInterface) exitWith {};
// Check inventory when it changes
-["playerInventoryChanged", {
- [ACE_player] call FUNC(inventoryCheck);
-}] call EFUNC(common,addEventhandler);
-
+["ace_playerInventoryChanged", FUNC(inventoryCheck)] call CBA_fnc_addEventHandler;
// Instantly hide knobs when scoping in
-["cameraViewChanged", {
+["ace_cameraViewChanged", {
EXPLODE_2_PVT(_this,_player,_newCameraView);
if (_newCameraView == "GUNNER") then {
private "_layer";
@@ -29,15 +26,17 @@ if (!hasInterface) exitWith {};
GVAR(fadePFH) = nil;
};
};
-}] call EFUNC(common,addEventhandler);
+}] call CBA_fnc_addEventHandler;
// Add keybinds
["ACE3 Scope Adjustment", QGVAR(AdjustUpMinor), localize LSTRING(AdjustUpMinor),
{
// Conditions: canInteract
- if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
+ if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
+ if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
+
[ACE_player] call FUNC(inventoryCheck);
// Statement
@@ -49,8 +48,10 @@ if (!hasInterface) exitWith {};
["ACE3 Scope Adjustment", QGVAR(AdjustDownMinor), localize LSTRING(AdjustDownMinor),
{
// Conditions: canInteract
- if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
+ if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
+ if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
+
[ACE_player] call FUNC(inventoryCheck);
// Statement
@@ -62,8 +63,10 @@ if (!hasInterface) exitWith {};
["ACE3 Scope Adjustment", QGVAR(AdjustLeftMinor), localize LSTRING(AdjustLeftMinor),
{
// Conditions: canInteract
- if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
+ if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
+ if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
+
[ACE_player] call FUNC(inventoryCheck);
// Statement
@@ -75,8 +78,10 @@ if (!hasInterface) exitWith {};
["ACE3 Scope Adjustment", QGVAR(AdjustRightMinor), localize LSTRING(AdjustRightMinor),
{
// Conditions: canInteract
- if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
+ if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
+ if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
+
[ACE_player] call FUNC(inventoryCheck);
// Statement
@@ -88,8 +93,10 @@ if (!hasInterface) exitWith {};
["ACE3 Scope Adjustment", QGVAR(AdjustUpMajor), localize LSTRING(AdjustUpMajor),
{
// Conditions: canInteract
- if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
+ if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
+ if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
+
[ACE_player] call FUNC(inventoryCheck);
// Statement
@@ -101,8 +108,10 @@ if (!hasInterface) exitWith {};
["ACE3 Scope Adjustment", QGVAR(AdjustDownMajor), localize LSTRING(AdjustDownMajor),
{
// Conditions: canInteract
- if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
+ if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
+ if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
+
[ACE_player] call FUNC(inventoryCheck);
// Statement
@@ -114,8 +123,10 @@ if (!hasInterface) exitWith {};
["ACE3 Scope Adjustment", QGVAR(AdjustLeftMajor), localize LSTRING(AdjustLeftMajor),
{
// Conditions: canInteract
- if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
+ if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
+ if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
+
[ACE_player] call FUNC(inventoryCheck);
// Statement
@@ -127,8 +138,10 @@ if (!hasInterface) exitWith {};
["ACE3 Scope Adjustment", QGVAR(AdjustRightMajor), localize LSTRING(AdjustRightMajor),
{
// Conditions: canInteract
- if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
+ if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
+ if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
+
[ACE_player] call FUNC(inventoryCheck);
// Statement
@@ -139,5 +152,5 @@ if (!hasInterface) exitWith {};
// Register fire event handler
-["firedPlayer", DFUNC(firedEH)] call EFUNC(common,addEventHandler);
-["firedPlayerNonLocal", DFUNC(firedEH)] call EFUNC(common,addEventHandler);
+["ace_firedPlayer", DFUNC(firedEH)] call CBA_fnc_addEventHandler;
+["ace_firedPlayerNonLocal", DFUNC(firedEH)] call CBA_fnc_addEventHandler;
diff --git a/addons/scopes/XEH_preInit.sqf b/addons/scopes/XEH_preInit.sqf
index d45f50c1bb..a7feade1c3 100644
--- a/addons/scopes/XEH_preInit.sqf
+++ b/addons/scopes/XEH_preInit.sqf
@@ -2,15 +2,6 @@
ADDON = false;
-PREP(adjustScope);
-PREP(adjustZero);
-PREP(applyScopeAdjustment);
-PREP(canAdjustZero);
-PREP(firedEH);
-PREP(getOptics);
-PREP(inventoryCheck);
-PREP(showZeroing);
-
-GVAR(fadeScript) = scriptNull;
+#include "XEH_PREP.hpp"
ADDON = true;
diff --git a/addons/scopes/XEH_preStart.sqf b/addons/scopes/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/scopes/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/scopes/config.cpp b/addons/scopes/config.cpp
index 42be283044..c9ff1feb20 100644
--- a/addons/scopes/config.cpp
+++ b/addons/scopes/config.cpp
@@ -6,18 +6,15 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = { "ace_common" };
- author[] = {"KoffeinFlummi", "esteldunedain"};
- authorUrl = "https://github.com/KoffeinFlummi";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"KoffeinFlummi", "esteldunedain"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
#include "CfgEventHandlers.hpp"
-
#include "CfgSounds.hpp"
-
#include "CfgVehicles.hpp"
-
#include "CfgWeapons.hpp"
-
#include "RscTitles.hpp"
diff --git a/addons/scopes/functions/fnc_adjustScope.sqf b/addons/scopes/functions/fnc_adjustScope.sqf
index 50ee1a4f71..5b0c6d11a6 100644
--- a/addons/scopes/functions/fnc_adjustScope.sqf
+++ b/addons/scopes/functions/fnc_adjustScope.sqf
@@ -47,7 +47,7 @@ if ((count _maxHorizontal < 2) || (count _maxVertical < 2)) exitWith {false};
if ((_verticalIncrement == 0) && (_turretAndDirection in [ELEVATION_UP, ELEVATION_DOWN])) exitWith {false};
if ((_horizontalIncrement == 0) && (_turretAndDirection in [WINDAGE_UP, WINDAGE_DOWN])) exitWith {false};
-_zeroing = _adjustment select _weaponIndex;
+_zeroing = _adjustment select _weaponIndex;
_zeroing params ["_elevation", "_windage", "_zero"];
switch (_turretAndDirection) do {
diff --git a/addons/scopes/functions/fnc_firedEH.sqf b/addons/scopes/functions/fnc_firedEH.sqf
index d28c0dee7e..07eadb5620 100644
--- a/addons/scopes/functions/fnc_firedEH.sqf
+++ b/addons/scopes/functions/fnc_firedEH.sqf
@@ -24,6 +24,7 @@ _weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex);
if (_weaponIndex < 0) exitWith {};
_zeroing = _adjustment select _weaponIndex;
+TRACE_1("Adjusting With",_zeroing);
if (_zeroing isEqualTo [0, 0, 0]) exitWith {};
diff --git a/addons/scopes/functions/fnc_showZeroing.sqf b/addons/scopes/functions/fnc_showZeroing.sqf
index 43595bde87..eb47c692bf 100644
--- a/addons/scopes/functions/fnc_showZeroing.sqf
+++ b/addons/scopes/functions/fnc_showZeroing.sqf
@@ -45,13 +45,13 @@ _vertical ctrlSetText (str _elevation);
_horizontal ctrlSetText (str _windage);
// Set the time when to hide the knobs
-GVAR(timeToHide) = ACE_diagTime + 3.0;
+GVAR(timeToHide) = diag_tickTime + 3.0;
if !(isNil QGVAR(fadePFH)) exitWith {};
// Launch a PFH to wait and fade out the knobs
GVAR(fadePFH) = [{
- if (ACE_diagTime >= GVAR(timeToHide)) exitWith {
+ if (diag_tickTime >= GVAR(timeToHide)) exitWith {
private "_layer";
params ["", "_pfhId"];
_layer = [QGVAR(Zeroing)] call BIS_fnc_rscLayer;
diff --git a/addons/scopes/stringtable.xml b/addons/scopes/stringtable.xml
index 81ae11dc3a..8dc7a9eba0 100644
--- a/addons/scopes/stringtable.xml
+++ b/addons/scopes/stringtable.xml
@@ -67,7 +67,7 @@
Большая корректировка ВНИЗ
Ajuste mayor abajo
Regola l'alzata in basso
- Hausse ---
+ Hausse - - -
Große Korrektur nach unten
Nagy állítás le
Ajuste grande para baixo
@@ -91,7 +91,7 @@
Большая корректировка ВЛЕВО
Ajuste mayor izquierda
Regola il tiro a sinistra
- Dérive ---
+ Dérive - - -
Große Korrektur nach links
Nagy állítás balra
Ajuste grande para esquerda
diff --git a/addons/sitting/CfgEventHandlers.hpp b/addons/sitting/CfgEventHandlers.hpp
index 3481fa1fb5..0d7f0a3f64 100644
--- a/addons/sitting/CfgEventHandlers.hpp
+++ b/addons/sitting/CfgEventHandlers.hpp
@@ -1,3 +1,10 @@
+
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
diff --git a/addons/sitting/CfgVehicles.hpp b/addons/sitting/CfgVehicles.hpp
index cb2422bd6d..95deed0dd6 100644
--- a/addons/sitting/CfgVehicles.hpp
+++ b/addons/sitting/CfgVehicles.hpp
@@ -1,3 +1,6 @@
+
+class CBA_Extended_EventHandlers;
+
class CfgVehicles {
class ACE_Module;
class ACE_ModuleSitting: ACE_Module {
@@ -5,13 +8,14 @@ class CfgVehicles {
category = "ACE";
displayName = CSTRING(ModuleDisplayName);
function = QFUNC(moduleInit);
- scope = 2;
+ scope = 1;
isGlobal = 1;
isSingular = 1;
- icon = QUOTE(PATHTOF(UI\Icon_Module_Sitting_ca.paa));
+ icon = QPATHTOF(UI\Icon_Module_Sitting_ca.paa);
class Arguments {
class enable {
displayName = CSTRING(Enable);
+ description = CSTRING(Enable);
typeName = "BOOL";
defaultValue = 1;
};
@@ -30,72 +34,90 @@ class CfgVehicles {
exceptions[] = {"isNotSitting"};
statement = QUOTE(_player call FUNC(stand));
priority = 0;
- icon = PATHTOF(UI\stand_ca.paa);
+ icon = QPATHTOF(UI\stand_ca.paa);
};
};
};
- class ThingX;
// Folding Chair
+ class ThingX;
class Land_CampingChair_V1_F: ThingX {
- XEH_ENABLED;
+ class EventHandlers {
+ class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
+ };
+
GVAR(canSit) = 1;
GVAR(sitDirection) = 180;
- GVAR(sitPosition[]) = {0, -0.1, -0.45};
+ GVAR(sitPosition)[] = {0, -0.1, -0.45};
EGVAR(dragging,canCarry) = 1;
- EGVAR(dragging,carryPosition[]) = {0, 0.75, 0.5};
+ EGVAR(dragging,carryPosition)[] = {0, 0.75, 0.5};
EGVAR(dragging,carryDirection) = 180;
};
// Camping Chair
class Land_CampingChair_V2_F: ThingX {
- XEH_ENABLED;
+ class EventHandlers {
+ class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
+ };
+
GVAR(canSit) = 1;
GVAR(sitDirection) = 180;
- GVAR(sitPosition[]) = {0, -0.1, -0.45};
+ GVAR(sitPosition)[] = {0, -0.1, -0.45};
EGVAR(dragging,canCarry) = 1;
- EGVAR(dragging,carryPosition[]) = {0, 0.75, 0.5};
+ EGVAR(dragging,carryPosition)[] = {0, 0.75, 0.5};
EGVAR(dragging,carryDirection) = 180;
};
- class Furniture_base_F;
// Chair (Plastic)
+ class Furniture_base_F: ThingX {};
class Land_ChairPlastic_F: Furniture_base_F {
- XEH_ENABLED;
+ class EventHandlers {
+ class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
+ };
+
GVAR(canSit) = 1;
GVAR(sitDirection) = 90;
- GVAR(sitPosition[]) = {0, 0, -0.5};
+ GVAR(sitPosition)[] = {0, 0, -0.5};
EGVAR(dragging,canCarry) = 1;
- EGVAR(dragging,carryPosition[]) = {0, 0.75, 0.5};
+ EGVAR(dragging,carryPosition)[] = {0, 0.75, 0.5};
EGVAR(dragging,carryDirection) = 270;
};
// Chair (Wooden)
class Land_ChairWood_F: Furniture_base_F {
- XEH_ENABLED;
+ class EventHandlers {
+ class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
+ };
+
GVAR(canSit) = 1;
GVAR(sitDirection) = 180;
- GVAR(sitPosition[]) = {0, -0.05, 0};
+ GVAR(sitPosition)[] = {0, -0.05, 0};
EGVAR(dragging,canCarry) = 1;
- EGVAR(dragging,carryPosition[]) = {0, 0.75, 0.5};
+ EGVAR(dragging,carryPosition)[] = {0, 0.75, 0.5};
EGVAR(dragging,carryDirection) = 180;
};
// Office Chair
class Land_OfficeChair_01_F: Furniture_base_F {
- XEH_ENABLED;
+ class EventHandlers {
+ class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
+ };
+
GVAR(canSit) = 1;
GVAR(sitDirection) = 180;
- GVAR(sitPosition[]) = {0, 0, -0.6};
+ GVAR(sitPosition)[] = {0, 0, -0.6};
EGVAR(dragging,canCarry) = 1;
- EGVAR(dragging,carryPosition[]) = {0, 0.75, 0.5};
+ EGVAR(dragging,carryPosition)[] = {0, 0.75, 0.5};
EGVAR(dragging,carryDirection) = 180;
};
// Rattan Chair
class Land_RattanChair_01_F: Furniture_base_F {
- XEH_ENABLED;
+ class EventHandlers {
+ class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
+ };
+
GVAR(canSit) = 1;
GVAR(sitDirection) = 180;
- GVAR(sitPosition[]) = {0, -0.1, -1}; // Z must be -1 due to chair's geometry (magic floating seat point)
+ GVAR(sitPosition)[] = {0, -0.1, -1}; // Z must be -1 due to chair's geometry (magic floating seat point)
EGVAR(dragging,canCarry) = 1;
- EGVAR(dragging,carryPosition[]) = {0, 0.75, 0.5};
+ EGVAR(dragging,carryPosition)[] = {0, 0.75, 0.5};
EGVAR(dragging,carryDirection) = 180;
};
};
diff --git a/addons/sitting/XEH_PREP.hpp b/addons/sitting/XEH_PREP.hpp
new file mode 100644
index 0000000000..cb7f51cfd5
--- /dev/null
+++ b/addons/sitting/XEH_PREP.hpp
@@ -0,0 +1,9 @@
+
+PREP(addSitActions);
+PREP(canSit);
+PREP(canStand);
+PREP(getRandomAnimation);
+PREP(handleInterrupt);
+PREP(moduleInit);
+PREP(sit);
+PREP(stand);
diff --git a/addons/sitting/XEH_clientInit.sqf b/addons/sitting/XEH_clientInit.sqf
index a167e0fea5..3b6b0ba6c8 100644
--- a/addons/sitting/XEH_clientInit.sqf
+++ b/addons/sitting/XEH_clientInit.sqf
@@ -3,9 +3,8 @@
// Exit on Headless
if (!hasInterface) exitWith {};
-["SettingsInitialized", {
- TRACE_1("SettingInit", GVAR(enable));
-
+["ace_settingsInitialized", {
+ if ([[QUOTE(ADDON), QGVAR(enable)], ["acex_sitting", "acex_sitting_enable"], "3.8.0"] call EFUNC(common,deprecateComponent)) exitwith {};
//If not enabled, then do not add CanInteractWith Condition or event handlers:
if (!GVAR(enable)) exitWith {};
@@ -13,6 +12,6 @@ if (!hasInterface) exitWith {};
["isNotSitting", {isNil {(_this select 0) getVariable QGVAR(isSitting)}}] call EFUNC(common,addCanInteractWithCondition);
// Handle interruptions
- ["medical_onUnconscious", {_this call DFUNC(handleInterrupt)}] call EFUNC(common,addEventhandler);
- ["SetHandcuffed", {_this call DFUNC(handleInterrupt)}] call EFUNC(common,addEventhandler);
-}] call EFUNC(common,addEventHandler);
+ ["ace_unconscious", {_this call DFUNC(handleInterrupt)}] call CBA_fnc_addEventHandler;
+ [QEGVAR(captives,setHandcuffed), {_this call DFUNC(handleInterrupt)}] call CBA_fnc_addEventHandler;
+}] call CBA_fnc_addEventHandler;
diff --git a/addons/sitting/XEH_preInit.sqf b/addons/sitting/XEH_preInit.sqf
index 15ffe281c8..ea21067b30 100644
--- a/addons/sitting/XEH_preInit.sqf
+++ b/addons/sitting/XEH_preInit.sqf
@@ -2,14 +2,7 @@
ADDON = false;
-PREP(addSitActions);
-PREP(canSit);
-PREP(canStand);
-PREP(getRandomAnimation);
-PREP(handleInterrupt);
-PREP(moduleInit);
-PREP(sit);
-PREP(stand);
+#include "XEH_PREP.hpp"
GVAR(initializedClasses) = [];
diff --git a/addons/sitting/XEH_preStart.sqf b/addons/sitting/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/sitting/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/sitting/config.cpp b/addons/sitting/config.cpp
index 96d3edab7b..e6a730c492 100644
--- a/addons/sitting/config.cpp
+++ b/addons/sitting/config.cpp
@@ -6,8 +6,9 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_interaction"};
- author[] = {"Jonpas"};
- authorUrl = "https://github.com/jonpas";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"Jonpas"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
@@ -16,3 +17,7 @@ class CfgPatches {
#include "CfgEventHandlers.hpp"
#include "CfgMoves.hpp"
#include "CfgVehicles.hpp"
+
+class ACE_newEvents {
+ SetHandcuffed = QEGVAR(captives,setHandcuffed);
+};
diff --git a/addons/sitting/functions/fnc_addSitActions.sqf b/addons/sitting/functions/fnc_addSitActions.sqf
index 98c9aba99f..4c449bac52 100644
--- a/addons/sitting/functions/fnc_addSitActions.sqf
+++ b/addons/sitting/functions/fnc_addSitActions.sqf
@@ -40,7 +40,7 @@ TRACE_1("Adding Sit Action",_type);
private _sitAction = [
QGVAR(Sit),
localize LSTRING(Sit),
- QUOTE(PATHTOF(UI\sit_ca.paa)),
+ QPATHTOF(UI\sit_ca.paa),
{_this call FUNC(sit)},
{_this call FUNC(canSit)},
{},
diff --git a/addons/sitting/stringtable.xml b/addons/sitting/stringtable.xml
index 3dd6c3ef46..f7c7b84b93 100644
--- a/addons/sitting/stringtable.xml
+++ b/addons/sitting/stringtable.xml
@@ -1,4 +1,4 @@
-
+
@@ -11,6 +11,7 @@
S'assoir
Leülés
Сесть
+ Siediti
Stand Up
@@ -22,6 +23,7 @@
Se lever
Felállás
Встать
+ Alzati
Enable Sitting
@@ -29,10 +31,11 @@
Habilitar opção para sentar
Aktywuj siadanie
Povolit sezení
- Acivar asiento
+ Activar asiento
Permettre de s'assoir
Ülés engedélyezése
Разрешить сидение
+ Abilita seduta
Sitting
@@ -44,6 +47,7 @@
S'assoir
Ülés
Сидение
+ Sedersi
This module allows you to disable the ability to sit on chairs.
@@ -51,10 +55,11 @@
Este módulo permite que você desabilite a capacidade de sentar-se em cadeiras e banheiros.
Moduł ten pozwala na włączenie lub wyłączenie możliwości siadania na krzesłach i toaletach.
Tento modul dovoluje zakázat možnost sedět na židlých a toaletách.
- Este módulo te permite desactivar la capacidad de sentarte en sillas y aseos.
- Ce module controle la capacité de s'assoir sur des chaises ou sur des toilettes
+ Este módulo te permite desactivar la capacidad de sentarse en sillas.
+ Ce module contrôle la capacité de s'assoir sur des chaises ou sur des toilettes
Ez a modul lehetővé teszi a székekre és toalettekre való leülés letiltását.
Этот модуль позволяет вам запретить возможность садиться на стулья и туалеты.
+ Questo modulo ti permette di disabilitare la possibilità di sederti sulle sedie.
-
+
\ No newline at end of file
diff --git a/addons/slideshow/CfgEventHandlers.hpp b/addons/slideshow/CfgEventHandlers.hpp
index b928bc2de6..be284a9d70 100644
--- a/addons/slideshow/CfgEventHandlers.hpp
+++ b/addons/slideshow/CfgEventHandlers.hpp
@@ -1,3 +1,10 @@
+
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
diff --git a/addons/slideshow/CfgVehicles.hpp b/addons/slideshow/CfgVehicles.hpp
index 7e82d48ffc..af3108eb59 100644
--- a/addons/slideshow/CfgVehicles.hpp
+++ b/addons/slideshow/CfgVehicles.hpp
@@ -9,7 +9,7 @@ class CfgVehicles {
isGlobal = 1;
isTriggerActivated = 0;
isDisposable = 0;
- icon = QUOTE(PATHTOF(UI\Icon_Module_Slideshow_ca.paa));
+ icon = QPATHTOF(UI\Icon_Module_Slideshow_ca.paa);
class Arguments {
class Objects {
displayName = CSTRING(Objects_DisplayName);
diff --git a/addons/slideshow/XEH_PREP.hpp b/addons/slideshow/XEH_PREP.hpp
new file mode 100644
index 0000000000..ca31404b53
--- /dev/null
+++ b/addons/slideshow/XEH_PREP.hpp
@@ -0,0 +1,5 @@
+
+PREP(addSlideActions);
+PREP(autoTransition);
+PREP(createSlideshow);
+PREP(moduleInit);
diff --git a/addons/slideshow/XEH_preInit.sqf b/addons/slideshow/XEH_preInit.sqf
index 152c02ec77..8943a367f8 100644
--- a/addons/slideshow/XEH_preInit.sqf
+++ b/addons/slideshow/XEH_preInit.sqf
@@ -2,10 +2,7 @@
ADDON = false;
-PREP(addSlideActions);
-PREP(autoTransition);
-PREP(createSlideshow);
-PREP(moduleInit);
+#include "XEH_PREP.hpp"
GVAR(slideshows) = 0;
diff --git a/addons/slideshow/XEH_preStart.sqf b/addons/slideshow/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/slideshow/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/slideshow/config.cpp b/addons/slideshow/config.cpp
index 3af3bd5354..3a2e757e6a 100644
--- a/addons/slideshow/config.cpp
+++ b/addons/slideshow/config.cpp
@@ -6,8 +6,9 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
- author[]= {"Jonpas", "DaC"};
- authorUrl = "https://github.com/jonpas";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"Jonpas", "DaC"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
diff --git a/addons/slideshow/functions/fnc_autoTransition.sqf b/addons/slideshow/functions/fnc_autoTransition.sqf
index 4c31c4ff6a..d54d629b66 100644
--- a/addons/slideshow/functions/fnc_autoTransition.sqf
+++ b/addons/slideshow/functions/fnc_autoTransition.sqf
@@ -37,4 +37,4 @@ missionNamespace setVariable [_varString, _currentSlide];
// Log current slide and execute Next slide
TRACE_4("Auto-transition",_images select _currentSlide,_currentSlide,count _images,_duration);
-[FUNC(autoTransition), [_objects, _images, _varString, _duration], _duration] call EFUNC(common,waitAndExecute);
+[FUNC(autoTransition), [_objects, _images, _varString, _duration], _duration] call CBA_fnc_waitAndExecute;
diff --git a/addons/slideshow/functions/fnc_createSlideshow.sqf b/addons/slideshow/functions/fnc_createSlideshow.sqf
index 792905db0f..42d1498b88 100644
--- a/addons/slideshow/functions/fnc_createSlideshow.sqf
+++ b/addons/slideshow/functions/fnc_createSlideshow.sqf
@@ -80,5 +80,5 @@ if (_duration == 0) then {
missionNamespace setVariable [_varString, 0];
// Automatic transitions handler
- [FUNC(autoTransition), [_objects, _images, _varString, _duration], _duration] call EFUNC(common,waitAndExecute);
+ [FUNC(autoTransition), [_objects, _images, _varString, _duration], _duration] call CBA_fnc_waitAndExecute;
};
diff --git a/addons/slideshow/stringtable.xml b/addons/slideshow/stringtable.xml
index 4b184cf2e3..4c45399ba6 100644
--- a/addons/slideshow/stringtable.xml
+++ b/addons/slideshow/stringtable.xml
@@ -11,6 +11,7 @@
Слайд-шоу
Prezentace
Presentación de diapositivas
+ Mostra Diapositive
This module allows you to set up slide-shows on different objects. One module per image list. Only objects with hiddenSelection 0 are supported.
@@ -22,6 +23,7 @@
Этот модуль позволяет вам устроить слайд-шоу на различных объектах. Один модуль на один список изображений. Поддерживаются только объекты с hiddenSelection 0.
Este módulo permite configurar una presentación de diapositivas en diferentes objetos. Un módulo por lista de imágenes. Sólo son soportados objetos con hiddenSelection 0.
Tento modul umožňuje nastavit prezentaci na různé objekty. Jeden modul na seznam s obrázky. Podporované jsou pouze objekty s hiddenSelection 0.
+ Questo modulo ti permette di creare una presentazione con diapositive su vari oggetti. Un modulo per lista immagini. Solo oggetti con hiddenSelection 0 sono supportati.
Objects
@@ -33,6 +35,7 @@
Объекты
Objekty
Objetos
+ Oggetti
Object names (can also be synchronized objects) slide-show will be displayed on, separated by commas if multiple. Reference INFO for object support.
@@ -44,6 +47,7 @@
Имена объектов (так же могут использоваться синхронизированные объекты), на которых будет отображаться слайд-шоу, разделенные запятыми. Посмотрите описание, чтобы понять, какие объекты поддерживаются.
Los nombres de objetos (también pueden ser objetos sincronizados) de diapositivas se mostrarán en, separados por comas. Referencia INFO para el soporte del objeto.
Jména objektů (lze také použít synchronizované objekty) které se budou zobrazovat v prezentaci, oddělit čárkou pokud jich je více. Zkontrolujte POPIS abyste zjistili, zda je objekt podporován modulem.
+ Nomi di oggetti (possono anche essere oggetti sincronizzati) che verranno usati per la presentazione di diapositive, separato da virgole se più di uno. Fai riferimento ad INFO per gli oggetti supportati.
Controllers
@@ -55,6 +59,7 @@
Контроллеры
Controladores
Kontrolor
+ Controllori
Controller object names, separated by commas if multiple.
@@ -65,6 +70,7 @@
Nome dos objetos de controle, separado por vírgula se mais de um.
Имена объектов-контроллеров, разделенные запятыми.
Nombres de objeto de controlador, separados por comas.
+ Nomi di oggetti controllori, separati da virgole se multipli.
Images
@@ -76,17 +82,19 @@
Изображения
Obrázky
Imágenes
+ Immagini
List of images that will be used for the slide-show, separated by commas, with full path correctly formatted (eg. images\image.paa).
Eine Liste von Bildern, die bei der Vorführung verwendet werden. (Durch Kommata getrennt, mit vollem Pfad angegeben (z.B Bilder\bild.paa)).
- Liste d'images qui seront utilisées dans des diaporama, séparation par virgule, avec le chemin d'accès complet et formaté correctement (ie. images\image.paa)
+ Liste d'images qui seront utilisées dans des diaporamas, séparation par virgule, avec le chemin d'accès complet et formaté correctement (ie. images\image.paa)
Lista obrazów, które zostaną użyte do pokazu slajdów, oddzielone przecinkiem, z poprawnym pełnym formatem ścieżki do obrazka (np. slajdy\obrazek.paa).
A képek listája amit a vetítés használni fog, vesszővel elválasztva, megfelelően formázott teljes útvonallal (pl. képek\kép.paa)
Lista das imagens que serão utilizadas na apresentação de slides, separadas por vírgula, com o caminho completo corretamente formatado (ex: imagens\imagem.paa).
Список изображений, которые будут использованы для слайд-шоу, разделенные запятыми, с полными путями в правильном формате (например, images\image.paa).
Lista de imágenes que se utilizarán para la presentación de diapositivas, separadas por comas, con la ruta completa en formato correcto (ej. imágenes\image.paa).
Seznam obrázků které budou použity v prezentaci, oddělené čárkami, s kompletní cestou ve správném formátu (např. image\image.paa).
+ Lista di immagini che verranno usate durante la presentazione, separati da virgole, con il formato completo del percorso (es. images\image.paa)
Interaction Names
@@ -97,15 +105,19 @@
Интерактивные имена
Názvy interakcí
Nombres de interacción
+ Nomi Interazioni
+ Interaktionsnamen
List of names that will be used for interaction entries, separated by commas, in order of images.
- Liste de nom qui seront utilisés pour des interactions, séparation par virgule, dans l'ordre des images
+ Liste de noms qui seront utilisés pour des interactions, séparation par virgule, dans l'ordre des images
Lista nazw, które zostaną użyte do nazwania wpisów interakcji, oddzielone przecinkiem, w kolejności obrazów.
Olyan nevek listája, melyek interakciós célra kellenek, vesszővel elválasztva, kép szerinti sorrendben.
Lista dos nomes que serão usados para entradas de interação, separados por vírgulas, na ordem das imagens.
Список имен, которые будут использованы при взаимодействии, разделенные запятыми, в порядке следования изображений.
Lista de nombres que se utilizarán para las entradas de interacción, separados por comas, en el orden de las imágenes.
+ Lista di nomi che verranno usati per per le interazioni, separati da virgole, in ordine per immagini.
+ Liste aller Namen, die für Interaktionseinträge genutzt werden. Mit Kommata getrennt, in Reihenfolge der Bilder.
Slide Duration
@@ -116,6 +128,8 @@
Длительность слайда
Duración de diapositiva
Doba trvání snímku
+ Durata Diapositiva
+ Länge der Diavorführung pro Bild
Duration of each slide. Default: 0 (Automatic Transitions Disabled)
@@ -126,6 +140,8 @@
Длительность каждого слайда. По-умолчанию: 0 (автоматический переход отключен)
Duración de cada diapositiva. Por defecto: 0 (Transiciones automáticas desactivadas)
Doba trvání každého snímku. Výchozí: 0 (Automatické posouvání je zakázáno)
+ Durata di ogni diapositiva. Default: 0 (Transizioni Automatiche Disabilitate)
+ Länge der Diavorführung pro Bild. Standard: 0 (Automatischer Wechsel deaktiviert)
Slides
@@ -136,6 +152,8 @@
Слайды
Diapositivas
Snímky
+ Diapositive
+ Dias
\ No newline at end of file
diff --git a/addons/smallarms/CfgWeapons.hpp b/addons/smallarms/CfgWeapons.hpp
index c0f4b4daef..75d8ee6538 100644
--- a/addons/smallarms/CfgWeapons.hpp
+++ b/addons/smallarms/CfgWeapons.hpp
@@ -58,18 +58,12 @@ class CfgWeapons {
// Grenade launchers /////////////////////////////////////
// Updated strings are in weapon configs.
class GrenadeLauncher;
- class UGL_F : GrenadeLauncher {};
+ class UGL_F: GrenadeLauncher {};
// MXs ////////////////////////////////////////////////////
- class arifle_MX_Base_F : Rifle_Base_F {
- //magazines[] = {"30Rnd_65x39_caseless_mag", "30Rnd_65x39_caseless_mag_Tracer", "100Rnd_65x39_caseless_mag", "100Rnd_65x39_caseless_mag_Tracer"};
-
- // http://www.bushmaster.com/acr/#/intro
- // 800 rpm (whatever, fictional lol)
-
- //class Single : Mode_SemiAuto {};
- class Single : Mode_SemiAuto {
+ class arifle_MX_Base_F: Rifle_Base_F {
+ class Single: Mode_SemiAuto {
reloadTime = 0.075;
};
@@ -78,20 +72,20 @@ class CfgWeapons {
};
};
- class arifle_MX_SW_F : arifle_MX_Base_F {
+ class arifle_MX_SW_F: arifle_MX_Base_F {
modes[] = {"Single", "manual", "close", "short", "medium", "far_optic1", "far_optic2"};
- //class Single : Single {};
- //class manual : FullAuto {};
+ //class Single: Single {};
+ //class manual: FullAuto {};
};
// Katibas ////////////////////////////////////////////////////
- class arifle_katiba_Base_F : Rifle_Base_F {
+ class arifle_katiba_Base_F: Rifle_Base_F {
// http://world.guns.ru/assault/iran/khaybar-kh2002-e.html
// 800 rpm
- class Single : Mode_SemiAuto {
+ class Single: Mode_SemiAuto {
reloadTime = 0.075;
};
@@ -102,16 +96,16 @@ class CfgWeapons {
// SDAR //////////////////////////////////////////////////
- class SDAR_base_F : Rifle_Base_F {
+ class SDAR_base_F: Rifle_Base_F {
modes[] = {"Single", "FullAuto"}; // Leave in the imaginary full-auto mode because, whatever.
};
// Tavor TRG ////////////////////////////////////////////////
- class Tavor_base_F : Rifle_Base_F {
+ class Tavor_base_F: Rifle_Base_F {
// http://www.israel-weapon.com/files/brochure_2012/IWI_TAVOR_AR.pdf
// 700 ~1000 rpm (850)
- class Single : Mode_SemiAuto {
+ class Single: Mode_SemiAuto {
reloadTime = 0.07;
};
@@ -122,10 +116,10 @@ class CfgWeapons {
// Mk20 (F2000) //////////////////////////////////////////////////
- class mk20_base_F : Rifle_Base_F {
+ class mk20_base_F: Rifle_Base_F {
// http://www.fnherstal.com/primary-menu/products-capabilities/rifles/technical-data/product/182/232/182/1/_/fn-f2000R-standard.html
// 850 rpm
- class Single : Mode_SemiAuto {
+ class Single: Mode_SemiAuto {
reloadTime = 0.07;
};
@@ -136,14 +130,14 @@ class CfgWeapons {
// SMG Vermin ////////////////////////////////////////////////////
- class SMG_01_Base : Rifle_Base_F {
+ class SMG_01_Base: Rifle_Base_F {
// http://kriss-usa.com/pdf/operatormanual/
// 1200 rpm
- class Single : Mode_SemiAuto {
+ class Single: Mode_SemiAuto {
reloadTime = 0.05;
};
- class Burst : Mode_Burst {
+ class Burst: Mode_Burst {
burst = 2;
reloadTime = 0.05;
};
@@ -155,17 +149,17 @@ class CfgWeapons {
// SMG Scorpion ////////////////////////////////////////////////////
- class SMG_02_base_F : Rifle_Base_F {
+ class SMG_02_base_F: Rifle_Base_F {
//http://www.czub.cz/zbrojovka/cz-manual/Instruction-Manual-Scorpion-EVO-3-A1_en.pdf
// 1150 rpm
- class Single : Mode_SemiAuto {
+ class Single: Mode_SemiAuto {
// http://www.stengg.com/upload/915fGdhTi3ggnnGQGGL.pdf
// 900-1100 rpm (1000rpm)
reloadTime = 0.052;
};
- class Burst : Mode_Burst {
+ class Burst: Mode_Burst {
reloadTime = 0.052;
};
@@ -177,11 +171,9 @@ class CfgWeapons {
// SMG PDW2000 ///////////////////////////////////////////////////
class pdw2000_base_F: Rifle_Base_F {
- magazines[] = {"30Rnd_9x21_Mag"};
-
modes[] = {"Single", "FullAuto"}; // No burst on this thing
- class Single : Mode_SemiAuto {
+ class Single: Mode_SemiAuto {
// http://www.stengg.com/upload/915fGdhTi3ggnnGQGGL.pdf
// 900-1100 rpm (1000rpm)
reloadTime = 0.06;
@@ -194,24 +186,18 @@ class CfgWeapons {
// Pistols //////////////////////////////////////////////
- class hgun_P07_F : Pistol_Base_F {
- magazines[] = {"16Rnd_9x21_Mag"};
- };
-
- class hgun_Rook40_F : Pistol_Base_F {
- magazines[] = {"16Rnd_9x21_Mag"};
- };
-
- /*class hgun_ACPC2_F: Pistol_Base_F {};
+ /*class hgun_P07_F: Pistol_Base_F {};
+ class hgun_Rook40_F: Pistol_Base_F {};
+ class hgun_ACPC2_F: Pistol_Base_F {};
class hgun_Pistol_heavy_01_F: Pistol_Base_F {};
class hgun_Pistol_heavy_02_F: Pistol_Base_F {};*/
// LMGs //////////////////////////////////////////////
- class LMG_Mk200_F : Rifle_Long_Base_F {
+ class LMG_Mk200_F: Rifle_Long_Base_F {
modes[] = {"manual", "Single", "close", "short", "medium", "far_optic1", "far_optic2"};
- class manual : Mode_FullAuto {
+ class manual: Mode_FullAuto {
// http://www.defensereview.com/kac-stoner-lmg-belt-fed-5-56mm-nato-lightweight-light-machine-gun-squad-automatic-weapon-lmgsaw-displayed-at-sofic-2010/
// 550 rpm
reloadTime = 0.109;
@@ -219,7 +205,7 @@ class CfgWeapons {
// Add semi-auto mode.
// Inherit from 'manual' for sound reasons.
- class Single : manual {
+ class Single: manual {
reloadTime = 0.109;
dispersion = 0.00175; // radians. Equal to 6 MOA.
autofire = 0;
@@ -233,28 +219,28 @@ class CfgWeapons {
class LMG_Zafir_F: Rifle_Long_Base_F {
modes[] = {"FullAuto", "Single", "close", "short", "medium", "far_optic1", "far_optic2"};
- class FullAuto : Mode_FullAuto {
+ class FullAuto: Mode_FullAuto {
reloadTime = 0.070; // 850 RPM on gas position 1
};
};
// Sniper and anti-materiel rifles /////////////////////////////////
- class EBR_base_F : Rifle_Long_Base_F {
+ class EBR_base_F: Rifle_Long_Base_F {
// EMR/EBR is typically issued semi-auto AFAIK
modes[] = {"Single", "single_close_optics1", "single_medium_optics1", "single_far_optics1"};
cursor = "arifle";
};
- class LRR_base_F : Rifle_Long_Base_F {
+ class LRR_base_F: Rifle_Long_Base_F {
cursor = "arifle";
};
- class GM6_base_F : Rifle_Long_Base_F {
+ class GM6_base_F: Rifle_Long_Base_F {
cursor = "arifle";
// Fuck your balancing, BI.
- class Single : Mode_SemiAuto {
+ class Single: Mode_SemiAuto {
// 250 rpm is probably the limit of the finger on a heavy bullpup trigger like this thing must have.
reloadTime = 0.24;
};
diff --git a/addons/smallarms/config.cpp b/addons/smallarms/config.cpp
index e5731df7b3..5b211fa37e 100644
--- a/addons/smallarms/config.cpp
+++ b/addons/smallarms/config.cpp
@@ -6,8 +6,9 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
- author[] = {"TaoSensai", "KoffeinFlummi"};
- authorUrl = "https://github.com/Taosenai/tmr";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"TaoSensai", "KoffeinFlummi"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
diff --git a/addons/spectator/ACE_Settings.hpp b/addons/spectator/ACE_Settings.hpp
index 78402cff23..31e4ea3fd0 100644
--- a/addons/spectator/ACE_Settings.hpp
+++ b/addons/spectator/ACE_Settings.hpp
@@ -1,20 +1,28 @@
class ACE_Settings {
class GVAR(filterUnits) {
+ displayName = CSTRING(units_DisplayName);
+ description = CSTRING(units_Description);
typeName = "SCALAR";
value = 2;
values[] = {CSTRING(units_none), CSTRING(units_players), CSTRING(units_playable), CSTRING(units_all)};
};
class GVAR(filterSides) {
+ displayName = CSTRING(sides_DisplayName);
+ description = CSTRING(sides_Description);
typeName = "SCALAR";
value = 0;
values[] = {CSTRING(sides_player), CSTRING(sides_friendly), CSTRING(sides_hostile), CSTRING(sides_all)};
};
class GVAR(restrictModes) {
+ displayName = CSTRING(modes_DisplayName);
+ description = CSTRING(modes_Description);
typeName = "SCALAR";
value = 0;
values[] = {CSTRING(modes_all), CSTRING(modes_unit), CSTRING(modes_free), CSTRING(modes_internal), CSTRING(modes_external)};
};
class GVAR(restrictVisions) {
+ displayName = CSTRING(visions_DisplayName);
+ description = CSTRING(visions_Description);
typeName = "SCALAR";
value = 0;
values[] = {CSTRING(modes_all), CSTRING(visions_nv), CSTRING(visions_ti), "$STR_Special_None"};
diff --git a/addons/spectator/CfgEventHandlers.hpp b/addons/spectator/CfgEventHandlers.hpp
index e75956f440..becf395052 100644
--- a/addons/spectator/CfgEventHandlers.hpp
+++ b/addons/spectator/CfgEventHandlers.hpp
@@ -1,3 +1,10 @@
+
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
diff --git a/addons/spectator/CfgVehicles.hpp b/addons/spectator/CfgVehicles.hpp
index f6869462ac..268aabbef5 100644
--- a/addons/spectator/CfgVehicles.hpp
+++ b/addons/spectator/CfgVehicles.hpp
@@ -3,7 +3,7 @@ class CfgVehicles {
class GVAR(moduleSettings): ACE_Module {
scope = 2;
displayName = CSTRING(Settings_DisplayName);
- icon = PATHTOF(UI\Icon_Module_Spectator_ca.paa);
+ icon = QPATHTOF(UI\Icon_Module_Spectator_ca.paa);
category = "ACE";
function = QFUNC(moduleSpectatorSettings);
isGlobal = 1;
diff --git a/addons/spectator/XEH_PREP.hpp b/addons/spectator/XEH_PREP.hpp
new file mode 100644
index 0000000000..cc29fde611
--- /dev/null
+++ b/addons/spectator/XEH_PREP.hpp
@@ -0,0 +1,23 @@
+
+PREP(cacheUnitInfo);
+PREP(cycleCamera);
+PREP(handleCamera);
+PREP(handleCompass);
+PREP(handleIcons);
+PREP(handleInterface);
+PREP(handleMap);
+PREP(handleMouse);
+PREP(handleToolbar);
+PREP(handleUnits);
+PREP(interrupt);
+PREP(moduleSpectatorSettings);
+PREP(respawnTemplate);
+PREP(setCameraAttributes);
+PREP(setSpectator);
+PREP(stageSpectator);
+PREP(transitionCamera);
+PREP(toggleInterface);
+PREP(updateCameraModes);
+PREP(updateSpectatableSides);
+PREP(updateUnits);
+PREP(updateVisionModes);
diff --git a/addons/spectator/XEH_postInit.sqf b/addons/spectator/XEH_postInit.sqf
index 4b1f653223..72c53a2af0 100644
--- a/addons/spectator/XEH_postInit.sqf
+++ b/addons/spectator/XEH_postInit.sqf
@@ -4,10 +4,10 @@
// Add interaction menu exception
["isNotSpectating", {!(GETVAR((_this select 0),GVAR(isStaged),false))}] call EFUNC(common,addCanInteractWithCondition);
-["SettingsInitialized", {
+["ace_settingsInitialized", {
GVAR(availableModes) = [[0,1,2], [1,2], [0], [1], [2]] select GVAR(restrictModes);
GVAR(availableVisions) = [[-2,-1,0,1], [-2,-1], [-2,0,1], [-2]] select GVAR(restrictVisions);
-}] call EFUNC(common,addEventHandler);
+}] call CBA_fnc_addEventHandler;
// Create a radio channel for any spectators to text chat in
if (isServer) then {
@@ -16,4 +16,16 @@ if (isServer) then {
};
// Should prevent unending spectator on mission end
-addMissionEventHandler ["Ended",{ [QGVAR(EndMission)] call FUNC(interrupt) }];
+if (isServer) then {
+ addMissionEventHandler ["Ended", {
+ [QGVAR(endMission), []] call CBA_fnc_globalEvent;
+ }];
+};
+
+[QGVAR(endMission), {
+ if (GVAR(isSet)) then {
+ [false] call FUNC(setSpectator);
+ };
+}] call CBA_fnc_addEventHandler;
+
+[QGVAR(stageSpectator), FUNC(stageSpectator)] call CBA_fnc_addEventHandler;
diff --git a/addons/spectator/XEH_preInit.sqf b/addons/spectator/XEH_preInit.sqf
index 4b30edbadf..bdf0c72bd4 100644
--- a/addons/spectator/XEH_preInit.sqf
+++ b/addons/spectator/XEH_preInit.sqf
@@ -2,28 +2,7 @@
ADDON = false;
-PREP(cacheUnitInfo);
-PREP(cycleCamera);
-PREP(handleCamera);
-PREP(handleCompass);
-PREP(handleIcons);
-PREP(handleInterface);
-PREP(handleMap);
-PREP(handleMouse);
-PREP(handleToolbar);
-PREP(handleUnits);
-PREP(interrupt);
-PREP(moduleSpectatorSettings);
-PREP(respawnTemplate);
-PREP(setCameraAttributes);
-PREP(setSpectator);
-PREP(stageSpectator);
-PREP(transitionCamera);
-PREP(toggleInterface);
-PREP(updateCameraModes);
-PREP(updateSpectatableSides);
-PREP(updateUnits);
-PREP(updateVisionModes);
+#include "XEH_PREP.hpp"
// Reset the stored display
SETUVAR(GVAR(interface),displayNull);
diff --git a/addons/spectator/XEH_preStart.sqf b/addons/spectator/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/spectator/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/spectator/config.cpp b/addons/spectator/config.cpp
index 6e32ed0413..7e9937a70b 100644
--- a/addons/spectator/config.cpp
+++ b/addons/spectator/config.cpp
@@ -6,8 +6,9 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
- author[] = {"F3 Project","Head","SilentSpike","voiper"};
- authorUrl = "https://github.com/acemod";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"F3 Project","Head","SilentSpike","voiper"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
@@ -23,3 +24,8 @@ class CfgRespawnTemplates {
onPlayerRespawn = QFUNC(respawnTemplate);
};
};
+
+class ACE_newEvents {
+ spectatorStaged = "ace_spectatorStaged";
+ spectatorSet = "ace_spectatorSet";
+};
\ No newline at end of file
diff --git a/addons/spectator/functions/fnc_handleInterface.sqf b/addons/spectator/functions/fnc_handleInterface.sqf
index a8a607d537..3a69bb1383 100644
--- a/addons/spectator/functions/fnc_handleInterface.sqf
+++ b/addons/spectator/functions/fnc_handleInterface.sqf
@@ -27,8 +27,11 @@ switch (toLower _mode) do {
// Always show interface and hide map upon opening
[_display,nil,nil,!GVAR(showInterface),GVAR(showMap)] call FUNC(toggleInterface);
+ // Initalize the unit tree
+ ["onUnitsUpdate",[(_display displayCtrl IDC_UNIT) controlsGroupCtrl IDC_UNIT_TREE]] call FUNC(handleInterface);
+
// Keep unit list and tree up to date
- [FUNC(handleUnits), 21, _display] call CBA_fnc_addPerFrameHandler;
+ [FUNC(handleUnits), 9, _display] call CBA_fnc_addPerFrameHandler;
// Handle 3D unit icons
GVAR(iconHandler) = addMissionEventHandler ["Draw3D",FUNC(handleIcons)];
@@ -108,7 +111,7 @@ switch (toLower _mode) do {
_timer ctrlCommit 0;
_frame ctrlCommit 0;
};
- },[],0.5] call EFUNC(common,waitAndExecute);
+ },[],0.5] call CBA_fnc_waitAndExecute;
};
case "onunload": {
// Kill GUI PFHs
@@ -331,31 +334,40 @@ switch (toLower _mode) do {
};
case "onunitsupdate": {
_args params ["_tree"];
- private ["_cachedUnits","_cachedGrps","_cachedSides","_s","_g","_grp","_u","_unit","_side"];
+ private ["_cachedUnits","_cachedGrps","_cachedSides","_sT","_gT","_uT","_s","_g","_u","_grp","_unit","_side"];
// Cache existing group and side nodes and cull removed data
_cachedUnits = [];
_cachedGrps = [];
_cachedSides = [];
- for "_s" from 0 to ((_tree tvCount []) - 1) do {
- for "_g" from 0 to ((_tree tvCount [_s]) - 1) do {
+ // Track deleted nodes to account for decrease in index
+ _sT = _tree tvCount [];
+ for [{_s = 0;}, {_s < _sT}, {_s = _s + 1}] do {
+ _gT = _tree tvCount [_s];
+
+ for [{_g = 0;}, {_g < _gT}, {_g = _g + 1}] do {
_grp = groupFromNetID (_tree tvData [_s,_g]);
if (_grp in GVAR(groupList)) then {
_cachedGrps pushBack _grp;
_cachedGrps pushBack _g;
- for "_u" from 0 to ((_tree tvCount [_s,_g])) do {
+ _uT = _tree tvCount [_s,_g];
+ for [{_u = 0;}, {_u < _uT}, {_u = _u + 1}] do {
_unit = objectFromNetId (_tree tvData [_s,_g,_u]);
if (_unit in GVAR(unitList)) then {
_cachedUnits pushBack _unit;
} else {
_tree tvDelete [_s,_g,_u];
+ _u = _u - 1;
+ _uT = _uT - 1;
};
};
} else {
_tree tvDelete [_s,_g];
+ _g = _g - 1;
+ _gT = _gT - 1;
};
};
@@ -364,6 +376,8 @@ switch (toLower _mode) do {
_cachedSides pushBack _s;
} else {
_tree tvDelete [_s];
+ _s = _s - 1;
+ _sT = _sT - 1;
};
};
@@ -476,7 +490,7 @@ switch (toLower _mode) do {
[_this select 1] call CBA_fnc_removePerFrameHandler;
},0] call CBA_fnc_addPerFrameHandler;
- },[],5] call EFUNC(common,waitAndExecute);
+ },[],5] call CBA_fnc_waitAndExecute;
true
};
diff --git a/addons/spectator/functions/fnc_handleUnits.sqf b/addons/spectator/functions/fnc_handleUnits.sqf
index c32961024c..f51c922b8e 100644
--- a/addons/spectator/functions/fnc_handleUnits.sqf
+++ b/addons/spectator/functions/fnc_handleUnits.sqf
@@ -36,5 +36,5 @@ if !(GVAR(camUnit) in GVAR(unitList)) then {
// Reduce overhead when unit tree is hidden
if (ctrlShown (_display displayCtrl IDC_UNIT)) then {
// Reduce overhead by spreading across frames
- [FUNC(handleInterface),["onUnitsUpdate",[(_display displayCtrl IDC_UNIT) controlsGroupCtrl IDC_UNIT_TREE]],1] call EFUNC(common,waitAndExecute);
+ [FUNC(handleInterface),["onUnitsUpdate",[(_display displayCtrl IDC_UNIT) controlsGroupCtrl IDC_UNIT_TREE]],1] call CBA_fnc_waitAndExecute;
};
diff --git a/addons/spectator/functions/fnc_respawnTemplate.sqf b/addons/spectator/functions/fnc_respawnTemplate.sqf
index 4584a1fc3c..dc83bf7458 100644
--- a/addons/spectator/functions/fnc_respawnTemplate.sqf
+++ b/addons/spectator/functions/fnc_respawnTemplate.sqf
@@ -21,11 +21,6 @@
params [["_unit",objNull,[objNull]], ["_killer",objNull,[objNull]], ["_respawn",0,[0]], ["_respawnDelay",0,[0]]];
private ["_vision","_pos"];
-// When all are dead with respawn type "None" the mission should end
-if ((_respawn == 0) && {{alive _x} count allPlayers <= 0}) exitWith {
- [["endDeath",false],"BIS_fnc_endMission"] call EFUNC(common,execRemoteFnc);
-};
-
// Some environment information can be used for the initial camera attributes
if (isNull _killer) then {_killer = _unit};
_vision = [-2,-1] select (sunOrMoon < 1);
diff --git a/addons/spectator/functions/fnc_setSpectator.sqf b/addons/spectator/functions/fnc_setSpectator.sqf
index ce9428cea4..45bb15df42 100644
--- a/addons/spectator/functions/fnc_setSpectator.sqf
+++ b/addons/spectator/functions/fnc_setSpectator.sqf
@@ -92,12 +92,12 @@ if (_set) then {
if (_this) then {
_display displayAddEventHandler ["KeyDown", {
if (_this select 1 == 1) then {
- [false] call ace_spectator_fnc_setSpectator;
+ [false] call FUNC(setSpectator);
true
};
}];
};
- }, !_force] call EFUNC(common,execNextFrame);
+ }, !_force] call CBA_fnc_execNextFrame;
// Cache and disable nametag settings
if (["ace_nametags"] call EFUNC(common,isModLoaded)) then {
@@ -170,4 +170,4 @@ GVAR(interrupts) = [];
// Mark spectator state for reference
GVAR(isSet) = _set;
-["spectatorSet",[_set]] call EFUNC(common,localEvent);
+["ace_spectatorSet", [_set]] call CBA_fnc_localEvent;
diff --git a/addons/spectator/functions/fnc_stageSpectator.sqf b/addons/spectator/functions/fnc_stageSpectator.sqf
index 926ac008dc..8e6c32f568 100644
--- a/addons/spectator/functions/fnc_stageSpectator.sqf
+++ b/addons/spectator/functions/fnc_stageSpectator.sqf
@@ -27,7 +27,7 @@ params [["_unit",player,[objNull]], ["_set",true,[true]]];
if !(_set || (GETVAR(_unit,GVAR(isStaged),false))) exitWith {};
if !(local _unit) exitWith {
- [[_unit, _set], QFUNC(stageSpectator), _unit] call EFUNC(common,execRemoteFnc);
+ [QGVAR(stageSpectator), [_unit, _set], _unit] call CBA_fnc_targetEvent;
};
// Prevent unit falling into water
@@ -64,7 +64,7 @@ if !(_set isEqualTo (GETVAR(_unit,GVAR(isStaged),false))) then {
// Mark spectator state for reference
_unit setVariable [QGVAR(isStaged), _set, true];
- ["spectatorStaged",[_set]] call EFUNC(common,localEvent);
+ ["ace_spectatorStaged", [_set]] call CBA_fnc_localEvent;
};
//BandAid for #2677 - if player in unitList weird before being staged, weird things can happen
@@ -73,6 +73,6 @@ if ((player in GVAR(unitList)) || {ACE_player in GVAR(unitList)}) then {
if (!(isNull (findDisplay 12249))) then {//If display is open now, close it and restart
ACE_LOGWARNING("Player in unitList, call ace_spectator_fnc_stageSpectator before ace_spectator_fnc_setSpectator");
["fixWeirdList", true] call FUNC(interrupt);
- [{["fixWeirdList", false] call FUNC(interrupt);}, []] call EFUNC(common,execNextFrame);
+ [{["fixWeirdList", false] call FUNC(interrupt);}, []] call CBA_fnc_execNextFrame;
};
};
diff --git a/addons/spectator/stringtable.xml b/addons/spectator/stringtable.xml
index 25822e630a..bdb88a2675 100644
--- a/addons/spectator/stringtable.xml
+++ b/addons/spectator/stringtable.xml
@@ -3,525 +3,690 @@
Spectator Settings
+ Zuschauer Einstellungen
Ustawienia obserwatora
Preferências de Espectador
Настройки спектатора
Nastavení pozorovatele
Ajustes de espectador
+ Impostazioni Spettatore
+ Réglages de spectateur
Configure how the spectator system will operate by default.
+ Konfiguriert den Zuschauermodus
Skonfiguruj domyślne ustawienia obserwatora.
Configura como o sistema de espectador operará por padrão.
Определяют, как система спектатора будет функционировать по-умолчанию.
Configurar cómo el sistema de espectador funcionará por defecto.
Konfigurovat výchozí nastavení pozorovatele
+ Configura come il sistema spettatore si comporterà di default.
+ Configure comment le système de spectateurs opère par défaut.
Unit filter
+ Einheitenfilter
Filtr jednostek
Filtro de unidades
Фильтр юнитов
Filtr jednotek
Filtro de unidad
+ Filtro Unità
+ Filtre d'unités
Method of filtering spectatable units.
+ Einheiten denen zugeschaut werden kann.
Wybierz jednostki, jakie będzie można obserwować po uruchomeniu obserwatora.
Método para filtrar unidades espectáveis
Метод фильтрации наблюдаемых юнитов.
Método de filtrado de unidades de espectador
Metoda filtrování pozorovaných jednotek.
+ Metodo di filtraggio delle unità osservabili.
+ Méthode de filtration des unités regardables.
No units
+ Keine Einheiten
Brak jednostek
Sem unidades
Никто
Žádné jednotky
Ninguna
+ Nessuna unità
+ Pas d'unités
Only players
+ Nur Spieler
Tylko gracze
Somente jogadores
Только игроки
Pouze hráči
Solo jugadores
+ Solo giocatori
+ Joueurs seulements
Playable Units
+ Nur spielbare Einheiten
Grywalne jednostki
Unidades jogáveis
Играбельные юниты
Hratelné jednotky
Unidades jugables
+ Unità giocabili
+ Unités jouables
All units
+ Alle Einheiten
Wszystkie jednostki
Todas unidades
Все юниты
Všechny jednotky
Todas las unidades
+ Tutte le unità
+ Toutes les unités
Side filter
+ Fraktionenfilter
Filtr stron
Filtro de lados
Фильтр стороны
Filtr stran
Filtro de bando
+ Filtro Lato
+ Filtre de faction
Method of filtering spectatable sides.
+ Fraktionen denen zugeschaut werden kann.
Wybierz strony, jakie będzie można obserwować po uruchomeniu obserwatora.
Método para filtrar lados espectáveis.
Метод фильтрации наблюдаемых сторон.
Método de filtrado de bandos de espectador
Metoda filtrování pozorovaných stran.
+ Metodo per filtrare i lati osservabili.
+ Méthode de filtration des factions regardables
Player side
+ Spielerseite
Strona gracza
Lado do jogador
Сторона игрока
Strana hráče
Bando del jugador
+ Lato giocatore
+ Faction du joueur
Friendly sides
+ Verbündete
Strony sojusznicze
Lados aliados
Дружественные стороны
Strana spojenců
Bandos amigos
+ Lati alleati
+ Factions amies
Hostile sides
+ Feinde
Strony wrogie
Lados hostis
Враждебные стороны
Strana nepřítele
Bandos enemigos
+ Lati nemici
+ Factions hostiles
All sides
+ Alle Fraktionen
Wszystkie strony
Todos os lados
Все стороны
Všechny strany
Todos los bandos
+ Tutti i lati
+ Toutes les factions
Camera modes
+ Kameramodus
Tryby kamery
Modos de camera
Режимы камеры
Módy kamery
Modos de cámara
+ Modalità camera
+ Mode de caméra
Camera modes that can be used.
+ Verwendbare Kameramodi
Tryby kamery, jakie mogą być używane.
Modos de camera que podem ser utilizados
Режимы камеры, которые могут быть использованы
Modos de la cámara que se pueden utilizar.
Módy kamery které mohou být použity.
+ Modalità che la camera può utilizzare.
+ Modes de caméra qui peuvent être utilisés
All
+ Alle
Wszystkie
Todos
Все
Všechny
Todos
+ Tutte
+ Tous
Free only
+ Nur freie Kamera
Tylko wolna
Somente livre
Только свободная
Pouze volná
Solo libre
+ Solo libera
+ Libre seulement
Internal only
- Tylko wewnętrzna
- Somente interna
- Только внутренняя
- Pouze pohled z první osoby
- Solo interna
-
+ Erste Person //Bitte überprüfen!
+ Tylko wewnętrzna Somente interna Только внутренняя Pouze pohled z první osoby Solo interna Solo interna Interne seulement
External only
- Tylko zewnętrzna
- Somente externa
- Только внешняя
- Pouze pohled z třetí osoby
- Solo externa
-
+ Dritte Person //Bitte überpfüfen!
+ Tylko zewnętrzna Somente externa Только внешняя Pouze pohled z třetí osoby Solo externa Solo esterna Externe seulement
Internal and external
+ Erste und dritte Person
Wewnętrzna i zewnętrzna
Interna e externa
Внутренняя и внешняя
Pohled z první a třetí osoby
Interna y externa
+ Interna ed Esterna
+ Interne et externe
Vision modes
+ Sichtmodi
Tryby wizji
Modos de visão
Режимы видения
Modos de visión
Módy zobrazení
+ Modalità visuali
+ Modes de vision
Vision modes that can be used.
+ Sichtmodi die verwendet werden können.
Tryby wizji, jakie mogą być używane.
Modos de visão que podem ser utilizados
Режимы видения, которые могут быть использованы
Modos de visión que pueden ser utilizados.
Módy zobrazení které mohou být použity.
+ Modalità visuali che possono essere usate.
+ Modes de visions qui peuvent être utilisés
Night vision
+ Nachtsicht
Noktowizja
Visão noturna
Ночное видение
Noktovize
Visión nocturna
+ Visione Notturna
+ Vision nocturne
Thermal imaging
+ Wärmebild
Termowizja
Visão térmica
Тепловизионное
Termovize
Imagen térmica
+ Visione Termica
+ Vision thermique
Spectator Units
+ Zuschauereinheiten
Jednostki obserwatora
Unidades espectadoras
Юниты
Unidades espectador
Jednotky pozorovatele
+ Unità Osservabili
+ Unités spectatrices
Spectator Controls
+ Zuschauersteuerung
Sterowanie obserwatorem
Controle do espectador
Управление спектатором
Controles de espectador
Ovládání pozorovatele
+ Controlli Osservatore
+ Contrôles de spectateur
Free
+ Frei
Wolna
Livre
Свободная
Volná
Libre
+ Libera
+ Libre
Internal
- Wewnętrzna
- Interna
- Внутренняя
- Pohled z první osoby
- Interna
-
+ Erste Person //Bitte überprüfen!
+ Wewnętrzna Interna Внутренняя Pohled z první osoby Interna Interna Interne
External
- Zewnętrzna
- Externa
- Внешняя
- Pohled z třetí osoby
- Externa
-
+ Dritte Person //Bitte überprüfen!
+ Zewnętrzna Externa Внешняя Pohled z třetí osoby Externa Esterna Externe
Normal
+ Normal
Normalna
Normal
Нормальное
Normální
Normal
+ Normale
+ Normale
Night
+ Nacht
Noc
Visão Norturna
Ночное
- Noc
+ Noční
Nocturna
+ Notturno
+ Nuit
Thermal
+ Wärme
Termo
Térmica
Тепловизор
- Termál
+ Termální
Térmica
+ Termico
+ Thermique
Free Camera
+ Freie Kamera
Kamera swobodna
Câmera livre
Свободная камера
Volná Kamera
Cámara libre
+ Camera Libera
+ Caméra libre
Camera Forward
+ Kamera vor
Kamera naprzód
Câmera para frente
Камера вперед
Vpřed (Kamera)
Cámara delantera
+ Camera Avanti
+ Caméra en avant
Camera Backward
+ Kamera zurück
Kamera w tył
Câmera para trás
Камера назад
Zpět (Kamera)
Cámara trasera
+ Camera Indietro
+ Caméra en arrière
Camera Left
+ Kamera links
Kamera w lewo
Câmera para esquerda
Камера влево
Doleva (Kamera)
Cámara izquierda
+ Camera Sinistra
+ Caméra à gauche
Camera Right
+ Kamera rechts
Kamera w prawo
Câmera para direita
Камера вправо
Doprava (Kamera)
Cámara derecha
+ Camera Destra
+ Caméra à droite
Camera Up
+ Kamera hoch
Kamera w górę
Câmera para cima
Камера вверх
Nahoru (Kamera)
Cámara arriba
+ Camera Su
+ Caméra en haut
Camera Down
+ Kamera runter
Kamera w dół
Câmera para baixo
Камера вниз
Dolů (Kamera)
Cámara abajo
+ Camera Giù
+ Caméra en bas
Pan Camera
+ Kamera mitschwenken
Panoramowanie
Câmera panorâmica
Панорамирование
Cámara panorámica
Otáčet kameru
+ Camera Panoramica
Dolly Camera
+ Kamerafahrt
Płynna kamera
Câmera dolly
Рельсовая камера
Cámara dolly
Posouvat kameru
+ Camera dolly
Lock Camera to Target
+ Kamera Ziel verfolgen
Zablokuj kamerę na celu
Travar câmera em alvo
Зафиксировать камеру на цели
Zamknout kameru na Cíl
Fijar cámara al objetivo
+ Blocca la camera su obbiettivo
+ Verrouiller la caméra sur la cible
Speed Boost
+ Geschwindigkeitserhöhung
Przyśpieszenie kamery
Aumento de velocidade
Ускорение камеры
Aumento de velocidad
Zrychlení kamery
+ Aumento Velocità
+ Boost de vitesse
Interface
+ Nuteroberfläche
Interfejs
Interface
Интерфейс
Rozhraní
Interfaz
+ Interfaccia
+ Interface
Toggle Interface
+ Nutzeroberfläche umschalten
Przełącz interfejs
Alternar interface
Переключить интерфейс
Zobrazit/skrýt rozhraní
Conmutar
+ Apri Interfaccia
+ Bascule de l'interface
Toggle Unit Icons
+ Einheitensymbole umschalten
Przełącz ikony jednostek
Alternar ícone de unidades
Вкл./выкл. иконки юнитов
Zobrazit/skrýt ikony jednotek
Conmutar iconos de unidad
+ Apri Icone Unità
+ Bascule des icônes des unités
Toggle Unit List
+ Einheitenliste umschalten
Przełącz listę jednostek
Alternar lista de unidades
Вкл./выкл. список юнитов
Zobrazit/skrýt seznam jednotek
Conmutar lista de unidades
+ Apri Lista Unità
+ Bascule de la liste des unités
Toggle Toolbar
+ Werkzeuge umschalten
Przełącz pasek narzędzi
Alternar barra de ferramentas
Вкл./выкл. тулбар
Conmutar barra de herramientas
Zobrazit/skrýt spodní panel
+ Apri Barra degli Strumenti
+ Bascule de la barre d'outils
Toggle Compass
+ Kompass umschalten
Przełącz kompas
Alternar bússola
Вкл./выкл. компас
Zobrazit/skrýt kompas
Conmutar brújula
+ Apri Bussola
+ Basculer le compas
Toggle Map
+ Karte umschalten
Przełącz mapę
Alternar mapa
Вкл./выкл. карту
Zobrazit/skrýt mapu
Conmutar map
+ Apri Mappa
+ Basculer la carte
Toggle Help
+ Hilfe umschalten
Przełącz pomoc
Alternar ajuda
Вкл./выкл. помощь
Zobrazit/skrýt ovládání
Conmutar ayuda
+ Apri Aiuti
+ Basculer l'aide
Camera Attributes
+ Kameraeigenschaften
Atrybuty kamery
Atributos de câmera
Атрибуты камеры
Atributos de cámara
Atributy kamery
+ Attributi Camera
+ Propriétés de la caméra
Next Camera
+ Nächste Kamera
Następna kamera
Próxima câmera
Следующая камера
Následující kamera
Siguiente cámara
+ Prossima Camera
+ Caméra suivante
Previous Camera
+ Vorherige Kamera
Poprzednia kamera
Câmera anterior
Предыдущая камера
Předchozí kamera
Anterior cámara
+ Precedente Camera
+ Caméra précédente
Next Unit
+ Nächste Einheit
Następna jednostka
Próxima unidade
Следующий юнит
Následující jednotka
Siguiente unidad
+ Prossima Unità
+ Unité suivante
Previous Unit
+ Vorherige Einheit
Poprzednia jednostka
Unidade anterior
Предыдущий юнит
Předchozí jednotka
Anterior unidad
+ Precedente Unità
+ Unité précédente
Next Vision Mode
+ Nächster Sichtmodus
Następny tryb wizji
Próximo modo de visão
Следующий режим видения
Siguiente modo de visión
Následující mód zobrazení
+ Prossima Modalità Visiva
+ Mode de vision suivant
Previous Vision Mode
+ Vorheriger Sichtmodus
Poprzedni tryb wizji
Modo de visão anterior
Предыдущий режим видения
Anterior modo de visión
Předchozí mód zobrazení
+ Precedente Modalità Visiva
+ Mode de vision précédent
Adjust Zoom
+ Vergrößerung einstellen
Reguluj zoom
Ajustar zoom
Настроить зум
Regulovat přiblížení
Ajustar aumento
+ Aggiusta Zoom
+ Ajuster le zoom
Adjust Speed
+ Geschwindigkeit einstellen
Reguluj prędkość
Ajuster velocidade
Настроить скорость
Regulovat rychlost
Ajustar velocidad
+ Aggiusta Velocità
+ Ajuster la vitesse
Increment Zoom
+ Vergrößern
Reguluj zoom (krok)
Incrementar zoom
Увеличить зум
Incrementar aumento
Regulovat přiblížení (pomalu)
+ Aumenta Zoom
+ Augmenter le zoom
Increment Speed
+ Geschwindkeit erhöhen
Reguluj prędkość (krok)
Incrementar velocidade
Увеличить скорость
Incrementar velocidad
Regulovat rychlost (pomalu)
+ Aumenta Velocità
+ Augmenter la vitesse
Reset Zoom
+ Vergrößerung zurücksetzen
Resetuj zoom
Redefinir zoom
Сбросить зум
Obnovit přiblížení
Reiniciar aumento
+ Resetta Zoom
+ RAZ zoom
Reset Speed
+ Geschwindigkeit zurücksetzen
Resetuj prędkość
Redefinir velocidade
Сбросить скорость
Obnovit rychlost
Reiniciar velocidad
+ Resetta Velocità
+ RAZ vitesse
\ No newline at end of file
diff --git a/addons/spottingscope/CfgEventHandlers.hpp b/addons/spottingscope/CfgEventHandlers.hpp
index 81b3aef30e..b34b3ac099 100644
--- a/addons/spottingscope/CfgEventHandlers.hpp
+++ b/addons/spottingscope/CfgEventHandlers.hpp
@@ -1,12 +1,19 @@
+
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
- init = QUOTE( call COMPILE_FILE(XEH_preInit) );
+ init = QUOTE(call COMPILE_FILE(XEH_preInit));
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
- init = QUOTE( call COMPILE_FILE(XEH_postInit) );
+ init = QUOTE(call COMPILE_FILE(XEH_postInit));
};
};
diff --git a/addons/spottingscope/CfgVehicles.hpp b/addons/spottingscope/CfgVehicles.hpp
index 434c1c96ca..6ea8562936 100644
--- a/addons/spottingscope/CfgVehicles.hpp
+++ b/addons/spottingscope/CfgVehicles.hpp
@@ -1,4 +1,6 @@
+class CBA_Extended_EventHandlers_base;
+
class CfgVehicles {
class Man;
class CAManBase: Man {
@@ -10,12 +12,146 @@ class CfgVehicles {
statement = QUOTE([ARR_2(_player,'ACE_SpottingScope')] call FUNC(place));
showDisabled = 0;
priority = 2;
- icon = PATHTOF(UI\w_spottingscope_ca.paa);
+ icon = QPATHTOF(UI\w_spottingscope_ca.paa);
};
};
};
};
+ class LandVehicle;
+ class StaticWeapon: LandVehicle {
+ class Turrets;
+ class ACE_Actions {
+ class ACE_MainActions;
+ };
+ };
+
+ class StaticATWeapon: StaticWeapon {
+ class Turrets: Turrets {
+ class MainTurret;
+ };
+
+ class ACE_Actions: ACE_Actions {
+ class ACE_MainActions: ACE_MainActions {};
+ };
+ };
+
+ class ACE_SpottingScopeObject: StaticATWeapon {
+ EGVAR(dragging,canDrag) = 1;
+ EGVAR(dragging,dragPosition)[] = {0,1,0};
+ EGVAR(dragging,dragDirection) = 0;
+
+ class ACE_Actions: ACE_Actions{
+ class ACE_MainActions: ACE_MainActions {
+ selection = "main_gun";
+ class ACE_Pickup {
+ selection = "";
+ displayName = CSTRING(PickUp);
+ distance = 5;
+ condition = QUOTE((alive _target) && (count (crew _target) == 0));
+ statement = QUOTE([ARR_2(_target,_player)] call FUNC(pickup));
+ showDisabled = 0;
+ exceptions[] = {};
+ priority = 5;
+ icon = QPATHTOF(UI\w_spottingscope_ca.paa);
+ };
+ };
+ };
+
+ class EventHandlers {
+ class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers_base {};
+ };
+
+ author = ECSTRING(common,ACETeam);
+ scope = 1;
+ side = 1;
+ typicalCargo[] = {"Soldier"};
+ displayName = CSTRING(DisplayName);
+ model = QPATHTOF(data\ace_spottingscope.p3d);
+ mapSize = 0.5;
+ transportSoldier = 0;
+ getInAction = "GetInLow";
+ getOutAction = "GetOutLow";
+ editorSubcategory = "EdSubcat_Turrets";
+
+ class Turrets: Turrets {
+ class MainTurret: MainTurret {
+ minTurn = -45;
+ maxTurn = 45;
+ initTurn = 0;
+ minElev = -10;
+ maxElev = 40;
+ initElev = 0;
+
+ class ViewGunner {
+ initAngleX = 5;
+ minAngleX = -30;
+ maxAngleX = 30;
+ initAngleY = 0;
+ minAngleY = -100;
+ maxAngleY = 100;
+ initFov = 0.75;
+ minFov = 0.25;
+ maxFov = 1.25;
+ };
+
+ class ViewOptics {
+ initAngleX = 0;
+ minAngleX = -30;
+ maxAngleX = 30;
+ initAngleY = 0;
+ minAngleY = -100;
+ maxAngleY = 100;
+ minFov = 0.0025;
+ maxFov = 0.05;
+ initFov= 0.05;
+ };
+
+ weapons[] = {};
+ magazines[] = {};
+ gunnerOpticsColor[] = {1,1,1,1};
+ gunnerOpticsModel = "\A3\Weapons_F\empty"; //QPATHTOF(data\m144_optic.p3d);
+ gunnerOpticsEffect[] = {"OpticsCHAbera1","OpticsBlur2"};
+ gunnerOutOpticsShowCursor = 0;
+ gunnerOpticsShowCursor = 0;
+ gunnerAction = "ACE_SpottingScope";
+ gunnerGetInAction = "GetInLow";
+ gunnerGetOutAction = "GetOutLow";
+ gunnerForceOptics = 0;
+ ejectDeadGunner = 0;
+ turretInfoType = QGVAR(RscUnitInfo);
+ opticsDisablePeripherialVision = 1;
+ };
+ };
+ };
+
+ class ACE_B_SpottingScope: ACE_SpottingScopeObject {
+ author = ECSTRING(common,ACETeam);
+ _generalMacro = "ACE_B_SpottingScope";
+ scope = 2;
+ side = 1;
+ faction = "BLU_F";
+ crew = "B_spotter_F";
+ };
+
+ class ACE_O_SpottingScope: ACE_SpottingScopeObject {
+ author = ECSTRING(common,ACETeam);
+ _generalMacro = "ACE_O_SpottingScope";
+ scope = 2;
+ side = 0;
+ faction = "OPF_F";
+ crew = "O_spotter_F";
+ };
+
+ class ACE_I_SpottingScope: ACE_SpottingScopeObject {
+ author = ECSTRING(common,ACETeam);
+ _generalMacro = "ACE_I_SpottingScope";
+ scope = 2;
+ side = 2;
+ faction = "IND_F";
+ crew = "I_spotter_F";
+ };
+
class Item_Base_F;
class ACE_Item_SpottingScope: Item_Base_F {
author[] = {"Rocko", "Scubaman3D"};
@@ -31,99 +167,7 @@ class CfgVehicles {
class Box_NATO_Support_F;
class ACE_Box_Misc: Box_NATO_Support_F {
class TransportItems {
- MACRO_ADDITEM(ACE_Item_SpottingScope,2);
- };
- };
-
- class LandVehicle;
- class StaticWeapon: LandVehicle {
- class Turrets;
- class ACE_Actions {
- class ACE_MainActions {};
- };
- };
- class StaticATWeapon: StaticWeapon {
- class Turrets: Turrets {
- class MainTurret;
- };
- class ACE_Actions: ACE_Actions{
- class ACE_MainActions: ACE_MainActions {};
- };
- };
- class ACE_SpottingScopeObject: StaticATWeapon {
- XEH_ENABLED;
- scope = 1;
- side = 1;
- typicalCargo[] = {"Soldier"};
- displayName = CSTRING(DisplayName);
- model = PATHTOF(data\ace_spottingscope.p3d);
- mapSize = 0.5;
- transportSoldier = 0;
- getInAction = "GetInLow";
- getOutAction = "GetOutLow";
- class Turrets: Turrets {
- class MainTurret: MainTurret {
- minTurn = -45;
- maxTurn = 45;
- initTurn = 0;
- minElev = -10;
- maxElev = 40;
- initElev = 0;
-
- weapons[] = {};
- magazines[] = {};
- gunnerOpticsColor[] = {1,1,1,1};
- gunnerOpticsmodel = PATHTOF(data\m144_optic.p3d);
- gunnerOpticsEffect[] = {"OpticsCHAbera1","OpticsBlur2"};
- gunnerOutOpticsShowCursor = 0;
- gunnerOpticsShowCursor = 0;
- gunnerAction = "ACE_SpottingScope";
- gunnerGetInAction = "GetInLow";
- gunnerGetOutAction = "GetOutLow";
- gunnerForceOptics = 0;
- ejectDeadGunner = 0;
- class ViewGunner {
- initAngleX = 5;
- minAngleX = -30;
- maxAngleX = 30;
- initAngleY = 0;
- minAngleY = -100;
- maxAngleY = 100;
- initFov = 0.75;
- minFov = 0.25;
- maxFov = 1.25;
- };
- class ViewOptics {
- initAngleX = 0;
- minAngleX = -30;
- maxAngleX = 30;
- initAngleY = 0;
- minAngleY = -100;
- maxAngleY = 100;
- minFov = 0.0025;
- maxFov = 0.05;
- initFov= 0.05;
- };
- };
- };
- EGVAR(dragging,canDrag) = 1;
- EGVAR(dragging,dragPosition[]) = {0,1,0};
- EGVAR(dragging,dragDirection) = 0;
- class ACE_Actions: ACE_Actions{
- class ACE_MainActions: ACE_MainActions {
- selection = "osaveze";
- class ACE_Pickup {
- selection = "";
- displayName = CSTRING(PickUp);
- distance = 5;
- condition = QUOTE((alive _target) && (count (crew _target) == 0));
- statement = QUOTE([ARR_2(_target,_player)] call FUNC(pickup));
- showDisabled = 0;
- exceptions[] = {};
- priority = 5;
- icon = PATHTOF(UI\w_spottingscope_ca.paa);
- };
- };
+ MACRO_ADDITEM(ACE_SpottingScope,2);
};
};
};
diff --git a/addons/spottingscope/CfgWeapons.hpp b/addons/spottingscope/CfgWeapons.hpp
index 9b5825572b..acdf7c910f 100644
--- a/addons/spottingscope/CfgWeapons.hpp
+++ b/addons/spottingscope/CfgWeapons.hpp
@@ -2,14 +2,14 @@
class CfgWeapons {
class ACE_ItemCore;
class InventoryItem_Base_F;
-
+
class ACE_SpottingScope: ACE_ItemCore {
scope = 2;
displayName = CSTRING(DisplayName);
descriptionShort = "";
- picture = PATHTOF(UI\w_spottingscope_ca.paa);
- model = PATHTOF(data\ace_spottingscope.p3d);
-
+ picture = QPATHTOF(UI\w_spottingscope_ca.paa);
+ model = QPATHTOF(data\ace_spottingscope.p3d);
+
class ItemInfo: InventoryItem_Base_F {
mass = 40;
};
diff --git a/addons/spottingscope/RscInGameUI.hpp b/addons/spottingscope/RscInGameUI.hpp
new file mode 100644
index 0000000000..bf4f086dd7
--- /dev/null
+++ b/addons/spottingscope/RscInGameUI.hpp
@@ -0,0 +1,56 @@
+
+class RscOpticsValue;
+class RscMapControl;
+class RscText;
+class RscPicture;
+
+class RscInGameUI {
+ class RscUnitInfo;
+ class GVAR(RscUnitInfo): RscUnitInfo {
+ onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); {((_this select 0) displayCtrl _x) ctrlShow false} forEach [ARR_4(IDC_RETICLE,IDC_BODY,IDC_BLACK_LEFT,IDC_BLACK_RIGHT)]);
+ controls[] = {"CA_FOVMode","ScriptedReticleHelper","trippleHeadLeft","trippleHeadRight","Reticle","Body"}; // don't change this order
+
+ class CA_FOVMode: RscOpticsValue { // idea by Taosenai. Apparently this can be used via isNil check to determine wheter the scope or the kolimator is used
+ idc = 154;
+ w = 0;
+ h = 0;
+ };
+
+ class ScriptedReticleHelper: RscMapControl {
+ onDraw = QUOTE(ctrlParent (_this select 0) call FUNC(animateReticle));
+ idc = -1;
+ w = 0;
+ h = 0;
+ };
+
+ class Reticle: RscPicture {
+ idc = IDC_RETICLE;
+ text = QPATHTOF(rsc\spotting_scope_reticle_co.paa);
+ x = POS_X;
+ y = POS_Y;
+ w = POS_W;
+ h = POS_H;
+ };
+
+ class Body: Reticle {
+ idc = IDC_BODY;
+ text = QPATHTOF(rsc\spotting_scope_body_co.paa);
+ };
+
+ //These are just black side panels to cover the areas that the optics p3d doesn't cover
+ //It will ONLY effect tripple head users as (safezoneX == safeZoneXAbs) for everyone else
+ class trippleHeadLeft: RscText {
+ idc = IDC_BLACK_LEFT;
+ x = "safeZoneXAbs";
+ Y = "safezoneY";
+ w = QUOTE(POS_X_BASE(SIZEX) - safeZoneXAbs);
+ h = "safeZoneH";
+ colorBackground[] = {0,0,0,1};
+ };
+
+ class trippleHeadRight: trippleHeadLeft {
+ idc = IDC_BLACK_RIGHT;
+ x = QUOTE(safeZoneXAbs + safeZoneWAbs - (POS_X_BASE(SIZEX) - safeZoneXABS));
+ };
+ };
+};
diff --git a/addons/spottingscope/XEH_PREP.hpp b/addons/spottingscope/XEH_PREP.hpp
new file mode 100644
index 0000000000..9839872360
--- /dev/null
+++ b/addons/spottingscope/XEH_PREP.hpp
@@ -0,0 +1,4 @@
+
+PREP(pickup);
+PREP(place);
+PREP(animateReticle);
diff --git a/addons/spottingscope/XEH_preInit.sqf b/addons/spottingscope/XEH_preInit.sqf
index 306884e595..a7feade1c3 100644
--- a/addons/spottingscope/XEH_preInit.sqf
+++ b/addons/spottingscope/XEH_preInit.sqf
@@ -2,7 +2,6 @@
ADDON = false;
-PREP(pickup);
-PREP(place);
+#include "XEH_PREP.hpp"
ADDON = true;
diff --git a/addons/spottingscope/XEH_preStart.sqf b/addons/spottingscope/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/spottingscope/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/spottingscope/config.cpp b/addons/spottingscope/config.cpp
index c3541eed39..3849382690 100644
--- a/addons/spottingscope/config.cpp
+++ b/addons/spottingscope/config.cpp
@@ -2,11 +2,14 @@
class CfgPatches {
class ADDON {
- units[] = {"ACE_Item_SpottingScope"};
+ name = CSTRING(component);
+ units[] = {"ACE_B_SpottingScope", "ACE_O_SpottingScope", "ACE_I_SpottingScope", "ACE_Item_SpottingScope"};
weapons[] = {"ACE_SpottingScope"};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_apl", "ace_interaction"};
- author[] = {"Rocko", "Scubaman3D", "Ruthberg", "commy2", "p1nga"};
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"Rocko", "Scubaman3D", "Ruthberg", "commy2", "p1nga"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
@@ -15,3 +18,5 @@ class CfgPatches {
#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"
#include "CfgMoves.hpp"
+
+#include "RscInGameUI.hpp"
diff --git a/addons/spottingscope/data/PSO_ring.paa b/addons/spottingscope/data/PSO_ring.paa
deleted file mode 100644
index e1502aa5e2..0000000000
Binary files a/addons/spottingscope/data/PSO_ring.paa and /dev/null differ
diff --git a/addons/spottingscope/data/ace_spottingscope.p3d b/addons/spottingscope/data/ace_spottingscope.p3d
index fc6bc45354..0afe9952cf 100644
Binary files a/addons/spottingscope/data/ace_spottingscope.p3d and b/addons/spottingscope/data/ace_spottingscope.p3d differ
diff --git a/addons/spottingscope/data/scopering.paa b/addons/spottingscope/data/scopering.paa
deleted file mode 100644
index ecf236b025..0000000000
Binary files a/addons/spottingscope/data/scopering.paa and /dev/null differ
diff --git a/addons/spottingscope/data/sniper_peri.rvmat b/addons/spottingscope/data/sniper_peri.rvmat
deleted file mode 100644
index 35069be267..0000000000
--- a/addons/spottingscope/data/sniper_peri.rvmat
+++ /dev/null
@@ -1,78 +0,0 @@
-ambient[] = {1.0, 1.0, 1.0, 1.0};
-diffuse[] = {1.0, 1.0, 1.0, 1.0};
-forcedDiffuse[] = {0.0, 0.0, 0.0, 0.0};
-emmisive[] = {0.0, 0.0, 0.0, 1.0};
-specular[] = {0.0, 0.0, 0.0, 0.0};
-specularPower = 0.0;
-PixelShaderID = "Super";
-VertexShaderID = "Super";
-class Stage1 {
- texture = "z\ace\addons\spottingscope\data\sniper_peri_nohq.paa";
- uvSource="tex";
- class uvTransform {
- aside[]={1,0,0};
- up[]={0,1,0};
- dir[]={0,0,0};
- pos[]={0,0,0};
- };
-};
-class Stage2 {
- texture = "z\ace\addons\apl\data\metal4_weapons_vehicles_int_512_dt.paa";
- uvSource = "tex";
- class uvTransform {
- aside[] = {6.0, 0.0, 0.0};
- up[] = {0.0, 6.0, 0.0};
- dir[] = {0.0, 0.0, 0.0};
- pos[] = {0.0, 0.0, 0.0};
- };
-};
-class Stage3 {
- texture = "#(argb,8,8,3)color(0,0,0,0)";
- uvSource = "tex";
- class uvTransform {
- aside[] = {1,0,0};
- up[] = {0,1,0};
- dir[] = {0,0,0};
- pos[] = {0,0,0};
- };
-};
-class Stage4 {
- texture = "#(argb,8,8,3)color(0,1,1,1)";
- uvSource = "tex";
- class uvTransform {
- aside[] = {1.0, 0.0, 0.0};
- up[] = {0.0, 1.0, 0.0};
- dir[] = {0.0, 0.0, 0.0};
- pos[] = {0.0, 0.0, 0.0};
- };
-};
-class Stage5 {
- texture = "z\ace\addons\spottingscope\data\sniper_peri_smdi.paa";
- uvSource="tex";
- class uvTransform {
- aside[]={1,0,0};
- up[]={0,1,0};
- dir[]={0,0,0};
- pos[]={0,0,0};
- };
-};
-class Stage6 {
- texture = "#(ai,32,128,1)fresnel(1.58,0.01)";
- uvSource = "tex";
- class uvTransform {
- aside[] = {1.0, 0.0, 0.0};
- up[] = {0.0, 1.0, 0.0};
- dir[] = {0.0, 0.0, 0.0};
- pos[] = {0.0, 0.0, 0.0};
- };
-};
-class Stage7 {
- texture = "a3\data_f\env_land_co.paa";
- uvSource = "tex";
- class uvTransform {
- aside[] = {1.0, 0.0, 0.0};
- up[] = {0.0, 1.0, 0.0};
- dir[] = {0.0, 0.0, 0.0};
- pos[] = {0.0, 0.0, 0.0};
- };
-};
diff --git a/addons/spottingscope/data/sniper_peri_co.paa b/addons/spottingscope/data/sniper_peri_co.paa
deleted file mode 100644
index 6466dc6d82..0000000000
Binary files a/addons/spottingscope/data/sniper_peri_co.paa and /dev/null differ
diff --git a/addons/spottingscope/data/sniper_peri_nohq.paa b/addons/spottingscope/data/sniper_peri_nohq.paa
deleted file mode 100644
index cc84eab64d..0000000000
Binary files a/addons/spottingscope/data/sniper_peri_nohq.paa and /dev/null differ
diff --git a/addons/spottingscope/data/sniper_peri_smdi.paa b/addons/spottingscope/data/sniper_peri_smdi.paa
deleted file mode 100644
index 4cb94ce7d1..0000000000
Binary files a/addons/spottingscope/data/sniper_peri_smdi.paa and /dev/null differ
diff --git a/addons/spottingscope/data/spot_scope.rvmat b/addons/spottingscope/data/spot_scope.rvmat
deleted file mode 100644
index 294d3a75b2..0000000000
--- a/addons/spottingscope/data/spot_scope.rvmat
+++ /dev/null
@@ -1,78 +0,0 @@
-ambient[] = {1.0, 1.0, 1.0, 1.0};
-diffuse[] = {1.0, 1.0, 1.0, 1.0};
-forcedDiffuse[] = {0.0, 0.0, 0.0, 0.0};
-emmisive[] = {0.0, 0.0, 0.0, 1.0};
-specular[] = {0.0, 0.0, 0.0, 0.0};
-specularPower = 0.0;
-PixelShaderID = "Super";
-VertexShaderID = "Super";
-class Stage1 {
- texture = "z\ace\addons\spottingscope\data\spot_scope_nohq.paa";
- uvSource="tex";
- class uvTransform {
- aside[]={1,0,0};
- up[]={0,1,0};
- dir[]={0,0,0};
- pos[]={0,0,0};
- };
-};
-class Stage2 {
- texture = "z\ace\addons\apl\data\plastic_512_dt.paa";
- uvSource = "tex";
- class uvTransform {
- aside[] = {6.0, 0.0, 0.0};
- up[] = {0.0, 6.0, 0.0};
- dir[] = {0.0, 0.0, 0.0};
- pos[] = {0.0, 0.0, 0.0};
- };
-};
-class Stage3 {
- texture = "#(argb,8,8,3)color(0,0,0,0)";
- uvSource = "tex";
- class uvTransform {
- aside[] = {1,0,0};
- up[] = {0,1,0};
- dir[] = {0,0,0};
- pos[] = {0,0,0};
- };
-};
-class Stage4 {
- texture = "#(argb,8,8,3)color(0,1,1,1)";
- uvSource = "tex";
- class uvTransform {
- aside[] = {1.0, 0.0, 0.0};
- up[] = {0.0, 1.0, 0.0};
- dir[] = {0.0, 0.0, 0.0};
- pos[] = {0.0, 0.0, 0.0};
- };
-};
-class Stage5 {
- texture = "z\ace\addons\spottingscope\data\spot_scope_smdi.paa";
- uvSource="tex";
- class uvTransform {
- aside[]={1,0,0};
- up[]={0,1,0};
- dir[]={0,0,0};
- pos[]={0,0,0};
- };
-};
-class Stage6 {
- texture = "#(ai,32,128,1)fresnel(1.58,0.01)";
- uvSource = "tex";
- class uvTransform {
- aside[] = {1.0, 0.0, 0.0};
- up[] = {0.0, 1.0, 0.0};
- dir[] = {0.0, 0.0, 0.0};
- pos[] = {0.0, 0.0, 0.0};
- };
-};
-class Stage7 {
- texture = "a3\data_f\env_land_co.paa";
- uvSource = "tex";
- class uvTransform {
- aside[] = {1.0, 0.0, 0.0};
- up[] = {0.0, 1.0, 0.0};
- dir[] = {0.0, 0.0, 0.0};
- pos[] = {0.0, 0.0, 0.0};
- };
-};
diff --git a/addons/spottingscope/data/spot_scope_co.paa b/addons/spottingscope/data/spot_scope_co.paa
deleted file mode 100644
index c0168053a3..0000000000
Binary files a/addons/spottingscope/data/spot_scope_co.paa and /dev/null differ
diff --git a/addons/spottingscope/data/spot_scope_nohq.paa b/addons/spottingscope/data/spot_scope_nohq.paa
deleted file mode 100644
index 674ad1d0ec..0000000000
Binary files a/addons/spottingscope/data/spot_scope_nohq.paa and /dev/null differ
diff --git a/addons/spottingscope/data/spot_scope_smdi.paa b/addons/spottingscope/data/spot_scope_smdi.paa
deleted file mode 100644
index b6e2d763fe..0000000000
Binary files a/addons/spottingscope/data/spot_scope_smdi.paa and /dev/null differ
diff --git a/addons/spottingscope/data/spot_scope_tripod.rvmat b/addons/spottingscope/data/spot_scope_tripod.rvmat
deleted file mode 100644
index 0403471e5a..0000000000
--- a/addons/spottingscope/data/spot_scope_tripod.rvmat
+++ /dev/null
@@ -1,79 +0,0 @@
-ambient[] = {1.0, 1.0, 1.0, 1.0};
-diffuse[] = {1.0, 1.0, 1.0, 1.0};
-forcedDiffuse[] = {0.0, 0.0, 0.0, 0.0};
-emmisive[] = {0.0, 0.0, 0.0, 1.0};
-specular[] = {0.0, 0.0, 0.0, 0.0};
-specularPower = 0.0;
-PixelShaderID = "Super";
-VertexShaderID = "Super";
-class Stage1 {
- texture = "z\ace\addons\spottingscope\data\spot_scope_nohq.paa";
- uvSource="tex";
- class uvTransform {
- aside[]={1,0,0};
- up[]={0,1,0};
- dir[]={0,0,0};
- pos[]={0,0,0};
- };
-};
-class Stage2 {
- texture = "z\ace\addons\apl\data\metal4_weapons_vehicles_int_512_dt.paa";
- uvSource = "tex";
- class uvTransform {
- aside[] = {6.0, 0.0, 0.0};
- up[] = {0.0, 6.0, 0.0};
- dir[] = {0.0, 0.0, 0.0};
- pos[] = {0.0, 0.0, 0.0};
- };
-};
-class Stage3 {
- texture = "#(argb,8,8,3)color(0,0,0,0)";
- uvSource = "tex";
- class uvTransform {
- aside[] = {1,0,0};
- up[] = {0,1,0};
- dir[] = {0,0,0};
- pos[] = {0,0,0};
- };
-};
-class Stage4 {
- texture = "#(argb,8,8,3)color(0,1,1,1)";
- uvSource = "tex";
- class uvTransform {
- aside[] = {1.0, 0.0, 0.0};
- up[] = {0.0, 1.0, 0.0};
- dir[] = {0.0, 0.0, 0.0};
- pos[] = {0.0, 0.0, 0.0};
- };
-};
-class Stage5 {
- texture = "z\ace\addons\spottingscope\data\spot_scope_smdi.paa";
- uvSource="tex";
- class uvTransform {
- aside[]={1,0,0};
- up[]={0,1,0};
- dir[]={0,0,0};
- pos[]={0,0,0};
- };
-};
-class Stage6 {
- texture = "#(ai,32,128,1)fresnel(1.58,0.01)";
- uvSource = "tex";
- class uvTransform {
- aside[] = {1.0, 0.0, 0.0};
- up[] = {0.0, 1.0, 0.0};
- dir[] = {0.0, 0.0, 0.0};
- pos[] = {0.0, 0.0, 0.0};
- };
-};
-
-class Stage7 {
- texture = "a3\data_f\env_land_co.paa";
- uvSource = "tex";
- class uvTransform {
- aside[] = {1.0, 0.0, 0.0};
- up[] = {0.0, 1.0, 0.0};
- dir[] = {0.0, 0.0, 0.0};
- pos[] = {0.0, 0.0, 0.0};
- };
-};
diff --git a/addons/spottingscope/data/spottingscope.p3d b/addons/spottingscope/data/spottingscope.p3d
deleted file mode 100644
index fba9d66b91..0000000000
Binary files a/addons/spottingscope/data/spottingscope.p3d and /dev/null differ
diff --git a/addons/spottingscope/functions/fnc_animateReticle.sqf b/addons/spottingscope/functions/fnc_animateReticle.sqf
new file mode 100644
index 0000000000..109d81a2b9
--- /dev/null
+++ b/addons/spottingscope/functions/fnc_animateReticle.sqf
@@ -0,0 +1,44 @@
+/*
+ * Author: commy2
+ * Animate scripted reticle of spotting scope.
+ *
+ * Arguments:
+ * 0: Reticles RSC info display
+ *
+ * Return value:
+ * None
+ *
+ * Public: No
+ */
+#include "script_component.hpp"
+
+disableSerialization;
+
+params ["_display"];
+uinamespace setVariable [QGVAR(dlgSpottingScope), _display];
+
+private _ctrlReticle = _display displayCtrl IDC_RETICLE;
+private _ctrlBody = _display displayCtrl IDC_BODY;
+private _ctrlBlackLeft = _display displayCtrl IDC_BLACK_LEFT;
+private _ctrlBlackRight = _display displayCtrl IDC_BLACK_RIGHT;
+
+// check if optics are used
+// hide all controls otherwise
+private _isUsingOptic = ctrlShown (_display displayCtrl 154);
+
+_ctrlReticle ctrlShow _isUsingOptic;
+_ctrlBody ctrlShow _isUsingOptic;
+_ctrlBlackLeft ctrlShow _isUsingOptic;
+_ctrlBlackRight ctrlShow _isUsingOptic;
+
+// animate reticle
+private _zoom = ([] call EFUNC(common,getZoom)) * MAGIC_SCOPE_NUMBER;
+
+_ctrlReticle ctrlSetPosition [
+ POS_X_BASE(_zoom),
+ POS_Y_BASE(_zoom),
+ POS_W_BASE(_zoom),
+ POS_H_BASE(_zoom)
+];
+
+_ctrlReticle ctrlCommit 0;
diff --git a/addons/spottingscope/functions/fnc_pickup.sqf b/addons/spottingscope/functions/fnc_pickup.sqf
index 81c9bc10a5..cdcc78bea3 100644
--- a/addons/spottingscope/functions/fnc_pickup.sqf
+++ b/addons/spottingscope/functions/fnc_pickup.sqf
@@ -27,4 +27,4 @@ if ((_unit call CBA_fnc_getUnitAnim) select 0 == "stand") then {
[_unit, "ACE_SpottingScope"] call EFUNC(common,addToInventory);
deleteVehicle _spottingScope;
-}, [_spottingScope, _unit], 1, 0]call EFUNC(common,waitAndExecute);
+}, [_spottingScope, _unit], 1, 0]call CBA_fnc_waitAndExecute;
diff --git a/addons/spottingscope/functions/fnc_place.sqf b/addons/spottingscope/functions/fnc_place.sqf
index 09f756c109..21560f948f 100644
--- a/addons/spottingscope/functions/fnc_place.sqf
+++ b/addons/spottingscope/functions/fnc_place.sqf
@@ -38,4 +38,4 @@ if ((_unit call CBA_fnc_getUnitAnim) select 0 == "stand") then {
_spottingScope setVectorUp (surfaceNormal (position _spottingScope));
};
_unit reveal _spottingScope;
-}, [_unit], 1, 0] call EFUNC(common,waitAndExecute);
+}, [_unit], 1, 0] call CBA_fnc_waitAndExecute;
diff --git a/addons/spottingscope/rsc/spotting_scope_body_co.paa b/addons/spottingscope/rsc/spotting_scope_body_co.paa
new file mode 100644
index 0000000000..71e1984c6e
Binary files /dev/null and b/addons/spottingscope/rsc/spotting_scope_body_co.paa differ
diff --git a/addons/spottingscope/rsc/spotting_scope_reticle_co.paa b/addons/spottingscope/rsc/spotting_scope_reticle_co.paa
new file mode 100644
index 0000000000..a2d299d937
Binary files /dev/null and b/addons/spottingscope/rsc/spotting_scope_reticle_co.paa differ
diff --git a/addons/spottingscope/script_component.hpp b/addons/spottingscope/script_component.hpp
index 48f14b7398..0a730e13d6 100644
--- a/addons/spottingscope/script_component.hpp
+++ b/addons/spottingscope/script_component.hpp
@@ -15,3 +15,23 @@
#endif
#include "\z\ace\addons\main\script_macros.hpp"
+
+#define IDC_RETICLE 10000
+#define IDC_BODY 10001
+#define IDC_BLACK_LEFT 10002
+#define IDC_BLACK_RIGHT 10003
+
+#define MAGIC_SCOPE_NUMBER 0.0235
+//#define MAGIC_SCOPE_NUMBER (uiNamespace getVariable ['magic', 1])
+
+#define POS_X_BASE(size) safezoneX + 0.5 * safezoneW - 0.5 * (size) / (getResolution select 5)
+#define POS_Y_BASE(size) safezoneY + 0.5 * safezoneH - 0.5 * (size) / (getResolution select 5) * 4/3
+#define POS_W_BASE(size) (size) / (getResolution select 5)
+#define POS_H_BASE(size) (size) / (getResolution select 5) * 4/3
+
+#define SIZEX 1.05
+
+#define POS_X QUOTE(POS_X_BASE(SIZEX))
+#define POS_Y QUOTE(POS_Y_BASE(SIZEX))
+#define POS_W QUOTE(POS_W_BASE(SIZEX))
+#define POS_H QUOTE(POS_H_BASE(SIZEX))
diff --git a/addons/spottingscope/stringtable.xml b/addons/spottingscope/stringtable.xml
index 3a0b89b857..3df7c05ec5 100644
--- a/addons/spottingscope/stringtable.xml
+++ b/addons/spottingscope/stringtable.xml
@@ -1,6 +1,18 @@
+
+ Advanced Combat Environment 3 - Spotting Scope
+ Advanced Combat Environment 3 - Teleskop
+ Advanced Combat Environment 3 - Зрительная труба
+ Advanced Combat Environment 3 - Teleskop
+ Advanced Combat Environment 3 - Telescopio
+ Advanced Combat Environment 3 - Téléscope de visée
+ Advanced Combat Environment 3 - Zaměřovací dalekohled
+ Advanced Combat Environment 3 - Spotting Scope
+ Advanced Combat Environment 3 - Megfigyelő távcső
+ Advanced Combat Environment 3 - Luneta de observador
+
Spotting Scope
Teleskop
diff --git a/addons/switchunits/ACE_Settings.hpp b/addons/switchunits/ACE_Settings.hpp
index 06c1ff274c..e3fc653cb2 100644
--- a/addons/switchunits/ACE_Settings.hpp
+++ b/addons/switchunits/ACE_Settings.hpp
@@ -1,29 +1,41 @@
class ACE_Settings {
- class GVAR(EnableSwitchUnits) {
+ class GVAR(enableSwitchUnits) {
value = 0;
typeName = "BOOL";
};
- class GVAR(SwitchToWest) {
+ class GVAR(switchToWest) {
+ displayName = CSTRING(SwitchToWest_DisplayName);
+ description = CSTRING(SwitchToWest_Description);
value = 0;
typeName = "BOOL";
};
- class GVAR(SwitchToEast) {
+ class GVAR(switchToEast) {
+ displayName = CSTRING(SwitchToEast_DisplayName);
+ description = CSTRING(SwitchToEast_Description);
value = 0;
typeName = "BOOL";
};
- class GVAR(SwitchToIndependent) {
+ class GVAR(switchToIndependent) {
+ displayName = CSTRING(SwitchToIndependent_DisplayName);
+ description = CSTRING(SwitchToIndependent_Description);
value = 0;
typeName = "BOOL";
};
- class GVAR(SwitchToCivilian) {
+ class GVAR(switchToCivilian) {
+ displayName = CSTRING(SwitchToCivilian_DisplayName);
+ description = CSTRING(SwitchToCivilian_Description);
value = 0;
typeName = "BOOL";
};
- class GVAR(EnableSafeZone) {
+ class GVAR(enableSafeZone) {
+ displayName = CSTRING(EnableSafeZone_DisplayName);
+ description = CSTRING(EnableSafeZone_Description);
value = 1;
typeName = "BOOL";
};
- class GVAR(SafeZoneRadius) {
+ class GVAR(safeZoneRadius) {
+ displayName = CSTRING(SafeZoneRadius_DisplayName);
+ description = CSTRING(SafeZoneRadius_Description);
value = 100;
typeName = "SCALAR";
};
diff --git a/addons/switchunits/CfgEventHandlers.hpp b/addons/switchunits/CfgEventHandlers.hpp
index 44b6e8e6ff..5da5fd0dc2 100644
--- a/addons/switchunits/CfgEventHandlers.hpp
+++ b/addons/switchunits/CfgEventHandlers.hpp
@@ -1,3 +1,10 @@
+
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE( call COMPILE_FILE(XEH_preInit) );
diff --git a/addons/switchunits/CfgVehicles.hpp b/addons/switchunits/CfgVehicles.hpp
index f0549cb00e..1e12cc03d6 100644
--- a/addons/switchunits/CfgVehicles.hpp
+++ b/addons/switchunits/CfgVehicles.hpp
@@ -7,7 +7,7 @@ class CfgVehicles {
function = FUNC(module);
scope = 2;
isGlobal = 1;
- icon = QUOTE(PATHTOF(UI\Icon_Module_SwitchUnits_ca.paa));
+ icon = QPATHTOF(UI\Icon_Module_SwitchUnits_ca.paa);
class Arguments {
class SwitchToWest {
displayName = CSTRING(SwitchToWest_DisplayName);
diff --git a/addons/switchunits/XEH_PREP.hpp b/addons/switchunits/XEH_PREP.hpp
new file mode 100644
index 0000000000..d9151223c0
--- /dev/null
+++ b/addons/switchunits/XEH_PREP.hpp
@@ -0,0 +1,11 @@
+
+PREP(addMapFunction);
+PREP(handleMapClick);
+PREP(initPlayer);
+PREP(isValidAi);
+PREP(markAiOnMap);
+PREP(module);
+PREP(nearestPlayers);
+PREP(startSwitchUnits);
+PREP(switchBack);
+PREP(switchUnit);
diff --git a/addons/switchunits/XEH_postInit.sqf b/addons/switchunits/XEH_postInit.sqf
index 5928804d7b..dc143bc6ac 100644
--- a/addons/switchunits/XEH_postInit.sqf
+++ b/addons/switchunits/XEH_postInit.sqf
@@ -20,10 +20,18 @@
if (missionNamespace getVariable [QGVAR(EnableSwitchUnits), false]) then {
[player] call FUNC(startSwitchUnits);
} else {
- ["SettingChanged", {
+ ["ace_settingChanged", {
PARAMS_2(_name,_value);
if ((_name == QGVAR(EnableSwitchUnits)) && {_value}) then {
[player] call FUNC(startSwitchUnits);
};
- }] call EFUNC(common,addEventhandler);
+ }] call CBA_fnc_addEventHandler;
+};
+
+if (isServer) then {
+ [QGVAR(switchLocality), {
+ params ["_unit", "_player"];
+ _unit setVariable [QGVAR(OriginalOwner), owner _unit, true];
+ _unit setOwner (owner _player);
+ }] call CBA_fnc_addEventHandler;
};
diff --git a/addons/switchunits/XEH_preInit.sqf b/addons/switchunits/XEH_preInit.sqf
index c120608357..a7feade1c3 100644
--- a/addons/switchunits/XEH_preInit.sqf
+++ b/addons/switchunits/XEH_preInit.sqf
@@ -2,15 +2,6 @@
ADDON = false;
-PREP(addMapFunction);
-PREP(handleMapClick);
-PREP(initPlayer);
-PREP(isValidAi);
-PREP(markAiOnMap);
-PREP(module);
-PREP(nearestPlayers);
-PREP(startSwitchUnits);
-PREP(switchBack);
-PREP(switchUnit);
+#include "XEH_PREP.hpp"
ADDON = true;
diff --git a/addons/switchunits/XEH_preStart.sqf b/addons/switchunits/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/switchunits/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/switchunits/config.cpp b/addons/switchunits/config.cpp
index 22a4924709..1bdec70729 100644
--- a/addons/switchunits/config.cpp
+++ b/addons/switchunits/config.cpp
@@ -6,8 +6,9 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
- author[] = {"bux578"};
- authorUrl = "https://github.com/bux578/";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"bux578"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
diff --git a/addons/switchunits/functions/fnc_markAiOnMap.sqf b/addons/switchunits/functions/fnc_markAiOnMap.sqf
index d29e75b6a4..5d7eac6f1a 100644
--- a/addons/switchunits/functions/fnc_markAiOnMap.sqf
+++ b/addons/switchunits/functions/fnc_markAiOnMap.sqf
@@ -37,7 +37,7 @@ GVAR(AllMarkerNames) = [];
// create markers
{
if (([_x] call FUNC(isValidAi) && (side group _x in _sides)) || (_x getVariable [QGVAR(IsPlayerControlled), false])) then {
-
+
private _markerName = str _x;
private _marker = createMarkerLocal [_markerName, position _x];
diff --git a/addons/switchunits/functions/fnc_switchUnit.sqf b/addons/switchunits/functions/fnc_switchUnit.sqf
index a26b2d474a..84b766de4d 100644
--- a/addons/switchunits/functions/fnc_switchUnit.sqf
+++ b/addons/switchunits/functions/fnc_switchUnit.sqf
@@ -40,14 +40,7 @@ if (_leave) exitWith {
// should switch locality
// This doesn't work anymore, because one's now able to switch to units from a different side
//[_unit] joinSilent group player;
-[
- [_unit, player],
- QUOTE({
- (_this select 0) setVariable [ARR_3(QUOTE(QGVAR(OriginalOwner)), owner (_this select 0), true)];
- (_this select 0) setOwner owner (_this select 1)
- }),
- 1
-] call EFUNC(common,execRemoteFnc);
+[QGVAR(switchLocality), [_unit, player]] call CBA_fnc_serverEvent;
[{
params ["_args", "_pfhId"];
@@ -79,12 +72,7 @@ if (_leave) exitWith {
// set owner back to original owner
private _oldOwner = _oldUnit getVariable[QGVAR(OriginalOwner), -1];
if (_oldOwner > -1) then {
- [
- [_oldUnit, _oldOwner],
- QUOTE({
- (_this select 0) setOwner (_this select 1)
- }), 1
- ] call EFUNC(common,execRemoteFnc);
+ ["ace_setOwner", [_oldUnit, _oldOwner]] call CBA_fnc_serverEvent;
};
[localize LSTRING(SwitchedUnit)] call EFUNC(common,displayTextStructured);
diff --git a/addons/switchunits/stringtable.xml b/addons/switchunits/stringtable.xml
index 8403c5c726..b1635cfae6 100644
--- a/addons/switchunits/stringtable.xml
+++ b/addons/switchunits/stringtable.xml
@@ -17,6 +17,11 @@
Trying to switch
Versuche zu Wechseln
Snažím se přehodit
+ Próba zmiany
+ Sto provando a cambiare
+ Intentando cambiar
+ Essaye de basculer
+ Tentando trocar
This unit is too close to the enemy.
@@ -34,12 +39,13 @@
SwitchUnits System
System zmiany stron
Sistema de cambio de unidad
- Einheiten-Switch-System?
+ Einheiten-Wechsel-System
Systém výměny stran
Sistema de troca de unidades
Système de changement d'unité
Egységváltó-rendszer
Переключение между юнитами
+ Sistema Cambio Unità
Switch to West?
@@ -51,6 +57,7 @@
Changer en OUEST?
Átváltás BLUFOR-ra?
На синих?
+ Cambia per BLUFOR?
Allow switching to west units?
@@ -62,6 +69,7 @@
Permettre le changement en unité OUEST?
Nyugat-fakciós egységekre való váltás engedélyezése?
Разрешить переключаться на синих юнитов?
+ Consenti passaggio ad unità BLUFOR?
Switch to East?
@@ -73,6 +81,7 @@
Changer en EST?
Átváltás OPFOR-ra?
На красных?
+ Cambia per OPFOR?
Allow switching to east units?
@@ -84,6 +93,7 @@
Permettre le changement en unité EST?
Kelet-fakciós egységekre való váltás engedélyezése?
Разрешить переключаться на красных юнитов?
+ Consenti passaggio ad unità OPFOR?
Switch to Independent?
@@ -95,6 +105,7 @@
Changer en INDE?
Átváltás INDFOR-ra?
На независимых?
+ Cambia per INDFOR?
Allow switching to independent units?
@@ -106,6 +117,7 @@
Permettre le changement en unité INDE?
Független egységekre való váltás engedélyezése?
Разрешить переключаться на независимых юнитов?
+ Consenti passaggio ad unità INDFOR?
Switch to Civilian?
@@ -117,6 +129,7 @@
Changer en CIV?
Átváltás civilre?
На гражданских?
+ Cambia per Civili?
Allow switching to civilian units?
@@ -128,6 +141,7 @@
Permettre le changement en unité CIV?
Civil egységekre való váltás engedélyezése?
Разрешить переключаться на гражданских юнитов?
+ Consenti passaggio ad unità civili?
Enable Safe Zone?
@@ -139,6 +153,7 @@
Activer la zone sécurisée?
Biztonságos zóna engedélyezése?
Безопасная зона
+ Abilita Zona Sicura?
Enable a safe zone around enemy units? Players can't switch to units inside of the safe zone.
@@ -147,9 +162,10 @@
Aktiviere eine Sicherheitszone um feindliche Einheiten? Spieler können nicht zu Einheiten in der Sicherheitszone wechseln.
Povolit bezpečnou zónu kolem nepřátelských jednotek? Hráči se nemohou změnit strany/jednotky uvnitř bezpečné zóny.
Habilitar uma zona segur ao redor das unidades inimigas? Jogadores não conseguirão trocar para unidades dentro dessa zona segura.
- Activer une zone sécurisée autour des enemis? Les joueurs ne peuvent changer d'unité dand la zone sécurisée
+ Activer une zone sécurisée autour des enemis ? Les joueurs ne peuvent changer d'unité dand la zone sécurisée
Engedélyezve legyen-e egy biztonságos zóna az ellenségek körül? A játékosok nem tudnak a biztonságos zónán belüli egységekre váltani.
Включить безопасную зону вокруг вражеских юнитов? Игроки не могут переключаться на юнитов, находящихся в безопасной зоне.
+ Abilita una zona sicura attorno ad unità nemiche? I giocatori non possono cambiare ad unità dentro la zona sicura.
Safe Zone Radius
@@ -161,6 +177,7 @@
Rayon de la zone sécurisée
Biztonságos zóna hatóköre
Радиус безопасной зоны
+ Raggio Zona Sicura
The safe zone around players from a different team. Default: 200
@@ -172,14 +189,18 @@
Rayon de la zone sécurisée autour de joueurs d'équipe différentes. Défaut: 200
A biztonságos zóna más csapatból lévő játékosok körül. Alapértelmezett: 200
Радиус безопасной зоны вокруг ироков из противоположной команды. По-умолчанию: 200
+ La zona sicura attorno ai giocatori di un team diverso. Default: 200
Module allows you to switch side during the game.
+ Dieses Modul gestattet, die Fraktion während des Spiels zu wechseln
Moduł ten pozwala na zmianę strony w trakcie gry.
Tento modul umožňuje přepínání mazi dostupnými stranami.
Este módulo permite mudar o lado à disposição dos jogadores.
Этот модуль позволяет игрокам переключаться между доступными юнитами.
Ce module permet le changement de faction des joueurs
+ Questo modulo ti permette di cambiare lato durante la partita.
+ El módulo permite a las unidades cambiar de bando durante el juego.
-
\ No newline at end of file
+
diff --git a/addons/tacticalladder/CfgEventHandlers.hpp b/addons/tacticalladder/CfgEventHandlers.hpp
index f9ceb35aa5..cb09874dab 100644
--- a/addons/tacticalladder/CfgEventHandlers.hpp
+++ b/addons/tacticalladder/CfgEventHandlers.hpp
@@ -1,4 +1,10 @@
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE( call COMPILE_FILE(XEH_preInit) );
@@ -18,3 +24,9 @@ class Extended_Killed_EventHandlers {
};
};
};
+
+class Extended_DisplayLoad_EventHandlers {
+ class RscDisplayMission {
+ ADDON = QUOTE(_this call COMPILE_FILE(XEH_missionDisplayLoad));
+ };
+};
diff --git a/addons/tacticalladder/CfgVehicles.hpp b/addons/tacticalladder/CfgVehicles.hpp
index 1457c4ddee..564a034614 100644
--- a/addons/tacticalladder/CfgVehicles.hpp
+++ b/addons/tacticalladder/CfgVehicles.hpp
@@ -1,15 +1,19 @@
+class CBA_Extended_EventHandlers;
+
class CfgVehicles {
class Man;
class CAManBase: Man {
class ACE_SelfActions {
- class ACE_TacticalLadders {
- displayName = CSTRING(Deploy);
- condition = QUOTE(backpack _player == 'ACE_TacticalLadder_Pack');
- statement = QUOTE([_player] call FUNC(deployTL));
- exceptions[] = {};
- showDisabled = 1;
- priority = 4;
+ class ACE_Equipment {
+ class ACE_TacticalLadders {
+ displayName = CSTRING(Deploy);
+ condition = QUOTE(backpack _player == 'ACE_TacticalLadder_Pack');
+ statement = QUOTE([_player] call FUNC(deployTL));
+ exceptions[] = {};
+ showDisabled = 1;
+ priority = 4;
+ };
};
};
};
@@ -19,8 +23,8 @@ class CfgVehicles {
scope = 2;
displayName = CSTRING(DisplayName);
descriptionShort = "";
- model = PATHTOF(data\ace_tacticalladder_pack.p3d);
- picture = PATHTOF(UI\ace_tactical_ladder_pack_ca.paa);
+ model = QPATHTOF(data\ace_tacticalladder_pack.p3d);
+ picture = QPATHTOF(UI\ace_tactical_ladder_pack_ca.paa);
maximumLoad = 0;
mass = 50;
};
@@ -34,10 +38,13 @@ class CfgVehicles {
class House;
class ACE_TacticalLadder: House {
- XEH_ENABLED;
+ class EventHandlers {
+ class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
+ };
+
displayName = CSTRING(DisplayName);
class DestructionEffects {};
- model = PATHTOF(data\ace_tacticalladder.p3d);
+ model = QPATHTOF(data\ace_tacticalladder.p3d);
animated = 1;
autocenter = 0;
featureSize = 12;
@@ -68,7 +75,7 @@ class CfgVehicles {
class ACE_MainActions {
selection = "roadway";
distance = 5;
- condition = "true";
+ condition = QUOTE(_target call FUNC(isLadderEmpty));
class ACE_PickUp {
selection = "";
@@ -87,7 +94,7 @@ class CfgVehicles {
distance = 4;
condition = "true";
//wait a frame to handle "Do When releasing action menu key" option:
- statement = QUOTE([ARR_2({_this call FUNC(positionTL)},[ARR_2(_player,_target)])] call EFUNC(common,execNextFrame));
+ statement = QUOTE([ARR_2({_this call FUNC(positionTL)},[ARR_2(_player,_target)])] call CBA_fnc_execNextFrame);
showDisabled = 0;
exceptions[] = {};
priority = 5;
diff --git a/addons/tacticalladder/XEH_PREP.hpp b/addons/tacticalladder/XEH_PREP.hpp
new file mode 100644
index 0000000000..691e318a02
--- /dev/null
+++ b/addons/tacticalladder/XEH_PREP.hpp
@@ -0,0 +1,12 @@
+
+PREP(cancelTLdeploy);
+PREP(confirmTLdeploy);
+PREP(deployTL);
+PREP(handleKilled);
+PREP(handleInteractMenuOpened);
+PREP(handlePlayerChanged);
+PREP(handleScrollWheel);
+PREP(handleUnconscious);
+PREP(isLadderEmpty);
+PREP(pickupTL);
+PREP(positionTL);
diff --git a/addons/tacticalladder/XEH_missionDisplayLoad.sqf b/addons/tacticalladder/XEH_missionDisplayLoad.sqf
new file mode 100644
index 0000000000..05419598b9
--- /dev/null
+++ b/addons/tacticalladder/XEH_missionDisplayLoad.sqf
@@ -0,0 +1,6 @@
+#include "script_component.hpp"
+
+params ["_display"];
+
+_display displayAddEventHandler ["MouseZChanged", {(_this select 1) call FUNC(handleScrollWheel)}];
+_display displayAddEventHandler ["MouseButtonDown", {[ACE_player, _this select 1] call FUNC(cancelTLdeploy)}];
diff --git a/addons/tacticalladder/XEH_postInit.sqf b/addons/tacticalladder/XEH_postInit.sqf
index 8ebf776987..723c5b1421 100644
--- a/addons/tacticalladder/XEH_postInit.sqf
+++ b/addons/tacticalladder/XEH_postInit.sqf
@@ -7,22 +7,20 @@ GVAR(cancelTime) = 0;
GVAR(currentStep) = 3;
GVAR(currentAngle) = 0;
-/*["interactMenuOpened", {
- if ((ACE_time > GVAR(cancelTime)) && !isNull GVAR(ladder)) then {
+/*["ace_interactMenuOpened", {
+ if ((CBA_missionTime > GVAR(cancelTime)) && !isNull GVAR(ladder)) then {
GVAR(ladder) call FUNC(cancelTLdeploy);
};
-}] call EFUNC(common,addEventHandler);*/
+}] call CBA_fnc_addEventHandler;*/
// Cancel adjustment if interact menu opens
-["interactMenuOpened", {[ACE_player] call FUNC(handleInteractMenuOpened)}] call EFUNC(common,addEventHandler);
-
-[{_this call FUNC(handleScrollWheel)}] call EFUNC(common,addScrollWheelEventHandler);
+["ace_interactMenuOpened", {[ACE_player] call FUNC(handleInteractMenuOpened)}] call CBA_fnc_addEventHandler;
// Cancel adjusting on player change.
-["playerChanged", {_this call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler);
-["playerVehicleChanged", {[ACE_player, objNull] call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler);
+["ace_playerChanged", {_this call FUNC(handlePlayerChanged)}] call CBA_fnc_addEventHandler;
+["ace_playerVehicleChanged", {[ACE_player, objNull] call FUNC(handlePlayerChanged)}] call CBA_fnc_addEventHandler;
// handle falling unconscious
-["medical_onUnconscious", {_this call FUNC(handleUnconscious)}] call EFUNC(common,addEventhandler);
+["ace_unconscious", {_this call FUNC(handleUnconscious)}] call CBA_fnc_addEventHandler;
// @todo captivity?
diff --git a/addons/tacticalladder/XEH_preInit.sqf b/addons/tacticalladder/XEH_preInit.sqf
index cb1d3a8cf3..a7feade1c3 100644
--- a/addons/tacticalladder/XEH_preInit.sqf
+++ b/addons/tacticalladder/XEH_preInit.sqf
@@ -2,15 +2,6 @@
ADDON = false;
-PREP(cancelTLdeploy);
-PREP(confirmTLdeploy);
-PREP(deployTL);
-PREP(handleKilled);
-PREP(handleInteractMenuOpened);
-PREP(handlePlayerChanged);
-PREP(handleScrollWheel);
-PREP(handleUnconscious);
-PREP(pickupTL);
-PREP(positionTL);
+#include "XEH_PREP.hpp"
ADDON = true;
diff --git a/addons/tacticalladder/XEH_preStart.sqf b/addons/tacticalladder/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/tacticalladder/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/tacticalladder/config.cpp b/addons/tacticalladder/config.cpp
index 02740639fe..53ce7384f6 100644
--- a/addons/tacticalladder/config.cpp
+++ b/addons/tacticalladder/config.cpp
@@ -6,10 +6,16 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_apl", "ace_interaction"};
- author[] = {"Rocko", "Ruthberg"};
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"Rocko", "Ruthberg"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
#include "CfgEventHandlers.hpp"
#include "CfgVehicles.hpp"
+
+class ACE_newEvents {
+ interactMenuOpened = "ace_interactMenuOpened";
+};
diff --git a/addons/tacticalladder/data/model.cfg b/addons/tacticalladder/data/model.cfg
index ba19d58c65..bc7da07960 100644
--- a/addons/tacticalladder/data/model.cfg
+++ b/addons/tacticalladder/data/model.cfg
@@ -35,76 +35,51 @@ class CfgSkeletons {
"Camera","Pelvis",
"weapon","Spine1",
"launcher","Spine1",
- //Head skeleton in hierarchy
+
+ // Head skeleton in hierarchy
"neck","Spine3",
- "neck1","neck",
- "head","neck1",
- "HeadCutScene","head",
- "jaw","head",
- "chin","head",
- "jaw_rf","head",
- "jaw_rm","head",
- "jaw_rs","head",
- "jaw_lf","head",
- "jaw_lm","head",
- "jaw_ls","head",
- "ear_r","head",
- "ear_l","head",
- "lip_lc","head",
- "lip_lwlb","head",
- "lip_lwlf","head",
- "lip_lwm","head",
- "lip_lwrf","head",
- "lip_lwrb","head",
- "lip_rc","head",
- "lip_uprb","head",
- "lip_uprf","head",
- "lip_upm","head",
- "lip_uplf","head",
- "lip_uplb","head",
- "nose_tip","head",
- "nose_r","head",
- "nose_l","head",
- "zig_lt","head",
- "zig_lm","head",
- "zig_lb","head",
- "zig_rt","head",
- "zig_rm","head",
- "zig_rb","head",
- "cheek_r","head",
- "cheek_l","head",
- "eyebrow_lb","head",
- "eyebrow_lm","head",
- "eyebrow_lf","head",
- "corr","head",
- "eyebrow_rf","head",
- "eyebrow_rm","head",
- "eyebrow_rb","head",
- "eye_upr","head",
- "eye_lwr","head",
- "eye_upl","head",
- "eye_lwl","head",
- "cheek_rf","head",
- "cheek_rm","head",
- "cheek_rb","head",
- "cheek_lf","head",
- "cheek_lm","head",
- "cheek_lb","head",
- "forehead_l","head",
- "forehead_m","head",
- "forehead_r","head",
- "l_eye","head",
- "r_eye","head",
- "l_pupila","head",
- "r_pupila","head",
- "neck_t","head",
- "neck_b","head",
- "neck_r","head",
- "neck_l","head",
- "tongue_b","head",
- "tongue_m","head",
- "tongue_f","head",
- //Left upper side
+ "neck1","neck",
+ "head","neck1",
+
+ // New facial features
+ "Face_Hub","head",
+ "Face_Jawbone","Face_Hub",
+ "Face_Jowl","Face_Jawbone",
+ "Face_chopRight","Face_Jawbone",
+ "Face_chopLeft","Face_Jawbone",
+ "Face_LipLowerMiddle","Face_Jawbone",
+ "Face_LipLowerLeft","Face_Jawbone",
+ "Face_LipLowerRight","Face_Jawbone",
+ "Face_Chin","Face_Jawbone",
+ "Face_Tongue","Face_Jawbone",
+ "Face_CornerRight","Face_Hub",
+ "Face_CheekSideRight","Face_CornerRight",
+ "Face_CornerLeft","Face_Hub",
+ "Face_CheekSideLeft","Face_CornerLeft",
+ "Face_CheekFrontRight","Face_Hub",
+ "Face_CheekFrontLeft","Face_Hub",
+ "Face_CheekUpperRight","Face_Hub",
+ "Face_CheekUpperLeft","Face_Hub",
+ "Face_LipUpperMiddle","Face_Hub",
+ "Face_LipUpperRight","Face_Hub",
+ "Face_LipUpperLeft","Face_Hub",
+ "Face_NostrilRight","Face_Hub",
+ "Face_NostrilLeft","Face_Hub",
+ "Face_Forehead","Face_Hub",
+ "Face_BrowFrontRight","Face_Forehead",
+ "Face_BrowFrontLeft","Face_Forehead",
+ "Face_BrowMiddle","Face_Forehead",
+ "Face_BrowSideRight","Face_Forehead",
+ "Face_BrowSideLeft","Face_Forehead",
+ "Face_Eyelids","Face_Hub",
+ "Face_EyelidUpperRight","Face_Hub",
+ "Face_EyelidUpperLeft","Face_Hub",
+ "Face_EyelidLowerRight","Face_Hub",
+ "Face_EyelidLowerLeft","Face_Hub",
+ "EyeLeft","Face_Hub",
+ "EyeRight","Face_Hub",
+
+ // Left upper side
"LeftShoulder","Spine3",
"LeftArm","LeftShoulder",
"LeftArmRoll","LeftArm",
@@ -127,7 +102,8 @@ class CfgSkeletons {
"LeftHandThumb1","LeftHand",
"LeftHandThumb2","LeftHandThumb1",
"LeftHandThumb3","LeftHandThumb2",
- //Right upper side
+
+ // Right upper side
"RightShoulder","Spine3",
"RightArm","RightShoulder",
"RightArmRoll","RightArm",
@@ -150,25 +126,26 @@ class CfgSkeletons {
"RightHandThumb1","RightHand",
"RightHandThumb2","RightHandThumb1",
"RightHandThumb3","RightHandThumb2",
- //Left lower side
+
+ // Left lower side
"LeftUpLeg","Pelvis",
"LeftUpLegRoll","LeftUpLeg",
"LeftLeg","LeftUpLegRoll",
"LeftLegRoll","LeftLeg",
"LeftFoot","LeftLegRoll",
"LeftToeBase","LeftFoot",
- //Right lower side
+
+ // Right lower side
"RightUpLeg","Pelvis",
"RightUpLegRoll","RightUpLeg",
"RightLeg","RightUpLegRoll",
"RightLegRoll","RightLeg",
"RightFoot","RightLegRoll",
"RightToeBase","RightFoot"
- };
- // location of pivot points (local axes) for hierarchical animation
- //pivotsModel="ca\Anims\Characters\Data\Skeleton\SkeletonPivots.p3d";
- pivotsModel="";
- };
+ };
+ // location of pivot points (local axes) for hierarchical animation
+ pivotsModel="A3\anims_f\data\skeleton\SkeletonPivots.p3d";
+ };
};
class CfgModels {
@@ -249,13 +226,14 @@ class CfgModels {
};
};
class ArmaMan: Default {
- htMin=60;
- htMax=1800;
- afMax=30;
- mfMax=0;
- mFact=1;
- tBody=37;
- sections[]= {
+ htMin = 60; // Minimum half-cooling time (in seconds)
+ htMax = 1800; // Maximum half-cooling time (in seconds)
+ afMax = 30; // Maximum temperature in case the model is alive (in celsius)
+ mfMax = 0; // Maximum temperature when the model is moving (in celsius)
+ mFact = 1; // Metabolism factor - number from interval <0, 1> (0 - metabolism has no influence, 1 - metabolism has full influence (no other temperature source will be considered)).
+ tBody = 37; // Metabolism temperature of the model (in celsius)
+
+ sections[] = {
"osobnost",
"Head_Injury",
"Body_Injury",
@@ -274,9 +252,11 @@ class CfgModels {
"Camo2",
"personality",
"hl",
- "injury_head"
+ "injury_head",
+ "insignia",
+ "ghillie_hide"
};
- skeletonName="OFP2_ManSkeleton";
+ skeletonName = "OFP2_ManSkeleton";
};
class ace_tacticalladder_pack: ArmaMan {
};
diff --git a/addons/tacticalladder/functions/fnc_cancelTLdeploy.sqf b/addons/tacticalladder/functions/fnc_cancelTLdeploy.sqf
index 940b2b612a..b009028c93 100644
--- a/addons/tacticalladder/functions/fnc_cancelTLdeploy.sqf
+++ b/addons/tacticalladder/functions/fnc_cancelTLdeploy.sqf
@@ -3,8 +3,8 @@
* Cancel tactical ladder deployment
*
* Arguments:
- * 0: unit
- * 1: ladder
+ * 0: Unit
+ * 1: Key
*
* Return Value:
* None
@@ -18,23 +18,24 @@
#define __ANIMS ["extract_1","extract_2","extract_3","extract_4","extract_5","extract_6","extract_7","extract_8","extract_9","extract_10","extract_11"]
-params ["_unit", "_ladder"];
+params ["_unit", "_key"];
+
+if (_key != 1 || {isNull GVAR(ladder)}) exitWith {};
// enable running again
[_unit, "forceWalk", "ACE_Ladder", false] call EFUNC(common,statusEffect_set);
-detach _ladder;
+detach GVAR(ladder);
-_ladder animate ["rotate", 0];
+GVAR(ladder) animate ["rotate", 0];
{
- _ladder animate [_x, 0];
+ GVAR(ladder) animate [_x, 0];
} count __ANIMS;
// remove mouse buttons and hint
call EFUNC(interaction,hideMouseHint);
[_unit, "DefaultAction", _unit getVariable [QGVAR(Deploy), -1]] call EFUNC(Common,removeActionEventHandler);
-[_unit, "zoomtemp", _unit getVariable [QGVAR(Cancel), -1]] call EFUNC(Common,removeActionEventHandler);
GVAR(ladder) = objNull;
diff --git a/addons/tacticalladder/functions/fnc_confirmTLdeploy.sqf b/addons/tacticalladder/functions/fnc_confirmTLdeploy.sqf
index 9d5783b327..3703fe1f47 100644
--- a/addons/tacticalladder/functions/fnc_confirmTLdeploy.sqf
+++ b/addons/tacticalladder/functions/fnc_confirmTLdeploy.sqf
@@ -34,7 +34,6 @@ detach _ladder;
call EFUNC(interaction,hideMouseHint);
[_unit, "DefaultAction", _unit getVariable [QGVAR(Deploy), -1]] call EFUNC(common,removeActionEventHandler);
-[_unit, "zoomtemp", _unit getVariable [QGVAR(Cancel), -1]] call EFUNC(common,removeActionEventHandler);
GVAR(ladder) = objNull;
diff --git a/addons/tacticalladder/functions/fnc_handleScrollWheel.sqf b/addons/tacticalladder/functions/fnc_handleScrollWheel.sqf
index 0b64d89610..e7d4136526 100644
--- a/addons/tacticalladder/functions/fnc_handleScrollWheel.sqf
+++ b/addons/tacticalladder/functions/fnc_handleScrollWheel.sqf
@@ -19,7 +19,7 @@ params ["_scroll"];
if (isNull GVAR(ladder)) exitWith { false };
-if (GETMVAR(ACE_Modifier,0) == 0) then {
+if (ACE_Modifier == 0) then {
private ["_currentStep"];
// Lengthening
if (_scroll > 0) then {
@@ -40,9 +40,9 @@ if (GETMVAR(ACE_Modifier,0) == 0) then {
};
};
} else {
- // Tilting
- GVAR(currentAngle) = 0 max (GVAR(currentAngle) + _scroll) min 30;
- GVAR(ladder) animate ["rotate", GVAR(currentAngle)];
+ // Tilting (disabled due to sinking, interaction point offset and unsuitable animation)
+ //GVAR(currentAngle) = 0 max (GVAR(currentAngle) + _scroll) min 30;
+ //GVAR(ladder) animate ["rotate", GVAR(currentAngle)];
};
true
diff --git a/addons/tacticalladder/functions/fnc_isLadderEmpty.sqf b/addons/tacticalladder/functions/fnc_isLadderEmpty.sqf
new file mode 100644
index 0000000000..8267faf3c4
--- /dev/null
+++ b/addons/tacticalladder/functions/fnc_isLadderEmpty.sqf
@@ -0,0 +1,31 @@
+/*
+ * Author: Jonpas
+ * Checks if Tactical Ladder is empty (no one climbing it).
+ *
+ * Arguments:
+ * 0: Ladder
+ *
+ * Return Value:
+ * Can Be Picked Up
+ *
+ * Example:
+ * [ladder] call ace_tacticalladder_fnc_isLadderEmpty;
+ *
+ * Public: No
+ */
+#include "script_component.hpp"
+
+params ["_ladder"];
+
+private _unitsNearLadder = nearestObjects [_ladder, ["CAManBase"], 4];
+TRACE_1("Near Ladder",_unitsNearLadder);
+
+private _ladderEmpty = true;
+{
+ if (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> animationState _x >> "ACE_isLadder") == 1) exitWith {
+ _ladderEmpty = false;
+ TRACE_1("On Ladder",_x);
+ };
+} forEach _unitsNearLadder;
+
+_ladderEmpty
diff --git a/addons/tacticalladder/functions/fnc_positionTL.sqf b/addons/tacticalladder/functions/fnc_positionTL.sqf
index 629159db75..c47733dd5a 100644
--- a/addons/tacticalladder/functions/fnc_positionTL.sqf
+++ b/addons/tacticalladder/functions/fnc_positionTL.sqf
@@ -37,21 +37,16 @@ _ladder animate ["rotate", 0];
} count ["extract_1", "extract_2", "extract_3"]; // Extract ladder at head height (extract_3)
GVAR(ladder) = _ladder;
-GVAR(cancelTime) = ACE_time + 1; // Workaround to prevent accidental canceling
+GVAR(cancelTime) = CBA_missionTime + 1; // Workaround to prevent accidental canceling
GVAR(currentStep) = 3;
GVAR(currentAngle) = 0;
// add mouse buttons and hints
-[localize LSTRING(Deploy), localize LSTRING(Drop), localize LSTRING(Adjust)] call EFUNC(interaction,showMouseHint);
+//private _adjustText = format ["%1, +%2", localize LSTRING(Adjust), localize LSTRING(AdjustTilt)]; // Tilting disabled due to sinking, interaction point offset and unsuitable animation
+[localize LSTRING(Deploy), localize LSTRING(Drop), /*_adjustText*/ localize LSTRING(Adjust)] call EFUNC(interaction,showMouseHint);
_unit setVariable [QGVAR(Deploy), [
_unit, "DefaultAction",
{!isNull GVAR(ladder)},
{[_this select 0, GVAR(ladder)] call FUNC(confirmTLdeploy)}
] call EFUNC(common,addActionEventHandler)];
-
-_unit setVariable [QGVAR(Cancel), [
- _unit, "zoomtemp",
- {!isNull GVAR(ladder)},
- {[_this select 0, GVAR(ladder)] call FUNC(cancelTLdeploy)}
-] call EFUNC(common,addActionEventHandler)];
diff --git a/addons/tacticalladder/stringtable.xml b/addons/tacticalladder/stringtable.xml
index 602be09855..7a60933ceb 100644
--- a/addons/tacticalladder/stringtable.xml
+++ b/addons/tacticalladder/stringtable.xml
@@ -38,12 +38,26 @@
Derrubar escada
- Extend, +Ctrl tilt
- Ausfahren, +Strg kippen
- Rozłóż, +Ctrl nachyl
- Extender, +Ctrl tilt
- Разложить, +Ctrl наклонить
- Prodloužit, +Ctrl naklonit
+ Extend
+ Ausfahren
+ Rozłóż
+ Extender
+ Разложить
+ Prodloužit
+ Estendi, +Ctrl ruota
+ Extender
+ Déployer
+
+
+ +Ctrl tilt
+ +Strg kippen
+ +Ctrl nachyl
+ +Ctrl tilt
+ +Ctrl наклонить
+ +Ctrl naklonit
+ +Ctrl inclinar
+ +Ctrl incliner
+ +Ctrl per inclinare
Position ladder
diff --git a/addons/tagging/$PBOPREFIX$ b/addons/tagging/$PBOPREFIX$
new file mode 100644
index 0000000000..d841d5d209
--- /dev/null
+++ b/addons/tagging/$PBOPREFIX$
@@ -0,0 +1 @@
+z\ace\addons\tagging
\ No newline at end of file
diff --git a/addons/headless/CfgEventHandlers.hpp b/addons/tagging/CfgEventHandlers.hpp
similarity index 61%
rename from addons/headless/CfgEventHandlers.hpp
rename to addons/tagging/CfgEventHandlers.hpp
index 864912227c..becf395052 100644
--- a/addons/headless/CfgEventHandlers.hpp
+++ b/addons/tagging/CfgEventHandlers.hpp
@@ -1,3 +1,10 @@
+
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
@@ -9,11 +16,3 @@ class Extended_PostInit_EventHandlers {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
};
};
-
-class Extended_InitPost_EventHandlers {
- class AllVehicles {
- class ADDON {
- serverInit = QUOTE(_this call FUNC(handleInitPost));
- };
- };
-};
diff --git a/addons/tagging/CfgVehicles.hpp b/addons/tagging/CfgVehicles.hpp
new file mode 100644
index 0000000000..2a71c773a0
--- /dev/null
+++ b/addons/tagging/CfgVehicles.hpp
@@ -0,0 +1,75 @@
+class CfgVehicles {
+ class Man;
+ class CAManBase: Man {
+ class ACE_SelfActions {
+ class ACE_Equipment {
+ class ACE_TagBlack {
+ displayName = CSTRING(TagBlack);
+ condition = QUOTE(('ACE_SpraypaintBlack' in items ACE_player) && {[] call FUNC(checkTaggable)});
+ statement = QUOTE([ARR_2(ACE_player,'black' call FUNC(getTexture))] call FUNC(tag));
+ showDisabled = 0;
+ priority = 3;
+ icon = QPATHTOF(UI\icons\iconTaggingBlack.paa);
+ };
+ class ACE_TagRed: ACE_TagBlack {
+ displayName = CSTRING(TagRed);
+ condition = QUOTE(('ACE_SpraypaintRed' in items ACE_player) && {[] call FUNC(checkTaggable)});
+ statement = QUOTE([ARR_2(ACE_player,'red' call FUNC(getTexture))] call FUNC(tag));
+ icon = QPATHTOF(UI\icons\iconTaggingRed.paa);
+ };
+ class ACE_TagGreen: ACE_TagBlack {
+ displayName = CSTRING(TagGreen);
+ condition = QUOTE(('ACE_SpraypaintGreen' in items ACE_player) && {[] call FUNC(checkTaggable)});
+ statement = QUOTE([ARR_2(ACE_player,'green' call FUNC(getTexture))] call FUNC(tag));
+ icon = QPATHTOF(UI\icons\iconTaggingGreen.paa);
+ };
+ class ACE_TagBlue: ACE_TagBlack {
+ displayName = CSTRING(TagBlue);
+ condition = QUOTE(('ACE_SpraypaintBlue' in items ACE_player) && {[] call FUNC(checkTaggable)});
+ statement = QUOTE([ARR_2(ACE_player,'blue' call FUNC(getTexture))] call FUNC(tag));
+ icon = QPATHTOF(UI\icons\iconTaggingBlue.paa);
+ };
+ };
+ };
+ };
+
+ class Item_Base_F;
+ class ACE_Item_SpraypaintBlack: Item_Base_F {
+ author = "jokoho48";
+ scope = 2;
+ scopeCurator = 2;
+ displayName = CSTRING(SpraypaintBlack);
+ vehicleClass = "Items";
+ class TransportItems {
+ MACRO_ADDITEM(ACE_SpraypaintBlack,1);
+ };
+ };
+ class ACE_Item_SpraypaintRed: ACE_Item_SpraypaintBlack {
+ displayName = CSTRING(SpraypaintRed);
+ class TransportItems {
+ MACRO_ADDITEM(ACE_SpraypaintRed,1);
+ };
+ };
+ class ACE_Item_SpraypaintGreen: ACE_Item_SpraypaintBlack {
+ displayName = CSTRING(SpraypaintGreen);
+ class TransportItems {
+ MACRO_ADDITEM(ACE_SpraypaintGreen,1);
+ };
+ };
+ class ACE_Item_SpraypaintBlue: ACE_Item_SpraypaintBlack {
+ displayName = CSTRING(SpraypaintBlue);
+ class TransportItems {
+ MACRO_ADDITEM(ACE_SpraypaintBlue,1);
+ };
+ };
+
+ class Box_NATO_Support_F;
+ class ACE_Box_Misc: Box_NATO_Support_F {
+ class TransportItems {
+ MACRO_ADDITEM(ACE_SpraypaintBlack,5);
+ MACRO_ADDITEM(ACE_SpraypaintRed,5);
+ MACRO_ADDITEM(ACE_SpraypaintBlue,5);
+ MACRO_ADDITEM(ACE_SpraypaintGreen,5);
+ };
+ };
+};
diff --git a/addons/tagging/CfgWeapons.hpp b/addons/tagging/CfgWeapons.hpp
new file mode 100644
index 0000000000..1984b3b14a
--- /dev/null
+++ b/addons/tagging/CfgWeapons.hpp
@@ -0,0 +1,33 @@
+class CfgWeapons {
+ class ACE_ItemCore;
+ class InventoryItem_Base_F;
+
+ class ACE_SpraypaintBlack : ACE_ItemCore {
+ author = "jokoho48";
+ displayname = CSTRING(spraypaintBlack);
+ descriptionShort = CSTRING(descSpraypaint);
+ picture = QPATHTOF(UI\items\itemSpraypaintBlack.paa);
+ model = QPATHTOF(data\SprayCan.p3d);
+ scope = 2;
+ hiddenSelections[] = {"camo"};
+ hiddenSelectionsTextures[] = {QPATHTOF(data\spraycanBlack_co.paa)};
+ class ItemInfo: InventoryItem_Base_F {
+ mass = 10;
+ };
+ };
+ class ACE_SpraypaintRed : ACE_SpraypaintBlack {
+ displayname = CSTRING(spraypaintRed);
+ picture = QPATHTOF(UI\items\itemSpraypaintRed.paa);
+ hiddenSelectionsTextures[] = {QPATHTOF(data\spraycanRed_co.paa)};
+ };
+ class ACE_SpraypaintGreen : ACE_SpraypaintBlack {
+ displayname = CSTRING(spraypaintGreen);
+ picture = QPATHTOF(UI\items\itemSpraypaintGreen.paa);
+ hiddenSelectionsTextures[] = {QPATHTOF(data\spraycanGreen_co.paa)};
+ };
+ class ACE_SpraypaintBlue : ACE_SpraypaintBlack {
+ displayname = CSTRING(spraypaintBlue);
+ picture = QPATHTOF(UI\items\itemSpraypaintBlue.paa);
+ hiddenSelectionsTextures[] = {QPATHTOF(data\spraycanBlue_co.paa)};
+ };
+};
diff --git a/addons/tagging/README.md b/addons/tagging/README.md
new file mode 100644
index 0000000000..1e29e16b6f
--- /dev/null
+++ b/addons/tagging/README.md
@@ -0,0 +1,11 @@
+ace_tagging
+===============
+
+Adds a can of spray paint which allows you to tag buildings, walls and other static objects.
+
+
+## Maintainers
+
+The people responsible for merging changes to this component or answering potential questions.
+
+- []()
\ No newline at end of file
diff --git a/addons/tagging/UI/icons/iconTaggingBlack.paa b/addons/tagging/UI/icons/iconTaggingBlack.paa
new file mode 100644
index 0000000000..fcc29807bb
Binary files /dev/null and b/addons/tagging/UI/icons/iconTaggingBlack.paa differ
diff --git a/addons/tagging/UI/icons/iconTaggingBlue.paa b/addons/tagging/UI/icons/iconTaggingBlue.paa
new file mode 100644
index 0000000000..eb60a8b1a8
Binary files /dev/null and b/addons/tagging/UI/icons/iconTaggingBlue.paa differ
diff --git a/addons/tagging/UI/icons/iconTaggingGreen.paa b/addons/tagging/UI/icons/iconTaggingGreen.paa
new file mode 100644
index 0000000000..3c92b87375
Binary files /dev/null and b/addons/tagging/UI/icons/iconTaggingGreen.paa differ
diff --git a/addons/tagging/UI/icons/iconTaggingRed.paa b/addons/tagging/UI/icons/iconTaggingRed.paa
new file mode 100644
index 0000000000..cfed5fdb1f
Binary files /dev/null and b/addons/tagging/UI/icons/iconTaggingRed.paa differ
diff --git a/addons/tagging/UI/items/itemSpraypaintBlack.paa b/addons/tagging/UI/items/itemSpraypaintBlack.paa
new file mode 100644
index 0000000000..b4df79a4f5
Binary files /dev/null and b/addons/tagging/UI/items/itemSpraypaintBlack.paa differ
diff --git a/addons/tagging/UI/items/itemSpraypaintBlue.paa b/addons/tagging/UI/items/itemSpraypaintBlue.paa
new file mode 100644
index 0000000000..c3fc18a74d
Binary files /dev/null and b/addons/tagging/UI/items/itemSpraypaintBlue.paa differ
diff --git a/addons/tagging/UI/items/itemSpraypaintGreen.paa b/addons/tagging/UI/items/itemSpraypaintGreen.paa
new file mode 100644
index 0000000000..781b59880c
Binary files /dev/null and b/addons/tagging/UI/items/itemSpraypaintGreen.paa differ
diff --git a/addons/tagging/UI/items/itemSpraypaintRed.paa b/addons/tagging/UI/items/itemSpraypaintRed.paa
new file mode 100644
index 0000000000..670bc3d8b3
Binary files /dev/null and b/addons/tagging/UI/items/itemSpraypaintRed.paa differ
diff --git a/addons/tagging/UI/tags/black/0.paa b/addons/tagging/UI/tags/black/0.paa
new file mode 100644
index 0000000000..eaf80ac9e6
Binary files /dev/null and b/addons/tagging/UI/tags/black/0.paa differ
diff --git a/addons/tagging/UI/tags/black/1.paa b/addons/tagging/UI/tags/black/1.paa
new file mode 100644
index 0000000000..41a7d633ea
Binary files /dev/null and b/addons/tagging/UI/tags/black/1.paa differ
diff --git a/addons/tagging/UI/tags/black/2.paa b/addons/tagging/UI/tags/black/2.paa
new file mode 100644
index 0000000000..743410005c
Binary files /dev/null and b/addons/tagging/UI/tags/black/2.paa differ
diff --git a/addons/tagging/UI/tags/blue/0.paa b/addons/tagging/UI/tags/blue/0.paa
new file mode 100644
index 0000000000..fcc9b28ec9
Binary files /dev/null and b/addons/tagging/UI/tags/blue/0.paa differ
diff --git a/addons/tagging/UI/tags/blue/1.paa b/addons/tagging/UI/tags/blue/1.paa
new file mode 100644
index 0000000000..78122eb7f1
Binary files /dev/null and b/addons/tagging/UI/tags/blue/1.paa differ
diff --git a/addons/tagging/UI/tags/blue/2.paa b/addons/tagging/UI/tags/blue/2.paa
new file mode 100644
index 0000000000..fb7b8c3d20
Binary files /dev/null and b/addons/tagging/UI/tags/blue/2.paa differ
diff --git a/addons/tagging/UI/tags/green/0.paa b/addons/tagging/UI/tags/green/0.paa
new file mode 100644
index 0000000000..19d89d6954
Binary files /dev/null and b/addons/tagging/UI/tags/green/0.paa differ
diff --git a/addons/tagging/UI/tags/green/1.paa b/addons/tagging/UI/tags/green/1.paa
new file mode 100644
index 0000000000..1f55002d28
Binary files /dev/null and b/addons/tagging/UI/tags/green/1.paa differ
diff --git a/addons/tagging/UI/tags/green/2.paa b/addons/tagging/UI/tags/green/2.paa
new file mode 100644
index 0000000000..79804cdfde
Binary files /dev/null and b/addons/tagging/UI/tags/green/2.paa differ
diff --git a/addons/tagging/UI/tags/red/0.paa b/addons/tagging/UI/tags/red/0.paa
new file mode 100644
index 0000000000..540348b90c
Binary files /dev/null and b/addons/tagging/UI/tags/red/0.paa differ
diff --git a/addons/tagging/UI/tags/red/1.paa b/addons/tagging/UI/tags/red/1.paa
new file mode 100644
index 0000000000..767cc1003e
Binary files /dev/null and b/addons/tagging/UI/tags/red/1.paa differ
diff --git a/addons/tagging/UI/tags/red/2.paa b/addons/tagging/UI/tags/red/2.paa
new file mode 100644
index 0000000000..c2b7189133
Binary files /dev/null and b/addons/tagging/UI/tags/red/2.paa differ
diff --git a/addons/tagging/XEH_PREP.hpp b/addons/tagging/XEH_PREP.hpp
new file mode 100644
index 0000000000..f8a8598cd7
--- /dev/null
+++ b/addons/tagging/XEH_PREP.hpp
@@ -0,0 +1,5 @@
+PREP(checkTaggable);
+PREP(createTag);
+PREP(getTexture);
+PREP(tag);
+PREP(tagTestingThread);
diff --git a/addons/tagging/XEH_postInit.sqf b/addons/tagging/XEH_postInit.sqf
new file mode 100644
index 0000000000..055cb59cfd
--- /dev/null
+++ b/addons/tagging/XEH_postInit.sqf
@@ -0,0 +1,47 @@
+// by esteldunedain
+#include "script_component.hpp"
+
+
+// Cache for static objects
+GVAR(cacheStaticModels) = createLocation ["ACE_HashLocation", [-10000,-10000,-10000], 0, 0];
+GVAR(cacheStaticModels) setText QGVAR(cacheStaticModels);
+
+// Consider static everything vehicle that inherit from Static
+// This include houses (which we don't need), but also walls, that we do
+private _cfgBase = configFile >> "CfgVehicles";
+private _countOptions = count _cfgBase;
+for "_index" from 0 to (_countOptions - 1) do {
+ private _cfgClass = _cfgBase select _index;
+ if (isClass _cfgClass) then {
+ if ((configName _cfgClass) isKindOf "Static") then {
+ private _model = getText (_cfgClass >> "model");
+ if (_model != "") then {
+ private _array = _model splitString "\";
+ GVAR(cacheStaticModels) setVariable [toLower (_array select ((count _array) - 2)), _cfgClass];
+ };
+ };
+ };
+};
+
+// Also consider static all object inheriting from bridges
+_cfgBase = configFile >> "CfgNonAIVehicles";
+_countOptions = count _cfgBase;
+for "_index" from 0 to (_countOptions - 1) do {
+ private _cfgClass = _cfgBase select _index;
+ if (isClass _cfgClass) then {
+ if ((configName _cfgClass) isKindOf ["Bridge_base_F", _cfgBase]) then {
+ private _model = getText (_cfgClass >> "model");
+ if (_model != "") then {
+ private _array = _model splitString "\";
+ GVAR(cacheStaticModels) setVariable [toLower (_array select ((count _array) - 2)), _cfgClass];
+ };
+ };
+ };
+};
+
+if (!isServer) exitWith {};
+
+GVAR(testingThread) = false;
+GVAR(tagsToTest) = [];
+
+[QGVAR(createTag), DFUNC(createTag)] call CBA_fnc_addEventHandler;
diff --git a/addons/tagging/XEH_preInit.sqf b/addons/tagging/XEH_preInit.sqf
new file mode 100644
index 0000000000..a7feade1c3
--- /dev/null
+++ b/addons/tagging/XEH_preInit.sqf
@@ -0,0 +1,7 @@
+#include "script_component.hpp"
+
+ADDON = false;
+
+#include "XEH_PREP.hpp"
+
+ADDON = true;
diff --git a/addons/tagging/XEH_preStart.sqf b/addons/tagging/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/tagging/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/tagging/config.cpp b/addons/tagging/config.cpp
new file mode 100644
index 0000000000..7e495892e9
--- /dev/null
+++ b/addons/tagging/config.cpp
@@ -0,0 +1,23 @@
+#include "script_component.hpp"
+
+class CfgPatches {
+ class ADDON {
+ units[] = {"ACE_Item_SpraypaintBlack", "ACE_Item_SpraypaintRed", "ACE_Item_SpraypaintGreen", "ACE_Item_SpraypaintBlue"};
+ weapons[] = {"ACE_SpraypaintBlack", "ACE_SpraypaintRed", "ACE_SpraypaintGreen", "ACE_SpraypaintBlue"};
+ requiredVersion = REQUIRED_VERSION;
+ requiredAddons[] = {"ace_interaction"};
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"BaerMitUmlaut","esteldunedain"};
+ url = ECSTRING(main,URL);
+ VERSION_CONFIG;
+ };
+};
+
+#include "CfgEventHandlers.hpp"
+#include "CfgVehicles.hpp"
+#include "CfgWeapons.hpp"
+
+class ACE_newEvents {
+ createTag = QGVAR(createTag);
+ tagCreated = "ace_tagCreated";
+};
diff --git a/addons/tagging/data/SprayCan.p3d b/addons/tagging/data/SprayCan.p3d
new file mode 100644
index 0000000000..54410046a9
Binary files /dev/null and b/addons/tagging/data/SprayCan.p3d differ
diff --git a/addons/tagging/data/model.cfg b/addons/tagging/data/model.cfg
new file mode 100644
index 0000000000..dda2be3d82
--- /dev/null
+++ b/addons/tagging/data/model.cfg
@@ -0,0 +1,20 @@
+class CfgSkeletons {
+ class Default {
+ isDiscrete = 1;
+ skeletonInherit = "";
+ skeletonBones[] = {};
+ };
+};
+
+class CfgModels {
+ class Default {
+ sectionsInherit="";
+ sections[] = {""};
+ skeletonName = "";
+ };
+ class SprayCan {
+ sectionsInherit = "";
+ sections[] = {"camo"};
+ skeletonName = "";
+ };
+};
\ No newline at end of file
diff --git a/addons/tagging/data/spraycan.rvmat b/addons/tagging/data/spraycan.rvmat
new file mode 100644
index 0000000000..18c91a1bf2
--- /dev/null
+++ b/addons/tagging/data/spraycan.rvmat
@@ -0,0 +1,82 @@
+class StageTI {
+ texture = "a3\data_f\default_glass_ti_ca.paa";
+};
+ambient[] = {1,1,1,1};
+diffuse[] = {1,1,1,1};
+forcedDiffuse[] = {0,0,0,0};
+emmisive[] = {0,0,0,1};
+specular[] = {0.3,0.3,0.3,1};
+specularPower = 50;
+PixelShaderID = "Super";
+VertexShaderID = "Super";
+class Stage1 {
+ texture = "#(argb,8,8,3)color(0.5,0.5,0.5,1,NOHQ)";
+ uvSource = "tex";
+ class uvTransform {
+ aside[] = {1,0,0};
+ up[] = {0,1,0};
+ dir[] = {0,0,1};
+ pos[] = {0,0,0};
+ };
+};
+class Stage2 {
+ texture = "#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)";
+ uvSource = "tex";
+ class uvTransform {
+ aside[] = {1,0,0};
+ up[] = {0,1,0};
+ dir[] = {0,0,1};
+ pos[] = {0,0,0};
+ };
+};
+class Stage3 {
+ texture = "#(argb,8,8,3)color(0,0,0,0,MC)";
+ uvSource = "tex";
+ class uvTransform {
+ aside[] = {1,0,0};
+ up[] = {0,1,0};
+ dir[] = {0,0,1};
+ pos[] = {0,0,0};
+ };
+};
+class Stage4 {
+ texture = "#(argb,8,8,3)color(1,1,1,1,AS)";
+ uvSource = "tex";
+ class uvTransform {
+ aside[] = {1,0,0};
+ up[] = {0,1,0};
+ dir[] = {0,0,1};
+ pos[] = {0,0,0};
+ };
+};
+class Stage5 {
+ texture = "#(argb,8,8,3)color(0,0.6,1,1,SMDI)";
+ uvSource = "tex";
+ class uvTransform {
+ aside[] = {1,0,0};
+ up[] = {0,1,0};
+ dir[] = {0,0,1};
+ pos[] = {0,0,0};
+ };
+};
+class Stage6 {
+ texture = "#(ai,32,128,1)fresnel(0.85,0.36)";
+ uvSource = "tex";
+ class uvTransform {
+ aside[] = {1,0,0};
+ up[] = {0,1,0};
+ dir[] = {0,0,1};
+ pos[] = {0,0,0};
+ };
+};
+class Stage7 {
+ useWorldEnvMap = "true";
+ texture = "a3\data_f\env_interier_car_ca.paa";
+ uvSource = "tex";
+ class uvTransform {
+ aside[] = {1,0,0};
+ up[] = {0,1,0};
+ dir[] = {0,0,1};
+ pos[] = {0,0,0};
+ };
+};
diff --git a/addons/tagging/data/spraycanBlack_co.paa b/addons/tagging/data/spraycanBlack_co.paa
new file mode 100644
index 0000000000..ff512a3ae1
Binary files /dev/null and b/addons/tagging/data/spraycanBlack_co.paa differ
diff --git a/addons/tagging/data/spraycanBlue_co.paa b/addons/tagging/data/spraycanBlue_co.paa
new file mode 100644
index 0000000000..e2013be084
Binary files /dev/null and b/addons/tagging/data/spraycanBlue_co.paa differ
diff --git a/addons/tagging/data/spraycanGreen_co.paa b/addons/tagging/data/spraycanGreen_co.paa
new file mode 100644
index 0000000000..8143f5a385
Binary files /dev/null and b/addons/tagging/data/spraycanGreen_co.paa differ
diff --git a/addons/tagging/data/spraycanRed_co.paa b/addons/tagging/data/spraycanRed_co.paa
new file mode 100644
index 0000000000..b7d499b50f
Binary files /dev/null and b/addons/tagging/data/spraycanRed_co.paa differ
diff --git a/addons/tagging/functions/fnc_checkTaggable.sqf b/addons/tagging/functions/fnc_checkTaggable.sqf
new file mode 100644
index 0000000000..b77473f25b
--- /dev/null
+++ b/addons/tagging/functions/fnc_checkTaggable.sqf
@@ -0,0 +1,56 @@
+/*
+ * Author: BaerMitUmlaut, esteldunedain
+ * Checks if there is a taggable surface within 2.5m in front of the player.
+ *
+ * Arguments:
+ * None
+ *
+ * Return Value:
+ * Is wall taggable
+ *
+ * Example:
+ * [] call ace_tagging_fnc_checkTaggable
+ *
+ * Public: No
+ */
+
+#include "script_component.hpp"
+
+[[], {
+ private _startPosASL = eyePos ACE_player;
+ private _cameraPosASL = AGLToASL positionCameraToWorld [0, 0, 0];
+ private _cameraDir = (AGLToASL positionCameraToWorld [0, 0, 1]) vectorDiff _cameraPosASL;
+ private _endPosASL = _startPosASL vectorAdd (_cameraDir vectorMultiply 2.5);
+
+ private _intersections = lineIntersectsSurfaces [_startPosASL, _endPosASL, ACE_player, objNull, true, 1, "FIRE", "GEOM"];
+
+ // If there's no intersections
+ if (_intersections isEqualTo []) exitWith {false};
+
+ (_intersections select 0) params ["", "", "", "_object"];
+
+ // Exit if trying to tag a non static object
+ TRACE_1("Obj:",_intersections);
+
+ // Exit if trying to tag a non static object
+ if ((!isNull _object) && {
+ // If the class is alright, do not exit
+ if (_object isKindOf "Static") exitWith {false};
+
+ // If the class is not categorized correctly search the cache
+ private _array = str(_object) splitString " ";
+ private _str = toLower (_array select 1);
+ TRACE_1("Object:",_str);
+ private _objClass = GVAR(cacheStaticModels) getVariable _str;
+ // If the class in not on the cache, exit
+ if (isNil "_objClass") exitWith {
+ false
+ };
+ true
+ }) exitWith {
+ TRACE_1("Pointed object is non static",_object);
+ false
+ };
+
+ true
+}, missionNamespace, QGVAR(checkTaggableCache), 0.5] call EFUNC(common,cachedCall);
diff --git a/addons/tagging/functions/fnc_createTag.sqf b/addons/tagging/functions/fnc_createTag.sqf
new file mode 100644
index 0000000000..20ca33bd2e
--- /dev/null
+++ b/addons/tagging/functions/fnc_createTag.sqf
@@ -0,0 +1,78 @@
+/*
+ * Author: BaerMitUmlaut, esteldunedain
+ * Creates a tag and handle its destruction. Only execute on the server.
+ *
+ * Arguments:
+ * 0: Position ASL
+ * 1: Vector dir and up
+ * 2: Colour of the tag (valid colours are black, red, green and blue or full path to custom texture)
+ * 3: Object it should be tied to
+ * 4: Unit that created the tag
+ *
+ * Return Value:
+ * Tag created
+ *
+ * Example:
+ * [positionASL, vectorDirAndUp, "z\ace\addons\tagging\UI\tags\black\0.paa", object] call ace_tagging_fnc_createTag
+ *
+ * Public: No
+ */
+
+#include "script_component.hpp"
+
+params ["_tagPosASL", "_vectorDirAndUp", "_texture", "_object", "_unit"];
+TRACE_5("createTag:",_tagPosASL,_vectorDirAndUp,_texture,_object,_unit);
+
+if (_texture == "") exitWith {
+ ACE_LOGERROR_1("%1 is not a valid tag texture.",_texture);
+ false
+};
+
+private _tag = "UserTexture1m_F" createVehicle [0,0,0];
+_tag setObjectTextureGlobal [0, _texture];
+_tag setPosASL _tagPosASL;
+_tag setVectorDirAndUp _vectorDirAndUp;
+
+// Throw a global event for mision makers
+["ace_tagCreated", [_tag, _texture, _object, _unit]] call CBA_fnc_globalEvent;
+
+if (isNull _object) exitWith {true};
+
+// If the tag is applied to an object, handle its destruction
+_object setVariable [QGVAR(testVar), true];
+if (_object getVariable [QGVAR(testVar), false]) then {
+ // The object supports variables and hence HandleDamage too
+ // Use the cheaper alternative for handling destruction: HandleDamage
+
+ // If the object already has tags attached, just add the new one to the list
+ private _attachedTags = _object getVariable QGVAR(attachedTags);
+ if !(isNil "_attachedTags ") exitWith {
+ _attachedTags pushBack _tag;
+ };
+
+ _attachedTags = [_tag];
+ _object setVariable [QGVAR(attachedTags), _attachedTags];
+
+ // If it's the first tag attached to that object, add a handledamage event handler
+ _object addEventHandler ["HandleDamage", {
+ params ["_object", "_selection", "_damage"];
+ if (_selection == "" && _damage >= 1) then {
+ {
+ deleteVehicle _x;
+ } foreach (_object getVariable [QGVAR(attachedTags), []]);
+ _object setVariable [QGVAR(attachedTags), []];
+ };
+ }];
+};
+
+// Periodic test the tag:
+// - For object that don't support handledamage
+// - For object that do, to support doors opening/closing, etc
+GVAR(tagsToTest) pushBack [_tag, _tagPosASL, _vectorDirAndUp];
+
+// Run the test
+if (!GVAR(testingThread)) then {
+ call FUNC(tagTestingThread);
+};
+
+true
diff --git a/addons/tagging/functions/fnc_getTexture.sqf b/addons/tagging/functions/fnc_getTexture.sqf
new file mode 100644
index 0000000000..f7f6d7e5e2
--- /dev/null
+++ b/addons/tagging/functions/fnc_getTexture.sqf
@@ -0,0 +1,26 @@
+/*
+ * Author: BaerMitUmlaut, esteldunedain, Jonpas
+ * Puts together a full path to the given tag color texture. Internal ACE3 textures only.
+ *
+ * Arguments:
+ * 0: The colour of the tag (valid colours are black, red, green and blue)
+ *
+ * Return Value:
+ * Texture (full path), "" if not found
+ *
+ * Example:
+ * texture = ["blue"] call ace_tagging_fnc_getTexture
+ *
+ * Public: No
+ */
+
+#include "script_component.hpp"
+
+params ["_color"];
+
+if !((toLower _color) in ["black", "red", "green", "blue"]) exitWith {
+ ACE_LOGERROR_1("%1 is not a valid tag colour.",_color);
+ ""
+};
+
+QUOTE(PATHTOF(UI)) + "\tags\" + _color + "\" + str (floor (random 3)) + ".paa"
diff --git a/addons/tagging/functions/fnc_tag.sqf b/addons/tagging/functions/fnc_tag.sqf
new file mode 100644
index 0000000000..d14e65ae7f
--- /dev/null
+++ b/addons/tagging/functions/fnc_tag.sqf
@@ -0,0 +1,115 @@
+/*
+ * Author: BaerMitUmlaut, esteldunedain
+ * Creates a tag on a wall that is on the closest surface within 2m on front of the unit.
+ *
+ * Arguments:
+ * 0: Unit
+ * 1: The colour of the tag (valid colours are black, red, green and blue or full path to custom texture)
+ *
+ * Return Value:
+ * Sucess
+ *
+ * Example:
+ * success = [player, "z\ace\addons\tagging\UI\tags\black\0.paa"] call ace_tagging_fnc_tag
+ *
+ * Public: Yes
+ */
+
+#include "script_component.hpp"
+
+params [
+ ["_unit", objNull, [objNull]],
+ ["_texture", "", [""]]
+];
+
+if (isNull _unit || {_texture == ""}) exitWith {
+ ACE_LOGERROR_2("Tag parameters invalid. Unit: %1, Texture: %2",_unit,_texture);
+};
+
+private _startPosASL = eyePos _unit;
+private _cameraPosASL = AGLToASL positionCameraToWorld [0, 0, 0];
+private _cameraDir = (AGLToASL positionCameraToWorld [0, 0, 1]) vectorDiff _cameraPosASL;
+private _endPosASL = _startPosASL vectorAdd (_cameraDir vectorMultiply 2.5);
+
+// Check for intersections below the unit
+private _intersections = lineIntersectsSurfaces [_startPosASL, _endPosASL, _unit, objNull, true, 1, "GEOM", "FIRE"];
+
+// If there's no intersections
+if (_intersections isEqualTo []) exitWith {
+ TRACE_3("No intersections",_intersections);
+ false
+};
+
+(_intersections select 0) params ["_touchingPoint", "_surfaceNormal", "", "_object"];
+TRACE_3("",_touchingPoint, _surfaceNormal, _object);
+
+// Exit if trying to tag a non static object
+if ((!isNull _object) && {
+ // If the class is alright, do not exit
+ if (_object isKindOf "Static") exitWith {false};
+
+ // If the class is not categorized correctly search the cache
+ private _array = str(_object) splitString " ";
+ private _str = toLower (_array select 1);
+ TRACE_1("Object:",_str);
+ private _objClass = GVAR(cacheStaticModels) getVariable _str;
+ // If the class in not on the cache, exit
+ if (isNil "_objClass") exitWith {
+ false
+ };
+ true
+}) exitWith {
+ TRACE_1("Pointed object is non static",_object);
+ false
+};
+
+
+// If the surface normal points away, flip it. This happens in weird places like the Stratis Pier
+if (_surfaceNormal vectorDotProduct (_endPosASL vectorDiff _startPosASL) > 0) then {
+ _surfaceNormal = _surfaceNormal vectorMultiply -1;
+};
+
+// Check if its a valid surface: big enough, reasonably plane
+private _v1 = vectorNormalized (_surfaceNormal vectorMultiply -1);
+private _v2 = vectorNormalized (_v1 vectorCrossProduct (_endPosASL vectorDiff _startPosASL));
+private _v3 = _v2 vectorCrossProduct _v1;
+
+TRACE_3("Reference:", _v1, _v2, _v3);
+
+_fnc_isOk = {
+ params ["_rx", "_ry"];
+ private _startPosASL2 = _touchingPoint vectorAdd (_v2 vectorMultiply _rx) vectorAdd (_v3 vectorMultiply _ry) vectorAdd (_v1 vectorMultiply (-0.06));
+ private _endPosASL2 = _startPosASL2 vectorAdd (_v1 vectorMultiply (0.12));
+ private _intersections = lineIntersectsSurfaces [_startPosASL2, _endPosASL2, _unit, objNull, true, 1, "GEOM", "FIRE"];
+ // If there's no intersections
+ if (_intersections isEqualTo []) exitWith {false;};
+
+ if !(((_intersections select 0) select 3) isEqualTo _object) exitWith {false;};
+
+ true
+};
+
+if ( !([ 0.5*TAG_SIZE, 0.5*TAG_SIZE] call _fnc_isOk) ||
+ {!([ 0.5*TAG_SIZE,-0.5*TAG_SIZE] call _fnc_isOk) ||
+ {!([-0.5*TAG_SIZE, 0.5*TAG_SIZE] call _fnc_isOk) ||
+ {!([-0.5*TAG_SIZE,-0.5*TAG_SIZE] call _fnc_isOk)}}}) exitWith {
+ TRACE_3("Unsuitable location:",_touchingPoint);
+ false
+};
+
+private _vectorDirAndUp = [_surfaceNormal vectorMultiply -1, _v3];
+
+// Everything ok, make the unit create the tag
+_unit playActionNow "PutDown";
+
+[{
+ params ["", "", "", "", "_unit"];
+ TRACE_2("Unit:",_unit,_this);
+
+ playSound3D [QUOTE(PATHTO_R(sounds\spray.ogg)), _unit, false, (eyePos _unit), 10, 1, 15];
+
+ // Tell the server to create the tag and handle its destruction
+ [QGVAR(createTag), _this] call CBA_fnc_serverEvent;
+}, [_touchingPoint vectorAdd (_surfaceNormal vectorMultiply 0.06), _vectorDirAndUp, _texture, _object, _unit], 0.6] call CBA_fnc_waitAndExecute;
+
+true
diff --git a/addons/tagging/functions/fnc_tagTestingThread.sqf b/addons/tagging/functions/fnc_tagTestingThread.sqf
new file mode 100644
index 0000000000..ead21f8d91
--- /dev/null
+++ b/addons/tagging/functions/fnc_tagTestingThread.sqf
@@ -0,0 +1,45 @@
+/*
+ * Author: esteldunedain
+ * Checks if tags are still leaning on an object periodically.
+ *
+ * Arguments:
+ * None
+ *
+ * Return Value:
+ * None
+ *
+ * Example:
+ * [] call ace_tagging_fnc_tagTestingThread
+ *
+ * Public: No
+ */
+
+#include "script_component.hpp"
+
+GVAR(tagsToTest) = GVAR(tagsToTest) select {
+ _x params ["_tag", "_tagPosASL", "_vectorDirAndUp"];
+
+ _vectorDirAndUp params ["_v1", "_v2"];
+
+ private _endPosASL = _tagPosASL vectorAdd (_v1 vectorMultiply 0.08);
+
+ // Check for intersections below the unit
+ private _intersections = lineIntersectsSurfaces [_tagPosASL, _endPosASL, _tag, objNull, true, 1, "GEOM", "FIRE"];
+
+ // If there's no intersections
+ if (_intersections isEqualTo []) exitWith {
+ TRACE_1("No intersections, deleting:",_tag);
+ deleteVehicle _tag;
+ false
+ };
+ true
+};
+
+// If there's no more tag
+if (GVAR(tagsToTest) isEqualTo []) exitWith {
+ GVAR(testingThread) = false;
+};
+
+// Schedule for execution again after 5 seconds
+[DFUNC(tagTestingThread), [], 5] call CBA_fnc_waitAndExecute;
+GVAR(testingThread) = true;
diff --git a/addons/tagging/functions/script_component.hpp b/addons/tagging/functions/script_component.hpp
new file mode 100644
index 0000000000..bc860f2283
--- /dev/null
+++ b/addons/tagging/functions/script_component.hpp
@@ -0,0 +1 @@
+#include "\z\ace\addons\tagging\script_component.hpp"
\ No newline at end of file
diff --git a/addons/testmissions/script_component.hpp b/addons/tagging/script_component.hpp
similarity index 52%
rename from addons/testmissions/script_component.hpp
rename to addons/tagging/script_component.hpp
index 718356494d..4836d2f209 100644
--- a/addons/testmissions/script_component.hpp
+++ b/addons/tagging/script_component.hpp
@@ -1,4 +1,4 @@
-#define COMPONENT testmissions
+#define COMPONENT tagging
#include "\z\ace\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL
@@ -6,12 +6,15 @@
// #define CBA_DEBUG_SYNCHRONOUS
// #define ENABLE_PERFORMANCE_COUNTERS
-#ifdef DEBUG_ENABLED_TESTMISSIONS
+#ifdef DEBUG_ENABLED_BLANK
#define DEBUG_MODE_FULL
#endif
-#ifdef DEBUG_ENABLED_TESTMISSIONS
- #define DEBUG_SETTINGS DEBUG_ENABLED_TESTMISSIONS
+#ifdef DEBUG_SETTINGS_BLANK
+ #define DEBUG_SETTINGS DEBUG_SETTINGS_BLANK
#endif
-#include "\z\ace\addons\main\script_macros.hpp"
\ No newline at end of file
+#include "\z\ace\addons\main\script_macros.hpp"
+
+
+#define TAG_SIZE 0.6
diff --git a/addons/tagging/sounds/spray.ogg b/addons/tagging/sounds/spray.ogg
new file mode 100644
index 0000000000..127dc9db75
Binary files /dev/null and b/addons/tagging/sounds/spray.ogg differ
diff --git a/addons/tagging/stringtable.xml b/addons/tagging/stringtable.xml
new file mode 100644
index 0000000000..43f6a1e2d4
--- /dev/null
+++ b/addons/tagging/stringtable.xml
@@ -0,0 +1,95 @@
+
+
+
+
+ Tag black
+ Schwarz markieren
+ Marcar en negro
+ Oznakuj na czarno
+ Tag noir
+ Marca nero
+ Označit černě
+ Marcar em preto
+
+
+ Tag red
+ Rot markieren
+ Marcar en rojo
+ Oznakuj na czerwono
+ Tag rouge
+ Marca rosso
+ Označit červeně
+ Marcar em vermelho
+
+
+ Tag green
+ Grün markieren
+ Marcar en verde
+ Oznakuj na zielono
+ Tag vert
+ Marca verde
+ Označit zeleně
+ Marcar em verde
+
+
+ Tag blue
+ Blau markieren
+ Marcar en azul
+ Oznakuj na niebiesko
+ Tag bleu
+ Marca blu
+ Označit modře
+ Marcar em azul
+
+
+ Black spray paint
+ Schwarze Sprühfarbe
+ Pintura negra
+ Czarna farba w sprayu
+ Peinture pulvérisée noire
+ Bomboletta spray nera
+ Černý sprej
+ Spray de tinta preta
+
+
+ Red spray paint
+ Rote Sprühfarbe
+ Pintura roja
+ Czerwona farba w sprayu
+ Peinture pulvérisée rouge
+ Bomboletta spray rossa
+ Červený sprej
+ Spray de tinta vermelha
+
+
+ Green spray paint
+ Grüne Sprühfarbe
+ Pintura verde
+ Zielona farba w sprayu
+ Peinture pulvérisée verte
+ Bomboletta spray verde
+ Zelený sprej
+ Spray de tinta verde
+
+
+ Blue spray paint
+ Blaue Sprühfarbe
+ Pintura azul
+ Niebieska farba w sprayu
+ Peinture pulvérisée bleue
+ Bomboletta spray blu
+ Modrý sprej
+ Spray de tinta azul
+
+
+ A can of spray paint for tagging walls.
+ Eine Farbsprühdose um Wände zu markieren.
+ Lata de pintura en aerosol para marcar.
+ Farba w sprayu, służy do oznakowywania terenu.
+ Un spray de peinture pour taguer les murs.
+ Una bomboletta di spay per contrassegnare i muri.
+ Plechovka se sprejem k vytváření značek.
+ Uma lata de tinta spray para marcar paredes.
+
+
+
\ No newline at end of file
diff --git a/addons/testmissions/$PBOPREFIX$ b/addons/testmissions/$PBOPREFIX$
deleted file mode 100644
index c899a56127..0000000000
--- a/addons/testmissions/$PBOPREFIX$
+++ /dev/null
@@ -1 +0,0 @@
-z\ace\addons\testmissions
\ No newline at end of file
diff --git a/addons/testmissions/MPMissions/ACETestingMap1.Stratis/description.ext b/addons/testmissions/MPMissions/ACETestingMap1.Stratis/description.ext
deleted file mode 100644
index d61b2cf200..0000000000
--- a/addons/testmissions/MPMissions/ACETestingMap1.Stratis/description.ext
+++ /dev/null
@@ -1,17 +0,0 @@
-enableDebugConsole = 2; //note security risk
-
-// respawn = "GROUP";
-respawn = "BASE";
-// respawn = "BIRD";
-respawnDelay = 2;
-
-class Header {
- gameType = Coop;
- minPlayers = 1;
- maxPlayers = 491;
-};
-
-onLoadName = "ACE3 Testing";
-// onLoadMission = "";
-// author = "";
-// loadScreen = "";
\ No newline at end of file
diff --git a/addons/testmissions/MPMissions/ACETestingMap1.Stratis/init.sqf b/addons/testmissions/MPMissions/ACETestingMap1.Stratis/init.sqf
deleted file mode 100644
index f2c95b8ca2..0000000000
--- a/addons/testmissions/MPMissions/ACETestingMap1.Stratis/init.sqf
+++ /dev/null
@@ -1 +0,0 @@
-enableSaving [false, false];
diff --git a/addons/testmissions/MPMissions/ACETestingMap1.Stratis/mission.sqm b/addons/testmissions/MPMissions/ACETestingMap1.Stratis/mission.sqm
deleted file mode 100644
index 08bba0bcb1..0000000000
--- a/addons/testmissions/MPMissions/ACETestingMap1.Stratis/mission.sqm
+++ /dev/null
@@ -1,1248 +0,0 @@
-version=12;
-class Mission
-{
- addOns[]=
- {
- "A3_Characters_F_BLUFOR",
- "a3_characters_f",
- "a3_map_stratis",
- "A3_armor_f_beta_APC_Tracked_02",
- "A3_Characters_F_INDEP",
- "ace_vehiclelock",
- "A3_Soft_F_MRAP_01",
- "A3_Soft_F_Car",
- "ace_map",
- "A3_Static_F_Gamma_AA",
- "A3_Static_F_Mortar_01",
- "A3_Static_F_Gamma",
- "a3_static_f",
- "ace_captives",
- "A3_Armor_F_Slammer",
- "A3_Air_F_Beta_Heli_Attack_01",
- "ace_medical",
- "ace_common",
- "A3_Weapons_F_Ammoboxes",
- "A3_Armor_F_EPB_APC_tracked_03",
- "A3_Air_F_Heli_Light_01",
- "A3_Air_F_Beta_Heli_Transport_01",
- "A3_Armor_F_T100K",
- "A3_Boat_F_Boat_Armed_01",
- "A3_Boat_F_Civilian_Boat",
- "A3_Boat_F_Boat_Transport_01",
- "A3_Characters_F_Gamma",
- "A3_Air_F_Gamma_UAV_02",
- "A3_Static_F_Gamma_AT"
- };
- addOnsAuto[]=
- {
- "A3_Characters_F_BLUFOR",
- "a3_characters_f",
- "A3_Characters_F_INDEP",
- "ace_vehiclelock",
- "ace_captives",
- "A3_Air_F_Gamma_UAV_02",
- "A3_Characters_F_Gamma",
- "A3_Soft_F_MRAP_01",
- "A3_Soft_F_Car",
- "A3_Static_F_Gamma_AA",
- "A3_Static_F_Mortar_01",
- "A3_Static_F_Gamma",
- "a3_static_f",
- "A3_Armor_F_Slammer",
- "ace_medical",
- "ace_common",
- "A3_Weapons_F_Ammoboxes",
- "A3_Armor_F_EPB_APC_tracked_03",
- "A3_Air_F_Beta_Heli_Attack_01",
- "A3_Air_F_Heli_Light_01",
- "A3_Air_F_Beta_Heli_Transport_01",
- "A3_Armor_F_T100K",
- "A3_Boat_F_Boat_Armed_01",
- "A3_Boat_F_Civilian_Boat",
- "A3_Boat_F_Boat_Transport_01",
- "A3_Static_F_Gamma_AT",
- "a3_map_stratis"
- };
- randomSeed=709402;
- class Intel
- {
- startWeather=0;
- startWind=0;
- startWaves=0.099999994;
- forecastWeather=0;
- forecastWind=0;
- forecastWaves=0.099999994;
- forecastLightnings=0.099999994;
- year=2035;
- month=7;
- day=6;
- hour=12;
- minute=0;
- startFogDecay=0.013;
- forecastFogDecay=0.013;
- };
- class Groups
- {
- items=19;
- class Item0
- {
- side="WEST";
- class Vehicles
- {
- items=1;
- class Item0
- {
- position[]={1716.1971,5.5,5752.0244};
- azimut=-50.831005;
- id=0;
- side="WEST";
- vehicle="B_Soldier_F";
- player="PLAY CDG";
- leader=1;
- skill=0.60000002;
- init="this addItem ""ACE_key_civ""";
- description="Keys For CD";
- syncId=0;
- synchronizations[]={3};
- };
- };
- };
- class Item1
- {
- side="GUER";
- class Vehicles
- {
- items=1;
- class Item0
- {
- position[]={1709.5989,5.5,5740.709};
- azimut=-67.220284;
- id=1;
- side="GUER";
- vehicle="I_soldier_F";
- player="PLAY CDG";
- leader=1;
- skill=0.60000002;
- init="this addItem ""ACE_key_east""";
- description="Keys for AB";
- syncId=1;
- synchronizations[]={2};
- };
- };
- };
- class Item2
- {
- side="LOGIC";
- class Vehicles
- {
- items=1;
- class Item0
- {
- position[]={1712.0765,5.5,5743.5811};
- id=2;
- side="LOGIC";
- vehicle="ACE_VehicleLock_ModuleSyncedAssign";
- leader=1;
- lock="UNLOCKED";
- skill=0.60000002;
- syncId=2;
- synchronizations[]={1,6};
- };
- };
- };
- class Item3
- {
- side="LOGIC";
- class Vehicles
- {
- items=1;
- class Item0
- {
- position[]={1714.5892,5.5,5748.7002};
- id=3;
- side="LOGIC";
- vehicle="ACE_VehicleLock_ModuleSyncedAssign";
- leader=1;
- lock="UNLOCKED";
- skill=0.60000002;
- syncId=3;
- synchronizations[]={7,0};
- };
- };
- };
- class Item4
- {
- side="LOGIC";
- class Vehicles
- {
- items=1;
- class Item0
- {
- position[]={1715.7699,5.5,5745.752};
- class args
- {
- items=3;
- class Item0
- {
- value="1";
- parentCls="ACE_VehicleLock_ModuleSetup";
- typeName="LockVehicleInventory";
- };
- class Item1
- {
- value="0";
- parentCls="ACE_VehicleLock_ModuleSetup";
- typeName="SetLockState";
- };
- class Item2
- {
- value="15";
- parentCls="ACE_VehicleLock_ModuleSetup";
- typeName="DefaultLockpickStrength";
- };
- };
- id=4;
- side="LOGIC";
- vehicle="ACE_VehicleLock_ModuleSetup";
- leader=1;
- lock="UNLOCKED";
- skill=0.60000002;
- };
- };
- };
- class Item5
- {
- side="WEST";
- class Vehicles
- {
- items=1;
- class Item0
- {
- position[]={1703.6329,5.5,5730.1909};
- azimut=119.576;
- id=5;
- side="WEST";
- vehicle="B_Soldier_F";
- player="PLAY CDG";
- leader=1;
- skill=0.60000002;
- text="Q";
- init="nul = this spawn {sleep 3; [_this] call ace_medical_fnc_setUnconscious};";
- description="Q Unconscious at start";
- };
- };
- };
- class Item6
- {
- side="WEST";
- class Vehicles
- {
- items=1;
- class Item0
- {
- position[]={1702.6882,5.5,5728.8687};
- azimut=103.13899;
- id=6;
- side="WEST";
- vehicle="B_Soldier_F";
- player="PLAY CDG";
- leader=1;
- skill=0.60000002;
- text="a1";
- description="Surrender At Start";
- syncId=4;
- synchronizations[]={5};
- };
- };
- };
- class Item7
- {
- side="LOGIC";
- class Vehicles
- {
- items=1;
- class Item0
- {
- position[]={1701.0719,5.5,5727.5586};
- azimut=15.1769;
- id=7;
- side="LOGIC";
- vehicle="ace_captives_ModuleSurrender";
- leader=1;
- lock="UNLOCKED";
- skill=0.60000002;
- syncId=5;
- synchronizations[]={4};
- };
- };
- };
- class Item8
- {
- side="WEST";
- class Vehicles
- {
- items=4;
- class Item0
- {
- position[]={1703.7711,5.5,5715.2427};
- azimut=11.294894;
- id=8;
- side="WEST";
- vehicle="B_Soldier_TL_F";
- player="PLAY CDG";
- leader=1;
- rank="CORPORAL";
- skill=0.60000002;
- text="GrpNATO_A1_0";
- description="NATO Alpha 1 Fireteam Leader";
- };
- class Item1
- {
- position[]={1706.2533,5.5,5712.9951};
- azimut=11.294894;
- id=9;
- side="WEST";
- vehicle="B_Soldier_LAT_F";
- player="PLAY CDG";
- skill=0.60000002;
- text="GrpNATO_A1_1";
- description="NATO Alpha 1 Rifleman (AT)";
- };
- class Item2
- {
- position[]={1709.2836,5.5,5712.2866};
- azimut=11.294894;
- id=10;
- side="WEST";
- vehicle="B_Soldier_AAR_F";
- player="PLAY CDG";
- skill=0.60000002;
- text="GrpNATO_A1_2";
- description="NATO Alpha 1 Assistant Automatic Rifleman";
- };
- class Item3
- {
- position[]={1712.4042,5.5,5711.6323};
- azimut=11.294894;
- id=11;
- side="WEST";
- vehicle="B_Soldier_AR_F";
- player="PLAY CDG";
- skill=0.60000002;
- text="GrpNATO_A1_3";
- description="NATO Alpha 1 Automatic Rifleman";
- };
- };
- };
- class Item9
- {
- side="WEST";
- class Vehicles
- {
- items=4;
- class Item0
- {
- position[]={1700.8379,5.5,5704.4658};
- azimut=11.294894;
- id=12;
- side="WEST";
- vehicle="B_Soldier_TL_F";
- player="PLAY CDG";
- leader=1;
- rank="CORPORAL";
- skill=0.60000002;
- text="GrpNATO_A2_0";
- description="NATO Alpha 2 Fireteam Leader";
- };
- class Item1
- {
- position[]={1703.1456,5.5,5702.0576};
- azimut=11.294894;
- id=13;
- side="WEST";
- vehicle="B_Soldier_LAT_F";
- player="PLAY CDG";
- skill=0.60000002;
- text="GrpNATO_A2_1";
- description="NATO Alpha 2 Rifleman (AT)";
- };
- class Item2
- {
- position[]={1706.1492,5.5,5701.3618};
- azimut=11.294894;
- id=14;
- side="WEST";
- vehicle="B_Soldier_AAR_F";
- player="PLAY CDG";
- skill=0.60000002;
- text="GrpNATO_A2_2";
- description="NATO Alpha 2 Assistant Automatic Rifleman";
- };
- class Item3
- {
- position[]={1709.3947,5.5,5700.7007};
- azimut=11.294894;
- id=15;
- side="WEST";
- vehicle="B_Soldier_AR_F";
- player="PLAY CDG";
- skill=0.60000002;
- text="GrpNATO_A2_3";
- description="NATO Alpha 2 Automatic Rifleman";
- };
- };
- };
- class Item10
- {
- side="WEST";
- class Vehicles
- {
- items=4;
- class Item0
- {
- position[]={1696.9097,5.5,5693.7847};
- azimut=11.294894;
- id=16;
- side="WEST";
- vehicle="B_Soldier_TL_F";
- player="PLAY CDG";
- leader=1;
- rank="CORPORAL";
- skill=0.60000002;
- text="GrpNATO_A3_0";
- description="NATO Alpha 3 Fireteam Leader";
- };
- class Item1
- {
- position[]={1699.3469,5.5,5691.3257};
- azimut=11.294894;
- id=17;
- side="WEST";
- vehicle="B_Soldier_LAT_F";
- player="PLAY CDG";
- skill=0.60000002;
- text="GrpNATO_A3_1";
- description="NATO Alpha 3 Rifleman (AT)";
- };
- class Item2
- {
- position[]={1702.4423,5.5,5690.4912};
- azimut=11.294894;
- id=18;
- side="WEST";
- vehicle="B_Soldier_AAR_F";
- player="PLAY CDG";
- skill=0.60000002;
- text="GrpNATO_A3_2";
- description="NATO Alpha 3 Assistant Automatic Rifleman";
- };
- class Item3
- {
- position[]={1705.6521,5.5,5689.7666};
- azimut=11.294894;
- id=19;
- side="WEST";
- vehicle="B_Soldier_AR_F";
- player="PLAY CDG";
- skill=0.60000002;
- text="GrpNATO_A3_3";
- description="NATO Alpha 3 Automatic Rifleman";
- };
- };
- };
- class Item11
- {
- side="WEST";
- class Vehicles
- {
- items=4;
- class Item0
- {
- position[]={1685.6747,5.5,5720.1187};
- azimut=11.294894;
- id=20;
- side="WEST";
- vehicle="B_Soldier_TL_F";
- player="PLAY CDG";
- leader=1;
- rank="CORPORAL";
- skill=0.60000002;
- text="GrpNATO_B1_0";
- description="NATO Bravo 1 Fireteam Leader";
- };
- class Item1
- {
- position[]={1688.1687,5.5,5717.9639};
- azimut=11.294894;
- id=21;
- side="WEST";
- vehicle="B_Soldier_LAT_F";
- player="PLAY CDG";
- skill=0.60000002;
- text="GrpNATO_B1_1";
- description="NATO Bravo 1 Rifleman (AT)";
- };
- class Item2
- {
- position[]={1691.0776,5.5,5717.2754};
- azimut=11.294894;
- id=22;
- side="WEST";
- vehicle="B_Soldier_AAR_F";
- player="PLAY CDG";
- skill=0.60000002;
- text="GrpNATO_B1_2";
- description="NATO Bravo 1 Assistant Automatic Rifleman";
- };
- class Item3
- {
- position[]={1694.293,5.5,5716.6172};
- azimut=11.294894;
- id=23;
- side="WEST";
- vehicle="B_Soldier_AR_F";
- player="PLAY CDG";
- skill=0.60000002;
- text="GrpNATO_B1_3";
- description="NATO Bravo 1 Automatic Rifleman";
- };
- };
- };
- class Item12
- {
- side="WEST";
- class Vehicles
- {
- items=4;
- class Item0
- {
- position[]={1682.364,5.5,5709.4131};
- azimut=11.294894;
- id=24;
- side="WEST";
- vehicle="B_Soldier_TL_F";
- player="PLAY CDG";
- leader=1;
- rank="CORPORAL";
- skill=0.60000002;
- text="GrpNATO_B2_0";
- description="NATO Bravo 2 Fireteam Leader";
- };
- class Item1
- {
- position[]={1685.1151,5.5,5707.0654};
- azimut=11.294894;
- id=25;
- side="WEST";
- vehicle="B_Soldier_LAT_F";
- player="PLAY CDG";
- skill=0.60000002;
- text="GrpNATO_B2_1";
- description="NATO Bravo 2 Rifleman (AT)";
- };
- class Item2
- {
- position[]={1688.1718,5.5,5706.313};
- azimut=11.294894;
- id=26;
- side="WEST";
- vehicle="B_Soldier_AAR_F";
- player="PLAY CDG";
- skill=0.60000002;
- text="GrpNATO_B2_2";
- description="NATO Bravo 2 Assistant Automatic Rifleman";
- };
- class Item3
- {
- position[]={1691.5254,5.5,5705.6113};
- azimut=11.294894;
- id=27;
- side="WEST";
- vehicle="B_Soldier_AR_F";
- player="PLAY CDG";
- skill=0.60000002;
- text="GrpNATO_B2_3";
- description="NATO Bravo 2 Automatic Rifleman";
- };
- };
- };
- class Item13
- {
- side="WEST";
- class Vehicles
- {
- items=4;
- class Item0
- {
- position[]={1678.4825,5.5,5697.4468};
- azimut=11.294894;
- id=28;
- side="WEST";
- vehicle="B_Soldier_TL_F";
- player="PLAY CDG";
- leader=1;
- rank="CORPORAL";
- skill=0.60000002;
- text="GrpNATO_B3_0";
- description="NATO Bravo 3 Fireteam Leader";
- };
- class Item1
- {
- position[]={1681.5645,5.5,5696.561};
- azimut=11.294894;
- id=29;
- side="WEST";
- vehicle="B_Soldier_LAT_F";
- player="PLAY CDG";
- skill=0.60000002;
- text="GrpNATO_B3_1";
- description="NATO Bravo 3 Rifleman (AT)";
- };
- class Item2
- {
- position[]={1684.6531,5.5,5695.8491};
- azimut=11.294894;
- id=30;
- side="WEST";
- vehicle="B_Soldier_AAR_F";
- player="PLAY CDG";
- skill=0.60000002;
- text="GrpNATO_B3_2";
- description="NATO Bravo 3 Assistant Automatic Rifleman";
- };
- class Item3
- {
- position[]={1687.8109,5.5,5695.1021};
- azimut=11.294894;
- id=31;
- side="WEST";
- vehicle="B_Soldier_AR_F";
- player="PLAY CDG";
- skill=0.60000002;
- text="GrpNATO_B3_3";
- description="NATO Bravo 3 Automatic Rifleman";
- };
- };
- };
- class Item14
- {
- side="WEST";
- class Vehicles
- {
- items=1;
- class Item0
- {
- position[]={1540.8328,-27.831757,6018.0283};
- azimut=4.41886;
- special="FLY";
- id=32;
- side="WEST";
- vehicle="B_UAV_02_CAS_F";
- isUAV=1;
- leader=1;
- skill=0.60000002;
- };
- };
- };
- class Item15
- {
- side="WEST";
- class Vehicles
- {
- items=1;
- class Item0
- {
- position[]={2861.0947,0,6407.8574};
- azimut=4.41886;
- special="FLY";
- id=33;
- side="WEST";
- vehicle="B_UAV_02_CAS_F";
- isUAV=1;
- leader=1;
- skill=0.60000002;
- };
- };
- };
- class Item16
- {
- side="WEST";
- class Vehicles
- {
- items=1;
- class Item0
- {
- position[]={1944.1785,0,6868.8906};
- azimut=4.41886;
- special="FLY";
- id=34;
- side="WEST";
- vehicle="B_UAV_02_CAS_F";
- isUAV=1;
- leader=1;
- skill=0.60000002;
- };
- };
- };
- class Item17
- {
- side="WEST";
- class Vehicles
- {
- items=4;
- class Item0
- {
- position[]={1713.3085,5.5,5725.0205};
- azimut=98.173798;
- id=35;
- side="WEST";
- vehicle="B_medic_F";
- player="PLAY CDG";
- leader=1;
- rank="LIEUTENANT";
- skill=0.60000002;
- text="Medic2";
- description="Medic 2";
- };
- class Item1
- {
- position[]={1712.2098,5.5,5727.1675};
- azimut=98.173798;
- id=36;
- side="WEST";
- vehicle="B_medic_F";
- player="PLAY CDG";
- skill=0.60000002;
- text="Medic1";
- description="Medic 1";
- };
- class Item2
- {
- position[]={1711.6387,5.5,5725.041};
- azimut=98.173798;
- id=37;
- side="WEST";
- vehicle="B_medic_F";
- player="PLAY CDG";
- skill=0.60000002;
- text="Medic3";
- description="Medic 3";
- };
- class Item3
- {
- position[]={1710.0735,5.5,5726.4287};
- id=38;
- side="WEST";
- vehicle="B_soldier_UAV_F";
- player="PLAY CDG";
- skill=0.60000002;
- text="uavGuy";
- };
- };
- };
- class Item18
- {
- side="WEST";
- class Vehicles
- {
- items=2;
- class Item0
- {
- position[]={1722.298,5.5,5733.4629};
- azimut=4.41886;
- special="FLY";
- id=39;
- side="WEST";
- vehicle="B_Soldier_F";
- player="PLAYER COMMANDER";
- leader=1;
- skill=0.60000002;
- text="R1";
- description="sp tester";
- };
- class Item1
- {
- position[]={1722.7957,5.5,5732.481};
- azimut=4.41886;
- special="FLY";
- id=40;
- side="WEST";
- vehicle="B_Soldier_F";
- player="PLAY CDG";
- skill=0.60000002;
- text="R2";
- description="sp tester2";
- };
- };
- };
- };
- class Vehicles
- {
- items=38;
- class Item0
- {
- position[]={1706.5913,5.5,5748.0903};
- azimut=-68.59301;
- id=41;
- side="EMPTY";
- vehicle="B_MRAP_01_F";
- leader=1;
- skill=0.60000002;
- text="car1";
- syncId=6;
- synchronizations[]={2};
- };
- class Item1
- {
- position[]={1707.5599,5.5,5753.0518};
- azimut=-65.45974;
- id=42;
- side="EMPTY";
- vehicle="B_MRAP_01_F";
- leader=1;
- lock="LOCKED";
- skill=0.60000002;
- text="car3";
- syncId=7;
- synchronizations[]={3};
- };
- class Item2
- {
- position[]={1708.7251,5.5,5757.8809};
- azimut=-65.45974;
- id=43;
- side="EMPTY";
- vehicle="C_Hatchback_01_F";
- leader=1;
- lock="UNLOCKED";
- skill=0.60000002;
- text="car4";
- };
- class Item3
- {
- position[]={1704.4299,5.5,5742.8721};
- azimut=-68.59301;
- id=44;
- side="EMPTY";
- vehicle="C_Hatchback_01_F";
- leader=1;
- lock="UNLOCKED";
- skill=0.60000002;
- text="car0";
- init="this setVariable [""ACE_VehicleLock_lockSide"", east];";
- };
- class Item4
- {
- position[]={1738.8502,5.5,5728.8525};
- azimut=101.05981;
- id=45;
- side="EMPTY";
- vehicle="B_static_AA_F";
- skill=0.60000002;
- text="q1";
- };
- class Item5
- {
- position[]={1738.4388,5.5,5726.1929};
- azimut=101.05981;
- id=46;
- side="EMPTY";
- vehicle="B_Mortar_01_F";
- skill=0.60000002;
- text="q2";
- };
- class Item6
- {
- position[]={1737.8582,5.5,5723.3979};
- azimut=101.05981;
- id=47;
- side="EMPTY";
- vehicle="B_HMG_01_high_F";
- skill=0.60000002;
- text="q3";
- };
- class Item7
- {
- position[]={1738.9786,5.5,5734.6968};
- azimut=104.535;
- id=48;
- side="EMPTY";
- vehicle="B_MBT_01_cannon_F";
- lock="UNLOCKED";
- skill=0.60000002;
- };
- class Item8
- {
- position[]={1734.713,5.5,5720.061};
- azimut=10.202663;
- id=49;
- side="EMPTY";
- vehicle="ACE_medicalSupplyCrate";
- leader=1;
- skill=0.60000002;
- };
- class Item9
- {
- position[]={1737.2236,5.5,5719.5591};
- azimut=10.202663;
- id=50;
- side="EMPTY";
- vehicle="ACE_medicalSupplyCrate";
- leader=1;
- skill=0.60000002;
- };
- class Item10
- {
- position[]={1733.2904,5.5,5717.6465};
- azimut=13.57355;
- id=51;
- side="EMPTY";
- vehicle="ACE_Box_Misc";
- leader=1;
- skill=0.60000002;
- };
- class Item11
- {
- position[]={1736.1099,5.5,5717.1831};
- azimut=13.57355;
- id=52;
- side="EMPTY";
- vehicle="ACE_Box_Misc";
- leader=1;
- skill=0.60000002;
- };
- class Item12
- {
- position[]={1732.4794,5.5,5715.4067};
- azimut=9.5156059;
- id=53;
- side="EMPTY";
- vehicle="Box_NATO_AmmoOrd_F";
- leader=1;
- skill=0.60000002;
- };
- class Item13
- {
- position[]={1735.2601,5.5,5714.7891};
- azimut=9.5156059;
- id=54;
- side="EMPTY";
- vehicle="Box_NATO_AmmoOrd_F";
- leader=1;
- skill=0.60000002;
- };
- class Item14
- {
- position[]={1743.4641,5.5,5753.5161};
- azimut=104.535;
- id=55;
- side="EMPTY";
- vehicle="B_MRAP_01_hmg_F";
- lock="UNLOCKED";
- skill=0.60000002;
- };
- class Item15
- {
- position[]={1741.916,5.5,5747.4302};
- azimut=104.535;
- id=56;
- side="EMPTY";
- vehicle="I_APC_tracked_03_cannon_F";
- lock="UNLOCKED";
- skill=0.60000002;
- };
- class Item16
- {
- position[]={1722.1113,5.5,5768.3818};
- azimut=193.13876;
- id=57;
- side="EMPTY";
- vehicle="B_Heli_Attack_01_F";
- skill=0.60000002;
- };
- class Item17
- {
- position[]={1733.6005,5.5,5765.2881};
- azimut=198.2417;
- id=58;
- side="EMPTY";
- vehicle="B_Heli_Light_01_armed_F";
- skill=0.60000002;
- };
- class Item18
- {
- position[]={1746.17,5.5,5764.1099};
- azimut=198.97742;
- id=59;
- side="EMPTY";
- vehicle="B_Heli_Transport_01_F";
- skill=0.60000002;
- };
- class Item19
- {
- position[]={1909.3875,10.094501,5668.21};
- azimut=4.41886;
- id=60;
- side="EMPTY";
- vehicle="O_MBT_02_cannon_F";
- skill=0.60000002;
- };
- class Item20
- {
- position[]={1724.0231,5.5,5722.8857};
- azimut=104.535;
- id=61;
- side="EMPTY";
- vehicle="Box_IND_Wps_F";
- skill=0.60000002;
- };
- class Item21
- {
- position[]={1724.6892,5.5,5724.7744};
- azimut=104.535;
- id=62;
- side="EMPTY";
- vehicle="Box_IND_Ammo_F";
- skill=0.60000002;
- };
- class Item22
- {
- position[]={1717.6512,5.5,5724.0181};
- azimut=104.535;
- id=63;
- side="EMPTY";
- vehicle="Box_IND_Wps_F";
- skill=0.60000002;
- };
- class Item23
- {
- position[]={1718.2023,5.5,5726.3066};
- azimut=104.535;
- id=64;
- side="EMPTY";
- vehicle="Box_IND_Ammo_F";
- skill=0.60000002;
- };
- class Item24
- {
- position[]={1733.6895,5.5,5706.4785};
- azimut=104.535;
- id=65;
- side="EMPTY";
- vehicle="Box_NATO_WpsLaunch_F";
- skill=0.60000002;
- };
- class Item25
- {
- position[]={1733.21,5.5,5704.1836};
- azimut=104.535;
- id=66;
- side="EMPTY";
- vehicle="Box_East_WpsLaunch_F";
- skill=0.60000002;
- };
- class Item26
- {
- position[]={1732.4906,5.5,5701.6831};
- azimut=104.535;
- id=67;
- side="EMPTY";
- vehicle="Box_IND_WpsLaunch_F";
- skill=0.60000002;
- };
- class Item27
- {
- position[]={1825.109,5.5,5676.3613};
- azimut=4.41886;
- id=68;
- side="EMPTY";
- vehicle="O_MBT_02_cannon_F";
- skill=0.60000002;
- text="t1";
- };
- class Item28
- {
- position[]={1894.5531,5.6621442,5745.1523};
- azimut=4.41886;
- id=69;
- side="EMPTY";
- vehicle="O_MBT_02_cannon_F";
- skill=0.60000002;
- };
- class Item29
- {
- position[]={1863.2545,5.5,5712.0615};
- azimut=4.41886;
- id=70;
- side="EMPTY";
- vehicle="O_MBT_02_cannon_F";
- skill=0.60000002;
- };
- class Item30
- {
- position[]={1740.923,5.5,5741.1685};
- azimut=104.535;
- id=71;
- side="EMPTY";
- vehicle="B_MBT_01_cannon_F";
- lock="UNLOCKED";
- skill=0.60000002;
- };
- class Item31
- {
- position[]={1721.363,5.5,5724.4956};
- azimut=104.535;
- id=72;
- side="EMPTY";
- vehicle="Box_NATO_Grenades_F";
- lock="UNLOCKED";
- skill=0.60000002;
- };
- class Item32
- {
- position[]={1722.3844,5.5,5727.0381};
- azimut=104.535;
- id=73;
- side="EMPTY";
- vehicle="Box_NATO_WpsSpecial_F";
- lock="UNLOCKED";
- skill=0.60000002;
- };
- class Item33
- {
- position[]={1644.8666,0,5751.0166};
- azimut=-19.956911;
- id=74;
- side="EMPTY";
- vehicle="B_Boat_Armed_01_minigun_F";
- skill=0.60000002;
- };
- class Item34
- {
- position[]={1639.6296,0,5741.1772};
- azimut=-19.956911;
- id=75;
- side="EMPTY";
- vehicle="B_Boat_Armed_01_minigun_F";
- skill=0.60000002;
- };
- class Item35
- {
- position[]={1636.3765,0,5727.1333};
- azimut=-19.9569;
- id=76;
- side="EMPTY";
- vehicle="C_Boat_Civil_01_F";
- skill=0.60000002;
- };
- class Item36
- {
- position[]={1652.0231,-0.71640843,5760.2349};
- azimut=-19.9569;
- id=77;
- side="EMPTY";
- vehicle="B_Boat_Transport_01_F";
- skill=0.60000002;
- };
- class Item37
- {
- position[]={1739.5898,5.5,5730.6455};
- azimut=101.06;
- id=78;
- side="EMPTY";
- vehicle="B_static_AT_F";
- skill=0.60000002;
- text="q0";
- };
- };
-};
-class Intro
-{
- addOns[]=
- {
- "a3_map_stratis"
- };
- addOnsAuto[]=
- {
- "a3_map_stratis"
- };
- randomSeed=13628778;
- class Intel
- {
- timeOfChanges=1800.0002;
- startWeather=0.30000001;
- startWind=0.1;
- startWaves=0.1;
- forecastWeather=0.30000001;
- forecastWind=0.1;
- forecastWaves=0.1;
- forecastLightnings=0.1;
- year=2035;
- month=7;
- day=6;
- hour=12;
- minute=0;
- startFogDecay=0.013;
- forecastFogDecay=0.013;
- };
-};
-class OutroWin
-{
- addOns[]=
- {
- "a3_map_stratis"
- };
- addOnsAuto[]=
- {
- "a3_map_stratis"
- };
- randomSeed=8997795;
- class Intel
- {
- timeOfChanges=1800.0002;
- startWeather=0.30000001;
- startWind=0.1;
- startWaves=0.1;
- forecastWeather=0.30000001;
- forecastWind=0.1;
- forecastWaves=0.1;
- forecastLightnings=0.1;
- year=2035;
- month=7;
- day=6;
- hour=12;
- minute=0;
- startFogDecay=0.013;
- forecastFogDecay=0.013;
- };
-};
-class OutroLoose
-{
- addOns[]=
- {
- "a3_map_stratis"
- };
- addOnsAuto[]=
- {
- "a3_map_stratis"
- };
- randomSeed=1617621;
- class Intel
- {
- timeOfChanges=1800.0002;
- startWeather=0.30000001;
- startWind=0.1;
- startWaves=0.1;
- forecastWeather=0.30000001;
- forecastWind=0.1;
- forecastWaves=0.1;
- forecastLightnings=0.1;
- year=2035;
- month=7;
- day=6;
- hour=12;
- minute=0;
- startFogDecay=0.013;
- forecastFogDecay=0.013;
- };
-};
diff --git a/addons/testmissions/config.cpp b/addons/testmissions/config.cpp
deleted file mode 100644
index 3a73a661d5..0000000000
--- a/addons/testmissions/config.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-#include "script_component.hpp"
-
-class CfgPatches {
- class ADDON {
- units[] = {};
- weapons[] = {};
- requiredVersion = REQUIRED_VERSION;
- requiredAddons[] = {"ace_common"};
- VERSION_CONFIG;
- };
-};
-
-class CfgMissions {
- class MPMissions {
- class ACETestingMap1 {
- briefingName = "ACE Testing Map 1";
- directory = QUOTE(PATHTO_R(MPMissions\ACETestingMap1.Stratis));
- };
- };
-};
diff --git a/addons/thermals/config.cpp b/addons/thermals/config.cpp
index 07d19d1b50..b4ad00f41c 100644
--- a/addons/thermals/config.cpp
+++ b/addons/thermals/config.cpp
@@ -6,8 +6,9 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
- author[] = {"[TF]Nkey"};
- authorUrl = "https://github.com/michail-nikolaev/";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"[TF]Nkey"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
diff --git a/addons/trenches/CfgEventHandlers.hpp b/addons/trenches/CfgEventHandlers.hpp
index dca07992b9..5b2eb3a053 100644
--- a/addons/trenches/CfgEventHandlers.hpp
+++ b/addons/trenches/CfgEventHandlers.hpp
@@ -1,4 +1,10 @@
+class Extended_PreStart_EventHandlers {
+ class ADDON {
+ init = QUOTE(call COMPILE_FILE(XEH_preStart));
+ };
+};
+
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
@@ -18,3 +24,9 @@ class Extended_Killed_EventHandlers {
};
};
};
+
+class Extended_DisplayLoad_EventHandlers {
+ class RscDisplayMission {
+ ADDON = QUOTE(_this call COMPILE_FILE(XEH_missionDisplayLoad));
+ };
+};
diff --git a/addons/trenches/CfgVehicles.hpp b/addons/trenches/CfgVehicles.hpp
index 81880a4265..9c93e555ac 100644
--- a/addons/trenches/CfgVehicles.hpp
+++ b/addons/trenches/CfgVehicles.hpp
@@ -1,3 +1,26 @@
+class CBA_Extended_EventHandlers;
+
+#define ACE_TRENCHES_ACTIONS class ACE_Actions { \
+ class ACE_MainActions { \
+ displayName = ECSTRING(interaction,MainAction); \
+ selection = ""; \
+ distance = 3; \
+ condition = QUOTE(true); \
+ class ACE_ContinueDiggingTrench { \
+ displayName = CSTRING(ContinueDiggingTrench); \
+ condition = QUOTE([ARR_2(_target,_player)] call FUNC(canContinueDiggingTrench)); \
+ statement = QUOTE([ARR_2(_target,_player)] call FUNC(continueDiggingTrench);); \
+ priority = -1; \
+ }; \
+ class ACE_RemoveTrench { \
+ displayName = CSTRING(RemoveEnvelope); \
+ condition = QUOTE([ARR_2(_target,_player)] call FUNC(canRemoveTrench)); \
+ statement = QUOTE([ARR_2(_target,_player)] call FUNC(removeTrench);); \
+ priority = -1; \
+ }; \
+ }; \
+ }
+
class CfgVehicles {
class Man;
class CAManBase: Man {
@@ -5,23 +28,23 @@ class CfgVehicles {
class ACE_Equipment {
class GVAR(digEnvelopeSmall) {
displayName = CSTRING(DigEnvelopeSmall);
- condition = QUOTE([ARR_2(_this select 0,'ace_trenches_trenchSmall')] call FUNC(canDigTrench));
+ condition = QUOTE(_player call FUNC(canDigTrench));
//wait a frame to handle "Do When releasing action menu key" option
- statement = QUOTE([ARR_2({_this call FUNC(placeTrench)},[ARR_2(_this select 0,'ace_trenches_trenchSmall')])] call EFUNC(common,execNextFrame));
+ statement = QUOTE([ARR_2({_this call FUNC(placeTrench)},[ARR_2(_this select 0,'ACE_envelope_small')])] call CBA_fnc_execNextFrame);
exceptions[] = {};
showDisabled = 0;
priority = 4;
- //icon = PATHTOF(UI\icon_sandbag_ca.paa);
+ //icon = QPATHTOF(UI\icon_sandbag_ca.paa);
};
class GVAR(digEnvelopeBig) {
displayName = CSTRING(DigEnvelopeBig);
- condition = QUOTE([ARR_2(_this select 0,'ace_trenches_trenchBig')] call FUNC(canDigTrench));
+ condition = QUOTE(_player call FUNC(canDigTrench));
//wait a frame to handle "Do When releasing action menu key" option
- statement = QUOTE([ARR_2({_this call FUNC(placeTrench)},[ARR_2(_this select 0,'ace_trenches_trenchBig')])] call EFUNC(common,execNextFrame));
+ statement = QUOTE([ARR_2({_this call FUNC(placeTrench)},[ARR_2(_this select 0,'ACE_envelope_big')])] call CBA_fnc_execNextFrame);
exceptions[] = {};
showDisabled = 0;
priority = 4;
- //icon = PATHTOF(UI\icon_sandbag_ca.paa);
+ //icon = QPATHTOF(UI\icon_sandbag_ca.paa);
};
};
};
@@ -32,27 +55,44 @@ class CfgVehicles {
author = ECSTRING(common,ACETeam);
displayName = CSTRING(EnvelopeSmallName);
descriptionShort = CSTRING(EnevlopeSmallDescription);
- model = QUOTE(PATHTOEF(apl,ace_envelope_small4.p3d));
+ model = QPATHTOEF(apl,ace_envelope_small4.p3d);
scope = 2;
+ GVAR(diggingDuration) = 20;
+ GVAR(removalDuration) = 12;
+ GVAR(noGeoClass) = "ACE_envelope_small_NoGeo";
+ GVAR(placementData)[] = {2,3,0.35};
+ GVAR(grassCuttingPoints)[] = {{0,-0.5,0}};
+ ACE_TRENCHES_ACTIONS;
+ class EventHandlers {
+ class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
+ };
};
class ACE_envelope_big: BagFence_base_F {
author = ECSTRING(common,ACETeam);
displayName = CSTRING(EnvelopeBigName);
descriptionShort = CSTRING(EnevlopeBigDescription);
- model = QUOTE(PATHTOEF(apl,ace_envelope_big4.p3d));
+ model = QPATHTOEF(apl,ace_envelope_big4.p3d);
scope = 2;
+ GVAR(diggingDuration) = 25;
+ GVAR(removalDuration) = 15;
+ GVAR(noGeoClass) = "ACE_envelope_big_NoGeo";
+ GVAR(placementData)[] = {6,1.1,0.20};
+ GVAR(grassCuttingPoints)[] = {{-1.5,-1,0},{1.5,-1,0}};
+ ACE_TRENCHES_ACTIONS;
+ class EventHandlers {
+ class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
+ };
};
-
class ACE_envelope_small_NoGeo: ACE_envelope_small {
scope = 1;
//@todo: replace by a no geo model
- model = QUOTE(PATHTOEF(apl,ace_envelope_small4_nogeo.p3d));
+ model = QPATHTOEF(apl,ace_envelope_small4_nogeo.p3d);
};
class ACE_envelope_big_NoGeo: ACE_envelope_big {
scope = 1;
//@todo: replace by a no geo model
- model = QUOTE(PATHTOEF(apl,ace_envelope_big4_nogeo.p3d));
+ model = QPATHTOEF(apl,ace_envelope_big4_nogeo.p3d);
};
class Box_NATO_Support_F;
diff --git a/addons/trenches/CfgWeapons.hpp b/addons/trenches/CfgWeapons.hpp
index 5b20e9e4c1..9f9049360a 100644
--- a/addons/trenches/CfgWeapons.hpp
+++ b/addons/trenches/CfgWeapons.hpp
@@ -6,8 +6,8 @@ class CfgWeapons {
author = ECSTRING(common,ACETeam);
displayName = CSTRING(EntrenchingToolName);
descriptionShort = CSTRING(EntrenchingToolDescription);
- model = QUOTE(PATHTOEF(apl,ace_entrchtool.p3d));
- picture = QUOTE(PATHTOF(ui\w_entrchtool_ca.paa));
+ model = QPATHTOEF(apl,ace_entrchtool.p3d);
+ picture = QPATHTOF(ui\w_entrchtool_ca.paa);
scope = 2;
class ItemInfo: InventoryItem_Base_F {
mass = 10;
diff --git a/addons/trenches/XEH_PREP.hpp b/addons/trenches/XEH_PREP.hpp
new file mode 100644
index 0000000000..2e671acb85
--- /dev/null
+++ b/addons/trenches/XEH_PREP.hpp
@@ -0,0 +1,16 @@
+
+PREP(canContinueDiggingTrench);
+PREP(canDigTrench);
+PREP(canRemoveTrench);
+PREP(continueDiggingTrench);
+PREP(handleInteractMenuOpened);
+PREP(handleKilled);
+PREP(handlePlayerChanged);
+PREP(handlePlayerInventoryChanged);
+PREP(handleScrollWheel);
+PREP(handleUnconscious);
+PREP(placeCancel);
+PREP(placeConfirm);
+PREP(placeTrench);
+PREP(removeTrench);
+PREP(setTrenchPlacement);
diff --git a/addons/trenches/XEH_missionDisplayLoad.sqf b/addons/trenches/XEH_missionDisplayLoad.sqf
new file mode 100644
index 0000000000..2c4951ec7a
--- /dev/null
+++ b/addons/trenches/XEH_missionDisplayLoad.sqf
@@ -0,0 +1,6 @@
+#include "script_component.hpp"
+
+params ["_display"];
+
+_display displayAddEventHandler ["MouseZChanged", {(_this select 1) call FUNC(handleScrollWheel)}];
+_display displayAddEventHandler ["MouseButtonDown", {[ACE_player, _this select 1] call FUNC(placeCancel)}];
diff --git a/addons/trenches/XEH_postInit.sqf b/addons/trenches/XEH_postInit.sqf
index d0e8775f05..af6038d992 100644
--- a/addons/trenches/XEH_postInit.sqf
+++ b/addons/trenches/XEH_postInit.sqf
@@ -12,17 +12,15 @@ GVAR(trench) = objNull;
GVAR(digPFH) = -1;
GVAR(digDirection) = 0;
-[{_this call FUNC(handleScrollWheel)}] call EFUNC(common,addScrollWheelEventHandler);
-
// Cancel dig sandbag if interact menu opened
-["interactMenuOpened", {[ACE_player] call FUNC(handleInteractMenuOpened)}] call EFUNC(common,addEventHandler);
+["ace_interactMenuOpened", {[ACE_player] call FUNC(handleInteractMenuOpened)}] call CBA_fnc_addEventHandler;
// Cancel dig on player change. This does work when returning to lobby, but not when hard disconnecting.
-["playerChanged", {_this call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler);
-["playerInventoryChanged", {_this call FUNC(handlePlayerInventoryChanged)}] call EFUNC(common,addEventhandler);
-["playerVehicleChanged", {[ACE_player, objNull] call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler);
+["ace_playerChanged", {_this call FUNC(handlePlayerChanged)}] call CBA_fnc_addEventHandler;
+["ace_playerInventoryChanged", {_this call FUNC(handlePlayerInventoryChanged)}] call CBA_fnc_addEventHandler;
+["ace_playerVehicleChanged", {[ACE_player, objNull] call FUNC(handlePlayerChanged)}] call CBA_fnc_addEventHandler;
// handle waking up dragged unit and falling unconscious while dragging
-["medical_onUnconscious", {_this call FUNC(handleUnconscious)}] call EFUNC(common,addEventhandler);
+["ace_unconscious", {_this call FUNC(handleUnconscious)}] call CBA_fnc_addEventHandler;
//@todo Captivity?
diff --git a/addons/trenches/XEH_preInit.sqf b/addons/trenches/XEH_preInit.sqf
index 55dc19e9b1..a7feade1c3 100644
--- a/addons/trenches/XEH_preInit.sqf
+++ b/addons/trenches/XEH_preInit.sqf
@@ -2,21 +2,6 @@
ADDON = false;
-PREP(canDigTrench);
-PREP(handleInteractMenuOpened);
-PREP(handleKilled);
-PREP(handlePlayerChanged);
-PREP(handlePlayerInventoryChanged);
-PREP(handleScrollWheel);
-PREP(handleUnconscious);
-PREP(placeCancel);
-PREP(placeConfirm);
-PREP(placeTrench);
-
-// Trench types
-// Name of the object, name of th dummy no geo object, dx, dy
-GVAR(trenchSmall) = ["ACE_envelope_small", "ACE_envelope_small_NoGeo", 2, 3, 0.35];
-GVAR(trenchBig) = ["ACE_envelope_big", "ACE_envelope_big_NoGeo", 6, 1.1, 0.20];
-GVAR(trenchType) = GVAR(trenchSmall);
+#include "XEH_PREP.hpp"
ADDON = true;
diff --git a/addons/trenches/XEH_preStart.sqf b/addons/trenches/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/trenches/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/trenches/config.cpp b/addons/trenches/config.cpp
index e2f2b5b4fe..f090a3ecf4 100644
--- a/addons/trenches/config.cpp
+++ b/addons/trenches/config.cpp
@@ -6,11 +6,17 @@ class CfgPatches {
weapons[] = {"ACE_EntrenchingTool"};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_interaction"};
- author[] = {"Grey", "esteldunedain"};
- authorUrl = "";
+ author = ECSTRING(common,ACETeam);
+ authors[] = {"Grey", "esteldunedain"};
+ url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
+
#include "CfgEventHandlers.hpp"
#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"
+
+class ACE_newEvents {
+ interactMenuOpened = "ace_interactMenuOpened";
+};
diff --git a/addons/trenches/functions/fnc_canContinueDiggingTrench.sqf b/addons/trenches/functions/fnc_canContinueDiggingTrench.sqf
new file mode 100644
index 0000000000..2e1942d6b8
--- /dev/null
+++ b/addons/trenches/functions/fnc_canContinueDiggingTrench.sqf
@@ -0,0 +1,27 @@
+/*
+ * Author: SzwedzikPL
+ * Checks if a unit can continue digging a trench
+ *
+ * Arguments:
+ * 0: trench
+ * 1: unit
+ *
+ * Return Value:
+ * Can continue
+ *
+ * Example:
+ * [TrenchObj, ACE_player] call ace_trenches_fnc_canContinueDiggingTrench
+ *
+ * Public: No
+ */
+#include "script_component.hpp"
+
+params ["_trench", "_unit"];
+
+if !("ACE_EntrenchingTool" in items _unit) exitWith {false};
+if ((_trench getVariable [QGVAR(progress), 0]) >= 1) exitWith {false};
+
+// Prevent removing/digging trench by more than one person
+if (_trench getVariable [QGVAR(digging), false]) exitWith {false};
+
+true
diff --git a/addons/trenches/functions/fnc_canDigTrench.sqf b/addons/trenches/functions/fnc_canDigTrench.sqf
index 9dc5e29017..0cbed2d9b7 100644
--- a/addons/trenches/functions/fnc_canDigTrench.sqf
+++ b/addons/trenches/functions/fnc_canDigTrench.sqf
@@ -4,7 +4,6 @@
*
* Arguments:
* 0: Unit
- * 1: Trench type
*
* Return Value:
* Can dig
@@ -18,17 +17,15 @@
#define SURFACE_BLACKLIST ["water", "concrete", "tarmac", "wood", "metal", "roof_tin", "roof_tiles", "wood_int", "concrete_int", "tiles_int", "metal_int", "stony", "rock", "int_concrete", "int_tiles", "int_wood", "tiling", "wavymetal", "int_metal"]
-params ["_unit","_trenchTypeName"];
+params ["_unit"];
if !("ACE_EntrenchingTool" in items _unit) exitWith {false};
// Can't dig trench if above ground level
if ((getPosATL _unit) select 2 > 0.05) exitWith {false};
-private ["_surfaceClass", "_surfaceType"];
-
-_surfaceClass = (surfaceType getPosASL _unit) select [1];
-_surfaceType = getText (configFile >> "CfgSurfaces" >> _surfaceClass >> "soundEnviron");
+private _surfaceClass = (surfaceType getPosASL _unit) select [1];
+private _surfaceType = getText (configFile >> "CfgSurfaces" >> _surfaceClass >> "soundEnviron");
TRACE_1("",_surfaceType);
!(_surfaceType in SURFACE_BLACKLIST)
diff --git a/addons/trenches/functions/fnc_canRemoveTrench.sqf b/addons/trenches/functions/fnc_canRemoveTrench.sqf
new file mode 100644
index 0000000000..4e33857637
--- /dev/null
+++ b/addons/trenches/functions/fnc_canRemoveTrench.sqf
@@ -0,0 +1,26 @@
+/*
+ * Author: SzwedzikPL
+ * Checks if a unit can remove a trench
+ *
+ * Arguments:
+ * 0: trench
+ * 1: unit
+ *
+ * Return Value:
+ * Can remove
+ *
+ * Example:
+ * [TrenchObj, ACE_player] call ace_trenches_fnc_canRemoveTrench
+ *
+ * Public: No
+ */
+#include "script_component.hpp"
+
+params ["_trench", "_unit"];
+
+if !("ACE_EntrenchingTool" in items _unit) exitWith {false};
+
+// Prevent removing/digging trench by more than one person
+if (_trench getVariable [QGVAR(digging), false]) exitWith {false};
+
+true
diff --git a/addons/trenches/functions/fnc_continueDiggingTrench.sqf b/addons/trenches/functions/fnc_continueDiggingTrench.sqf
new file mode 100644
index 0000000000..954eed1ca3
--- /dev/null
+++ b/addons/trenches/functions/fnc_continueDiggingTrench.sqf
@@ -0,0 +1,91 @@
+/*
+ * Author: Garth 'L-H' de Wet, Ruthberg, edited by commy2 for better MP and eventual AI support, esteldunedain
+ * Continue process of digging trench.
+ *
+ * Arguments:
+ * 0: trench
+ * 1: unit
+ *
+ * Return Value:
+ * None
+ *
+ * Example:
+ * [TrenchObj, ACE_player] call ace_trenches_fnc_continueDiggingTrench
+ *
+ * Public: No
+ */
+#include "script_component.hpp"
+
+params ["_trench", "_unit"];
+TRACE_2("continueDiggingTrench",_trench,_unit);
+
+private _actualProgress = _trench getVariable [QGVAR(progress), 0];
+if(_actualProgress == 1) exitWith {};
+
+// Mark trench as being worked on
+_trench setVariable [QGVAR(digging), true, true];
+
+private _digTime = getNumber (configFile >> "CfgVehicles" >> (typeof _trench) >> QGVAR(diggingDuration));
+private _digTimeLeft = _digTime * (1 - _actualProgress);
+
+private _placeData = _trench getVariable [QGVAR(placeData), [[], []]];
+_placeData params ["_basePos", "_vecDirAndUp"];
+
+private _trenchId = _unit getVariable [QGVAR(isDiggingId), -1];
+if(_trenchId < 0) then {
+ _trenchId = GVAR(trenchId);
+ _unit setVariable [QGVAR(isDiggingId), _trenchId, true];
+ GVAR(trenchId) = GVAR(trenchId) + 1;
+};
+
+// Create progress bar
+private _fnc_onFinish = {
+ (_this select 0) params ["_unit", "_trench"];
+ _unit setVariable [QGVAR(isDiggingId), -1, true];
+ _trench setVariable [QGVAR(digging), false, true];
+
+ // Save progress global
+ private _progress = _trench getVariable [QGVAR(progress), 0];
+ _trench setVariable [QGVAR(progress), _progress, true];
+
+ // Reset animation
+ [_unit, "", 1] call EFUNC(common,doAnimation);
+};
+private _fnc_onFailure = {
+ (_this select 0) params ["_unit", "_trench"];
+ _unit setVariable [QGVAR(isDiggingId), -1, true];
+ _trench setVariable [QGVAR(digging), false, true];
+
+ // Save progress global
+ private _progress = _trench getVariable [QGVAR(progress), 0];
+ _trench setVariable [QGVAR(progress), _progress, true];
+
+ // Reset animation
+ [_unit, "", 1] call EFUNC(common,doAnimation);
+};
+[(_digTimeLeft + 0.5), [_unit, _trench], _fnc_onFinish, _fnc_onFailure, localize LSTRING(DiggingTrench)] call EFUNC(common,progressBar);
+
+if(_actualProgress == 0) then {
+ [_unit, _trench, _trenchId, _basePos vectorDiff [0, 0, 1.0], _vecDirAndUp, _actualProgress] call FUNC(setTrenchPlacement);
+
+ //Remove grass
+ {
+ private _trenchGrassCutter = createVehicle ["Land_ClutterCutter_medium_F", [0, 0, 0], [], 0, "NONE"];
+ private _cutterPos = AGLToASL (_trench modelToWorld _x);
+ _cutterPos set [2, getTerrainHeightASL _cutterPos];
+ _trenchGrassCutter setPosASL _cutterPos;
+ deleteVehicle _trenchGrassCutter;
+ } foreach getArray (configFile >> "CfgVehicles" >> (typeof _trench) >> QGVAR(grassCuttingPoints));
+};
+
+private _progressLeft = (_actualProgress * 10) + 1;
+private ["_i"];
+for "_i" from _progressLeft to 10 do {
+ private _vectorDiffZ = 1 - (_i / 10);
+ private _delay = _digTime * ((_i / 10) - _actualProgress);
+ private _progress = _i / 10;
+ [DFUNC(setTrenchPlacement), [_unit, _trench, _trenchId, _basePos vectorDiff [0, 0, _vectorDiffZ], _vecDirAndUp, _progress], _delay] call CBA_fnc_waitAndExecute;
+};
+
+// Play animation
+[_unit, "AinvPknlMstpSnonWnonDnon_medic4"] call EFUNC(common,doAnimation);
diff --git a/addons/trenches/functions/fnc_handleScrollWheel.sqf b/addons/trenches/functions/fnc_handleScrollWheel.sqf
index 783463dd25..5dbe661417 100644
--- a/addons/trenches/functions/fnc_handleScrollWheel.sqf
+++ b/addons/trenches/functions/fnc_handleScrollWheel.sqf
@@ -15,9 +15,9 @@
*/
#include "script_component.hpp"
-params ["_scroll"];
+if (GVAR(digPFH) == -1) exitWith {false};
-if (GETMVAR(ACE_Modifier,0) == 0 || GVAR(digPFH) == -1) exitWith { false };
+params ["_scroll"];
GVAR(digDirection) = GVAR(digDirection) + (_scroll * 5);
diff --git a/addons/trenches/functions/fnc_placeCancel.sqf b/addons/trenches/functions/fnc_placeCancel.sqf
index a48d6e3f5b..b3d6bf78da 100644
--- a/addons/trenches/functions/fnc_placeCancel.sqf
+++ b/addons/trenches/functions/fnc_placeCancel.sqf
@@ -3,7 +3,8 @@
* Cancels trench dig
*
* Arguments:
- * 0: unit
+ * 0: Unit
+ * 1: Key
*
* Return Value:
* None
@@ -15,7 +16,9 @@
*/
#include "script_component.hpp"
-params ["_unit"];
+params ["_unit", "_key"];
+
+if (_key != 1 || {GVAR(digPFH) == -1}) exitWith {};
// enable running again
[_unit, "forceWalk", "ACE_Trenches", false] call EFUNC(common,statusEffect_set);
@@ -31,6 +34,5 @@ GVAR(digPFH) = -1;
call EFUNC(interaction,hideMouseHint);
[_unit, "DefaultAction", _unit getVariable [QGVAR(Dig), -1]] call EFUNC(common,removeActionEventHandler);
-[_unit, "zoomtemp", _unit getVariable [QGVAR(Cancel), -1]] call EFUNC(common,removeActionEventHandler);
_unit setVariable [QGVAR(isPlacing), false, true];
diff --git a/addons/trenches/functions/fnc_placeConfirm.sqf b/addons/trenches/functions/fnc_placeConfirm.sqf
index 797499a63f..7c3be2d901 100644
--- a/addons/trenches/functions/fnc_placeConfirm.sqf
+++ b/addons/trenches/functions/fnc_placeConfirm.sqf
@@ -28,7 +28,6 @@ GVAR(digPFH) = -1;
call EFUNC(interaction,hideMouseHint);
[_unit, "DefaultAction", _unit getVariable [QGVAR(Dig), -1]] call EFUNC(common,removeActionEventHandler);
-[_unit, "zoomtemp", _unit getVariable [QGVAR(Cancel), -1]] call EFUNC(common,removeActionEventHandler);
_unit setVariable [QGVAR(isPlacing), false, true];
@@ -37,9 +36,9 @@ params ["_unit"];
if (isNull GVAR(trench)) exitWith {};
deleteVehicle GVAR(trench);
-private _trench = createVehicle [GVAR(trenchType) select 0, [0, 0, 0], [], 0, "NONE"];
+private _trench = createVehicle [GVAR(trenchClass), [0, 0, 0], [], 0, "NONE"];
-GVAR(trenchType) params ["", "", "_dx", "_dy", "_offset"];
+GVAR(trenchPlacementData) params ["_dx", "_dy", "_offset"];
private _basePos = GVAR(trenchPos);
private _angle = (GVAR(digDirection) + getDir _unit);
@@ -67,49 +66,8 @@ for [{_ix = -_dx/2},{_ix <= _dx/2},{_ix = _ix + _dx/3}] do {
};
_basePos set [2, (_basePos select 2) + _minzoffset + _offset];
private _vecDirAndUp = [_v1, _v3];
-
GVAR(trench) = objNull;
-// Mark the unit as digging
-private _trenchId = GVAR(trenchId);
-_unit setVariable [QGVAR(isDiggingId), _trenchId, true];
-GVAR(trenchId) = GVAR(trenchId) + 1;
+_trench setVariable [QGVAR(placeData), [_basePos, _vecDirAndUp], true];
-// Create progress bar
-private _fnc_onFinish = {
- (_this select 0) params ["_unit"];
- _unit setVariable [QGVAR(isDiggingId), -1, true];
-};
-private _fnc_onFailure = {
- (_this select 0) params ["_unit"];
- _unit setVariable [QGVAR(isDiggingId), -1, true];
-};
-[12.5, [_unit], _fnc_onFinish, _fnc_onFailure, localize LSTRING(DiggingTrench)] call EFUNC(common,progressBar);
-
-// Schedule progressive raising of the trench
-private _fnc_setPlacing = {
- params ["_unit", "_trench", "_trenchId", "_pos", "_vecDirAndUp"];
-
- // If the progress bar was cancelled, cancel elevation
- // We use an uid to avoid any chance of an older trench being raised when a new one is built
- if (_unit getVariable [QGVAR(isDiggingId), -1] != _trenchId) exitWith {};
-
- _trench setPosASL _pos;
- _trench setVectorDirAndUp _vecDirAndUp;
-};
-
-// For loops are for wimps
-[_unit, _trench, _trenchId, _basePos vectorDiff [0, 0, 1.0], _vecDirAndUp] call _fnc_setPlacing;
-[_fnc_setPlacing, [_unit, _trench, _trenchId, _basePos vectorDiff [0, 0, 0.9], _vecDirAndUp], 3.0] call EFUNC(common,waitAndExecute);
-[_fnc_setPlacing, [_unit, _trench, _trenchId, _basePos vectorDiff [0, 0, 0.8], _vecDirAndUp], 4.0] call EFUNC(common,waitAndExecute);
-[_fnc_setPlacing, [_unit, _trench, _trenchId, _basePos vectorDiff [0, 0, 0.7], _vecDirAndUp], 5.0] call EFUNC(common,waitAndExecute);
-[_fnc_setPlacing, [_unit, _trench, _trenchId, _basePos vectorDiff [0, 0, 0.6], _vecDirAndUp], 6.0] call EFUNC(common,waitAndExecute);
-[_fnc_setPlacing, [_unit, _trench, _trenchId, _basePos vectorDiff [0, 0, 0.5], _vecDirAndUp], 7.0] call EFUNC(common,waitAndExecute);
-[_fnc_setPlacing, [_unit, _trench, _trenchId, _basePos vectorDiff [0, 0, 0.4], _vecDirAndUp], 8.0] call EFUNC(common,waitAndExecute);
-[_fnc_setPlacing, [_unit, _trench, _trenchId, _basePos vectorDiff [0, 0, 0.3], _vecDirAndUp], 9.0] call EFUNC(common,waitAndExecute);
-[_fnc_setPlacing, [_unit, _trench, _trenchId, _basePos vectorDiff [0, 0, 0.2], _vecDirAndUp],10.0] call EFUNC(common,waitAndExecute);
-[_fnc_setPlacing, [_unit, _trench, _trenchId, _basePos vectorDiff [0, 0, 0.1], _vecDirAndUp],11.0] call EFUNC(common,waitAndExecute);
-[_fnc_setPlacing, [_unit, _trench, _trenchId, _basePos vectorDiff [0, 0, 0.0], _vecDirAndUp],12.0] call EFUNC(common,waitAndExecute);
-
-// Play animation
-[_unit, "AinvPknlMstpSnonWnonDnon_medic4"] call EFUNC(common,doAnimation);
+[_trench, _unit] call FUNC(continueDiggingTrench);
diff --git a/addons/trenches/functions/fnc_placeTrench.sqf b/addons/trenches/functions/fnc_placeTrench.sqf
index 21c4d92bb9..f7a643d882 100644
--- a/addons/trenches/functions/fnc_placeTrench.sqf
+++ b/addons/trenches/functions/fnc_placeTrench.sqf
@@ -4,41 +4,45 @@
*
* Arguments:
* 0: unit
- * 1: Trench type
+ * 1: Trench class
*
* Return Value:
* None
*
* Example:
- * [ACE_player] call ace_trenches_fnc_placeTrench
+ * [ACE_player, "ACE_envelope_small"] call ace_trenches_fnc_placeTrench
*
* Public: No
*/
#include "script_component.hpp"
-params ["_unit","_trenchTypeName"];
+params ["_unit", "_trenchClass"];
-GVAR(trenchType) = missionNamespace getVariable _trenchTypeName;
+//Load trench data
+private _noGeoModel = getText (configFile >> "CfgVehicles" >> _trenchClass >> QGVAR(noGeoClass));
+if(_noGeoModel == "") then {_noGeoModel = _trenchClass;};
+
+GVAR(trenchClass) = _trenchClass;
+GVAR(trenchPlacementData) = getArray (configFile >> "CfgVehicles" >> _trenchClass >> QGVAR(placementData));
+TRACE_1("",GVAR(trenchPlacementData));
-TRACE_2("",_trenchTypeName,GVAR(trenchType));
// prevent the placing unit from running
[_unit, "forceWalk", "ACE_Trenches", true] call EFUNC(common,statusEffect_set);
// create the trench
private "_trench";
-_trench = createVehicle [GVAR(trenchType) select 1, [0, 0, 0], [], 0, "NONE"];
+_trench = createVehicle [_noGeoModel, [0, 0, 0], [], 0, "NONE"];
GVAR(trench) = _trench;
// prevent collisions with trench
-["enableSimulationGlobal", [_trench, false]] call EFUNC(common,serverEvent);
+[QEGVAR(common,enableSimulationGlobal), [_trench, false]] call CBA_fnc_serverEvent;
GVAR(digDirection) = 0;
// pfh that runs while the dig is in progress
GVAR(digPFH) = [{
(_this select 0) params ["_unit", "_trench"];
- GVAR(trenchType) params ["", "", "_dx", "_dy", "_offset"];
// Cancel if the helper object is gone
if (isNull _trench) exitWith {
@@ -46,12 +50,12 @@ GVAR(digPFH) = [{
};
// Cancel if the place is no longer suitable
- if !([_unit, GVAR(trenchType)] call FUNC(canDigTrench)) exitWith {
+ if !([_unit] call FUNC(canDigTrench)) exitWith {
[_unit] call FUNC(placeCancel);
};
// Update trench position
- GVAR(trenchType) params ["", "", "_dx", "_dy", "_offset"];
+ GVAR(trenchPlacementData) params ["_dx", "_dy", "_offset"];
private _basePos = eyePos _unit vectorAdd ([sin getDir _unit, +cos getDir _unit, 0] vectorMultiply 1.0);
private _angle = (GVAR(digDirection) + getDir _unit);
@@ -95,10 +99,4 @@ _unit setVariable [QGVAR(Dig), [
{[_this select 0] call FUNC(placeConfirm)}
] call EFUNC(common,addActionEventHandler)];
-_unit setVariable [QGVAR(Cancel), [
- _unit, "zoomtemp",
- {GVAR(digPFH) != -1},
- {[_this select 0] call FUNC(placeCancel)}
-] call EFUNC(common,addActionEventHandler)];
-
_unit setVariable [QGVAR(isPlacing), true, true];
diff --git a/addons/trenches/functions/fnc_removeTrench.sqf b/addons/trenches/functions/fnc_removeTrench.sqf
new file mode 100644
index 0000000000..53059f34bf
--- /dev/null
+++ b/addons/trenches/functions/fnc_removeTrench.sqf
@@ -0,0 +1,77 @@
+/*
+ * Author: Garth 'L-H' de Wet, Ruthberg, edited by commy2 for better MP and eventual AI support and esteldunedain
+ * Removes trench
+ *
+ * Arguments:
+ * 0: trench
+ * 1: unit
+ *
+ * Return Value:
+ * None
+ *
+ * Example:
+ * [TrenchObj, ACE_player] call ace_trenches_fnc_removeTrench
+ *
+ * Public: No
+ */
+#include "script_component.hpp"
+
+params ["_trench", "_unit"];
+TRACE_2("removeTrench",_trench,_unit);
+
+private _actualProgress = _trench getVariable [QGVAR(progress), 0];
+if(_actualProgress == 0) exitWith {};
+
+// Mark trench as being worked on
+_trench setVariable [QGVAR(digging), true, true];
+
+private _removeTime = getNumber (configFile >> "CfgVehicles" >> (typeof _trench) >> QGVAR(removalDuration));
+private _removeTimeLeft = _removeTime * _actualProgress;
+
+private _placeData = _trench getVariable [QGVAR(placeData), [[], []]];
+_placeData params ["_basePos", "_vecDirAndUp"];
+
+private _trenchId = _unit getVariable [QGVAR(isDiggingId), -1];
+if(_trenchId < 0) then {
+ _trenchId = GVAR(trenchId);
+ _unit setVariable [QGVAR(isDiggingId), _trenchId, true];
+ GVAR(trenchId) = GVAR(trenchId) + 1;
+};
+
+// Create progress bar
+private _fnc_onFinish = {
+ (_this select 0) params ["_unit", "_trench"];
+ _unit setVariable [QGVAR(isDiggingId), -1, true];
+
+ // Remove trench
+ deleteVehicle _trench;
+
+ // Reset animation
+ [_unit, "", 1] call EFUNC(common,doAnimation);
+};
+private _fnc_onFailure = {
+ (_this select 0) params ["_unit", "_trench"];
+ _unit setVariable [QGVAR(isDiggingId), -1, true];
+ _trench setVariable [QGVAR(digging), false, true];
+
+ // Save progress global
+ private _progress = _trench getVariable [QGVAR(progress), 0];
+ _trench setVariable [QGVAR(progress), _progress, true];
+
+ // Reset animation
+ [_unit, "", 1] call EFUNC(common,doAnimation);
+};
+[(_removeTimeLeft + 0.5), [_unit, _trench], _fnc_onFinish, _fnc_onFailure, localize LSTRING(RemovingTrench)] call EFUNC(common,progressBar);
+
+private _progressLeft = ((1 - _actualProgress) * 10) + 1;
+private ["_i"];
+for "_i" from _progressLeft to 10 do {
+ private _vectorDiffZ = _i / 10;
+ private _delay = _removeTime * ((_i / 10) - (1 - _actualProgress));
+ private _progress = 1 - (_i / 10);
+
+ [DFUNC(setTrenchPlacement), [_unit, _trench, _trenchId, _basePos vectorDiff [0, 0, _vectorDiffZ], _vecDirAndUp, _progress], _delay] call CBA_fnc_waitAndExecute;
+};
+
+// Play animation
+[_unit, "AinvPknlMstpSnonWnonDnon_medic4"] call EFUNC(common,doAnimation);
diff --git a/addons/trenches/functions/fnc_setTrenchPlacement.sqf b/addons/trenches/functions/fnc_setTrenchPlacement.sqf
new file mode 100644
index 0000000000..49c1efdaae
--- /dev/null
+++ b/addons/trenches/functions/fnc_setTrenchPlacement.sqf
@@ -0,0 +1,33 @@
+/*
+ * Author: Garth 'L-H' de Wet, Ruthberg, edited by commy2 for better MP and eventual AI support and esteldunedain
+ * Sets trench placement
+ *
+ * Arguments:
+ * 0: unit