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 f91634f6d4..37b5f2a626 100644
--- a/README.md
+++ b/README.md
@@ -3,15 +3,15 @@
-
-
-
-
-
+
+
+
+
+
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/XEH_postInit.sqf b/addons/advanced_ballistics/XEH_postInit.sqf
index 08270b0a31..7263970fb1 100644
--- a/addons/advanced_ballistics/XEH_postInit.sqf
+++ b/addons/advanced_ballistics/XEH_postInit.sqf
@@ -21,7 +21,6 @@ if (!GVAR(extensionAvailable)) exitWith {
};
};
*/
-[] call FUNC(initializeTerrainExtension);
if (!hasInterface) exitWith {};
@@ -29,10 +28,28 @@ if (!hasInterface) exitWith {};
//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);
+ //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 EFUNC(common,addEventHandler);
#ifdef DEBUG_MODE_FULL
diff --git a/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf b/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf
index 5ad6cb111e..8ff21e60cc 100644
--- a/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf
+++ b/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf
@@ -47,7 +47,7 @@ GVAR(Protractor) = true;
__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 ctrlSetTextColor [1, 1, 1, 1];
diff --git a/addons/advanced_ballistics/functions/fnc_handleFired.sqf b/addons/advanced_ballistics/functions/fnc_handleFired.sqf
index b8deb1a487..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 {
diff --git a/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf b/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf
index d3fd552267..9fed872a6b 100644
--- a/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf
+++ b/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf
@@ -24,7 +24,7 @@ _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;
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..a6868033e6 100644
--- a/addons/aircraft/Heli_Attack_01_base_F.hpp
+++ b/addons/aircraft/Heli_Attack_01_base_F.hpp
@@ -860,12 +860,12 @@ class Heli_Attack_01_base_F: Helicopter_Base_F {
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;
@@ -888,13 +888,13 @@ class Heli_Attack_01_base_F: Helicopter_Base_F {
minTurn = -120;
maxTurn = 120;
initTurn = 0;
-
+
class OpticsIn
{
delete Narrow;
delete Medium;
delete Wide;
-
+
class ACE_WideUnstabilized {
opticsDisplayName = "W NS";
initAngleX = 0;
@@ -994,4 +994,4 @@ class Heli_Attack_01_base_F: Helicopter_Base_F {
weapon = "ACE_gatling_20mm_Comanche";
};
};
-};
\ No newline at end of file
+};
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_postInit.sqf b/addons/atragmx/XEH_postInit.sqf
index 4b61a28551..8d4907523b 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)];
};
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..791374c9d0 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);
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 ac64bdcbb7..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((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((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/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/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/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 3f6835bbba..1cd705f63f 100644
--- a/addons/ballistics/CfgWeapons.hpp
+++ b/addons/ballistics/CfgWeapons.hpp
@@ -15,81 +15,81 @@ class CfgWeapons {
class Rifle_Base_F;
class Rifle_Long_Base_F;
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 Single: Mode_SemiAuto {
dispersion = 0.0004; // radians. Equal to 1.375 MOA.
};
};
-
+
class EBR_base_F: Rifle_Long_Base_F {
class Single: Mode_SemiAuto {
dispersion = 0.00029; // radians. Equal to 1.00 MOA.
};
-
+
class FullAuto: Mode_FullAuto {
dispersion = 0.00029; // radians. Equal to 1.00 MOA.
};
};
-
+
/* MX */
-
+
class arifle_MX_Base_F: Rifle_Base_F {};
class arifle_MX_SW_F: arifle_MX_Base_F {
magazines[] = {
@@ -158,7 +158,7 @@ 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.
};
@@ -285,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",
@@ -305,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",
@@ -320,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",
@@ -335,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",
@@ -356,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",
@@ -371,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",
@@ -386,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",
@@ -511,7 +525,7 @@ class CfgWeapons {
ACE_barrelTwist=234.95;
ACE_barrelLength=609.6;
};
-
+
class HMG_127 : LMG_RCWS {
};
class HMG_01: HMG_127 {
@@ -521,7 +535,7 @@ class CfgWeapons {
ACE_barrelTwist=304.8;
ACE_barrelLength=1143.0;
};
-
+
/* Silencers */
class ItemCore;
diff --git a/addons/ballistics/stringtable.xml b/addons/ballistics/stringtable.xml
index 39bbac1726..b51303fa6d 100644
--- a/addons/ballistics/stringtable.xml
+++ b/addons/ballistics/stringtable.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/addons/captives/XEH_postInit.sqf b/addons/captives/XEH_postInit.sqf
index 144d3efb9a..5aada0950f 100644
--- a/addons/captives/XEH_postInit.sqf
+++ b/addons/captives/XEH_postInit.sqf
@@ -1,5 +1,11 @@
#include "script_component.hpp"
+["SettingsInitialized", {
+ // Hold on a little bit longer to ensure anims will work
+ [{
+ GVAR(captivityEnabled) = true;
+ }, [], 0.05] call EFUNC(common,waitAndExecute);
+}] call EFUNC(common,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
@@ -33,10 +39,3 @@ if (!hasInterface) exitWith {};
["isNotEscorting", {!(GETVAR(_this select 0,GVAR(isEscorting),false))}] call EFUNC(common,addCanInteractWithCondition);
["isNotHandcuffed", {!(GETVAR(_this select 0,GVAR(isHandcuffed),false))}] call EFUNC(common,addCanInteractWithCondition);
["isNotSurrendering", {!(GETVAR(_this select 0,GVAR(isSurrendering),false))}] call EFUNC(common,addCanInteractWithCondition);
-
-["SettingsInitialized", {
- // Hold on a little bit longer to ensure anims will work
- [{
- GVAR(captivityEnabled) = true;
- }, [], 0.05] call EFUNC(common,waitAndExecute);
-}] call EFUNC(common,addEventHandler);
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/cargo/CfgEventHandlers.hpp b/addons/cargo/CfgEventHandlers.hpp
index 3f784e7ab4..ff4a88693e 100644
--- a/addons/cargo/CfgEventHandlers.hpp
+++ b/addons/cargo/CfgEventHandlers.hpp
@@ -27,27 +27,7 @@ class Extended_Killed_EventHandlers {
//Need initPost or we have problems with setVariable with 'ACE_Cargo'
class Extended_InitPost_EventHandlers {
- class StaticWeapon {
- class ADDON {
- init = QUOTE(_this call DFUNC(initObject));
- };
- };
- class ReammoBox_F {
- class ADDON {
- init = QUOTE(_this call DFUNC(initObject));
- };
- };
- class Cargo_base_F {
- class ADDON {
- init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle));
- };
- };
- class CargoNet_01_box_F {
- class ADDON {
- init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle));
- };
- };
- class Land_CargoBox_V1_F {
+ class ThingX {
class ADDON {
init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle));
};
@@ -57,27 +37,17 @@ class Extended_InitPost_EventHandlers {
init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle));
};
};
- class RoadCone_F {
+ class PlasticCase_01_base_F {
class ADDON {
init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle));
};
};
- class Car {
+ class LandVehicle {
class ADDON {
init = QUOTE(_this call DFUNC(initVehicle));
};
};
- class Tank {
- class ADDON {
- init = QUOTE(_this call DFUNC(initVehicle));
- };
- };
- class Helicopter {
- class ADDON {
- init = QUOTE(_this call DFUNC(initVehicle));
- };
- };
- class Plane {
+ class Air {
class ADDON {
init = QUOTE(_this call DFUNC(initVehicle));
};
@@ -87,16 +57,6 @@ class Extended_InitPost_EventHandlers {
init = QUOTE(_this call DFUNC(initVehicle));
};
};
- class ACE_RepairItem_Base {
- class ADDON {
- init = QUOTE(_this call DFUNC(initObject));
- };
- };
- class ACE_bodyBagObject {
- class ADDON {
- init = QUOTE(_this call DFUNC(initObject));
- };
- };
class ACE_ConcertinaWireCoil {
class ADDON {
init = QUOTE(_this call DFUNC(initObject));
diff --git a/addons/cargo/CfgVehicles.hpp b/addons/cargo/CfgVehicles.hpp
index e1750d8aad..3b2239019d 100644
--- a/addons/cargo/CfgVehicles.hpp
+++ b/addons/cargo/CfgVehicles.hpp
@@ -194,12 +194,69 @@ class CfgVehicles {
GVAR(hasCargo) = 1;
};
- class Heli_Transport_02_base_F;
- class I_Heli_Transport_02_F: Heli_Transport_02_base_F {
+ class Helicopter_Base_H;
+ class Heli_Light_01_base_F: Helicopter_Base_H {
+ GVAR(space) = 0;
+ GVAR(hasCargo) = 0;
+ };
+
+ class Heli_Light_02_base_F: Helicopter_Base_H {
+ GVAR(space) = 4;
+ };
+
+ class Helicopter_Base_F;
+ class Heli_light_03_base_F: Helicopter_Base_F {
+ GVAR(space) = 4;
+ };
+
+ class Heli_Transport_01_base_F: Helicopter_Base_H {
+ GVAR(space) = 8;
+ };
+
+ class Heli_Transport_02_base_F: Helicopter_Base_H {
+ GVAR(space) = 20;
+ };
+
+ class Heli_Transport_03_base_F: Helicopter_Base_H {
+ GVAR(space) = 40;
+ };
+
+ class Heli_Transport_04_base_F: Helicopter_Base_H {
+ GVAR(space) = 0;
+ GVAR(hasCargo) = 0;
+ };
+
+ class O_Heli_Transport_04_box_F: Heli_Transport_04_base_F {
GVAR(space) = 20;
GVAR(hasCargo) = 1;
};
+ class O_Heli_Transport_04_repair_F: Heli_Transport_04_base_F {
+ GVAR(space) = 12;
+ GVAR(hasCargo) = 1;
+ };
+
+ class O_Heli_Transport_04_ammo_F: Heli_Transport_04_base_F {
+ GVAR(space) = 8;
+ GVAR(hasCargo) = 1;
+ };
+
+ class O_Heli_Transport_04_fuel_F: Heli_Transport_04_base_F {};
+
+ class O_Heli_Transport_04_medevac_F: Heli_Transport_04_base_F {
+ GVAR(space) = 8;
+ GVAR(hasCargo) = 1;
+ };
+
+ class Heli_Attack_01_base_F: Helicopter_Base_F {
+ GVAR(space) = 0;
+ GVAR(hasCargo) = 0;
+ };
+
+ class Heli_Attack_02_base_F: Helicopter_Base_F {
+ GVAR(space) = 4;
+ };
+
// jets
class Plane: Air {
GVAR(space) = 0;
@@ -207,7 +264,6 @@ class CfgVehicles {
};
// autonomus
- class Helicopter_Base_F;
class UAV_01_base_F: Helicopter_Base_F {
GVAR(space) = 0;
GVAR(hasCargo) = 0;
@@ -248,6 +304,25 @@ class CfgVehicles {
GVAR(canLoad) = 1;
};
+ // Taru pods
+ class Pod_Heli_Transport_04_base_F;
+ class Land_Pod_Heli_Transport_04_ammo_F: Pod_Heli_Transport_04_base_F {
+ GVAR(space) = 8;
+ GVAR(hasCargo) = 1;
+ };
+ class Land_Pod_Heli_Transport_04_box_F: Pod_Heli_Transport_04_base_F {
+ GVAR(space) = 20;
+ GVAR(hasCargo) = 1;
+ };
+ class Land_Pod_Heli_Transport_04_medevac_F: Pod_Heli_Transport_04_base_F {
+ GVAR(space) = 8;
+ GVAR(hasCargo) = 1;
+ };
+ class Land_Pod_Heli_Transport_04_repair_F: Pod_Heli_Transport_04_base_F {
+ GVAR(space) = 12;
+ GVAR(hasCargo) = 1;
+ };
+
class StaticMortar;
class Mortar_01_base_F: StaticMortar {
GVAR(size) = 2; // 1 = small, 2 = large
@@ -256,6 +331,7 @@ class CfgVehicles {
// Ammo boxes
class ThingX;
+ class Items_base_F;
class ReammoBox_F: ThingX {
GVAR(size) = 2; // 1 = small, 2 = large
GVAR(canLoad) = 1;
@@ -278,6 +354,23 @@ class CfgVehicles {
class Slingload_01_Base_F: Slingload_base_F { //Huron 20ft containers
GVAR(canLoad) = 0;
};
+
+ //Plastic and metal case
+ class PlasticCase_01_base_F: Items_base_F {
+ GVAR(size) = 1; // 1 = small, 2 = large
+ GVAR(canLoad) = 1;
+ };
+ class Land_PlasticCase_01_large_F: PlasticCase_01_base_F {
+ GVAR(size) = 2; // 1 = small, 2 = large
+ };
+ class MetalCase_01_base_F: Items_base_F {
+ GVAR(size) = 1; // 1 = small, 2 = large
+ GVAR(canLoad) = 1;
+ };
+ class Land_MetalCase_01_large_F: MetalCase_01_base_F {
+ GVAR(size) = 2; // 1 = small, 2 = large
+ };
+
// objects
class RoadCone_F: ThingX {
GVAR(size) = 1;
diff --git a/addons/cargo/functions/fnc_initVehicle.sqf b/addons/cargo/functions/fnc_initVehicle.sqf
index c0b312146b..7e19b0acd0 100644
--- a/addons/cargo/functions/fnc_initVehicle.sqf
+++ b/addons/cargo/functions/fnc_initVehicle.sqf
@@ -20,6 +20,8 @@ TRACE_1("params", _vehicle);
private _type = typeOf _vehicle;
+if (getNumber (configFile >> "CfgVehicles" >> _type >> QGVAR(hasCargo)) != 1) exitWith {};
+
if (isServer) then {
{
if (isClass _x) then {
@@ -38,7 +40,6 @@ if (_type in GVAR(initializedVehicleClasses)) exitWith {};
GVAR(initializedVehicleClasses) pushBack _type;
if (!hasInterface) exitWith {};
-if (getNumber (configFile >> "CfgVehicles" >> _type >> QGVAR(hasCargo)) != 1) exitWith {};
TRACE_1("Adding unload cargo action to class", _type);
diff --git a/addons/cargo/stringtable.xml b/addons/cargo/stringtable.xml
index 57daacd207..e3cb368362 100644
--- a/addons/cargo/stringtable.xml
+++ b/addons/cargo/stringtable.xml
@@ -175,6 +175,7 @@
Rendi oggetto caricabile
Hacer objeto cargable
Rendre l'objet chargeable
+ Vytvořit objekt nakladatelným
Sets the synced object as loadable by the cargo system.
@@ -183,6 +184,7 @@
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.
Object's Size
@@ -191,6 +193,7 @@
Dimensioni dell'oggetto
Tamaño del objeto
Taille de l'objet
+ Velikost objektu
-
+
\ 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/CfgEventHandlers.hpp b/addons/common/CfgEventHandlers.hpp
index 2c4f3922bc..5d55e40f2d 100644
--- a/addons/common/CfgEventHandlers.hpp
+++ b/addons/common/CfgEventHandlers.hpp
@@ -33,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 FUNC(execNextFrame)};);
};
class GVAR(muteUnit) {
init = QUOTE(_this call FUNC(muteUnitHandleInitPost));
@@ -76,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/RscInfoType.hpp b/addons/common/RscInfoType.hpp
index 327a9814d1..e5af2454cb 100644
--- a/addons/common/RscInfoType.hpp
+++ b/addons/common/RscInfoType.hpp
@@ -15,7 +15,7 @@ class RscInGameUI {
class RscUnitInfoTank: RscUnitInfo {
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('infoDisplayChanged', [ARR_2(_this select 0, 'Vehicle')])] call FUNC(localEvent););
};
-
+
class RscUnitInfoAirNoWeapon: RscUnitInfo {
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('infoDisplayChanged', [ARR_2(_this select 0, 'Aircraft')])] call FUNC(localEvent););
};
diff --git a/addons/common/XEH_PREP.hpp b/addons/common/XEH_PREP.hpp
index e6f96bd4a7..de76966cbe 100644
--- a/addons/common/XEH_PREP.hpp
+++ b/addons/common/XEH_PREP.hpp
@@ -87,6 +87,7 @@ PREP(getWindDirection);
PREP(getZoom);
PREP(goKneeling);
PREP(hadamardProduct);
+PREP(handleEngine);
PREP(handleModifierKey);
PREP(handleModifierKeyUp);
PREP(handleScrollWheel);
diff --git a/addons/common/XEH_postInit.sqf b/addons/common/XEH_postInit.sqf
index f74b83916d..547d55530d 100644
--- a/addons/common/XEH_postInit.sqf
+++ b/addons/common/XEH_postInit.sqf
@@ -64,6 +64,7 @@
["blockSprint", false, []] call FUNC(statusEffect_addType);
["setCaptive", true, [QEGVAR(captives,Handcuffed), QEGVAR(captives,Surrendered), QEGVAR(medical,unconscious)]] call FUNC(statusEffect_addType);
["blockDamage", false, ["fixCollision"]] call FUNC(statusEffect_addType);
+["blockEngine", false, ["ACE_Refuel"]] call FUNC(statusEffect_addType);
["forceWalk", {
params ["_object", "_set"];
@@ -90,6 +91,11 @@
_object allowDamage (_set == 0);
};
}] call FUNC(addEventHandler);
+["blockEngine", {
+ params ["_vehicle", "_set"];
+ _vehicle setVariable [QGVAR(blockEngine), _set > 0, true];
+ _vehicle engineOn false;
+}] call FUNC(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
@@ -133,6 +139,7 @@ if (isServer) then {
["fixFloating", FUNC(fixFloating)] call FUNC(addEventhandler);
["fixPosition", FUNC(fixPosition)] call FUNC(addEventhandler);
+["loadPersonEvent", FUNC(loadPersonLocal)] call FUNC(addEventhandler);
["unloadPersonEvent", FUNC(unloadPersonLocal)] call FUNC(addEventhandler);
["lockVehicle", {
@@ -146,12 +153,15 @@ if (isServer) then {
["setDir", {(_this select 0) setDir (_this select 1)}] call FUNC(addEventhandler);
["setFuel", {(_this select 0) setFuel (_this select 1)}] call FUNC(addEventhandler);
+["engineOn", {(_this select 0) engineOn (_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);
["playMove", {(_this select 0) playMove (_this select 1)}] call FUNC(addEventHandler);
["playMoveNow", {(_this select 0) playMoveNow (_this select 1)}] call FUNC(addEventHandler);
["switchMove", {(_this select 0) switchMove (_this select 1)}] call FUNC(addEventHandler);
+["setVectorDirAndUp", {(_this select 0) setVectorDirAndUp (_this select 1)}] call FUNC(addEventHandler);
+["setVanillaHitPointDamage", {(_this select 0) setHitPointDamage (_this select 1)}] call FUNC(addEventHandler);
if (isServer) then {
["hideObjectGlobal", {(_this select 0) hideObjectGlobal (_this select 1)}] call FUNC(addEventHandler);
@@ -323,19 +333,13 @@ enableCamShake true;
GVAR(OldPlayerVehicle) = vehicle objNull;
GVAR(OldPlayerTurret) = [objNull] call FUNC(getTurretIndex);
GVAR(OldPlayerWeapon) = currentWeapon objNull;
-GVAR(OldPlayerInventory) = [objNull] call FUNC(getAllGear);
+GVAR(OldPlayerInventory) = [];
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);
@@ -377,11 +381,11 @@ if (!isNil QGVAR(PreInit_playerChanged_PFHID)) then {
};
// "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);
+ ["playerInventoryChanged", [ACE_player, [ACE_player, false] call FUNC(getAllGear) ]] call FUNC(localEvent);
};
// "playerVisionModeChanged" event
@@ -442,6 +446,11 @@ if (!isNil QGVAR(PreInit_playerChanged_PFHID)) then {
// Add various canInteractWith conditions
//////////////////////////////////////////////////
+["isNotDead", {
+ params ["_unit", "_target"];
+ alive _unit
+}] call FUNC(addCanInteractWithCondition);
+
["notOnMap", {!visibleMap}] call FUNC(addCanInteractWithCondition);
["isNotInside", {
diff --git a/addons/common/XEH_preInit.sqf b/addons/common/XEH_preInit.sqf
index e5043d3802..4886512525 100644
--- a/addons/common/XEH_preInit.sqf
+++ b/addons/common/XEH_preInit.sqf
@@ -47,7 +47,7 @@ GVAR(statusEffect_Names) = [];
GVAR(statusEffect_isGlobal) = [];
//////////////////////////////////////////////////
-// Set up PlayerChanged eventhandler for pre init
+// Set up PlayerChanged eventhandler for pre init (EH is installed in postInit)
//////////////////////////////////////////////////
ACE_player = objNull;
diff --git a/addons/common/functions/fnc__handleRequestSyncedEvent.sqf b/addons/common/functions/fnc__handleRequestSyncedEvent.sqf
index 605af2fa85..9d6c062ac2 100644
--- a/addons/common/functions/fnc__handleRequestSyncedEvent.sqf
+++ b/addons/common/functions/fnc__handleRequestSyncedEvent.sqf
@@ -23,7 +23,7 @@ if (isServer) then {
params ["_eventName", "_client"];
if (!HASH_HASKEY(GVAR(syncedEvents),_eventName)) exitWith {
- ACE_LOGERROR("Request for synced event - key not found.");
+ ACE_LOGERROR_1("Request for synced event - key [%1] not found.", _eventName);
false
};
diff --git a/addons/common/functions/fnc__handleSyncedEvent.sqf b/addons/common/functions/fnc__handleSyncedEvent.sqf
index 05266c2168..c65ccad8b0 100644
--- a/addons/common/functions/fnc__handleSyncedEvent.sqf
+++ b/addons/common/functions/fnc__handleSyncedEvent.sqf
@@ -17,7 +17,7 @@
params ["_name", "_args", "_ttl"];
if (!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
- ACE_LOGERROR("Synced event key not found.");
+ ACE_LOGERROR_1("Synced event key [%1] not found (_handleSyncedEvent).", _name);
false
};
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_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_addSyncedEventHandler.sqf b/addons/common/functions/fnc_addSyncedEventHandler.sqf
index 0964e419bc..126bb6a957 100644
--- a/addons/common/functions/fnc_addSyncedEventHandler.sqf
+++ b/addons/common/functions/fnc_addSyncedEventHandler.sqf
@@ -10,6 +10,9 @@
* Return Value:
* Boolean of success
*
+ * Example:
+ * ["myEvent", {_this call x}, 0] call ace_common_fnc_addSyncedEventHandler
+ *
* Public: Yes
*/
#include "script_component.hpp"
@@ -17,7 +20,7 @@
params ["_name", "_handler", ["_ttl", 0]];
if (HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
- ACE_LOGERROR("Duplicate synced event creation.");
+ ACE_LOGERROR_1("Duplicate synced event [%1] creation.",_name);
false
};
diff --git a/addons/common/functions/fnc_assignedItemFix.sqf b/addons/common/functions/fnc_assignedItemFix.sqf
index d93409ce7c..18dd6b4e0c 100644
--- a/addons/common/functions/fnc_assignedItemFix.sqf
+++ b/addons/common/functions/fnc_assignedItemFix.sqf
@@ -29,39 +29,17 @@ GVAR(AssignedItemsShownItems) = [
];
["playerInventoryChanged", {
- params ["_unit", "_assignedItems"];
+ 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"];
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_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_dumpPerformanceCounters.sqf b/addons/common/functions/fnc_dumpPerformanceCounters.sqf
index bdc4588b05..afb71b423a 100644
--- a/addons/common/functions/fnc_dumpPerformanceCounters.sqf
+++ b/addons/common/functions/fnc_dumpPerformanceCounters.sqf
@@ -21,7 +21,7 @@ if (!isNil "ACE_PFH_COUNTER") then {
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];
+ 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;
};
@@ -42,7 +42,7 @@ diag_log text format ["-------------------------------------------"];
if (_iter > 2) then {
_count = _count + 1;
private _delta = (_x select 1) - (_x select 0);
-
+
_total = _total + _delta;
};
@@ -54,7 +54,7 @@ diag_log text format ["-------------------------------------------"];
_averageResult = (_total / _count) * 1000;
// dump results
- diag_log text format ["%1: Average: %2s / %3 = %4ms", _counterEntry select 0, _total, _count, _averageResult];
+ 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];
};
@@ -68,7 +68,7 @@ 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;
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_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..cebcc489f1 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 {[
"",
diff --git a/addons/common/functions/fnc_getMGRSdata.sqf b/addons/common/functions/fnc_getMGRSdata.sqf
index ee6d1e11dc..44fc204638 100644
--- a/addons/common/functions/fnc_getMGRSdata.sqf
+++ b/addons/common/functions/fnc_getMGRSdata.sqf
@@ -22,27 +22,81 @@ 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; };
+_map = toLower _map;
+if (_map in ["abbottabad"]) then { _lat = 34; _altitude = 1256; }; //Abbottabad elevation 1256m (Wikipedia)
+if (_map in ["abramia"]) then { _lat = 60; _altitude = 0; };
+if (_map in ["af_kandahar_province"]) then { _lat = 42; _altitude = 0; };
+if (_map in ["altis"]) then { _lat = 40; _altitude = 0; };
+if (_map in ["angel"]) then { _lat = 38; _altitude = 0; };
+if (_map in ["anim_helvantis_v2"]) then { _lat = 50; _altitude = 0; };
+if (_map in ["australia"]) then { _lat = -25; _altitude = 0; };
+if (_map in ["bootcamp_acr"]) then { _lat = 50; _altitude = 0; };
+if (_map in ["bornholm"]) then { _lat = 55; _altitude = 0; };
+if (_map in ["bozcaada"]) then { _lat = 40; _altitude = 0; };
+if (_map in ["caribou"]) then { _lat = 68; _altitude = 0; };
+if (_map in ["catalina"]) then { _lat = 33; _altitude = 0; };
+if (_map in ["chernarus", "chernarus_summer", "chernarus_winter"]) then { _lat = 50; _altitude = 0; };
+if (_map in ["chernobylzone", "chernobylzonea2"]) then { _lat = 51; _altitude = 0; };
+if (_map in ["clafghan"]) then { _lat = 34; _altitude = 640; };
+if (_map in ["dakrong"]) then { _lat = 17; _altitude = 0; }; //Unsung Mod
+if (_map in ["desert_e"]) then { _lat = 40; _altitude = 800; };
+if (_map in ["dya"]) then { _lat = 34; _altitude = 110; }; //Diyala Iraq - default elevationOffset
+if (_map in ["esseker"]) then { _lat = 43; _altitude = 2000; };
+if (_map in ["evergreen"]) then { _lat = 41; _altitude = 0; }; //Burgazada, Turkey - default elevationOffset
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 ["fata"]) then { _lat = 33; _altitude = 1347; };
+if (_map in ["gorgona"]) then { _lat = 43; _altitude = 0; };
+if (_map in ["hellskitchen", "hellskitchens"]) then { _lat = 32; _altitude = 900; }; //Sangin summer, Sangin winter - Sangin elevation 888m (Wikipedia)
+if (_map in ["hindukush"]) then { _lat = 36; _altitude = 0; };
+if (_map in ["imrali", "imralispring"]) then { _lat = 40; _altitude = 0; };
+if (_map in ["intro"]) then { _lat = 40; _altitude = 0; };
+if (_map in ["isladuala3"]) then { _lat = -19; _altitude = 0; };
+if (_map in ["jacobi"]) then { _lat = 34; _altitude = 2000; }; //default elevationOffset
+if (_map in ["kapaulio"]) then { _lat = 0; _altitude = 0; };
+if (_map in ["kerama"]) then { _lat = 26; _altitude = 0; }; //Kerama Islands, Japan - default elevationOffset
+if (_map in ["kholm"]) then { _lat = 36; _altitude = 0; };
+if (_map in ["koplic"]) then { _lat = 42; _altitude = 0; };
+if (_map in ["kunduz"]) then { _lat = 37; _altitude = 0; };
+if (_map in ["lingor", "lingor3"]) then { _lat = -4; _altitude = 0; };
+if (_map in ["lost", "lostw"]) then { _lat = 60; _altitude = 0; };
+if (_map in ["mcn_aliabad"]) then { _lat = 36; _altitude = 0; };
+if (_map in ["malvinas"]) then { _lat = -52; _altitude = 0; };
+if (_map in ["namalsk"]) then { _lat = 65; _altitude = 0; };
+if (_map in ["mef_alaska"]) then { _lat = 60; _altitude = 5; };
+if (_map in ["mountains_acr"]) then { _lat = 35; _altitude = 2000; };
+if (_map in ["napf", "napfwinter"]) then { _lat = 47; _altitude = 0; };
+if (_map in ["panthera3"]) then { _lat = 46; _altitude = 0; };
+if (_map in ["pianosa_aut"]) then { _lat = 43; _altitude = 0; }; //Pianosa, Italy - default elevationOffset
+if (_map in ["pja305"]) then { _lat = 0; _altitude = 0; }; //G.O.S N'Ziwasogo
+if (_map in ["pja306"]) then { _lat = 35; _altitude = 0; }; //G.O.S Kalu Khan
+if (_map in ["pja307"]) then { _lat = 17; _altitude = 0; }; //F.S.F Daryah
+if (_map in ["pja308"]) then { _lat = 36; _altitude = 0; }; //G.O.S Gunkizli
+if (_map in ["pja310"]) then { _lat = 36; _altitude = 0; }; //G.O.S Al Rayak
+if (_map in ["pja312"]) then { _lat = 16; _altitude = 0; }; //G.O.S Song Bin Tanh
+if (_map in ["porquerolles"]) then { _lat = 43; _altitude = 0; };
+if (_map in ["porto"]) then { _lat = 40; _altitude = 0; };
+if (_map in ["provinggrounds_pmc"]) then { _lat = 35; _altitude = 100; };
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; };
+if (_map in ["sara", "sara_dbe1"]) then { _lat = 40; _altitude = 0; };
+if (_map in ["saralite"]) then { _lat = 40; _altitude = 0; };
+if (_map in ["sb3"]) then { _lat = 53; _altitude = 25; }; //TrpUebPl Einfelde Nord (Munster North Training Area, Germany) - default elevationOffset
+if (_map in ["shapur_baf"]) then { _lat = 35; _altitude = 100; };
+if (_map in ["sfp_sturko"]) then { _lat = 56; _altitude = 0; };
+if (_map in ["sfp_wamako"]) then { _lat = 14; _altitude = 0; };
+if (_map in ["stratis"]) then { _lat = 40; _altitude = 0; };
+if (_map in ["sugarlake"]) then { _lat = 29; _altitude = 0; };
+if (_map in ["takistan"]) then { _lat = 35; _altitude = 2000; };
+if (_map in ["thirsk"]) then { _lat = 65; _altitude = 0; };
+if (_map in ["tilos"]) then { _lat = 36; _altitude = 0; };
+if (_map in ["utes"]) then { _lat = 50; _altitude = 0; };
+if (_map in ["vt5"]) then { _lat = 61; _altitude = 100; }; //Vt5, Suomi Finland - default elevationOffset
+if (_map in ["wake"]) then { _lat = 19; _altitude = 0; };
+if (_map in ["waziristan"]) then { _lat = 33; _altitude = 0; };
+if (_map in ["wintermap"]) then { _lat = 61; _altitude = 0; }; //Nordkvingo - default elevationOffset
+if (_map in ["wintertown", "wintertowna3"]) then { _lat = 39; _altitude = 600; }; //U.S. state Kansas mean elevation 610m (Wikipedia)
+if (_map in ["woodland_acr"]) then { _lat = 50; _altitude = 0; };
+if (_map in ["xcam_prototype"]) then { _lat = 35; _altitude = 0; };
+if (_map in ["zargabad"]) then { _lat = 35; _altitude = 2000; };
private _UTM = [_long,_lat] call BIS_fnc_posDegToUTM;
private _easting = _UTM select 0;
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_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_loadPerson.sqf b/addons/common/functions/fnc_loadPerson.sqf
index 3071ffbd47..6c728134d1 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);
+ ["loadPersonEvent", _unit, [_unit, _vehicle, _caller]] call FUNC(objectEvent);
};
_vehicle
diff --git a/addons/common/functions/fnc_progressBar.sqf b/addons/common/functions/fnc_progressBar.sqf
index 434a2c3e4b..d8503f5223 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;
diff --git a/addons/common/functions/fnc_removeSyncedEventHandler.sqf b/addons/common/functions/fnc_removeSyncedEventHandler.sqf
index 126bf0b70f..23803acdd1 100644
--- a/addons/common/functions/fnc_removeSyncedEventHandler.sqf
+++ b/addons/common/functions/fnc_removeSyncedEventHandler.sqf
@@ -15,7 +15,7 @@
params ["_name"];
if (!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
- ACE_LOGERROR("Synced event key not found.");
+ ACE_LOGERROR_1("Synced event key [%1] not found (removeSyncedEventHandler).", _name);
false
};
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..2366081ec1 100644
--- a/addons/common/functions/fnc_setHearingCapability.sqf
+++ b/addons/common/functions/fnc_setHearingCapability.sqf
@@ -54,5 +54,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_syncedEvent.sqf b/addons/common/functions/fnc_syncedEvent.sqf
index 4ed8107330..c752d1eba2 100644
--- a/addons/common/functions/fnc_syncedEvent.sqf
+++ b/addons/common/functions/fnc_syncedEvent.sqf
@@ -17,7 +17,7 @@
params ["_name", "_args", ["_ttl", 0]];
if (!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
- ACE_LOGERROR("Synced event key not found.");
+ ACE_LOGERROR_1("Synced event key [%1] not found (syncedEvent).", _name);
false
};
diff --git a/addons/common/init_handleModifierKey.sqf b/addons/common/init_handleModifierKey.sqf
index dd07db621c..7fe2be6476 100644
--- a/addons/common/init_handleModifierKey.sqf
+++ b/addons/common/init_handleModifierKey.sqf
@@ -12,9 +12,17 @@
*/
#include "script_component.hpp"
-disableSerialization;
+_this spawn {//
+ waitUntil {!isNull findDisplay 46};//
+ sleep 2;//
-params ["_display"];
+ disableSerialization;
-_display displayAddEventHandler ["KeyDown", FUNC(handleModifierKey)];
-_display displayAddEventHandler ["KeyUp", FUNC(handleModifierKeyUp)];
+ 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/stringtable.xml b/addons/common/stringtable.xml
index 32a979653f..820712189f 100644
--- a/addons/common/stringtable.xml
+++ b/addons/common/stringtable.xml
@@ -802,6 +802,7 @@
Non c'è spazio per scaricare
No hay espacio para descargar.
Pas de place pour décharger
+ Nedostatek místa k vyložení
\ No newline at end of file
diff --git a/addons/concertina_wire/CfgVehicles.hpp b/addons/concertina_wire/CfgVehicles.hpp
index 9c7d832bc1..88975ea7e9 100644
--- a/addons/concertina_wire/CfgVehicles.hpp
+++ b/addons/concertina_wire/CfgVehicles.hpp
@@ -86,7 +86,7 @@ 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[] = {};
@@ -119,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;
diff --git a/addons/concertina_wire/functions/fnc_handleKilled.sqf b/addons/concertina_wire/functions/fnc_handleKilled.sqf
index ac59798d10..1af3f93151 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 {};
diff --git a/addons/dagr/Dialog.hpp b/addons/dagr/Dialog.hpp
index 17c065f830..8511829e5e 100644
--- a/addons/dagr/Dialog.hpp
+++ b/addons/dagr/Dialog.hpp
@@ -76,349 +76,349 @@
class RscText;
class DAGR_Button {
- 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 = "";
+ 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 = "RobotoCondensed";
- 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 = "RobotoCondensed";
- 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 = QUOTE(PATHTOF(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 9ab34ee86f..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 = "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_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/functions/fnc_menuInit.sqf b/addons/dagr/functions/fnc_menuInit.sqf
index 7e6bec9575..a9b828727b 100644
--- a/addons/dagr/functions/fnc_menuInit.sqf
+++ b/addons/dagr/functions/fnc_menuInit.sqf
@@ -522,7 +522,7 @@ GVAR(menuRun) = true;
(__dsp displayCtrl __mainText) ctrlSetText "Connecting...";
};
if (CBA_missionTime - GVAR(busyTimer) > 0.6) then {
- if (ACE_player hasWeapon "ACE_Vector") 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;
diff --git a/addons/dagr/initKeybinds.sqf b/addons/dagr/initKeybinds.sqf
index 66bd08190e..1a2f25ac4d 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 {
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/difficulties/script_component.hpp b/addons/difficulties/script_component.hpp
deleted file mode 100644
index b6f387b02f..0000000000
--- a/addons/difficulties/script_component.hpp
+++ /dev/null
@@ -1,17 +0,0 @@
-#define COMPONENT difficulties
-#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_DIFFICULTIES
- #define DEBUG_MODE_FULL
-#endif
-
-#ifdef DEBUG_ENABLED_DIFFICULTIES
- #define DEBUG_SETTINGS DEBUG_ENABLED_DIFFICULTIES
-#endif
-
-#include "\z\ace\addons\main\script_macros.hpp"
\ No newline at end of file
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/stringtable.xml b/addons/disposable/stringtable.xml
index acdc79473c..ac2b76ee7f 100644
--- a/addons/disposable/stringtable.xml
+++ b/addons/disposable/stringtable.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/addons/dragging/CfgEventHandlers.hpp b/addons/dragging/CfgEventHandlers.hpp
index 313406a3f1..226efc5ef7 100644
--- a/addons/dragging/CfgEventHandlers.hpp
+++ b/addons/dragging/CfgEventHandlers.hpp
@@ -55,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 dab8c1e842..1529d39319 100644
--- a/addons/dragging/CfgVehicles.hpp
+++ b/addons/dragging/CfgVehicles.hpp
@@ -6,14 +6,19 @@ class CfgVehicles {
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;
};
+ class StaticCannon: StaticWeapon {
+ GVAR(canCarry) = 0;
+ GVAR(canDrag) = 0;
+ };
+
//remove actions from Taru Pods
class Pod_Heli_Transport_04_base_F: StaticWeapon {
GVAR(canCarry) = 0;
@@ -23,23 +28,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;
};
@@ -85,6 +91,32 @@ class CfgVehicles {
GVAR(canDrag) = 0;
};
+ //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) = 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 {
@@ -92,40 +124,40 @@ class CfgVehicles {
};
GVAR(canCarry) = 1;
- GVAR(carryPosition[]) = {0,1,1};
+ GVAR(carryPosition)[] = {0,1,1};
GVAR(carryDirection) = 0;
GVAR(canDrag) = 1;
- GVAR(dragPosition[]) = {0,1.2,0};
+ 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(carryPosition)[] = {0,1.2,0};
GVAR(carryDirection) = 180;
GVAR(canDrag) = 1;
- GVAR(dragPosition[]) = {0,1.2,0};
+ 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_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..9e20d8ee60 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;
};
diff --git a/addons/dragging/functions/fnc_handleScrollWheel.sqf b/addons/dragging/functions/fnc_handleScrollWheel.sqf
index e3547ca63a..c97284618c 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];
+["setDir", _carriedItem, [_carriedItem, _direction]] call EFUNC(common,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/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/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 0a40c12726..ced23c6b56 100644
--- a/addons/explosives/CfgEventHandlers.hpp
+++ b/addons/explosives/CfgEventHandlers.hpp
@@ -32,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/CfgVehicles.hpp b/addons/explosives/CfgVehicles.hpp
index ce77ce0d79..3db6546208 100644
--- a/addons/explosives/CfgVehicles.hpp
+++ b/addons/explosives/CfgVehicles.hpp
@@ -50,8 +50,7 @@ class CfgVehicles {
mapSize = 0.2;
icon = "iconObject_1x2";
model = "\A3\Weapons_f\dummyweapon.p3d";
- scope = 2;
- scopeCurator = 1;
+ scope = 1;
vehicleClass = "Cargo";
class ACE_Actions {
class ACE_MainActions {
@@ -66,7 +65,6 @@ class CfgVehicles {
showDisabled = 0;
icon = PATHTOF(UI\Defuse_ca.paa);
priority = 0.8;
- distance = 1;
};
};
};
@@ -82,18 +80,16 @@ class CfgVehicles {
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););
@@ -105,7 +101,6 @@ class CfgVehicles {
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/XEH_PREP.hpp b/addons/explosives/XEH_PREP.hpp
index b3686a986f..0d8a4eeca5 100644
--- a/addons/explosives/XEH_PREP.hpp
+++ b/addons/explosives/XEH_PREP.hpp
@@ -6,6 +6,7 @@ PREP(addExplosiveActions);
PREP(addToSpeedDial);
PREP(addTransmitterActions);
PREP(addTriggerActions);
+PREP(cancelPlacement);
PREP(canDefuse);
PREP(canDetonate);
PREP(connectExplosive);
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 e8f12ca6e3..fe12a88b7f 100644
--- a/addons/explosives/XEH_postInit.sqf
+++ b/addons/explosives/XEH_postInit.sqf
@@ -27,18 +27,7 @@ if (isServer) then {
TRACE_1("Knocked Out, Doing Deadman", _unit);
[_unit] call FUNC(onIncapacitated);
}] call EFUNC(common,addEventHandler);
-};
-if (!hasInterface) exitWith {};
-
-GVAR(PlacedCount) = 0;
-GVAR(Setup) = objNull;
-GVAR(pfeh_running) = false;
-GVAR(CurrentSpeedDial) = 0;
-
-// In case we are a JIP client, ask the server for orientation of any previously
-// placed mine.
-if (isServer) then {
["clientRequestsOrientations", {
params ["_logic"];
TRACE_1("clientRequestsOrientations received:",_logic);
@@ -50,7 +39,18 @@ if (isServer) then {
TRACE_1("serverSendsOrientations sent:",GVAR(explosivesOrientations));
["serverSendsOrientations", _logic, [GVAR(explosivesOrientations)]] call EFUNC(common,targetEvent);
}] call EFUNC(common,addEventHandler);
-} else {
+};
+
+if (!hasInterface) exitWith {};
+
+GVAR(PlacedCount) = 0;
+GVAR(Setup) = objNull;
+GVAR(pfeh_running) = false;
+GVAR(CurrentSpeedDial) = 0;
+
+// In case we are a JIP client, ask the server for orientation of any previously
+// placed mine.
+if (didJIP) then {
["serverSendsOrientations", {
params ["_explosivesOrientations"];
TRACE_1("serverSendsOrientations received:",_explosivesOrientations);
@@ -59,14 +59,12 @@ if (isServer) then {
TRACE_3("orientation set:",_explosive,_direction,_pitch);
[_explosive, _direction, _pitch] call FUNC(setPosition);
} forEach _explosivesOrientations;
- private _group = group GVAR(localLogic);
deleteVehicle GVAR(localLogic);
GVAR(localLogic) = nil;
- deleteGroup _group;
}] call EFUNC(common,addEventHandler);
// Create a logic to get the client ID
- GVAR(localLogic) = (createGroup sideLogic) createUnit ["Logic", [0,0,0], [], 0, "NONE"];
+ GVAR(localLogic) = ([sideLogic] call CBA_fnc_getSharedGroup) createUnit ["Logic", [0,0,0], [], 0, "NONE"];
TRACE_1("clientRequestsOrientations sent:",GVAR(localLogic));
["clientRequestsOrientations", [GVAR(localLogic)]] call EFUNC(common,serverEvent);
};
@@ -81,5 +79,3 @@ if (isServer) then {
_this call FUNC(interactEH);
}] call EFUNC(common,addEventHandler);
-
-[{(_this select 0) call FUNC(handleScrollWheel);}] call EFUNC(common,addScrollWheelEventHandler);
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_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_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_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..709ea688d5 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;
};
diff --git a/addons/explosives/stringtable.xml b/addons/explosives/stringtable.xml
index ad89649cbd..c49d09502f 100644
--- a/addons/explosives/stringtable.xml
+++ b/addons/explosives/stringtable.xml
@@ -107,16 +107,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
@@ -647,6 +647,8 @@
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)
M6 SLAM Mine (Side Attack)
@@ -661,6 +663,8 @@
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)
Large IED (Urban, Pressure Plate)
@@ -675,6 +679,8 @@
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é)
Large IED (Dug-in, Pressure Plate)
@@ -689,6 +695,8 @@
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é)
Small IED (Urban, Pressure Plate)
@@ -703,6 +711,8 @@
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é)
Small IED (Dug-in, Pressure Plate)
@@ -717,6 +727,8 @@
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é)
Connect to %1
@@ -731,4 +743,4 @@
Conectar à %1
-
+
\ No newline at end of file
diff --git a/addons/fastroping/$PBOPREFIX$ b/addons/fastroping/$PBOPREFIX$
index 352dc2c83a..c2389fdaf5 100644
--- a/addons/fastroping/$PBOPREFIX$
+++ b/addons/fastroping/$PBOPREFIX$
@@ -1 +1 @@
-z\ace\addons\fastroping
+z\ace\addons\fastroping
diff --git a/addons/fastroping/CfgEventHandlers.hpp b/addons/fastroping/CfgEventHandlers.hpp
index e75956f440..0d3301d6e0 100644
--- a/addons/fastroping/CfgEventHandlers.hpp
+++ b/addons/fastroping/CfgEventHandlers.hpp
@@ -1,3 +1,9 @@
+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/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
index 560f60cffc..609e386e68 100644
--- a/addons/fastroping/CfgVehicles.hpp
+++ b/addons/fastroping/CfgVehicles.hpp
@@ -4,7 +4,7 @@
control = "Checkbox"; \
displayName = CSTRING(Eden_equipFRIES); \
tooltip = CSTRING(Eden_equipFRIES_Tooltip); \
- expression = [_this] call FUNC(equipFRIES); \
+ expression = QUOTE([_this] call FUNC(equipFRIES)); \
typeName = "BOOL"; \
condition = "objectVehicle"; \
defaultValue = false; \
@@ -12,74 +12,6 @@
}
class CfgVehicles {
- class Building;
- class NonStrategic: Building {
- class AnimationSources;
- };
- class ACE_friesBase: NonStrategic {
- destrType = "";
- };
- class ACE_friesAnchorBar: ACE_friesBase {
- author = "jokoho48";
- scope = 1;
- model = PATHTOF(data\friesAnchorBar.p3d);
- animated = 1;
- class AnimationSources: 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 = PATHTOF(data\friesGantry.p3d);
- animated = 1;
- class AnimationSources: 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 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 Logic;
class Module_F: Logic {
class ModuleDescription;
@@ -108,15 +40,15 @@ class CfgVehicles {
class ACE_SelfActions {
class ACE_prepareFRIES {
displayName = CSTRING(Interaction_prepareFRIES);
- condition = [vehicle _player] call FUNC(canPrepareFRIES);
- statement = [vehicle _player] call FUNC(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 = [_player, vehicle _player] call FUNC(canDeployRopes);
- statement = [QGVAR(deployRopes), [vehicle _player]] call EFUNC(common,serverEvent);
+ condition = QUOTE([ARR_2(_player, vehicle _player)] call FUNC(canDeployRopes));
+ statement = QUOTE([ARR_2(QUOTE(QGVAR(deployRopes)), [vehicle _player])] call EFUNC(common,serverEvent));
showDisabled = 0;
priority = 1;
};
@@ -137,71 +69,174 @@ class CfgVehicles {
};
};
- class Helicopter_Base_H;
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 = QUOTE(PATHTOF(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 = QUOTE(PATHTOF(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 = PATHTOF(data\helper.p3d);
- class ACE_Actions {
- class ACE_MainActions {
- condition = "false";
- };
- };
+ class ACE_Actions {};
class Turrets {};
};
+ 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(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(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(ropeOrigins)[] = {"ropeOriginRight", "ropeOriginLeft"};
GVAR(friesType) = "ACE_friesAnchorBar";
- GVAR(friesAttachmentPoint[]) = {0.065, 2.2, -0.15};
+ 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(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(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(ropeOrigins)[] = {"ropeOriginRight", "ropeOriginLeft"};
GVAR(friesType) = "ACE_friesGantryReverse";
- GVAR(friesAttachmentPoint[]) = {1.04, 2.5, -0.34};
+ 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(ropeOrigins)[] = {"ropeOriginRight", "ropeOriginLeft"};
GVAR(friesType) = "ACE_friesGantry";
- GVAR(friesAttachmentPoint[]) = {-1.07, 3.26, -0.5};
+ GVAR(friesAttachmentPoint)[] = {-1.07, 3.26, -0.5};
EQUIP_FRIES_ATTRIBUTE;
};
- class Heli_Transport_04_base_F;
+ 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}};
+ 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(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..4c4da2a7cb
--- /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 = QUOTE(PATHTOF(functions\fnc_deployAIWaypoint.sqf));
+ icon = QUOTE(PATHTOF(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_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
index 873d1091e5..ae88feaa76 100644
--- a/addons/fastroping/XEH_postInit.sqf
+++ b/addons/fastroping/XEH_postInit.sqf
@@ -7,8 +7,3 @@
[QGVAR(startFastRope), {
[FUNC(fastRopeServerPFH), 0, _this] call CBA_fnc_addPerFrameHandler;
}] call EFUNC(common,addEventHandler);
-
-[QGVAR(ropeDetach), {
- params ["_object", "_rope"];
- _object ropeDetach _rope;
-}] call EFUNC(common,addEventHandler);
diff --git a/addons/fastroping/XEH_preInit.sqf b/addons/fastroping/XEH_preInit.sqf
index 83bb997eac..a7feade1c3 100644
--- a/addons/fastroping/XEH_preInit.sqf
+++ b/addons/fastroping/XEH_preInit.sqf
@@ -2,21 +2,6 @@
ADDON = false;
-PREP(canCutRopes);
-PREP(canDeployRopes);
-PREP(canFastRope);
-PREP(canPrepareFRIES);
-PREP(checkVehicleThread);
-PREP(cutRopes);
-PREP(deployRopes);
-PREP(equipFRIES);
-PREP(fastRope);
-PREP(fastRopeLocalPFH);
-PREP(fastRopeServerPFH);
-PREP(moduleEquipFRIES);
-PREP(onCutCommon);
-PREP(onPrepareCommon);
-PREP(onRopeBreak);
-PREP(prepareFRIES);
+#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/config.cpp b/addons/fastroping/config.cpp
index 25ec1876fa..7275741f40 100644
--- a/addons/fastroping/config.cpp
+++ b/addons/fastroping/config.cpp
@@ -14,4 +14,6 @@ class CfgPatches {
#include "CfgEventHandlers.hpp"
#include "CfgMoves.hpp"
+#include "CfgSounds.hpp"
#include "CfgVehicles.hpp"
+#include "CfgWaypoints.hpp"
diff --git a/addons/fastroping/data/model.cfg b/addons/fastroping/data/model.cfg
index de8c55b45d..3291e7a509 100644
--- a/addons/fastroping/data/model.cfg
+++ b/addons/fastroping/data/model.cfg
@@ -90,6 +90,24 @@ class CfgModels {
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_canPrepareFRIES.sqf b/addons/fastroping/functions/fnc_canPrepareFRIES.sqf
index ef33a4c7ff..67e2165c3f 100644
--- a/addons/fastroping/functions/fnc_canPrepareFRIES.sqf
+++ b/addons/fastroping/functions/fnc_canPrepareFRIES.sqf
@@ -19,7 +19,6 @@ params ["_vehicle"];
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
-(isNumber (_config >> QGVAR(enabled)) &&
-{(getNumber (_config >> QGVAR(enabled)) == 1) || {!(isNull (_vehicle getVariable [QGVAR(FRIES), objNull]))}} &&
+((getNumber (_config >> QGVAR(enabled)) == 1) || {!(isNull (_vehicle getVariable [QGVAR(FRIES), objNull]))}) &&
{(_vehicle getVariable [QGVAR(deploymentStage), 0]) == 0} &&
-{isText (_config >> QGVAR(onPrepare))})
+{getText (_config >> QGVAR(onPrepare)) != ""}
diff --git a/addons/fastroping/functions/fnc_cutRopes.sqf b/addons/fastroping/functions/fnc_cutRopes.sqf
index 88b02a70af..dcabda56ba 100644
--- a/addons/fastroping/functions/fnc_cutRopes.sqf
+++ b/addons/fastroping/functions/fnc_cutRopes.sqf
@@ -32,8 +32,11 @@ _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []];
};
};
- [QGVAR(ropeDetach), [_hook, _ropeTop]] call EFUNC(common,serverEvent);
- [{{deleteVehicle _x} count _this}, [_ropeTop, _ropeBottom, _dummy, _hook], 60] call EFUNC(common,waitAndExecute);
+ //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 EFUNC(common,waitAndExecute);
} count _deployedRopes;
_vehicle setVariable [QGVAR(deployedRopes), [], true];
diff --git a/addons/fastroping/functions/fnc_deployAI.sqf b/addons/fastroping/functions/fnc_deployAI.sqf
new file mode 100644
index 0000000000..dd4bfe4e71
--- /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 EFUNC(common,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 EFUNC(common,waitUntilAndExecute);
+ }, [_vehicle, _unitsToDeploy], 1] call EFUNC(common,waitAndExecute);
+ } else {
+ [{
+ private _deployedRopes = _this getVariable [QGVAR(deployedRopes), []];
+ ({_x select 5} count (_deployedRopes)) == 0
+ }, {
+ [_this] call FUNC(cutRopes);
+ driver _this enableAI "MOVE";
+ }, _vehicle] call EFUNC(common,waitUntilAndExecute);
+ };
+};
+
+[FUNC(deployAIRecursive), [_vehicle, _unitsToDeploy], _deployTime + 4] call EFUNC(common,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_fastRope.sqf b/addons/fastroping/functions/fnc_fastRope.sqf
index 9d91697d22..17991c538e 100644
--- a/addons/fastroping/functions/fnc_fastRope.sqf
+++ b/addons/fastroping/functions/fnc_fastRope.sqf
@@ -24,7 +24,7 @@ _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []];
_usableRope = _deployedRopes select 0;
_usableRopeIndex = 0;
{
- if !(_x select 6) exitWith {
+ if !(_x select 5) exitWith {
_usableRope = _x;
_usableRopeIndex = _forEachIndex;
};
@@ -35,6 +35,6 @@ _deployedRopes set [_usableRopeIndex, _usableRope];
_vehicle setVariable [QGVAR(deployedRopes), _deployedRopes, true];
//Start server PFH asap
-[QGVAR(startFastRope), [_unit, _vehicle, _usableRope, _usableRopeIndex]] call EFUNC(common,serverEvent);
+[QGVAR(startFastRope), [_unit, _vehicle, _usableRope, _usableRopeIndex, false]] call EFUNC(common,serverEvent);
moveOut _unit;
-[FUNC(fastRopeLocalPFH), 0, [_unit, _vehicle, _usableRope, _usableRopeIndex]] call CBA_fnc_addPerFrameHandler;
+[FUNC(fastRopeLocalPFH), 0, [_unit, _vehicle, _usableRope, _usableRopeIndex, ACE_diagTime]] call CBA_fnc_addPerFrameHandler;
diff --git a/addons/fastroping/functions/fnc_fastRopeLocalPFH.sqf b/addons/fastroping/functions/fnc_fastRopeLocalPFH.sqf
index d05c8bfdbc..03df460f55 100644
--- a/addons/fastroping/functions/fnc_fastRopeLocalPFH.sqf
+++ b/addons/fastroping/functions/fnc_fastRopeLocalPFH.sqf
@@ -17,7 +17,7 @@
#include "script_component.hpp"
params ["_arguments", "_pfhHandle"];
-_arguments params ["_unit", "_vehicle", "_rope", "_ropeIndex"];
+_arguments params ["_unit", "_vehicle", "_rope", "_ropeIndex", "_timeToPlayRopeSound"];
_rope params ["_attachmentPoint", "_ropeTop", "_ropeBottom", "_dummy", "_hook", "_occupied"];
private ["_vectorUp", "_vectorDir", "_origin"];
@@ -31,10 +31,19 @@ if (animationState _unit != "ACE_FastRoping") exitWith {
[_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];
+ playSound QGVAR(Thud);
+
[_pfhHandle] call CBA_fnc_removePerFrameHandler;
};
+
+if (ACE_diagTime > _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
index 44f9fedd1a..2ebffe680e 100644
--- a/addons/fastroping/functions/fnc_fastRopeServerPFH.sqf
+++ b/addons/fastroping/functions/fnc_fastRopeServerPFH.sqf
@@ -17,7 +17,7 @@
#include "script_component.hpp"
params ["_arguments", "_pfhHandle"];
-_arguments params ["_unit", "_vehicle", "_rope", "_ropeIndex"];
+_arguments params ["_unit", "_vehicle", "_rope", "_ropeIndex", "_hasBeenAttached"];
_rope params ["_attachmentPoint", "_ropeTop", "_ropeBottom", "_dummy", "_hook", "_occupied"];
private ["_vectorUp", "_vectorDir", "_origin"];
@@ -25,7 +25,7 @@ private ["_vectorUp", "_vectorDir", "_origin"];
if (vehicle _unit != _unit) exitWith {};
//Start fast roping
-if (animationState _unit != "ACE_FastRoping") exitWith {
+if (getMass _dummy != 80) exitWith {
//Fix for twitchyness
_dummy setMass 80;
_dummy setCenterOfMass [0, 0, -2];
@@ -37,8 +37,15 @@ if (animationState _unit != "ACE_FastRoping") exitWith {
ropeUnwind [_ropeBottom, 6, 0.5];
};
-//Check if rope broke and unit is falling
-if (isNull attachedTo _unit) exitWith {
+//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;
};
diff --git a/addons/fastroping/functions/fnc_onCutCommon.sqf b/addons/fastroping/functions/fnc_onCutCommon.sqf
index 7bfb95b68b..404f94e9d8 100644
--- a/addons/fastroping/functions/fnc_onCutCommon.sqf
+++ b/addons/fastroping/functions/fnc_onCutCommon.sqf
@@ -24,16 +24,24 @@ if !(isNull _fries) then {
[{
_this animateDoor ["door_R", 0];
_this animateDoor ["door_L", 0];
- _vehicle animate ["dvere1_posunZ", 0];
- _vehicle animate ["dvere2_posunZ", 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 EFUNC(common,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
index d9138ea0e2..5e8bf931bb 100644
--- a/addons/fastroping/functions/fnc_onPrepareCommon.sqf
+++ b/addons/fastroping/functions/fnc_onPrepareCommon.sqf
@@ -22,9 +22,14 @@ _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 {
[{
diff --git a/addons/fastroping/script_component.hpp b/addons/fastroping/script_component.hpp
index ccfa2c3e56..3770bfe0d4 100644
--- a/addons/fastroping/script_component.hpp
+++ b/addons/fastroping/script_component.hpp
@@ -1,6 +1,11 @@
#define COMPONENT fastroping
#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_FASTROPING
#define DEBUG_MODE_FULL
#endif
diff --git a/addons/fastroping/stringtable.xml b/addons/fastroping/stringtable.xml
index b65169b273..7b0e4ad1f8 100644
--- a/addons/fastroping/stringtable.xml
+++ b/addons/fastroping/stringtable.xml
@@ -1,4 +1,4 @@
-
+
@@ -6,48 +6,77 @@
Rüste FRIES aus
Wyposaż FRIES
Equiper le FRIES
+ Equipar FRIES
+ Equipaggia la FRIES
+ Vybavit 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).
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í
Deploy ropes
Seile auswerfen
Wypuść liny
Déployer les cordes
+ Desplegar cuerdas
+ Srotola le corde
+ Připravit lana
Fast rope
Abseilen
Zjedź na linie
Descendre à la corde
+ Descender por la cuerda
+ Scendi sulla corda
+ SLANIT
Cut ropes
Seile abwerfen
Odetnij liny
Détacher les cordes
+ Cortar cuerdas
+ Taglia le corde
+ Odříznout lano
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
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)
+
+
+ LET UNITS FAST ROPE
+ EINHEITEN ABSEILEN LASSEN
+ SCENDI DALLE CORDE
-
+
\ No newline at end of file
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/stringtable.xml b/addons/fcs/stringtable.xml
index 035d9d7a36..8750d2a4e3 100644
--- a/addons/fcs/stringtable.xml
+++ b/addons/fcs/stringtable.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/addons/finger/XEH_postInit.sqf b/addons/finger/XEH_postInit.sqf
index 394c0cfd3b..94a22d7224 100644
--- a/addons/finger/XEH_postInit.sqf
+++ b/addons/finger/XEH_postInit.sqf
@@ -11,7 +11,7 @@ GVAR(pfeh_id) = -1;
if (!GVAR(enabled)) exitWith {};
[QGVAR(fingered), {_this call FUNC(incomingFinger)}] call EFUNC(common,addEventHandler);
-
+
["ACE3 Common",
QGVAR(finger),
[(localize LSTRING(keyComb)), (localize LSTRING(keyComb_description))],
diff --git a/addons/flashsuppressors/stringtable.xml b/addons/flashsuppressors/stringtable.xml
index 5f6a0ebc86..f075f1aa34 100644
--- a/addons/flashsuppressors/stringtable.xml
+++ b/addons/flashsuppressors/stringtable.xml
@@ -1,4 +1,4 @@
-
+
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..cd6cc64cfd 100644
--- a/addons/frag/CfgAmmo.hpp
+++ b/addons/frag/CfgAmmo.hpp
@@ -8,11 +8,11 @@ class CfgAmmo {
//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;
@@ -27,7 +27,7 @@ class CfgAmmo {
class Grenade;
class GrenadeHand: Grenade {
GVAR(enabled) = 1;
-
+
GVAR(skip) = 0;
GVAR(force) = 1;
// This is a good high-drag frag type for grenades.
@@ -52,7 +52,7 @@ class CfgAmmo {
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;
@@ -74,18 +74,19 @@ class CfgAmmo {
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;
@@ -95,20 +96,21 @@ class CfgAmmo {
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;
@@ -121,7 +123,7 @@ class CfgAmmo {
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;
@@ -131,7 +133,7 @@ class CfgAmmo {
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;
@@ -140,7 +142,7 @@ class CfgAmmo {
};
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;
@@ -149,7 +151,7 @@ class CfgAmmo {
};
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;
@@ -158,7 +160,7 @@ class CfgAmmo {
};
class Sh_120mm_HE : ShellBase {
GVAR(enabled) = 1;
-
+
GVAR(classes)[] = {"ACE_frag_medium", "ACE_frag_medium_HD"};
GVAR(metal) = 23000;
GVAR(charge) = 3148;
@@ -167,7 +169,7 @@ class CfgAmmo {
};
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;
@@ -176,7 +178,7 @@ class CfgAmmo {
};
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;
@@ -203,7 +205,7 @@ class CfgAmmo {
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;
@@ -213,7 +215,7 @@ class CfgAmmo {
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;
@@ -471,6 +473,6 @@ class CfgAmmo {
class ACE_frag_spall_huge: ACE_frag_huge {
timeToLive = 0.3;
};
-
+
#include "CfgAmmoReflections.hpp"
};
diff --git a/addons/frag/XEH_PREP.hpp b/addons/frag/XEH_PREP.hpp
index 926cbaab0c..2fed1630f2 100644
--- a/addons/frag/XEH_PREP.hpp
+++ b/addons/frag/XEH_PREP.hpp
@@ -1,3 +1,4 @@
+PREP(dev_debugAmmo);
PREP(doSpall);
PREP(fired);
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_doReflections.sqf b/addons/frag/functions/fnc_doReflections.sqf
index 7702e34fd5..64d8ede26d 100644
--- a/addons/frag/functions/fnc_doReflections.sqf
+++ b/addons/frag/functions/fnc_doReflections.sqf
@@ -13,10 +13,6 @@ if(count _this > 2) then {
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_drawTraces.sqf b/addons/frag/functions/fnc_drawTraces.sqf
index ac95957ad4..494a2af727 100644
--- a/addons/frag/functions/fnc_drawTraces.sqf
+++ b/addons/frag/functions/fnc_drawTraces.sqf
@@ -18,12 +18,11 @@ private ["_color", "_index", "_lastPos", "_lastSpd", "_max", "_positions", "_sta
} 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;
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/CfgVehicles.hpp b/addons/gestures/CfgVehicles.hpp
index d3c7b5ca21..8294f43759 100644
--- a/addons/gestures/CfgVehicles.hpp
+++ b/addons/gestures/CfgVehicles.hpp
@@ -12,131 +12,104 @@ class CfgVehicles {
icon = PATHTOF(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(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/testmissions/README.md b/addons/gestures/README.md
similarity index 50%
rename from addons/testmissions/README.md
rename to addons/gestures/README.md
index e8737f0ab6..e224ff6d69 100644
--- a/addons/testmissions/README.md
+++ b/addons/gestures/README.md
@@ -1,11 +1,11 @@
-ace_testmissions
-===========
+ace_gestures
+========
-Provides test missions.
+Gestures system in interaction menu and keybinds.
## Maintainers
The people responsible for merging changes to this component or answering potential questions.
-- None
+- [jokoho48](https://github.com/jokoho48)
diff --git a/addons/gestures/XEH_postInit.sqf b/addons/gestures/XEH_postInit.sqf
index 3b4a92164e..6d9e057e29 100644
--- a/addons/gestures/XEH_postInit.sqf
+++ b/addons/gestures/XEH_postInit.sqf
@@ -5,4 +5,45 @@ if (!hasInterface) exitWith {};
// reload mutex, you can't play signal while reloading
GVAR(ReloadMutex) = true;
-#include "key.sqf"
+// Add keybinds
+{
+ _x params ["_currentName", "_key", ["_vanillaKey", 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 _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 [
+ ["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/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..50a835abe6 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"};
@@ -134,13 +134,13 @@ class CfgGesturesMale {
file = QUOTE(PATHTOF(anim\ace_forward_stand_lowered.rtm));
};
- class GVAR(stop): GVAR(forward) {
- file = QUOTE(PATHTOF(anim\ace_stop.rtm));
+ class GVAR(freeze): GVAR(forward) {
+ file = QUOTE(PATHTOF(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 = QUOTE(PATHTOF(anim\ace_freeze_stand_lowered.rtm));
};
class GVAR(cover): GVAR(forward) {
diff --git a/addons/gestures/config.cpp b/addons/gestures/config.cpp
index 39cb8f0951..ce60d26545 100644
--- a/addons/gestures/config.cpp
+++ b/addons/gestures/config.cpp
@@ -7,7 +7,7 @@ class CfgPatches {
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_interact_menu"};
author[] = {"joko // Jonas", "Emperias", "Zigomarvin"};
- authorUrl = "https://github.com/commy2/";
+ authorUrl = "https://github.com/jokoho48";
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 1f008ddae9..56b77e97e9 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,20 +108,7 @@
Alto
Fermi
-
-
- Stop
- Stop
- Halt
- Stop
- Стоп
- Parar
- Stop
- Stop
- Detenerse
-
-
-
+
Cover
Deckung
Cubrirse
@@ -134,8 +120,7 @@
Proteger-se
Copertura
-
-
+
Rally up
Regroupement
Sammeln
@@ -146,8 +131,7 @@
Raggruppare
Reunirse
-
-
+
Move forward
En avant
Vorwärts Bewegen
@@ -158,8 +142,7 @@
Muovere avanti
Avanzar
-
-
+
Engage
Angriff
Engager
@@ -170,8 +153,7 @@
Ingaggiare
Atacar
-
-
+
Point
Pointer
Zeigen
@@ -182,8 +164,7 @@
Puntare
Señalar
-
-
+
Hold
Tenir
Anhalten
@@ -194,8 +175,7 @@
Mantenere
Esperar
-
-
+
Warning
Attention
Achtung
@@ -206,31 +186,7 @@
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
-
-
\ No newline at end of file
diff --git a/addons/inventory/XEH_postInit.sqf b/addons/inventory/XEH_postInit.sqf
index bf7adec77a..7135383734 100644
--- a/addons/inventory/XEH_postInit.sqf
+++ b/addons/inventory/XEH_postInit.sqf
@@ -2,6 +2,35 @@
if (!hasInterface) exitWith {};
+// cache config
+// items in the inventory display can only be distinguished by their lb names and pictures
+// this can cause collisions (mainly weapons with attachments),
+// but if the item has the same name and picture it at least shouldn't change the filter anyway
+// luckily we don't need private items, so dummy and parent classes are out of the picture
+
+GVAR(ItemKeyNamespace) = [] call CBA_fnc_createNamespace;
+
+private _fnc_addToCache = {
+ private _displayName = getText (_this >> "displayName");
+ private _picture = getText (_this >> "picture");
+
+ // list box seems to delete the leading backslash
+ if (_picture select [0,1] == "\") then {
+ _picture = _picture select [1];
+ };
+
+ GVAR(ItemKeyNamespace) setVariable [format ["%1:%2", _displayName, _picture], _this];
+};
+
+private _allItems = [];
+
+_allItems append ("getNumber (_x >> 'scope') > 0" configClasses (configFile >> "CfgWeapons"));
+_allItems append ("getNumber (_x >> 'scope') > 0" configClasses (configFile >> "CfgGlasses"));
+_allItems append ("getNumber (_x >> 'scope') == 2" configClasses (configFile >> "CfgMagazines"));
+_allItems append ("getNumber (_x >> 'scope') > 0 && {getNumber (_x >> 'isBackpack') == 1}" configClasses (configFile >> "CfgVehicles"));
+
+{_x call _fnc_addToCache; false} count _allItems;
+
GVAR(customFilters) = [];
GVAR(selectedFilterIndex) = -1;
diff --git a/addons/inventory/XEH_preInit.sqf b/addons/inventory/XEH_preInit.sqf
index 535b9be656..a7feade1c3 100644
--- a/addons/inventory/XEH_preInit.sqf
+++ b/addons/inventory/XEH_preInit.sqf
@@ -4,47 +4,4 @@ ADDON = false;
#include "XEH_PREP.hpp"
-// cache config
-// items in the inventory display can only be distinguished by their lb names and pictures
-// this can cause collisions (mainly weapons with attachments),
-// but if the item has the same name and picture it at least shouldn't change the filter anyway
-// luckily we don't need private items, so dummy and parent classes are out of the picture
-
-if !(uiNamespace getVariable [QGVAR(configCached), false]) then {
- private _fnc_addToCache = {
- private _displayName = getText (_this >> "displayName");
- private _picture = getText (_this >> "picture");
-
- // list box seems to delete the leading backslash
- if (_picture select [0,1] == "\") then {
- _picture = _picture select [1];
- };
-
- uiNamespace setVariable [format [QGVAR(ItemKey:%1:%2), _displayName, _picture], _this];
- };
-
- // weapons and items
- {
- if (getNumber (_x >> "scope") > 0) then {_x call _fnc_addToCache};
- false
- } count (
- ("true" configClasses (configFile >> "CfgWeapons")) +
- ("true" configClasses (configFile >> "CfgGlasses"))
- );
-
- // magazines
- {
- if (getNumber (_x >> "scope") == 2) then {_x call _fnc_addToCache};
- false
- } count ("true" configClasses (configFile >> "CfgMagazines"));
-
- // backpacks
- {
- if (getNumber (_x >> "scope") > 0 && {getNumber (_x >> "isBackpack") == 1}) then {_x call _fnc_addToCache};
- false
- } count ("true" configClasses (configFile >> "CfgVehicles"));
-
- uiNamespace setVariable [QGVAR(configCached), true];
-};
-
ADDON = true;
diff --git a/addons/inventory/functions/fnc_forceItemListUpdate.sqf b/addons/inventory/functions/fnc_forceItemListUpdate.sqf
index 89142b99ff..e5358212bb 100644
--- a/addons/inventory/functions/fnc_forceItemListUpdate.sqf
+++ b/addons/inventory/functions/fnc_forceItemListUpdate.sqf
@@ -23,12 +23,9 @@ if (_filterFunction isEqualType {}) then {
private _i = 0;
while {_i < lbSize _itemList} do {
- private _config = uiNamespace getVariable [
- format [QGVAR(ItemKey:%1:%2), _itemList lbText _i, _itemList lbPicture _i],
- configNull
- ];
+ private _config = GVAR(ItemKeyNamespace) getVariable format ["%1:%2", _itemList lbText _i, _itemList lbPicture _i];
- if (!isNull _config && {!(_config call _filterFunction)}) then {
+ if (!isNil "_config" && {!(_config call _filterFunction)}) then {
_itemList lbDelete _i;
// in case the filter function returns nil. Otherwise could lock up the game.
diff --git a/addons/inventory/functions/fnc_inventoryDisplayLoad.sqf b/addons/inventory/functions/fnc_inventoryDisplayLoad.sqf
index 6e48c1ec2a..ab23701760 100644
--- a/addons/inventory/functions/fnc_inventoryDisplayLoad.sqf
+++ b/addons/inventory/functions/fnc_inventoryDisplayLoad.sqf
@@ -28,7 +28,7 @@ _filter ctrlAddEventHandler ["LBSelChanged", {_this call FUNC(onLBSelChanged)}];
[{
disableSerialization;
params ["_filter"];
-
+
// remove "All", so we can push it to the back later.
// to keep localization we can keep the lbText (displayed name).
private _index = lbSize _filter - 1;
diff --git a/addons/javelin/CfgMagazines.hpp b/addons/javelin/CfgMagazines.hpp
index 3053cf1fa1..80111d9484 100644
--- a/addons/javelin/CfgMagazines.hpp
+++ b/addons/javelin/CfgMagazines.hpp
@@ -10,7 +10,7 @@ class CfgMagazines {
class Titan_AT: Titan_AA {
ammo = "ACE_Javelin_FGM148"; //from misssileGuidance, was "M_Titan_AT"
};
-
+
//Handheld Titan "AP" Magazine (SACLOS? "Anti-personal")
// class Titan_AP: Titan_AA {
//???
diff --git a/addons/javelin/CfgVehicles.hpp b/addons/javelin/CfgVehicles.hpp
index 1cd527089d..74863ef08f 100644
--- a/addons/javelin/CfgVehicles.hpp
+++ b/addons/javelin/CfgVehicles.hpp
@@ -3,20 +3,20 @@ class CfgVehicles {
class StaticWeapon : LandVehicle {
class Turrets;
};
-
+
class StaticMGWeapon : StaticWeapon {
class Turrets : Turrets {
class MainTurret;
};
};
class AT_01_base_F: StaticMGWeapon {};
-
+
class B_static_AT_F: AT_01_base_F {
class Turrets : Turrets {
class MainTurret : MainTurret {
weapons[] = { QGVAR(Titan_Static) };
magazines[] = {"1Rnd_GAT_missiles","1Rnd_GAT_missiles","1Rnd_GAT_missiles","1Rnd_GAT_missiles"};
-
+
turretInfoType = "ACE_RscOptics_javelin";
gunnerOpticsModel = PATHTOF(data\reticle_titan.p3d);
opticsZoomMin = 0.08333;
@@ -34,7 +34,7 @@ class CfgVehicles {
class MainTurret : MainTurret {
weapons[] = { QGVAR(Titan_Static) };
magazines[] = {"1Rnd_GAT_missiles","1Rnd_GAT_missiles","1Rnd_GAT_missiles","1Rnd_GAT_missiles"};
-
+
turretInfoType = "ACE_RscOptics_javelin";
gunnerOpticsModel = PATHTOF(data\reticle_titan.p3d);
opticsZoomMin = 0.08333;
@@ -52,7 +52,7 @@ class CfgVehicles {
class MainTurret : MainTurret {
weapons[] = { QGVAR(Titan_Static) };
magazines[] = {"1Rnd_GAT_missiles","1Rnd_GAT_missiles","1Rnd_GAT_missiles","1Rnd_GAT_missiles"};
-
+
turretInfoType = "ACE_RscOptics_javelin";
gunnerOpticsModel = PATHTOF(data\reticle_titan.p3d);
opticsZoomMin = 0.08333;
@@ -65,4 +65,4 @@ class CfgVehicles {
};
};
};
-};
\ No newline at end of file
+};
diff --git a/addons/javelin/CfgWeapons.hpp b/addons/javelin/CfgWeapons.hpp
index 75aaf7c332..1e32752145 100644
--- a/addons/javelin/CfgWeapons.hpp
+++ b/addons/javelin/CfgWeapons.hpp
@@ -1,38 +1,38 @@
class CfgWeapons {
class Launcher;
class MissileLauncher;
-
+
class Launcher_Base_F : Launcher {
- class WeaponSlotsInfo;
+ class WeaponSlotsInfo;
};
// @TODO: AA by default, motherfuckers
class missiles_titan : MissileLauncher {
-
+
};
-
+
class missiles_titan_at : missiles_titan { };
- class GVAR(Titan_Static) : missiles_titan_at {
+ class GVAR(Titan_Static) : missiles_titan_at {
GVAR(enabled) = 1;
weaponInfoType = "ACE_RscOptics_javelin";
modelOptics = PATHTOF(data\reticle_titan.p3d);
-
+
canLock = 0;
magazines[] = {"1Rnd_GAT_missiles"};
lockingTargetSound[] = {"",0,1};
lockedTargetSound[] = {"",0,1};
};
-
+
// @TODO: AA by default, motherfuckers
class launch_Titan_base : Launcher_Base_F {};
-
+
class launch_Titan_short_base : launch_Titan_base { };
-
+
class launch_B_Titan_short_F: launch_Titan_short_base {
GVAR(enabled) = 1;
weaponInfoType = "ACE_RscOptics_javelin";
modelOptics = PATHTOF(data\reticle_titan.p3d);
-
+
canLock = 0;
lockingTargetSound[] = {"",0,1};
@@ -42,7 +42,7 @@ class CfgWeapons {
GVAR(enabled) = 1;
weaponInfoType = "ACE_RscOptics_javelin";
modelOptics = PATHTOF(data\reticle_titan.p3d);
-
+
canLock = 0;
lockingTargetSound[] = {"",0,1};
@@ -52,10 +52,10 @@ class CfgWeapons {
GVAR(enabled) = 1;
weaponInfoType = "ACE_RscOptics_javelin";
modelOptics = PATHTOF(data\reticle_titan.p3d);
-
+
canLock = 0;
-
-
+
+
lockingTargetSound[] = {"",0,1};
lockedTargetSound[] = {"",0,1};
};
@@ -63,10 +63,10 @@ class CfgWeapons {
GVAR(enabled) = 1;
weaponInfoType = "ACE_RscOptics_javelin";
modelOptics = PATHTOF(data\reticle_titan.p3d);
-
+
canLock = 0;
lockingTargetSound[] = {"",0,1};
lockedTargetSound[] = {"",0,1};
};
-};
\ No newline at end of file
+};
diff --git a/addons/javelin/RscInGameUI.hpp b/addons/javelin/RscInGameUI.hpp
index ea1e12626c..d3fff71db0 100644
--- a/addons/javelin/RscInGameUI.hpp
+++ b/addons/javelin/RscInGameUI.hpp
@@ -15,7 +15,7 @@ class RscInGameUI {
controls[] = { "ACE_javelin_elements_group", "ACE_Targeting" }; //, "ACE_TargetingConstrains", "ACE_TargetingGate", "ACE_TargetingLines"};
onLoad = QUOTE(_this call FUNC(onOpticLoad));
onUnload = QUOTE(_this call FUNC(onOpticUnload));
-
+
class ACE_javelin_elements_group: RscControlsGroup
{
x = "SafezoneX";
@@ -44,7 +44,7 @@ class RscInGameUI {
w = 0;
h = 0;
};
-
+
class ACE_javelin_Day_mode_off: RscPicture {
idc = 1001;
x = "(SafezoneX+(SafezoneW -SafezoneH*3/4)/2)+ (0.03/4)*3*SafezoneH - SafezoneX";
@@ -123,7 +123,7 @@ class RscInGameUI {
h = 0;
colorText[] = {0.2941,0.8745,0.2157,1};
};
-
+
};
};
class CA_Javelin_NFOV_mode_off: ACE_javelin_Day_mode_off {
@@ -191,7 +191,7 @@ class RscInGameUI {
h = "0.1895*SafezoneH";
colorText[] = {0.2941,0.8745,0.2157,1};
};
-
+
};
};
@@ -253,12 +253,12 @@ class RscInGameUI {
};
class ACE_Targeting : RscControlsGroup {
idc = 6999;
-
+
x = "SafezoneX";
y = "SafezoneY";
w = "SafezoneW";
h = "SafezoneH";
-
+
enabled = 0;
class Controls {
class ACE_TargetingConstrains: RscControlsGroup {
@@ -266,7 +266,7 @@ class RscInGameUI {
y = "SafezoneY";
w = "SafezoneW-SafezoneX";
h = "SafezoneH-SafezoneY";
-
+
enabled = 0;
class VScrollbar {
autoScrollSpeed = -1;
@@ -315,7 +315,7 @@ class RscInGameUI {
};
};
};
-
+
class ACE_TargetingGate : ACE_TargetingConstrains {
idc = 699200;
class Controls {
@@ -401,8 +401,8 @@ class RscInGameUI {
};
};
};
-
-
+
+
class ACE_TargetingLines: ACE_TargetingConstrains {
idc = 699300;
class Controls {
@@ -451,4 +451,4 @@ ACE_Titan_TOP_off: 1006
ACE_Titan_DIR: 1007
ACE_Titan_FLTR_mode_off: 1002
ACE_Titan_FLTR_mode: 161
-*/
\ No newline at end of file
+*/
diff --git a/addons/javelin/functions/fnc_onOpticDraw.sqf b/addons/javelin/functions/fnc_onOpticDraw.sqf
index 04a5e1d04c..6608b13ecc 100644
--- a/addons/javelin/functions/fnc_onOpticDraw.sqf
+++ b/addons/javelin/functions/fnc_onOpticDraw.sqf
@@ -98,8 +98,17 @@ if (_range > 50 && {_range < 2500}) then {
};
};
-if (isNull _newTarget) then {
- _newTarget = cursorTarget;
+if ((isNull _newTarget) && {cursorObject isKindOf "AllVehicles"}) then {
+ private _intersectionsToCursorTarget = lineIntersectsSurfaces [(AGLtoASL positionCameraToWorld [0,0,0]), aimPos cursorObject, ace_player, cursorObject, true, 1];
+ if (_intersectionsToCursorTarget isEqualTo []) then {
+ _newTarget = cursorObject;
+ };
+};
+if ((isNull _newTarget) && {cursorTarget isKindOf "AllVehicles"}) then {
+ private _intersectionsToCursorTarget = lineIntersectsSurfaces [(AGLtoASL positionCameraToWorld [0,0,0]), aimPos cursorTarget, ace_player, cursorTarget, true, 1];
+ if (_intersectionsToCursorTarget isEqualTo []) then {
+ _newTarget = cursorTarget;
+ };
};
// Create constants
diff --git a/addons/javelin/stringtable.xml b/addons/javelin/stringtable.xml
index 385abf586e..dcc03dca91 100644
--- a/addons/javelin/stringtable.xml
+++ b/addons/javelin/stringtable.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/addons/kestrel4500/initKeybinds.sqf b/addons/kestrel4500/initKeybinds.sqf
index 5793d36976..581ab1a1ae 100644
--- a/addons/kestrel4500/initKeybinds.sqf
+++ b/addons/kestrel4500/initKeybinds.sqf
@@ -5,7 +5,7 @@
if (GVAR(Kestrel4500)) exitWith {
closeDialog 0;
false
- };
+ };
// Statement
[] call FUNC(createKestrelDialog);
false
@@ -17,7 +17,7 @@
{
// Conditions: canInteract
if !([ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false};
-
+
// Statement
[] call FUNC(displayKestrel);
false
@@ -34,7 +34,7 @@ _conditonCode = {
_toggleCode = {
// Conditions: canInteract
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {};
-
+
// Statement
if (!GVAR(Overlay)) then {
//If no overlay, show it:
diff --git a/addons/kestrel4500/stringtable.xml b/addons/kestrel4500/stringtable.xml
index defb44c2dc..3ad9e8824f 100644
--- a/addons/kestrel4500/stringtable.xml
+++ b/addons/kestrel4500/stringtable.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/addons/laser/CfgVehicles.hpp b/addons/laser/CfgVehicles.hpp
index d8976ac204..780107fdf7 100644
--- a/addons/laser/CfgVehicles.hpp
+++ b/addons/laser/CfgVehicles.hpp
@@ -6,20 +6,20 @@ class CfgVehicles {
model = "\A3\Weapons_F\empty.p3d";
destrType = "DestructNo";
simulation = "LaserTarget";
-
+
class EventHandlers {
init = QUOTE(_this call FUNC(laser_init));
};
};
-
+
// Visual laserTarget override
class ACE_LaserTarget_Visual : LaserTarget {
simulation = "LaserTarget";
model = "\A3\Weapons_f\laserTgt.p3d";
};
-
+
// Vehicle lockable configurations
-
+
class AllVehicles;
class Air: AllVehicles {
class Turrets;
@@ -42,4 +42,4 @@ class CfgVehicles {
};
};
};
-};
\ No newline at end of file
+};
diff --git a/addons/laser/CfgWeapons.hpp b/addons/laser/CfgWeapons.hpp
index 70a25e6f85..6dff36a4e8 100644
--- a/addons/laser/CfgWeapons.hpp
+++ b/addons/laser/CfgWeapons.hpp
@@ -1,7 +1,6 @@
class CfgWeapons {
class Binocular;
-
class Laserdesignator : Binocular {
visionMode[] = {"Normal","NVG"};
};
diff --git a/addons/laser/RscInGameUI.hpp b/addons/laser/RscInGameUI.hpp
index d87136c960..08f0a794be 100644
--- a/addons/laser/RscInGameUI.hpp
+++ b/addons/laser/RscInGameUI.hpp
@@ -8,11 +8,10 @@ class RscInGameUI {
class RscOptics_LaserDesignator {
idd = 300;
controls[] = {"CA_IGUI_elements_group"};
-
+
onLoad = "uiNameSpace setVariable ['ACE_RscOptics_LaserDesignator',(_this select 0)];";
onUnload = "uiNameSpace setVariable ['ACE_RscOptics_LaserDesignator',nil];";
-
-
+
class CA_IGUI_elements_group: RscControlsGroup {
idc = 170;
@@ -118,7 +117,7 @@ class RscInGameUI {
w = "3.5 * (0.01875 * SafezoneH)";
h = "1.6 * (0.025 * SafezoneH)";
};
-
+
class ACE_LaserCode_Helper : RscMapControl {
idc = -1;
onDraw = QUOTE(_this call FUNC(onLaserDesignatorDraw));
@@ -141,4 +140,4 @@ class RscInGameUI {
};
};
};
-};
\ No newline at end of file
+};
diff --git a/addons/laser/functions/fnc_laserOff.sqf b/addons/laser/functions/fnc_laserOff.sqf
index 84613cd988..7899ec1253 100644
--- a/addons/laser/functions/fnc_laserOff.sqf
+++ b/addons/laser/functions/fnc_laserOff.sqf
@@ -8,7 +8,7 @@
* Return value:
* None
*/
-
+
#include "script_component.hpp"
private ["_uuid"];
diff --git a/addons/laser/functions/fnc_laserTargetPFH.sqf b/addons/laser/functions/fnc_laserTargetPFH.sqf
index 6d993b07de..8726ce4201 100644
--- a/addons/laser/functions/fnc_laserTargetPFH.sqf
+++ b/addons/laser/functions/fnc_laserTargetPFH.sqf
@@ -12,7 +12,7 @@ _uuid = _args select 2;
if(isNull _laserTarget || !alive _shooter) exitWith {
[(_this select 1)] call CBA_fnc_removePerFrameHandler;
REM(GVAR(VanillaLasers), _laserTarget);
-
+
// Remove laseron
[_uuid] call FUNC(laserOff);
};
@@ -28,4 +28,3 @@ drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\select_target_ca.paa", [1,0,0,1], (A
} forEach DRAW_LINES;
DRAW_LINES = [];
#endif
-
diff --git a/addons/laser/functions/fnc_seekerFindLaserSpot.sqf b/addons/laser/functions/fnc_seekerFindLaserSpot.sqf
index 22287f1342..45b60a69c1 100644
--- a/addons/laser/functions/fnc_seekerFindLaserSpot.sqf
+++ b/addons/laser/functions/fnc_seekerFindLaserSpot.sqf
@@ -62,7 +62,7 @@ _finalOwner = nil;
};
};
};
-
+
//Handle Weird Data Return
if (_laser params [["_laserPos", [], [[]], 3], ["_laserDir", [], [[]], 3]]) then {
_res = [_laserPos, _laserDir, _divergence] call FUNC(shootCone);
diff --git a/addons/laser/stringtable.xml b/addons/laser/stringtable.xml
index f51b9cd127..4a478096d0 100644
--- a/addons/laser/stringtable.xml
+++ b/addons/laser/stringtable.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/addons/laser_selfdesignate/stringtable.xml b/addons/laser_selfdesignate/stringtable.xml
index 17c562a2bb..cdd7439200 100644
--- a/addons/laser_selfdesignate/stringtable.xml
+++ b/addons/laser_selfdesignate/stringtable.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/addons/laserpointer/stringtable.xml b/addons/laserpointer/stringtable.xml
index afd11addb1..1e4b150c3d 100644
--- a/addons/laserpointer/stringtable.xml
+++ b/addons/laserpointer/stringtable.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/addons/logistics_uavbattery/stringtable.xml b/addons/logistics_uavbattery/stringtable.xml
index c38c3daae3..6ff6e4b52d 100644
--- a/addons/logistics_uavbattery/stringtable.xml
+++ b/addons/logistics_uavbattery/stringtable.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/addons/logistics_wirecutter/stringtable.xml b/addons/logistics_wirecutter/stringtable.xml
index ef5d0522e3..1f9955f4be 100644
--- a/addons/logistics_wirecutter/stringtable.xml
+++ b/addons/logistics_wirecutter/stringtable.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/addons/magazinerepack/ACE_Settings.hpp b/addons/magazinerepack/ACE_Settings.hpp
index 0b7b2d4628..940af87d15 100644
--- a/addons/magazinerepack/ACE_Settings.hpp
+++ b/addons/magazinerepack/ACE_Settings.hpp
@@ -1,16 +1,16 @@
class ACE_Settings {
//Time to move a round from one magazine to another
- class GVAR(TimePerAmmo) {
+ class GVAR(timePerAmmo) {
value = 1.5;
typeName = "SCALAR";
};
//Time to swap between magazines when repacking
- class GVAR(TimePerMagazine) {
+ class GVAR(timePerMagazine) {
value = 2.0;
typeName = "SCALAR";
};
//Time to relink 2 belts together
- class GVAR(TimePerBeltLink) {
+ class GVAR(timePerBeltLink) {
value = 8.0;
typeName = "SCALAR";
};
diff --git a/addons/magazinerepack/stringtable.xml b/addons/magazinerepack/stringtable.xml
index 1fc873f0c3..b89b4b587d 100644
--- a/addons/magazinerepack/stringtable.xml
+++ b/addons/magazinerepack/stringtable.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/addons/main/CfgSettings.hpp b/addons/main/CfgSettings.hpp
new file mode 100644
index 0000000000..58cb824a6f
--- /dev/null
+++ b/addons/main/CfgSettings.hpp
@@ -0,0 +1,17 @@
+
+class CfgSettings {
+ class CBA {
+ class Versioning {
+ class ACE {
+ class dependencies {
+ //ACE will hard exit if this is missing
+ CBA[] = {"cba_main", REQUIRED_CBA_VERSION, "(true)"};
+
+ //Warnings for missing RHS compat pbos
+ compat_rhs_afrf3[] = {"ace_compat_rhs_afrf3", {VERSION_AR}, "isClass (configFile >> 'CfgPatches' >> 'rhs_main')"};
+ compat_rhs_usf3[] = {"ace_compat_rhs_usf3", {VERSION_AR}, "isClass (configFile >> 'CfgPatches' >> 'rhsusf_main')"};
+ };
+ };
+ };
+ };
+};
diff --git a/addons/main/config.cpp b/addons/main/config.cpp
index 857478a442..7b15f0c8f0 100644
--- a/addons/main/config.cpp
+++ b/addons/main/config.cpp
@@ -586,5 +586,6 @@ class CfgMods {
};
};
+#include "CfgSettings.hpp"
#include "CfgModuleCategories.hpp"
#include "CfgVehicleClasses.hpp"
diff --git a/addons/main/script_mod.hpp b/addons/main/script_mod.hpp
index 0c6ec9acb4..1f86448c94 100644
--- a/addons/main/script_mod.hpp
+++ b/addons/main/script_mod.hpp
@@ -5,7 +5,7 @@
#define MAJOR 3
#define MINOR 5
-#define PATCHLVL 0
+#define PATCHLVL 1
#define BUILD 0
#define VERSION MAJOR.MINOR.PATCHLVL.BUILD
@@ -13,3 +13,4 @@
// MINIMAL required version for the Mod. Components can specify others..
#define REQUIRED_VERSION 1.56
+#define REQUIRED_CBA_VERSION {2,3,1}
diff --git a/addons/map/ACE_Settings.hpp b/addons/map/ACE_Settings.hpp
index 6ff2e1e867..b04c7b39b3 100644
--- a/addons/map/ACE_Settings.hpp
+++ b/addons/map/ACE_Settings.hpp
@@ -62,7 +62,7 @@ class ACE_Settings {
displayName = CSTRING(MapShowCursorCoordinates_DisplayName);
description = CSTRING(MapShowCursorCoordinates_Description);
};
- class GVAR(DefaultChannel) {
+ class GVAR(defaultChannel) {
category = CSTRING(Module_DisplayName);
value = -1;
typeName = "SCALAR";
diff --git a/addons/map/CfgAmmo.hpp b/addons/map/CfgAmmo.hpp
index 9e98d0efea..01cd9427e8 100644
--- a/addons/map/CfgAmmo.hpp
+++ b/addons/map/CfgAmmo.hpp
@@ -1,21 +1,21 @@
class CfgAmmo {
class FlareCore;
-
+
class FlareBase: FlareCore {};
class F_20mm_White: FlareBase {};
-
+
class ACE_FlashlightProxy_White: F_20mm_White {
model = "\A3\Weapons_f\empty";
effectFlare = "FlareShell";
-
+
triggerTime = 0;
intensity = 0.5;
flareSize = 1;
timeToLive = 10e10;
-
+
lightColor[] = {1,1,1,1};
-
+
grenadeBurningSound[] = {};
grenadeFireSound[] = {};
soundTrigger[] = {};
@@ -25,24 +25,24 @@ class CfgAmmo {
SmokeShellSoundLoop1[] = {};
SmokeShellSoundLoop2[] = {};
};
-
+
class ACE_FlashlightProxy_Red: ACE_FlashlightProxy_White {
intensity = 1;
lightColor[] = {1,0,0,1};
};
-
+
class ACE_FlashlightProxy_Green: ACE_FlashlightProxy_White {
intensity = 1;
lightColor[] = {0,1,0,1};
};
-
+
class ACE_FlashlightProxy_Blue: ACE_FlashlightProxy_White {
intensity = 1.5;
lightColor[] = {0.25,0.25,1,1};
};
-
+
class ACE_FlashlightProxy_Yellow: ACE_FlashlightProxy_White {
intensity = 1;
lightColor[] = {1,1,0.5,1};
};
-};
\ No newline at end of file
+};
diff --git a/addons/map/XEH_postInitClient.sqf b/addons/map/XEH_postInitClient.sqf
index cf4b20c032..ef02bfe68f 100644
--- a/addons/map/XEH_postInitClient.sqf
+++ b/addons/map/XEH_postInitClient.sqf
@@ -12,7 +12,7 @@ if (isServer) then {
deleteVehicle _x;
};
} forEach attachedObjects _disconnectedPlayer;
-
+
nil
}];
};
diff --git a/addons/map/functions/fnc_blueForceTrackingUpdate.sqf b/addons/map/functions/fnc_blueForceTrackingUpdate.sqf
index 34d41bb49c..cecf228924 100644
--- a/addons/map/functions/fnc_blueForceTrackingUpdate.sqf
+++ b/addons/map/functions/fnc_blueForceTrackingUpdate.sqf
@@ -33,7 +33,7 @@ if (GVAR(BFT_Enabled) and {(!isNil "ACE_player") and {alive ACE_player}}) then {
private _markerType = [_x] call EFUNC(common,getMarkerType);
private _colour = format ["Color%1", side _x];
- private _marker = createMarkerLocal [format ["ACE_BFT_%1", _forEachIndex], [(getPos leader _x) select 0, (getPos leader _x) select 1]];
+ private _marker = createMarkerLocal [format ["ACE_BFT_%1", _forEachIndex], [(getPos _x) select 0, (getPos _x) select 1]];
_marker setMarkerTypeLocal _markerType;
_marker setMarkerColorLocal _colour;
_marker setMarkerTextLocal (name _x);
diff --git a/addons/map/functions/fnc_compileFlashlightMenu.sqf b/addons/map/functions/fnc_compileFlashlightMenu.sqf
index bc6746f46e..836b483a20 100644
--- a/addons/map/functions/fnc_compileFlashlightMenu.sqf
+++ b/addons/map/functions/fnc_compileFlashlightMenu.sqf
@@ -30,7 +30,7 @@ _flashlights = [_player] call FUNC(getUnitFlashlights);
_cfg = (configFile >> "CfgWeapons" >> _x);
_displayName = getText (_cfg >> "displayName");
_icon = getText (_cfg >> "picture");
-
+
_statement = if (GVAR(flashlightInUse) == _x) then {
_displayName = format [localize LSTRING(turnLightOff), _displayName];
{[""] call FUNC(switchFlashlight)}
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/maptools/ACE_Settings.hpp b/addons/maptools/ACE_Settings.hpp
index 9c53a84a7c..0a88948a7f 100644
--- a/addons/maptools/ACE_Settings.hpp
+++ b/addons/maptools/ACE_Settings.hpp
@@ -1,5 +1,5 @@
class ACE_Settings {
- class GVAR(EveryoneCanDrawOnBriefing) {
+ class GVAR(everyoneCanDrawOnBriefing) {
value = 1;
typeName = "BOOL";
};
diff --git a/addons/maptools/functions/fnc_calculateMapScale.sqf b/addons/maptools/functions/fnc_calculateMapScale.sqf
index 78bfae43af..018edf68d9 100644
--- a/addons/maptools/functions/fnc_calculateMapScale.sqf
+++ b/addons/maptools/functions/fnc_calculateMapScale.sqf
@@ -14,7 +14,7 @@
private ["_screenOffset", "_pos"];
-_pos = ((findDisplay 12) displayCtrl 51) ctrlMapScreenToWorld [0.5, 0.5];
+_pos = ((findDisplay 12) displayCtrl 51) ctrlMapScreenToWorld [0.5, 0.5];
_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_openMapGpsUpdate.sqf b/addons/maptools/functions/fnc_openMapGpsUpdate.sqf
index 092f0720c2..4a77f4a6c3 100644
--- a/addons/maptools/functions/fnc_openMapGpsUpdate.sqf
+++ b/addons/maptools/functions/fnc_openMapGpsUpdate.sqf
@@ -6,15 +6,15 @@
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
+_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/stringtable.xml b/addons/maptools/stringtable.xml
index cde1096170..3db0d4d972 100644
--- a/addons/maptools/stringtable.xml
+++ b/addons/maptools/stringtable.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/addons/markers/functions/fnc_initInsertMarker.sqf b/addons/markers/functions/fnc_initInsertMarker.sqf
index 08c078c4f5..2de05575f7 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
diff --git a/addons/markers/stringtable.xml b/addons/markers/stringtable.xml
index 9d015b0403..44d64eb1e0 100644
--- a/addons/markers/stringtable.xml
+++ b/addons/markers/stringtable.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/addons/medical/ACE_Medical_Treatments.hpp b/addons/medical/ACE_Medical_Treatments.hpp
index 47d78d23e1..14205fbd30 100644
--- a/addons/medical/ACE_Medical_Treatments.hpp
+++ b/addons/medical/ACE_Medical_Treatments.hpp
@@ -1366,7 +1366,7 @@ class ACE_Medical_Advanced {
timeInSystem = 900;
maxDose = 4;
inCompatableMedication[] = {};
- viscosityChange = 10;
+ viscosityChange = -10;
};
class Epinephrine {
painReduce = 0;
diff --git a/addons/medical/ACE_Settings.hpp b/addons/medical/ACE_Settings.hpp
index 429cb995a1..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,53 +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)};
@@ -199,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;
};
@@ -232,7 +288,6 @@ class ACE_Settings {
typeName = "BOOL";
value = 0;
};
-
class GVAR(menuTypeStyle) {
category = CSTRING(Category_Medical);
displayName = CSTRING(menuTypeDisplay);
@@ -242,7 +297,6 @@ class ACE_Settings {
values[] = {CSTRING(useSelection), CSTRING(useRadial), "Disabled"};
isClientSettable = 1;
};
-
class GVAR(delayUnconCaptive) {
category = CSTRING(Category_Medical);
displayName = CSTRING(MedicalSettings_delayUnconCaptive_DisplayName);
diff --git a/addons/medical/CfgVehicles.hpp b/addons/medical/CfgVehicles.hpp
index a4fef30466..86ad45296b 100644
--- a/addons/medical/CfgVehicles.hpp
+++ b/addons/medical/CfgVehicles.hpp
@@ -663,7 +663,7 @@ class CfgVehicles {
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;
diff --git a/addons/medical/CfgWeapons.hpp b/addons/medical/CfgWeapons.hpp
index 4bd5452794..1c752c2aea 100644
--- a/addons/medical/CfgWeapons.hpp
+++ b/addons/medical/CfgWeapons.hpp
@@ -236,7 +236,7 @@ class CfgWeapons {
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
index 4184f096f7..d7322082c6 100644
--- a/addons/medical/XEH_PREP.hpp
+++ b/addons/medical/XEH_PREP.hpp
@@ -16,7 +16,9 @@ PREP(addToLog);
PREP(addToTriageCard);
PREP(addUnconsciousCondition);
PREP(addUnloadPatientActions);
+PREP(addVitalLoop);
PREP(adjustPainLevel);
+PREP(bodyCleanupLoop);
PREP(canAccessMedicalEquipment);
PREP(canTreat);
PREP(canTreatCached);
@@ -56,12 +58,14 @@ 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);
@@ -96,6 +100,7 @@ PREP(treatmentTourniquet);
PREP(treatmentTourniquetLocal);
PREP(useItem);
PREP(useItems);
+PREP(vitalLoop);
PREP(displayPatientInformation);
PREP(displayTriageCard);
PREP(dropDownTriageCard);
@@ -113,3 +118,4 @@ 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 ed12661379..ba63ba0ae3 100644
--- a/addons/medical/XEH_postInit.sqf
+++ b/addons/medical/XEH_postInit.sqf
@@ -298,9 +298,7 @@ GVAR(lastHeartBeatSound) = CBA_missionTime;
["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);
+["playerInventoryChanged", FUNC(itemCheck)] call EFUNC(common,addEventHandler);
if (hasInterface) then {
["PlayerJip", {
diff --git a/addons/medical/functions/fnc_addToInjuredCollection.sqf b/addons/medical/functions/fnc_addToInjuredCollection.sqf
index 5114cc91fd..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 {
- ["addToInjuredCollection", _unit, [_unit, _force]] call EFUNC(common,targetEvent);
- };
-
- if ((_unit getVariable[QGVAR(addedToUnitLoop),false] || !alive _unit) && !_force) exitWith{};
- _unit setVariable [QGVAR(addedToUnitLoop), true, true];
-
- [{
- params ["_args", "_idPFH"];
- _args params ["_unit", "_interval"];
- _interval = CBA_missionTime - _interval;
- (_this select 0) set [1, CBA_missionTime];
-
- 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, CBA_missionTime]] call CBA_fnc_addPerFrameHandler;
-};
+_this call FUNC(addVitalLoop);
diff --git a/addons/medical/functions/fnc_addVitalLoop.sqf b/addons/medical/functions/fnc_addVitalLoop.sqf
new file mode 100644
index 0000000000..52b2cc11f9
--- /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 {
+ ["addVitalLoop", _unit, [_unit, _force]] call EFUNC(common,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, ACE_time], 1] call EFUNC(common,waitAndExecute);
diff --git a/addons/medical/functions/fnc_adjustPainLevel.sqf b/addons/medical/functions/fnc_adjustPainLevel.sqf
index df82e06823..7b97cdc48f 100644
--- a/addons/medical/functions/fnc_adjustPainLevel.sqf
+++ b/addons/medical/functions/fnc_adjustPainLevel.sqf
@@ -35,6 +35,6 @@ _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
diff --git a/addons/medical/functions/fnc_bodyCleanupLoop.sqf b/addons/medical/functions/fnc_bodyCleanupLoop.sqf
new file mode 100644
index 0000000000..03c1234713
--- /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 EFUNC(common,waitAndExecute);
diff --git a/addons/medical/functions/fnc_handleCreateLitter.sqf b/addons/medical/functions/fnc_handleCreateLitter.sqf
index b1b31d9c5d..582ca4caee 100644
--- a/addons/medical/functions/fnc_handleCreateLitter.sqf
+++ b/addons/medical/functions/fnc_handleCreateLitter.sqf
@@ -44,22 +44,7 @@ if((count GVAR(allCreatedLitter)) > _maxLitterCount ) then {
GVAR(allCreatedLitter) pushBack [CBA_missionTime, [_litterObject]];
if(!GVAR(litterPFHRunning) && {GVAR(litterCleanUpDelay) > 0}) then {
+ // Start the litter cleanup loop
GVAR(litterPFHRunning) = true;
- [{
- {
- _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 ( (count GVAR(allCreatedLitter)) == 0) exitWith {
- [(_this select 1)] call CBA_fnc_removePerFrameHandler;
- GVAR(litterPFHRunning) = false;
- };
- }, 30, []] call CBA_fnc_addPerFrameHandler;
+ call FUNC(litterCleanupLoop);
};
diff --git a/addons/medical/functions/fnc_handleDamage.sqf b/addons/medical/functions/fnc_handleDamage.sqf
index cd0b4b1b27..b46ffcf1ad 100644
--- a/addons/medical/functions/fnc_handleDamage.sqf
+++ b/addons/medical/functions/fnc_handleDamage.sqf
@@ -102,8 +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;
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 e4485fae9f..42e8a9b7b2 100644
--- a/addons/medical/functions/fnc_handleLocal.sqf
+++ b/addons/medical/functions/fnc_handleLocal.sqf
@@ -17,8 +17,9 @@
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 {
diff --git a/addons/medical/functions/fnc_handleUnitVitals.sqf b/addons/medical/functions/fnc_handleUnitVitals.sqf
index 1ae3f616cc..103561da0e 100644
--- a/addons/medical/functions/fnc_handleUnitVitals.sqf
+++ b/addons/medical/functions/fnc_handleUnitVitals.sqf
@@ -110,6 +110,11 @@ 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);
_unit setVariable [QGVAR(heartRate), _heartRate max 0, _syncValues];
@@ -117,10 +122,11 @@ if (GVAR(level) >= 2) then {
_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 = if (_painStatus > 5) then {0.002} else {0.001};
+
+ // @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
diff --git a/addons/medical/functions/fnc_litterCleanupLoop.sqf b/addons/medical/functions/fnc_litterCleanupLoop.sqf
new file mode 100644
index 0000000000..ac102d5d59
--- /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 (ACE_time - _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 EFUNC(common,waitAndExecute);
diff --git a/addons/medical/functions/fnc_medicationEffectLoop.sqf b/addons/medical/functions/fnc_medicationEffectLoop.sqf
new file mode 100644
index 0000000000..6d89675d8a
--- /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 EFUNC(common,waitAndExecute);
diff --git a/addons/medical/functions/fnc_onMedicationUsage.sqf b/addons/medical/functions/fnc_onMedicationUsage.sqf
index fc7e8daa2d..28b1d4dd0b 100644
--- a/addons/medical/functions/fnc_onMedicationUsage.sqf
+++ b/addons/medical/functions/fnc_onMedicationUsage.sqf
@@ -77,22 +77,5 @@ if (_hasOverDosed > 0 && GVAR(enableOverdosing)) then {
_decreaseAmount = 1 / _timeInSystem;
_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_reviveStateLoop.sqf b/addons/medical/functions/fnc_reviveStateLoop.sqf
new file mode 100644
index 0000000000..77a48c9340
--- /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 && {ACE_time - _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 EFUNC(common,waitAndExecute);
diff --git a/addons/medical/functions/fnc_serverRemoveBody.sqf b/addons/medical/functions/fnc_serverRemoveBody.sqf
index de089b199b..311199b1b8 100644
--- a/addons/medical/functions/fnc_serverRemoveBody.sqf
+++ b/addons/medical/functions/fnc_serverRemoveBody.sqf
@@ -26,23 +26,9 @@ TRACE_2("",_target,isPlayer _target);
if (isNil QGVAR(bodiesToDelete)) then {GVAR(bodiesToDelete) = [];};
GVAR(bodiesToDelete) pushBack _target;
-//Start up PFEH to wait for bodies to be free to delete
-if ((count GVAR(bodiesToDelete)) == 1) then {
- TRACE_1("starting PFEH",GVAR(bodiesToDelete));
- [{
- {
- 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 (GVAR(bodiesToDelete) isEqualTo []) then {
- TRACE_1("array emptied - rem PFEH",GVAR(bodiesToDelete));
- [_this select 1] call CBA_fnc_removePerFrameHandler;
- };
- }, 20, []] call CBA_fnc_addPerFrameHandler;
+// 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 62254ffd9d..70e7d5c253 100644
--- a/addons/medical/functions/fnc_setCardiacArrest.sqf
+++ b/addons/medical/functions/fnc_setCardiacArrest.sqf
@@ -27,11 +27,10 @@ _unit setVariable [QGVAR(heartRate), 0];
_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];
diff --git a/addons/medical/functions/fnc_setDead.sqf b/addons/medical/functions/fnc_setDead.sqf
index a67877eb33..c8521453a7 100644
--- a/addons/medical/functions/fnc_setDead.sqf
+++ b/addons/medical/functions/fnc_setDead.sqf
@@ -41,41 +41,8 @@ if (((_reviveVal == 1 && {[_unit] call EFUNC(common,isPlayer)} || _reviveVal ==
_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 && {CBA_missionTime - _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;
};
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_treatmentAdvanced_bandageLocal.sqf b/addons/medical/functions/fnc_treatmentAdvanced_bandageLocal.sqf
index 5c02ecc0cb..5cfe73ab8d 100644
--- a/addons/medical/functions/fnc_treatmentAdvanced_bandageLocal.sqf
+++ b/addons/medical/functions/fnc_treatmentAdvanced_bandageLocal.sqf
@@ -15,7 +15,7 @@
#include "script_component.hpp"
-private ["_openWounds", "_config", "_effectiveness","_mostEffectiveInjury", "_mostEffectiveSpot", "_woundEffectivenss", "_mostEffectiveInjury", "_impact", "_exit", "_classID", "_effectivenessFound", "_className", "_hitPoints", "_hitSelections", "_point", "_woundTreatmentConfig"];
+private ["_openWounds", "_config", "_effectiveness","_mostEffectiveInjury", "_mostEffectiveSpot", "_woundEffectiveness", "_mostEffectiveInjury", "_impact", "_exit", "_classID", "_effectivenessFound", "_className", "_hitPoints", "_hitSelections", "_point", "_woundTreatmentConfig"];
params ["_target", "_bandage", "_selectionName", ["_specificClass", -1]];
// Ensure it is a valid bodypart
@@ -44,7 +44,7 @@ _exit = false;
TRACE_2("OPENWOUND: ", _target, _x);
// Only parse injuries that are for the selected bodypart.
if (_partX == _part) then {
- _woundEffectivenss = _effectiveness;
+ _woundEffectiveness = _effectiveness;
// Select the classname from the wound classname storage
_className = GVAR(woundClassNames) select _classID;
@@ -54,7 +54,7 @@ _exit = false;
// Collect the effectiveness from the used bandage for this wound type
_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 +62,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;
};
diff --git a/addons/medical/functions/fnc_treatmentAdvanced_medicationLocal.sqf b/addons/medical/functions/fnc_treatmentAdvanced_medicationLocal.sqf
index 2c3cf4cc41..85f8485f6b 100644
--- a/addons/medical/functions/fnc_treatmentAdvanced_medicationLocal.sqf
+++ b/addons/medical/functions/fnc_treatmentAdvanced_medicationLocal.sqf
@@ -64,6 +64,7 @@ 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];
diff --git a/addons/medical/functions/fnc_treatmentTourniquetLocal.sqf b/addons/medical/functions/fnc_treatmentTourniquetLocal.sqf
index fcfd75f701..b8acc27c74 100644
--- a/addons/medical/functions/fnc_treatmentTourniquetLocal.sqf
+++ b/addons/medical/functions/fnc_treatmentTourniquetLocal.sqf
@@ -16,32 +16,12 @@
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);
// 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];
+_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 (CBA_missionTime - _time > 120) then {
- _target setVariable [QGVAR(pain), (_target getVariable [QGVAR(pain), 0]) + 0.005];
- };
-}, 5, [_target, _applyingTo, _part, CBA_missionTime] ] call CBA_fnc_addPerFrameHandler;
-
-true
diff --git a/addons/medical/functions/fnc_treatment_success.sqf b/addons/medical/functions/fnc_treatment_success.sqf
index d8a4d3b336..a9ef534346 100644
--- a/addons/medical/functions/fnc_treatment_success.sqf
+++ b/addons/medical/functions/fnc_treatment_success.sqf
@@ -92,7 +92,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);
diff --git a/addons/medical/functions/fnc_vitalLoop.sqf b/addons/medical/functions/fnc_vitalLoop.sqf
new file mode 100644
index 0000000000..c9df4c6e91
--- /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, ACE_time - _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, ACE_time], 1] call EFUNC(common,waitAndExecute);
diff --git a/addons/medical/stringtable.xml b/addons/medical/stringtable.xml
index 7091de6b6e..ef0ccc68a2 100644
--- a/addons/medical/stringtable.xml
+++ b/addons/medical/stringtable.xml
@@ -55,6 +55,8 @@
Inyectar Adenosina
Wstrzyknij adenozynę
Injecter de l'adénosine
+ Inietta andenosina
+ Aplikovat adenosine
Inject Atropine
@@ -254,6 +256,8 @@
Inyectando Adenosina...
Wstrzykiwanie adenozyny...
Injection d'adénosine...
+ Inietto l'andenosina
+ Aplikuji adenosine...
Injecting Atropine...
@@ -361,14 +365,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
@@ -829,7 +833,7 @@
Nyomókötszer
Bendaggio compressivo
Bandagem de Compressão
- Tlakový obvaz
+ Obvaz (Tlakový)
Used to pack medium to large wounds and stem the bleeding
@@ -862,7 +866,7 @@
Vendaje (Elástico)
Bandage (Élastique)
Bandaż (elastyczny)
- Obvaz (elastický)
+ Obvaz (Elastický)
Rögzító kötszer
Benda (elastica)
Bandagem (Elástica)
@@ -934,7 +938,7 @@
Morfina auto-inyectable
Auto-injecteur de Morphine
Autostrzykawka z morfiną
- Autoinjektor morfin
+ Auto-morfin
Morfium autoinjektor
Autoiniettore di morfina
Auto-injetor de morfina
@@ -969,6 +973,8 @@
Asenosina auto-inyectable
Autostrzykawka z adenozyną
Auto-injécteur d'adénosine
+ Autoiniettore di adenosina
+ Auto-adenosine
Used to counter effects of Epinephrine
@@ -976,6 +982,8 @@
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
A drug used to counter the effects of Epinephrine
@@ -983,6 +991,8 @@
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
Atropine autoinjector
@@ -991,7 +1001,7 @@
Auto-injecteur d'Atropine
Autostrzykawka AtroPen
Atropin-Autoinjektor
- Autoinjektor atropin
+ Auto-atropine
Atropin autoinjektor
Autoiniettore di atropina
Auto-injetor de Atropina
@@ -1027,7 +1037,7 @@
Auto-injecteur d'épinéphrine
Autostrzykawka EpiPen
Epiniphrin-Autoinjektor
- Autoinjektor adrenalin
+ Auto-adrenalin
Epinefrin autoinjektor
Autoiniettore di adrenalina
Auto-injetor de epinefrina
@@ -1282,7 +1292,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
@@ -1317,7 +1327,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
@@ -1426,7 +1436,7 @@
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
@@ -1437,7 +1447,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
@@ -1462,7 +1472,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
@@ -1474,7 +1484,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
@@ -1486,7 +1496,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
@@ -1498,7 +1508,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
@@ -1510,7 +1520,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
@@ -1522,7 +1532,7 @@
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
@@ -1582,7 +1592,7 @@
Pulzus
Polso
Pulso
- Tep
+ Puls
Checking Heart Rate...
@@ -1606,7 +1616,7 @@
A %1 ellenőrizve
Hai diagnosticato %1
Você aferiu o paciente %1
- Zkontroloval jsi %1
+ Zkontroloval si %1
%1 checked Heart Rate: %2
@@ -1690,7 +1700,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
@@ -1702,7 +1712,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
@@ -1714,7 +1724,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
@@ -1726,7 +1736,7 @@
Nem észlelhető szívverés
Hai riscontrato una assenza di battito cardiaco
Sem Freqüência Cardíaca
- Nenašel jsi
+ Žádný puls
Response
@@ -2167,7 +2177,7 @@
Gravemente herido
Lourdement blessé
Erősen sérült
- Těžce zraněn
+ Těžce raněn
Gravemente ferido
@@ -2179,7 +2189,7 @@
Levemente herido
Légèrement blessé
Enyhén sérült
- Lehce zraněn
+ Lehce raněn
Levemente ferido
@@ -2191,7 +2201,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
@@ -3199,6 +3209,8 @@
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]
Advanced Medical Settings [ACE]
@@ -3314,6 +3326,8 @@
Permitir Epinefrina
Ograniczenia adrenaliny
Autoriser l'adrénaline
+ Permette epinefrina
+ Povolit adrenalin
Who can use Epinephrine for full heal? (Basic medical only)
@@ -3321,6 +3335,8 @@
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)
Allow PAK
@@ -3328,7 +3344,7 @@
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
@@ -3412,6 +3428,8 @@
Ubicaciones epinefrina
Ograniczenia adrenaliny
Position des adrénalines
+ Ubicazione epinefrina
+ Oblast k použití adrenalinu
Where can the Epinephrine be used? (Basic Medical)
@@ -3419,6 +3437,8 @@
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)
Locations PAK
@@ -3426,7 +3446,7 @@
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
@@ -3438,7 +3458,7 @@
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?
@@ -3447,7 +3467,7 @@
Condition PAK
Bedingungen für d. Erste-Hilfe-Set
- Podmínka osobní lékárničky
+ Podmínky pro použití osobní lékárničky
Condición EPA
Condition d'utilisation du KPS
Warunek apteczek
@@ -3459,7 +3479,7 @@
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?
@@ -3474,7 +3494,7 @@
Wszędzie
Donde sea
Überall
- Kdekoli
+ Kdekoliv
Qualquer lugar
PArtout
Akárhol
@@ -3664,6 +3684,7 @@
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
Configure the treatment settings from ACE Advanced Medical
@@ -4113,6 +4134,7 @@
Sanitätsausbildung
Entrenamiento médico
Entraînement médical
+ Lékařský výcvik
Whether or not the object will be a medical vehicle.
@@ -4125,12 +4147,16 @@
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ů.
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é
-
+
\ No newline at end of file
diff --git a/addons/medical_menu/stringtable.xml b/addons/medical_menu/stringtable.xml
index f825882be6..e9812128f4 100644
--- a/addons/medical_menu/stringtable.xml
+++ b/addons/medical_menu/stringtable.xml
@@ -295,7 +295,7 @@
Selectioner Bras Gauche
Wybierz lewą rękę
Selecionar Braço Esquerdo
- Vybrat Levou Ruku
+ Vybrat Levou ruku
Seleziona Braccio Sinistro
Entrenching Tool
@@ -16,6 +17,7 @@
Pala
Pala para trincheras
Outil de tranchée
+ Polní lopatky se používají k zákopovým a jiným pracem.
Envelope - Small
@@ -32,6 +34,7 @@
Piccola Trincea Personale
Trinchera personal pequeña
Petite tranchée personelle
+ Malý zákop pro jednoho
Dig Small Trench
@@ -40,6 +43,7 @@
Scava Trincea Piccola
Cavar trinchera pequeña
Creuser une petite tranchée
+ Vykopat malý zákop
Envelope - Big
@@ -56,6 +60,7 @@
Grande Trincea Personale
Trinchera personal grande
Grande tranchée personelle
+ Velký zákop pro jednoho
Dig Big Trench
@@ -64,6 +69,7 @@
Scava Trincea Grande
Cavar trinchera grande
Creuser une grande tranchée
+ Vykopat velký zákop
Confirm Dig
@@ -72,6 +78,7 @@
Conferma Scava
Confirmar cavado
Confirmer la creusée
+ Potvrdit kopání
Cancel Dig
@@ -80,22 +87,40 @@
Cancella Scava
Cancelar cavado
Annuler la creusée
+ Zrušit kopání
- +Ctrl rotate
- +Strg drehen
- +Ctrl obrót
- +Ctrl ruota
- +Ctrl rotar
- +Ctrl rotation
+ Rotate
+ Drehen
+ Girar
+ Tourner
+ Rotazione
+ Otočit
+ Forgatás
+ Obrót
+ Rotaciona
+ Bращать
Digging Trench
Grabe Schützengraben
- Kopanie okopu
+ Kopanie wnęki
Sto Scavando la Trincea
Cavando trinchera
Creuse la tranchée
+ Vykopat zákop
+
+
+ Continue Digging Trench
+ Wzów kopanie wnęki
+
+
+ Remove Trench
+ Usuń wnękę
+
+
+ Removing Trench
+ Usuwanie wnęki
-
+
\ No newline at end of file
diff --git a/addons/tripod/CfgEventHandlers.hpp b/addons/tripod/CfgEventHandlers.hpp
index 6e31dde2cb..eaec430c1e 100644
--- a/addons/tripod/CfgEventHandlers.hpp
+++ b/addons/tripod/CfgEventHandlers.hpp
@@ -32,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/tripod/CfgVehicles.hpp b/addons/tripod/CfgVehicles.hpp
index 6b9d11fe0f..418b32e550 100644
--- a/addons/tripod/CfgVehicles.hpp
+++ b/addons/tripod/CfgVehicles.hpp
@@ -42,7 +42,7 @@ class CfgVehicles {
};
EGVAR(dragging,canDrag) = 1;
- EGVAR(dragging,dragPosition[]) = {0,1,0};
+ EGVAR(dragging,dragPosition)[] = {0,1,0};
EGVAR(dragging,dragDirection) = 0;
scope = 2;
displayName = CSTRING(DisplayName);
diff --git a/addons/tripod/CfgWeapons.hpp b/addons/tripod/CfgWeapons.hpp
index 5ae0ee84d2..6322ef1906 100644
--- a/addons/tripod/CfgWeapons.hpp
+++ b/addons/tripod/CfgWeapons.hpp
@@ -1,17 +1,17 @@
class CfgWeapons {
class ACE_ItemCore;
class InventoryItem_Base_F;
-
- class ACE_Tripod: ACE_ItemCore {
- author[] = {"Rocko", "Scubaman3D"};
- scope = 2;
- displayName = CSTRING(DisplayName);
- descriptionShort = "";
- model = PATHTOF(data\w_sniper_tripod.p3d);
- picture = PATHTOF(UI\w_sniper_tripod_ca.paa);
-
+
+ class ACE_Tripod: ACE_ItemCore {
+ author[] = {"Rocko", "Scubaman3D"};
+ scope = 2;
+ displayName = CSTRING(DisplayName);
+ descriptionShort = "";
+ model = PATHTOF(data\w_sniper_tripod.p3d);
+ picture = PATHTOF(UI\w_sniper_tripod_ca.paa);
+
class ItemInfo: InventoryItem_Base_F {
mass = 40;
};
- };
+ };
};
diff --git a/addons/tripod/XEH_missionDisplayLoad.sqf b/addons/tripod/XEH_missionDisplayLoad.sqf
new file mode 100644
index 0000000000..289d2f067a
--- /dev/null
+++ b/addons/tripod/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/tripod/XEH_postInit.sqf b/addons/tripod/XEH_postInit.sqf
index 6f2dc9b7e0..79aa7a69f2 100644
--- a/addons/tripod/XEH_postInit.sqf
+++ b/addons/tripod/XEH_postInit.sqf
@@ -9,8 +9,6 @@ GVAR(height) = 0;
// Cancel adjustment if interact menu opens
["interactMenuOpened", {[ACE_player] call FUNC(handleInteractMenuOpened)}] call EFUNC(common,addEventHandler);
-[{_this call FUNC(handleScrollWheel)}] call EFUNC(common,addScrollWheelEventHandler);
-
// 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);
diff --git a/addons/ui/ACE_Settings.hpp b/addons/ui/ACE_Settings.hpp
new file mode 100644
index 0000000000..89ddc8d35d
--- /dev/null
+++ b/addons/ui/ACE_Settings.hpp
@@ -0,0 +1,217 @@
+class ACE_Settings {
+ class GVAR(allowSelectiveUI) {
+ category = CSTRING(Category);
+ displayName = CSTRING(AllowSelectiveUI);
+ description = CSTRING(AllowSelectiveUI_Description);
+ typeName = "BOOL";
+ value = 1;
+ };
+
+// BASIC
+ class GVAR(soldierVehicleWeaponInfo) {
+ category = CSTRING(Category);
+ displayName = CSTRING(SoldierVehicleWeaponInfo);
+ typeName = "BOOL";
+ value = 1;
+ isClientSettable = 1;
+ };
+ class GVAR(vehicleRadar) {
+ category = CSTRING(Category);
+ displayName = CSTRING(VehicleRadar);
+ typeName = "BOOL";
+ value = 1;
+ isClientSettable = 1;
+ };
+ class GVAR(vehicleCompass) {
+ category = CSTRING(Category);
+ displayName = CSTRING(VehicleCompass);
+ typeName = "BOOL";
+ value = 1;
+ isClientSettable = 1;
+ };
+ class GVAR(commandMenu) {
+ category = CSTRING(Category);
+ displayName = CSTRING(CommandMenu);
+ typeName = "BOOL";
+ value = 1;
+ isClientSettable = 1;
+ };
+ class GVAR(groupBar) {
+ category = CSTRING(Category);
+ displayName = CSTRING(GroupBar);
+ typeName = "BOOL";
+ value = 0;
+ isClientSettable = 1;
+ };
+
+// ADVANCED
+ // Upper Weapon Info
+ class GVAR(weaponName) {
+ category = CSTRING(Category);
+ displayName = CSTRING(WeaponName);
+ description = CSTRING(RequiresSoldierVehicleWeaponInfo);
+ typeName = "BOOL";
+ value = 1;
+ isClientSettable = 1;
+ };
+ class GVAR(weaponNameBackground) {
+ category = CSTRING(Category);
+ displayName = CSTRING(WeaponNameBackground);
+ description = CSTRING(RequiresSoldierVehicleWeaponInfo);
+ typeName = "BOOL";
+ value = 1;
+ isClientSettable = 1;
+ };
+ class GVAR(firingMode) {
+ category = CSTRING(Category);
+ displayName = CSTRING(FiringMode);
+ description = CSTRING(RequiresSoldierVehicleWeaponInfo);
+ typeName = "BOOL";
+ value = 1;
+ isClientSettable = 1;
+ };
+
+ // Lower Weapon Info
+ class GVAR(ammoType) {
+ category = CSTRING(Category);
+ displayName = CSTRING(AmmoType);
+ description = CSTRING(RequiresSoldierVehicleWeaponInfo);
+ typeName = "BOOL";
+ value = 1;
+ isClientSettable = 1;
+ };
+ class GVAR(ammoCount) {
+ category = CSTRING(Category);
+ displayName = CSTRING(AmmoCount);
+ description = CSTRING(RequiresSoldierVehicleWeaponInfo);
+ typeName = "BOOL";
+ value = 0;
+ isClientSettable = 1;
+ };
+ class GVAR(magCount) {
+ category = CSTRING(Category);
+ displayName = CSTRING(MagCount);
+ description = CSTRING(RequiresSoldierVehicleWeaponInfo);
+ typeName = "BOOL";
+ value = 1;
+ isClientSettable = 1;
+ };
+ class GVAR(throwableName) {
+ category = CSTRING(Category);
+ displayName = CSTRING(throwableName);
+ description = CSTRING(RequiresSoldierVehicleWeaponInfo);
+ typeName = "BOOL";
+ value = 1;
+ isClientSettable = 1;
+ };
+ class GVAR(throwableCount) {
+ category = CSTRING(Category);
+ displayName = CSTRING(throwableCount);
+ description = CSTRING(RequiresSoldierVehicleWeaponInfo);
+ typeName = "BOOL";
+ value = 1;
+ isClientSettable = 1;
+ };
+ class GVAR(zeroing) {
+ category = CSTRING(Category);
+ displayName = CSTRING(Zeroing);
+ description = CSTRING(RequiresSoldierVehicleWeaponInfo);
+ typeName = "BOOL";
+ value = 1;
+ isClientSettable = 1;
+ };
+ class GVAR(weaponLowerInfoBackground) {
+ category = CSTRING(Category);
+ displayName = CSTRING(WeaponLowerInfoBackground); //todo
+ description = CSTRING(RequiresSoldierVehicleWeaponInfo);
+ typeName = "BOOL";
+ value = 1;
+ isClientSettable = 1;
+ };
+
+ // Stance
+ class GVAR(stance) {
+ category = CSTRING(Category);
+ displayName = CSTRING(Stance);
+ description = CSTRING(RequiresSoldierVehicleWeaponInfo);
+ typeName = "BOOL";
+ value = 1;
+ isClientSettable = 1;
+ };
+
+ // Stamina Bar
+ class GVAR(staminaBar) {
+ category = CSTRING(Category);
+ displayName = CSTRING(StaminaBar);
+ description = CSTRING(RequiresSoldierVehicleWeaponInfo);
+ typeName = "BOOL";
+ value = 1;
+ isClientSettable = 1;
+ };
+
+ // Vehicle
+ class GVAR(vehicleName) {
+ category = CSTRING(Category);
+ displayName = CSTRING(VehicleName);
+ description = CSTRING(RequiresSoldierVehicleWeaponInfo);
+ typeName = "BOOL";
+ value = 1;
+ isClientSettable = 1;
+ };
+ class GVAR(vehicleNameBackground) {
+ category = CSTRING(Category);
+ displayName = CSTRING(VehicleNameBackground);
+ description = CSTRING(RequiresSoldierVehicleWeaponInfo);
+ typeName = "BOOL";
+ value = 1;
+ isClientSettable = 1;
+ };
+ class GVAR(vehicleFuelBar) {
+ category = CSTRING(Category);
+ displayName = CSTRING(VehicleFuelBar);
+ description = CSTRING(RequiresSoldierVehicleWeaponInfo);
+ typeName = "BOOL";
+ value = 1;
+ isClientSettable = 1;
+ };
+ class GVAR(vehicleSpeed) {
+ category = CSTRING(Category);
+ displayName = CSTRING(VehicleSpeed);
+ description = CSTRING(RequiresSoldierVehicleWeaponInfo);
+ typeName = "BOOL";
+ value = 1;
+ isClientSettable = 1;
+ };
+ class GVAR(vehicleAltitude) {
+ category = CSTRING(Category);
+ displayName = CSTRING(VehicleAltitude);
+ description = CSTRING(RequiresSoldierVehicleWeaponInfo);
+ typeName = "BOOL";
+ value = 1;
+ isClientSettable = 1;
+ };
+ class GVAR(vehicleDamage) {
+ category = CSTRING(Category);
+ displayName = CSTRING(VehicleDamage);
+ description = CSTRING(RequiresSoldierVehicleWeaponInfo);
+ typeName = "BOOL";
+ value = 1;
+ isClientSettable = 1;
+ };
+ class GVAR(vehicleInfoBackground) {
+ category = CSTRING(Category);
+ displayName = CSTRING(VehicleInfoBackground);
+ description = CSTRING(RequiresSoldierVehicleWeaponInfo);
+ typeName = "BOOL";
+ value = 1;
+ isClientSettable = 1;
+ };
+ class GVAR(vehicleGunnerWeapon) {
+ category = CSTRING(Category);
+ displayName = CSTRING(VehicleGunnerWeapon);
+ description = CSTRING(RequiresSoldierVehicleWeaponInfo);
+ typeName = "BOOL";
+ value = 1;
+ isClientSettable = 1;
+ };
+};
diff --git a/addons/ui/CfgEventHandlers.hpp b/addons/ui/CfgEventHandlers.hpp
new file mode 100644
index 0000000000..36c0fca8a3
--- /dev/null
+++ b/addons/ui/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 {
+ clientInit = QUOTE(call COMPILE_FILE(XEH_clientInit));
+ };
+};
diff --git a/addons/ui/CfgVehicles.hpp b/addons/ui/CfgVehicles.hpp
new file mode 100644
index 0000000000..391b3627eb
--- /dev/null
+++ b/addons/ui/CfgVehicles.hpp
@@ -0,0 +1,181 @@
+class CfgVehicles {
+ class ACE_Module;
+ class GVAR(Module): ACE_Module {
+ author = ECSTRING(common,ACETeam);
+ category = "ACE";
+ displayName = CSTRING(ModuleName);
+ function = QFUNC(moduleInit);
+ scope = 2;
+ isGlobal = 1;
+ icon = QUOTE(PATHTOF(UI\Icon_Module_UI_ca.paa));
+ class Arguments {
+ class allowSelectiveUI {
+ displayName = CSTRING(AllowSelectiveUI);
+ description = CSTRING(AllowSelectiveUI_Description);
+ typeName = "BOOL";
+ defaultValue = 1;
+ };
+
+ // BASIC
+ class soldierVehicleWeaponInfo {
+ displayName = CSTRING(SoldierVehicleWeaponInfo);
+ typeName = "BOOL";
+ defaultValue = 1;
+ };
+ class vehicleRadar {
+ displayName = CSTRING(VehicleRadar);
+ typeName = "BOOL";
+ defaultValue = 1;
+ };
+ class vehicleCompass {
+ displayName = CSTRING(VehicleCompass);
+ typeName = "BOOL";
+ defaultValue = 1;
+ };
+ class commandMenu {
+ displayName = CSTRING(CommandMenu);
+ typeName = "BOOL";
+ defaultValue = 1;
+ };
+ class groupBar {
+ displayName = CSTRING(GroupBar);
+ typeName = "BOOL";
+ defaultValue = 0;
+ };
+
+ // ADVANCED
+ // Upper Weapon Info
+ class weaponName {
+ displayName = CSTRING(WeaponName);
+ description = CSTRING(RequiresSoldierVehicleWeaponInfo);
+ typeName = "BOOL";
+ defaultValue = 1;
+ };
+ class weaponNameBackground {
+ displayName = CSTRING(WeaponNameBackground);
+ description = CSTRING(RequiresSoldierVehicleWeaponInfo);
+ typeName = "BOOL";
+ defaultValue = 1;
+ };
+ class firingMode {
+ displayName = CSTRING(FiringMode);
+ description = CSTRING(RequiresSoldierVehicleWeaponInfo);
+ typeName = "BOOL";
+ defaultValue = 1;
+ };
+
+ // Lower Weapon Info
+ class ammoType {
+ displayName = CSTRING(AmmoType);
+ description = CSTRING(RequiresSoldierVehicleWeaponInfo);
+ typeName = "BOOL";
+ defaultValue = 1;
+ };
+ class ammoCount {
+ displayName = CSTRING(AmmoCount);
+ description = CSTRING(RequiresSoldierVehicleWeaponInfo);
+ typeName = "BOOL";
+ defaultValue = 0;
+ };
+ class magCount {
+ displayName = CSTRING(MagCount);
+ description = CSTRING(RequiresSoldierVehicleWeaponInfo);
+ typeName = "BOOL";
+ defaultValue = 1;
+ };
+ class throwableName {
+ displayName = CSTRING(throwableName);
+ description = CSTRING(RequiresSoldierVehicleWeaponInfo);
+ typeName = "BOOL";
+ defaultValue = 1;
+ };
+ class throwableCount {
+ displayName = CSTRING(throwableCount);
+ description = CSTRING(RequiresSoldierVehicleWeaponInfo);
+ typeName = "BOOL";
+ defaultValue = 1;
+ };
+ class zeroing {
+ displayName = CSTRING(Zeroing);
+ description = CSTRING(RequiresSoldierVehicleWeaponInfo);
+ typeName = "BOOL";
+ defaultValue = 1;
+ };
+ class weaponLowerInfoBackground {
+ displayName = CSTRING(WeaponLowerInfoBackground);
+ description = CSTRING(RequiresSoldierVehicleWeaponInfo);
+ typeName = "BOOL";
+ defaultValue = 1;
+ };
+
+ // Stance
+ class stance {
+ displayName = CSTRING(Stance);
+ description = CSTRING(RequiresSoldierVehicleWeaponInfo);
+ typeName = "BOOL";
+ defaultValue = 1;
+ };
+
+ // Stamina Bar
+ class staminaBar {
+ displayName = CSTRING(StaminaBar);
+ description = CSTRING(RequiresSoldierVehicleWeaponInfo);
+ typeName = "BOOL";
+ defaultValue = 1;
+ };
+
+ // Vehicle
+ class vehicleName {
+ displayName = CSTRING(VehicleName);
+ description = CSTRING(RequiresSoldierVehicleWeaponInfo);
+ typeName = "BOOL";
+ defaultValue = 1;
+ };
+ class vehicleNameBackground {
+ displayName = CSTRING(VehicleNameBackground);
+ description = CSTRING(RequiresSoldierVehicleWeaponInfo);
+ typeName = "BOOL";
+ defaultValue = 1;
+ };
+ class vehicleFuelBar {
+ displayName = CSTRING(VehicleFuelBar);
+ description = CSTRING(RequiresSoldierVehicleWeaponInfo);
+ typeName = "BOOL";
+ defaultValue = 1;
+ };
+ class vehicleSpeed {
+ displayName = CSTRING(VehicleSpeed);
+ description = CSTRING(RequiresSoldierVehicleWeaponInfo);
+ typeName = "BOOL";
+ defaultValue = 1;
+ };
+ class vehicleAltitude {
+ displayName = CSTRING(VehicleAltitude);
+ description = CSTRING(RequiresSoldierVehicleWeaponInfo);
+ typeName = "BOOL";
+ defaultValue = 1;
+ };
+ class vehicleDamage {
+ displayName = CSTRING(VehicleDamage);
+ description = CSTRING(RequiresSoldierVehicleWeaponInfo);
+ typeName = "BOOL";
+ defaultValue = 1;
+ };
+ class vehicleInfoBackground {
+ displayName = CSTRING(VehicleInfoBackground);
+ description = CSTRING(RequiresSoldierVehicleWeaponInfo);
+ typeName = "BOOL";
+ defaultValue = 1;
+ };
+ class vehicleGunnerWeapon {
+ displayName = CSTRING(VehicleGunnerWeapon);
+ description = CSTRING(RequiresSoldierVehicleWeaponInfo);
+ typeName = "BOOL";
+ defaultValue = 1;
+ };
+ };
+ class ModuleDescription {
+ description = CSTRING(ModuleDescription);
+ };
+ };
+};
diff --git a/addons/ui/README.md b/addons/ui/README.md
index 340e3ad0f6..c55ffbc5c7 100644
--- a/addons/ui/README.md
+++ b/addons/ui/README.md
@@ -1,7 +1,7 @@
ace_ui
=======
-Removes vignette and changes the chat contrast on the map to allow easier reading.
+Removes vignette, changes the chat contrast on the map to allow easier reading and provides settings to hide or show different UI elements.
## Maintainers
@@ -9,3 +9,4 @@ Removes vignette and changes the chat contrast on the map to allow easier readin
The people responsible for merging changes to this component or answering potential questions.
- [VKing](https://github.com/VKing6)
+- [Jonpas](https://github.com/jonpas)
diff --git a/addons/ui/UI/Icon_Module_UI_ca.paa b/addons/ui/UI/Icon_Module_UI_ca.paa
new file mode 100644
index 0000000000..f23b8b40c9
Binary files /dev/null and b/addons/ui/UI/Icon_Module_UI_ca.paa differ
diff --git a/addons/ui/XEH_PREP.hpp b/addons/ui/XEH_PREP.hpp
new file mode 100644
index 0000000000..8a6b4d2ce1
--- /dev/null
+++ b/addons/ui/XEH_PREP.hpp
@@ -0,0 +1,4 @@
+PREP(moduleInit);
+PREP(setAdvancedElement);
+PREP(setElements);
+PREP(setElementVisibility);
diff --git a/addons/ui/XEH_clientInit.sqf b/addons/ui/XEH_clientInit.sqf
new file mode 100644
index 0000000000..d228696fc0
--- /dev/null
+++ b/addons/ui/XEH_clientInit.sqf
@@ -0,0 +1,40 @@
+#include "script_component.hpp"
+
+// Exit on Headless
+if (!hasInterface) exitWith {};
+
+["SettingsInitialized", {
+ // Initial settings
+ [true] call FUNC(setElements);
+
+ // On load and entering/exiting a vehicle
+ ["infoDisplayChanged", {
+ // Selective UI Advanced
+ // Defaults must be set in this EH to make sure controls are activated and advanced settings can be modified
+ private _force = [true, false] select (GVAR(allowSelectiveUI));
+ {
+ [_x select 0, _x select 1, _x select 2, _force] call FUNC(setAdvancedElement);
+ } forEach ELEMENTS_ADVANCED;
+ }] call EFUNC(common,addEventHandler);
+
+ // On changing settings
+ ["SettingChanged", {
+ params ["_name"];
+
+ // Selective UI Basic
+ if (_name in ELEMENTS_BASIC) then {
+ [false] call FUNC(setElements);
+ };
+
+ // Selective UI Advanced
+ {
+ _x params ["_idd", "_elements", "_elementName"];
+
+ if (_name == _elementName) then {
+ [_idd, _elements, _elementName] call FUNC(setAdvancedElement);
+ TRACE_2("Setting Changed",_name,_elementName);
+ };
+ } forEach ELEMENTS_ADVANCED;
+ }] call EFUNC(common,addEventHandler);
+
+}] call EFUNC(common,addEventHandler);
diff --git a/addons/ui/XEH_preInit.sqf b/addons/ui/XEH_preInit.sqf
new file mode 100644
index 0000000000..4a5638fc03
--- /dev/null
+++ b/addons/ui/XEH_preInit.sqf
@@ -0,0 +1,9 @@
+#include "script_component.hpp"
+
+ADDON = false;
+
+#include "XEH_PREP.hpp"
+
+GVAR(elementsSet) = [];
+
+ADDON = true;
diff --git a/addons/ui/XEH_preStart.sqf b/addons/ui/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/addons/ui/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/addons/ui/config.cpp b/addons/ui/config.cpp
index f545600758..d6fbed61ae 100644
--- a/addons/ui/config.cpp
+++ b/addons/ui/config.cpp
@@ -12,5 +12,9 @@ class CfgPatches {
};
};
+#include "CfgEventHandlers.hpp"
+#include "CfgVehicles.hpp"
+#include "ACE_Settings.hpp"
+
#include "RscChat.hpp"
#include "RscVignette.hpp"
diff --git a/addons/ui/functions/fnc_moduleInit.sqf b/addons/ui/functions/fnc_moduleInit.sqf
new file mode 100644
index 0000000000..10f18f94f3
--- /dev/null
+++ b/addons/ui/functions/fnc_moduleInit.sqf
@@ -0,0 +1,56 @@
+/*
+ * Author: Jonpas
+ * Initializes the UI module.
+ *
+ * Arguments:
+ * 0: Module Logic
+ * 1: Units
+ * 2: Activated
+ *
+ * Return Value:
+ * None
+ */
+#include "script_component.hpp"
+
+if (!isServer) exitWith {};
+
+params ["_logic", "_units", "_activated"];
+
+if (!_activated) exitWith {};
+
+// Basic
+if (isArray (missionConfigFile >> "showHUD")) then {
+ // HUD visibility is hardcoded in mission config and showHUD command is overriden
+ ACE_LOGINFO("User Interface Module Failed to Initialize Basic settings - showHUD overriden in mission config!");
+} else {
+ [_logic, QGVAR(allowSelectiveUI), "allowSelectiveUI"] call EFUNC(common,readSettingFromModule);
+ [_logic, QGVAR(soldierVehicleWeaponInfo), "soldierVehicleWeaponInfo"] call EFUNC(common,readSettingFromModule);
+ [_logic, QGVAR(vehicleRadar), "vehicleRadar"] call EFUNC(common,readSettingFromModule);
+ [_logic, QGVAR(vehicleCompass), "vehicleCompass"] call EFUNC(common,readSettingFromModule);
+ [_logic, QGVAR(commandMenu), "commandMenu"] call EFUNC(common,readSettingFromModule);
+ [_logic, QGVAR(groupBar), "groupBar"] call EFUNC(common,readSettingFromModule);
+};
+
+// Advanced
+[_logic, QGVAR(weaponName), "weaponName"] call EFUNC(common,readSettingFromModule);
+[_logic, QGVAR(weaponNameBackground), "weaponNameBackground"] call EFUNC(common,readSettingFromModule);
+[_logic, QGVAR(firingMode), "firingMode"] call EFUNC(common,readSettingFromModule);
+[_logic, QGVAR(ammoType), "ammoType"] call EFUNC(common,readSettingFromModule);
+[_logic, QGVAR(ammoCount), "ammoCount"] call EFUNC(common,readSettingFromModule);
+[_logic, QGVAR(magCount), "magCount"] call EFUNC(common,readSettingFromModule);
+[_logic, QGVAR(throwableName), "throwableName"] call EFUNC(common,readSettingFromModule);
+[_logic, QGVAR(throwableCount), "throwableCount"] call EFUNC(common,readSettingFromModule);
+[_logic, QGVAR(zeroing), "zeroing"] call EFUNC(common,readSettingFromModule);
+[_logic, QGVAR(weaponLowerInfoBackground), "weaponLowerInfoBackground"] call EFUNC(common,readSettingFromModule);
+[_logic, QGVAR(stance), "stance"] call EFUNC(common,readSettingFromModule);
+[_logic, QGVAR(staminaBar), "staminaBar"] call EFUNC(common,readSettingFromModule);
+[_logic, QGVAR(vehicleName), "vehicleName"] call EFUNC(common,readSettingFromModule);
+[_logic, QGVAR(vehicleNameBackground), "vehicleNameBackground"] call EFUNC(common,readSettingFromModule);
+[_logic, QGVAR(vehicleFuelBar), "vehicleFuelBar"] call EFUNC(common,readSettingFromModule);
+[_logic, QGVAR(vehicleSpeed), "vehicleSpeed"] call EFUNC(common,readSettingFromModule);
+[_logic, QGVAR(vehicleAltitude), "vehicleAltitude"] call EFUNC(common,readSettingFromModule);
+[_logic, QGVAR(vehicleDamage), "vehicleDamage"] call EFUNC(common,readSettingFromModule);
+[_logic, QGVAR(vehicleInfoBackground), "vehicleInfoBackground"] call EFUNC(common,readSettingFromModule);
+[_logic, QGVAR(vehicleGunnerWeapon), "vehicleGunnerWeapon"] call EFUNC(common,readSettingFromModule);
+
+ACE_LOGINFO_1("User Interface Module Initialized. Allow client modifications: %1",GVAR(allowSelectiveUI));
diff --git a/addons/ui/functions/fnc_setAdvancedElement.sqf b/addons/ui/functions/fnc_setAdvancedElement.sqf
new file mode 100644
index 0000000000..2ef88d5868
--- /dev/null
+++ b/addons/ui/functions/fnc_setAdvancedElement.sqf
@@ -0,0 +1,53 @@
+/*
+ * Author: Jonpas
+ * Sets advanced visible element of the UI using displays and controls.
+ *
+ * Arguments:
+ * 0: Element IDD
+ * 1: Element IDCs
+ * 2: Show/Hide Element OR Element ACE Settings Variable
+ * 3: Force change even when disallowed (default: false)
+ *
+ * Return Value:
+ * Successfully Set
+ *
+ * Example:
+ * [303, [188], true, false] call ace_ui_fnc_setAdvancedElement
+ *
+ * Public: No
+ */
+#include "script_component.hpp"
+
+params ["_idd", "_elements", "_show", ["_force", false, [true]] ];
+
+if (_elementInfo in GVAR(elementsSet)) exitWith {};
+
+if (!_force && {!GVAR(allowSelectiveUI)}) exitWith {
+ [LSTRING(Disallowed), 2] call EFUNC(common,displayTextStructured)
+};
+
+// Get show/hide boolean from mission namespace if it's a string
+if (typeName _show == "STRING") then {
+ _show = missionNamespace getVariable _show;
+};
+_show = [1, 0] select _show;
+
+// Disable/Enable elements
+private _success = false;
+{
+ private _idc = _x;
+
+ // Loop through IGUI displays as they can be present several times for some reason
+ {
+ if (_idd == ctrlIDD _x) then {
+ TRACE_3("Setting Element Visibility",_show,_idd,_idc);
+
+ (_x displayCtrl _idc) ctrlSetFade _show;
+ (_x displayCtrl _idc) ctrlCommit 0;
+
+ _success = true;
+ };
+ } forEach (uiNamespace getVariable "IGUI_displays");
+} forEach _elements;
+
+_success
diff --git a/addons/ui/functions/fnc_setElementVisibility.sqf b/addons/ui/functions/fnc_setElementVisibility.sqf
new file mode 100644
index 0000000000..b019c4c081
--- /dev/null
+++ b/addons/ui/functions/fnc_setElementVisibility.sqf
@@ -0,0 +1,52 @@
+/*
+ * Author: Jonpas
+ * Setter for toggling advanced element visibility.
+ *
+ * Arguments:
+ * 0: Set/Unset (default: true)
+ * 1: Element IDD (default: 0)
+ * 2: Element IDCs (default: [])
+ * 3: Show/Hide Element OR Element ACE Settings Variable (default: false)
+ *
+ * Return Value:
+ * None
+ *
+ * Example:
+ * [true, 300, [188], false] call ace_ui_fnc_setElementVisibility
+ *
+ * Public: Yes
+ */
+#include "script_component.hpp"
+
+params [
+ ["_set", true, [true]],
+ ["_idd", 0, [0]],
+ ["_elements", [], [[]]],
+ ["_show", false, [true, ""]]
+];
+
+private _return = false;
+
+if (_set) then {
+ if ([_idd, _elements] in GVAR(elementsSet)) exitWith { TRACE_3("Element already set",_idd,_elements,GVAR(elementsSet)); };
+
+ TRACE_4("Setting element",_idd,_elements,_show,GVAR(elementsSet));
+ private _success = [_idd, _elements, _show] call FUNC(setAdvancedElement);
+
+ if (_success) then {
+ GVAR(elementsSet) pushBack [_idd, _elements];
+ _return = true;
+ };
+} else {
+ if ([_idd, _elements] in GVAR(elementsSet)) then {
+ TRACE_4("Setting element",_idd,_elements,_show,GVAR(elementsSet));
+ [_idd, _elements, _show] call FUNC(setAdvancedElement);
+
+ private _index = GVAR(elementsSet) find [_idd, _elements];
+ GVAR(elementsSet) deleteAt _index;
+ _return = true;
+ };
+};
+
+TRACE_2("Visibility set",_return,GVAR(elementsSet));
+_return
diff --git a/addons/ui/functions/fnc_setElements.sqf b/addons/ui/functions/fnc_setElements.sqf
new file mode 100644
index 0000000000..64b716ee29
--- /dev/null
+++ b/addons/ui/functions/fnc_setElements.sqf
@@ -0,0 +1,35 @@
+/*
+ * Author: Jonpas
+ * Sets basic visible elements of the UI using showHUD setter.
+ *
+ * Arguments:
+ * 0: Force change even when disallowed (default: false)
+ *
+ * Return Value:
+ * None
+ *
+ * Example:
+ * [false] call ace_ui_fnc_setElements
+ *
+ * Public: No
+ */
+#include "script_component.hpp"
+
+if (isArray (missionConfigFile >> "showHUD")) exitWith {};
+
+params [ ["_force", false, [true]] ];
+
+if (!_force && {!GVAR(allowSelectiveUI)}) exitWith {
+ [LSTRING(Disallowed), 2] call EFUNC(common,displayTextStructured);
+};
+
+["ui", [
+ true,
+ GVAR(soldierVehicleWeaponInfo),
+ GVAR(vehicleRadar),
+ GVAR(vehicleCompass),
+ true,
+ GVAR(commandMenu),
+ GVAR(groupBar),
+ true
+]] call EFUNC(common,showHud);
diff --git a/addons/ui/functions/script_component.hpp b/addons/ui/functions/script_component.hpp
new file mode 100644
index 0000000000..656228f742
--- /dev/null
+++ b/addons/ui/functions/script_component.hpp
@@ -0,0 +1 @@
+#include "\z\ace\addons\ui\script_component.hpp"
diff --git a/addons/ui/script_component.hpp b/addons/ui/script_component.hpp
index 2c669b78e5..a7410a49b8 100644
--- a/addons/ui/script_component.hpp
+++ b/addons/ui/script_component.hpp
@@ -15,3 +15,81 @@
#endif
#include "\z\ace\addons\main\script_macros.hpp"
+
+
+// Elements
+#define ELEMENTS_BASIC [QGVAR(soldierVehicleWeaponInfo), QGVAR(vehicleRadar), QGVAR(vehicleCompass), QGVAR(commandMenu), QGVAR(groupBar)]
+
+// IDD, IDC, Element (must be string to compare to changed setting name)
+#define ELEMENTS_ADVANCED [ \
+ [300, [118], QGVAR(weaponName)], \
+ [300, [1001, 1008], QGVAR(weaponNameBackground)], \
+ [300, [187, 1203], QGVAR(firingMode)], \
+ [300, [155], QGVAR(ammoType)], \
+ [300, [184], QGVAR(ammoCount)], \
+ [300, [185], QGVAR(magCount)], \
+ [300, [152], QGVAR(throwableName)], \
+ [300, [151], QGVAR(throwableCount)], \
+ [300, [1202], QGVAR(weaponLowerInfoBackground)], \
+ [300, [168], QGVAR(zeroing)], \
+ [305, [193], QGVAR(staminaBar)], \
+ [303, [188, 1201], QGVAR(stance)], \
+ [300, [120], QGVAR(vehicleName)], \
+ [300, [1000, 1013], QGVAR(vehicleNameBackground)], \
+ [300, [113, 1202], QGVAR(vehicleFuelBar)], \
+ [300, [121, 1004, 1006], QGVAR(vehicleSpeed)], \
+ [300, [122, 1005, 1014], QGVAR(vehicleAltitude)], \
+ [300, [111], QGVAR(vehicleDamage)], \
+ [300, [1200], QGVAR(vehicleInfoBackground)], \
+ [300, [150], QGVAR(vehicleGunnerWeapon)] \
+]
+
+
+/*
+RscUnitInfo = 300
+--------------------
+118 (Weapon Name)
++ 1001 (Weapon Name Background 1/2)
++ 1008 (Weapon Name Background 2/2)
+
+187 (Firing Mode)
++ 1203 (Firing Mode Background)
+
+155 (Ammo Type)
+184 (Ammo Count) - disabled in config by ace_reload
+185 (Magazine Count)
+152 (Grenade/Flare Type)
+151 (Grenade/Flare Count)
+1202 (Lower Weapon Info Background)
+168 (Zeroing)
+
+
+120 (Vehicle Name)
+1000 (Vehicle Name Background 1/2)
++ 1013 (Vehicle Name Background 2/2)
+
+113 (Vehicle Fuel Bar)
++ 1202 (Vehicle Fuel Bar Background)
+
+121 (Vehicle Speed Number)
++ 1004 (Vehicle Speed Unit)
++ 1006 (Vehicle Speed Background)
+122 (Vehicle Altitude Number)
++ 1005 (Vehicle Altitude Units)
++ 1014 (Vehicle Altitude Background)
+111 (Vehicle Damage)
+1200 (Vehicle Info Background)
+
+150 (Vehicle Gunner Weapon)
+
+
+RscStanceInfo = 303
+--------------------
+188 (Stance)
++ 1201 (Stance Background)
+
+
+RscStaminaBar = 305
+--------------------
+193 (Stamina Bar)
+*/
diff --git a/addons/ui/stringtable.xml b/addons/ui/stringtable.xml
new file mode 100644
index 0000000000..74cd89e93b
--- /dev/null
+++ b/addons/ui/stringtable.xml
@@ -0,0 +1,131 @@
+
+
+
+
+ User Interface
+ Uživatelské rozhraní
+
+
+ User Interface
+ Uživatelské rozhraní
+
+
+ This module allows toggling visible user interface parts.
+
+
+ Allow Selective UI
+ Povolit selektivní UI
+
+
+ Allow client to modify their UI.
+ Povolit klientovi měnit jeho UI
+
+
+ Soldier/Vehicle/Weapon Information
+ Informace o Vojákovi/Vozidlu/Zbrani
+
+
+ Vehicle Radar
+ Radar vozidla
+
+
+ Vehicle Compass
+ Kompas vozidla
+
+
+ Command Menu
+ Menu rozkazů
+
+
+ Group Bar
+ Panel skupiny
+
+
+ Weapon Name
+ Název zbraně
+
+
+ Weapon Name Background
+ Název zbraně v pozadí
+
+
+ Firing Mode
+ Režim palby
+
+
+ Ammo Type
+ Typ munice
+
+
+ Ammo Count
+ Počet munice
+
+
+ Magazine Count
+ Počet zásobníků
+
+
+ Throwable Type
+ Typ granátů apod.
+
+
+ Throwable Count
+ Počet granátů apod.
+
+
+ Zeroing
+ Náměr
+
+
+ Weapon Lower Info Background
+
+
+ Stance
+ Postoj
+
+
+ Stamina Bar
+ Panel výdrže
+
+
+ Vehicle Name
+ Název vozidla
+
+
+ Vehicle Name Background
+ Název vozidla v pozadí
+
+
+ Vehicle Fuel Bar
+ Ukazatel paliva
+
+
+ Vehicle Speed
+ Rychlost vozidla
+
+
+ Vehicle Altitude
+ Výška vozidla
+
+
+ Vehicle Damage
+ Poškození vozidla
+
+
+ Vehicle Info Background
+ Info o vozidle v pozadí
+
+
+ Vehicle Gunner Weapon
+ Střelcova zbraň ve vozidle
+
+
+ Requires Soldier/Vehicle/Weapons Information.
+ Vyžaduje informace o Vojákovi/Vozidlu/Zbrani
+
+
+ Modifying User Interface is disabled.
+ Změna uživatelského rozhraní je zakázána.
+
+
+
\ No newline at end of file
diff --git a/addons/vector/CfgWeapons.hpp b/addons/vector/CfgWeapons.hpp
index 019d774da8..a28321bdc8 100644
--- a/addons/vector/CfgWeapons.hpp
+++ b/addons/vector/CfgWeapons.hpp
@@ -13,4 +13,9 @@ class CfgWeapons {
opticsZoomMin = 0.06621;
weaponInfoType = "ACE_RscOptics_vector";
};
+ class ACE_VectorDay: ACE_Vector {
+ author = ECSTRING(common,ACETeam);
+ displayName = CSTRING(VectorDayName);
+ visionMode[] = {"Normal"};
+ };
};
diff --git a/addons/vector/config.cpp b/addons/vector/config.cpp
index e2a52b47ef..e4cdf9a55b 100644
--- a/addons/vector/config.cpp
+++ b/addons/vector/config.cpp
@@ -3,7 +3,7 @@
class CfgPatches {
class ADDON {
units[] = {"ACE_Item_Vector"};
- weapons[] = {"ACE_Vector"};
+ weapons[] = {"ACE_Vector", "ACE_VectorDay"};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
author[] = {"Ghost","Hamburger SV","commy2","bux578"};
diff --git a/addons/vector/functions/fnc_onKeyHold.sqf b/addons/vector/functions/fnc_onKeyHold.sqf
index 568ef2050c..ee6d80e2de 100644
--- a/addons/vector/functions/fnc_onKeyHold.sqf
+++ b/addons/vector/functions/fnc_onKeyHold.sqf
@@ -7,7 +7,7 @@ PFH executed while holding a vector key down.
*/
#include "script_component.hpp"
-if (currentWeapon ACE_player != "ACE_Vector") exitWith {
+if (!((currentWeapon ACE_player) isKindOf ["ACE_Vector", configFile >> "CfgWeapons"])) exitWith {
[_this select 1] call CBA_fnc_removePerFrameHandler;
GVAR(currentMode) = "";
diff --git a/addons/vector/initKeybinds.sqf b/addons/vector/initKeybinds.sqf
index babef0819c..5b099235da 100644
--- a/addons/vector/initKeybinds.sqf
+++ b/addons/vector/initKeybinds.sqf
@@ -5,7 +5,7 @@
// Conditions: canInteract
if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
- if !(currentWeapon ACE_player == "ACE_Vector" && {cameraView == "GUNNER"}) exitWith {false};
+ if !(((currentWeapon ACE_player) isKindOf ["ACE_Vector", configFile >> "CfgWeapons"]) && {cameraView == "GUNNER"}) exitWith {false};
// prevent holding down
if (GETGVAR(isDownStateKey1,false)) exitWith {false};
@@ -34,7 +34,7 @@
// Conditions: canInteract
if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
- if !(currentWeapon ACE_player == "ACE_Vector" && {cameraView == "GUNNER"}) exitWith {false};
+ if !(((currentWeapon ACE_player) isKindOf ["ACE_Vector", configFile >> "CfgWeapons"]) && {cameraView == "GUNNER"}) exitWith {false};
// prevent holding down
if (GETGVAR(isDownStateKey2,false)) exitWith {false};
diff --git a/addons/vector/stringtable.xml b/addons/vector/stringtable.xml
index 9d1936304e..fd8d73858c 100644
--- a/addons/vector/stringtable.xml
+++ b/addons/vector/stringtable.xml
@@ -1,7 +1,19 @@
-
+
+ Vector 21 Nite
+ Vector 21 Nite
+ Vector 21 Nite
+ Vector 21 Nite
+ Vector 21 Nite
+ Vector 21 Nite
+ Vector 21 Nite
+ Vector 21 Nite
+ Vector 21 Nite
+ Vector 21 Nite
+
+
Vector 21
Vector 21
Vector 21
diff --git a/addons/vehiclelock/ACE_Settings.hpp b/addons/vehiclelock/ACE_Settings.hpp
index 9eac505db2..f8a431410f 100644
--- a/addons/vehiclelock/ACE_Settings.hpp
+++ b/addons/vehiclelock/ACE_Settings.hpp
@@ -1,14 +1,20 @@
class ACE_Settings {
- class GVAR(DefaultLockpickStrength) {
+ class GVAR(defaultLockpickStrength) {
+ displayName = CSTRING(DefaultLockpickStrength_DisplayName);
+ description = CSTRING(DefaultLockpickStrength_Description);
value = 10;
typeName = "SCALAR";
};
- class GVAR(LockVehicleInventory) {
+ class GVAR(lockVehicleInventory) {
+ displayName = CSTRING(LockVehicleInventory_DisplayName);
+ description = CSTRING(LockVehicleInventory_Description);
value = 0;
typeName = "BOOL";
- };
- class GVAR(VehicleStartingLockState) {
+ };
+ class GVAR(vehicleStartingLockState) {
+ displayName = CSTRING(VehicleStartingLockState_DisplayName);
+ description = CSTRING(VehicleStartingLockState_Description);
value = -1;
typeName = "SCALAR";
};
-};
\ No newline at end of file
+};
diff --git a/addons/vehiclelock/CfgEventHandlers.hpp b/addons/vehiclelock/CfgEventHandlers.hpp
index 705415e65d..712cc2be1c 100644
--- a/addons/vehiclelock/CfgEventHandlers.hpp
+++ b/addons/vehiclelock/CfgEventHandlers.hpp
@@ -17,14 +17,6 @@ class Extended_PostInit_EventHandlers {
};
};
-class Extended_InventoryOpened_EventHandlers {
- class CAManBase {
- class ADDON {
- clientInventoryOpened = QUOTE(_this call FUNC(onOpenInventory););
- };
- };
-};
-
class Extended_InitPost_EventHandlers {
class Car {
class ADDON {
diff --git a/addons/vehiclelock/XEH_postInit.sqf b/addons/vehiclelock/XEH_postInit.sqf
index c635de2bd3..93d8bd6426 100644
--- a/addons/vehiclelock/XEH_postInit.sqf
+++ b/addons/vehiclelock/XEH_postInit.sqf
@@ -3,3 +3,13 @@
//Add Event Handlers
["VehicleLock_SetupCustomKey", {_this call FUNC(serverSetupCustomKeyEH)}] call EFUNC(common,addEventHandler);
["VehicleLock_SetVehicleLock", {_this call FUNC(setVehicleLockEH)}] call EFUNC(common,addEventHandler);
+
+if (!hasInterface) exitwith {};
+
+["SettingsInitialized", {
+ TRACE_1("SettingsInitialized eh",GVAR(LockVehicleInventory));
+
+ if (GVAR(LockVehicleInventory)) then {
+ ["CAManBase", "InventoryOpened", {_this call FUNC(onOpenInventory);}] call CBA_fnc_addClassEventHandler;
+ };
+}] call EFUNC(common,addEventHandler);
diff --git a/addons/vehiclelock/functions/fnc_onOpenInventory.sqf b/addons/vehiclelock/functions/fnc_onOpenInventory.sqf
index 17682c72de..5ac9ee427e 100644
--- a/addons/vehiclelock/functions/fnc_onOpenInventory.sqf
+++ b/addons/vehiclelock/functions/fnc_onOpenInventory.sqf
@@ -7,7 +7,7 @@
* 1: Container
*
* Return Value:
- * Handeled
+ * None
*
* Example:
* [player, car] call ACE_VehicleLock_fnc_onOpenInventory;
@@ -20,10 +20,7 @@ params ["_unit", "_container"];
TRACE_2("params",_unit,_container);
//Only check for player:
-if (_unit != ace_player) exitWith {false};
-
-private "_handeled";
-_handeled = false;
+if (_unit != ace_player) exitWith {};
if (GVAR(LockVehicleInventory) && //if setting not enabled
{(vehicle ace_player) == ace_player} && //Player dismounted
@@ -33,15 +30,19 @@ if (GVAR(LockVehicleInventory) && //if setting not enabled
) then {
//Give feedback that vehicle is locked
playSound "ACE_Sound_Click";
- //don't open the vehicles inventory
- _handeled = true;
- // As of 1.54 the action needs to be delayed a frame to work, which used not to be the case
+ //For compatibiltiy with ACRE, wait until the display is open, close it and then reopen the player's own inventory
+ //ref: http://gitlab.idi-systems.com/idi-systems/acre2-public/issues/70
[{
- TRACE_1("delaying a frame", ace_player);
- //Just opens a dummy groundContainer (so the player can still see their own inventory)
- ACE_player action ["Gear", objNull];
- }, []] call EFUNC(common,execNextFrame);
+ !isNull (findDisplay 602)
+ },
+ {
+ TRACE_1("car display open: closing", _this);
+ (findDisplay 602) closeDisplay 0;
+ [{
+ TRACE_1("Opening Player Inventory", _this);
+ ACE_player action ["Gear", objNull]
+ }, []] call EFUNC(common,execNextFrame);
+ },
+ []] call EFUNC(common,waitUntilAndExecute);
};
-
-_handeled
diff --git a/addons/vehiclelock/stringtable.xml b/addons/vehiclelock/stringtable.xml
index 9b8b06fd40..32e9c762d0 100644
--- a/addons/vehiclelock/stringtable.xml
+++ b/addons/vehiclelock/stringtable.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/addons/vehicles/stringtable.xml b/addons/vehicles/stringtable.xml
index dcf2348175..005bba53a3 100644
--- a/addons/vehicles/stringtable.xml
+++ b/addons/vehicles/stringtable.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/addons/viewdistance/ACE_Settings.hpp b/addons/viewdistance/ACE_Settings.hpp
index 1499626b7f..356c7d86f2 100644
--- a/addons/viewdistance/ACE_Settings.hpp
+++ b/addons/viewdistance/ACE_Settings.hpp
@@ -1,11 +1,13 @@
class ACE_Settings {
class GVAR(enabled) {
+ category = CSTRING(Module_DisplayName);
typeName = "BOOL";
value = 1;
displayName = CSTRING(enabled_DisplayName);
description = CSTRING(enabled_Description);
};
class GVAR(viewDistanceOnFoot) {
+ category = CSTRING(Module_DisplayName);
typeName = "SCALAR";
isClientSettable = 1;
value = 0; // index, NOT value // Can set it to client's actual viewdistance in the init function once ACE_Settings supports numbers (if ever).
@@ -14,6 +16,7 @@ class ACE_Settings {
description = CSTRING(onFoot_Description);
};
class GVAR(viewDistanceLandVehicle) {
+ category = CSTRING(Module_DisplayName);
typeName = "SCALAR";
isClientSettable = 1;
value = 0; // index, NOT value
@@ -22,6 +25,7 @@ class ACE_Settings {
description = CSTRING(landVehicle_Description);
};
class GVAR(viewDistanceAirVehicle) {
+ category = CSTRING(Module_DisplayName);
typeName = "SCALAR";
isClientSettable = 1;
value = 0; // index, NOT value
@@ -30,12 +34,14 @@ class ACE_Settings {
description = CSTRING(airVehicle_Description);
};
class GVAR(limitViewDistance) {
+ category = CSTRING(Module_DisplayName);
typeName = "SCALAR";
value = 10000; // Value, NOT index. 10000 is the maximum in A3
displayName = CSTRING(limit_DisplayName);
description = CSTRING(limit_setting);
};
class GVAR(objectViewDistanceCoeff) {
+ category = CSTRING(Module_DisplayName);
typeName = "SCALAR";
isClientSettable = 1;
value = 0; // index. Actual coefficient is given by functions/fnc_returnObjectCoeff.sqf
diff --git a/addons/viewdistance/CfgVehicles.hpp b/addons/viewdistance/CfgVehicles.hpp
index 86d906bfce..4c6639370c 100644
--- a/addons/viewdistance/CfgVehicles.hpp
+++ b/addons/viewdistance/CfgVehicles.hpp
@@ -1,6 +1,6 @@
class CfgVehicles {
class ACE_Module;
- class GVAR(ModuleSettings) : ACE_Module {
+ class GVAR(ModuleSettings): ACE_Module {
author = ECSTRING(common,ACETeam);
category = "ACE";
function = QUOTE(DFUNC(initModule));
@@ -28,4 +28,4 @@ class CfgVehicles {
sync[] = {};
};
};
-};
\ No newline at end of file
+};
diff --git a/addons/viewdistance/XEH_PREP.hpp b/addons/viewdistance/XEH_PREP.hpp
index fea5de5a4f..c040baf334 100644
--- a/addons/viewdistance/XEH_PREP.hpp
+++ b/addons/viewdistance/XEH_PREP.hpp
@@ -1,4 +1,3 @@
-
PREP(adaptViewDistance);
PREP(changeViewDistance);
PREP(initModule);
diff --git a/addons/viewdistance/XEH_clientInit.sqf b/addons/viewdistance/XEH_clientInit.sqf
index 45b86d944d..dfcfd7e405 100644
--- a/addons/viewdistance/XEH_clientInit.sqf
+++ b/addons/viewdistance/XEH_clientInit.sqf
@@ -24,6 +24,6 @@ if (!hasInterface) exitWith {};
// Set the EH which waits for a vehicle change to automatically swap between On Foot/In Land Vehicle/In Air Vehicle
// Also run when SettingsInitialized runs (not guaranteed)
["playerVehicleChanged",{
- [false] call FUNC(adaptViewDistance)
+ [false] call FUNC(adaptViewDistance);
}] call EFUNC(common,addEventHandler);
}] call EFUNC(common,addEventHandler);
diff --git a/addons/viewdistance/functions/fnc_adaptViewDistance.sqf b/addons/viewdistance/functions/fnc_adaptViewDistance.sqf
index f1ea7121b2..4816ee946e 100644
--- a/addons/viewdistance/functions/fnc_adaptViewDistance.sqf
+++ b/addons/viewdistance/functions/fnc_adaptViewDistance.sqf
@@ -2,7 +2,6 @@
* Author: Winter
* Sets the player's current view distance according to whether s/he is on foot, in a land vehicle or in an air vehicle.
*
- *
* Arguments:
* 0: Show Prompt
*
@@ -17,23 +16,23 @@
#include "script_component.hpp"
-private["_land_vehicle","_air_vehicle"];
-
-params ["_show_prompt"];
+params ["_showPrompt"];
if (!GVAR(enabled) || isNull ACE_player) exitWith {};
-_land_vehicle = (vehicle ACE_player) isKindOf "LandVehicle";
-_air_vehicle = (vehicle ACE_player) isKindOf "Air";
+private _vehicle = vehicle ACE_player;
-if (!_land_vehicle && !_air_vehicle) exitWith {
- [GVAR(viewDistanceOnFoot),_show_prompt] call FUNC(changeViewDistance);
+private _landVehicle = _vehicle isKindOf "LandVehicle" || {_vehicle isKindOf "Ship_F"};
+private _airVehicle = _vehicle isKindOf "Air";
+
+if (!_landVehicle && !_airVehicle) exitWith {
+ [GVAR(viewDistanceOnFoot), _showPrompt] call FUNC(changeViewDistance);
};
-if (_land_vehicle) exitWith {
- [GVAR(viewDistanceLandVehicle),_show_prompt] call FUNC(changeViewDistance);
+if (_landVehicle) exitWith {
+ [GVAR(viewDistanceLandVehicle), _showPrompt] call FUNC(changeViewDistance);
};
-if (_air_vehicle) exitWith {
- [GVAR(viewDistanceAirVehicle),_show_prompt] call FUNC(changeViewDistance);
+if (_airVehicle) exitWith {
+ [GVAR(viewDistanceAirVehicle), _showPrompt] call FUNC(changeViewDistance);
};
diff --git a/addons/viewdistance/functions/fnc_changeViewDistance.sqf b/addons/viewdistance/functions/fnc_changeViewDistance.sqf
index 28bba29b67..c5f39ff2f8 100644
--- a/addons/viewdistance/functions/fnc_changeViewDistance.sqf
+++ b/addons/viewdistance/functions/fnc_changeViewDistance.sqf
@@ -16,20 +16,18 @@
*/
#include "script_component.hpp"
-private ["_text", "_new_view_distance", "_view_distance_limit", "_object_view_distance_coeff"];
+params ["_indexRequested", "_showPrompt"];
-params ["_index_requested", "_show_prompt"];
+private _newViewDistance = [_indexRequested] call FUNC(returnValue); // changes the setting index into an actual view distance value
+private _objectViewDistanceCoeff = [GVAR(objectViewDistanceCoeff)] call FUNC(returnObjectCoeff); // changes the setting index into a coefficient.
+private _viewDistanceLimit = GVAR(limitViewDistance); // Grab the limit
-_new_view_distance = [_index_requested] call FUNC(returnValue); // changes the setting index into an actual view distance value
-_object_view_distance_coeff = [GVAR(objectViewDistanceCoeff)] call FUNC(returnObjectCoeff); // changes the setting index into a coefficient.
-_view_distance_limit = GVAR(limitViewDistance); // Grab the limit
+TRACE_3("Limit",_newViewDistance,_viewDistanceLimit,_showPrompt);
+setViewDistance (_newViewDistance min _viewDistanceLimit);
-TRACE_2("Limit",_new_view_distance,_view_distance_limit);
-setViewDistance (_new_view_distance min _view_distance_limit);
-
-if (typeName _object_view_distance_coeff == "SCALAR") then {
- if (_object_view_distance_coeff > 0) then {
- setObjectViewDistance (_object_view_distance_coeff * viewDistance);
+if (_objectViewDistanceCoeff isEqualType 0) then {
+ if (_objectViewDistanceCoeff > 0) then {
+ setObjectViewDistance (_objectViewDistanceCoeff * viewDistance);
} else {
// Restore correct view distance when changing from FoV Based to Off
// Restoring directly inside PFH's self-exit resulted in the need of selecting another option to take effect
@@ -42,18 +40,18 @@ if (typeName _object_view_distance_coeff == "SCALAR") then {
};
};
-if (_show_prompt) then {
+if (_showPrompt) then {
if (GVAR(objectViewDistanceCoeff) > 0) then {
+ private _text = "";
// FoV Based or %
if (GVAR(objectViewDistanceCoeff) == 6) then {
_text = format ["%1 %2 Min. %3 Max. %4 ", localize LSTRING(objectinfotext), localize LSTRING(object_fovBased), GVAR(fovBasedPFHminimalViewDistance), viewDistance];
} else {
- _text = if (_new_view_distance <= _view_distance_limit) then {
- format ["%1 %2m", localize LSTRING(infotext), viewDistance];
- } else {
- format ["%1 %2m", localize LSTRING(invalid), viewDistance];
- };
- _text = _text + format ["%1 %2%3 ", localize LSTRING(objectinfotext), _object_view_distance_coeff * 100, "%"];
+ _text = [
+ format ["%1 %2m", localize LSTRING(invalid), viewDistance],
+ format ["%1 %2m", localize LSTRING(infotext), viewDistance]
+ ] select (_newViewDistance <= _viewDistanceLimit);
+ _text = _text + format ["%1 %2%3 ", localize LSTRING(objectinfotext), _objectViewDistanceCoeff * 100, "%"];
};
[parseText _text, 2] call EFUNC(common,displayTextStructured);
};
diff --git a/addons/viewdistance/functions/fnc_returnObjectCoeff.sqf b/addons/viewdistance/functions/fnc_returnObjectCoeff.sqf
index 90c70b810c..257dca2995 100644
--- a/addons/viewdistance/functions/fnc_returnObjectCoeff.sqf
+++ b/addons/viewdistance/functions/fnc_returnObjectCoeff.sqf
@@ -16,11 +16,9 @@
#include "script_component.hpp"
-private ["_return"];
-
params ["_index"];
-_return = switch (_index) do {
+switch (_index) do {
case 0: {0.00}; // Off
case 1: {0.20}; // Very Low
case 2: {0.40}; // Low
@@ -30,5 +28,3 @@ _return = switch (_index) do {
case 6: {"fov"}; // FoV Based
default {0.50}; // something broke if this returns
};
-
-_return;
diff --git a/addons/viewdistance/functions/fnc_returnValue.sqf b/addons/viewdistance/functions/fnc_returnValue.sqf
index 7224292fa4..35c0894520 100644
--- a/addons/viewdistance/functions/fnc_returnValue.sqf
+++ b/addons/viewdistance/functions/fnc_returnValue.sqf
@@ -16,28 +16,23 @@
#include "script_component.hpp"
-private ["_return"];
-
params ["_index"];
-_return = switch (_index) do {
- case 0: {viewDistance}; // Video Settings option
- case 1: {500};
- case 2: {1000};
- case 3: {1500};
- case 4: {2000};
- case 5: {2500};
- case 6: {3000};
- case 7: {3500};
- case 8: {4000};
- case 9: {5000};
- case 10: {6000};
- case 11: {7000};
- case 12: {8000};
- case 13: {9000};
- case 14: {10000};
- default {1000};
+switch (_index) do {
+ case 0: {viewDistance}; // Video Settings option
+ case 1: {500};
+ case 2: {1000};
+ case 3: {1500};
+ case 4: {2000};
+ case 5: {2500};
+ case 6: {3000};
+ case 7: {3500};
+ case 8: {4000};
+ case 9: {5000};
+ case 10: {6000};
+ case 11: {7000};
+ case 12: {8000};
+ case 13: {9000};
+ case 14: {10000};
+ default {1000};
};
-
-TRACE_1("VD Index Return",_return);
-_return
diff --git a/addons/viewdistance/functions/fnc_setFovBasedOvdPFH.sqf b/addons/viewdistance/functions/fnc_setFovBasedOvdPFH.sqf
index bcde34316a..4a57747d97 100644
--- a/addons/viewdistance/functions/fnc_setFovBasedOvdPFH.sqf
+++ b/addons/viewdistance/functions/fnc_setFovBasedOvdPFH.sqf
@@ -17,10 +17,6 @@
#include "script_component.hpp"
-#define VD_ZOOM_NORMAL 1.00041
-#define VD_ZOOM_DIVISION 35
-#define VD_ZOOM_DIVISION_AIR 10
-
params ["", "_idPFH"];
// Remove PFH and set Object View Distance back to what it was before
@@ -29,25 +25,20 @@ if (GVAR(objectViewDistanceCoeff) < 6) exitWith {
GVAR(fovBasedPFHminimalViewDistance) = nil;
};
-private ["_zoom"];
-_zoom = (call CBA_fnc_getFov) select 1;
+private _zoom = (call CBA_fnc_getFov) select 1;
-// Air
-if ((vehicle ACE_player) isKindOf "Air") exitWith {
- if (_zoom > VD_ZOOM_NORMAL) then {
- // Dynamically set Object View Distance based on player's Zoom Level and View Distance
- setObjectViewDistance ((_zoom / VD_ZOOM_DIVISION_AIR * (viewDistance - GVAR(fovBasedPFHminimalViewDistance))) + GVAR(fovBasedPFHminimalViewDistance));
- } else {
- setObjectViewDistance (GVAR(fovBasedPFHminimalViewDistance) + viewDistance / 10);
- };
- TRACE_2("FoV Based",getObjectViewDistance select 0,_zoom);
-};
-
-// Land
if (_zoom > VD_ZOOM_NORMAL) then {
// Dynamically set Object View Distance based on player's Zoom Level and View Distance
- setObjectViewDistance ((_zoom / VD_ZOOM_DIVISION * (viewDistance - GVAR(fovBasedPFHminimalViewDistance))) + GVAR(fovBasedPFHminimalViewDistance));
+ if ((vehicle ACE_player) isKindOf "Air") then {
+ setObjectViewDistance ((_zoom / VD_ZOOM_DIVISION_AIR * (viewDistance - GVAR(fovBasedPFHminimalViewDistance))) + GVAR(fovBasedPFHminimalViewDistance));
+ } else {
+ setObjectViewDistance ((_zoom / VD_ZOOM_DIVISION * (viewDistance - GVAR(fovBasedPFHminimalViewDistance))) + GVAR(fovBasedPFHminimalViewDistance));
+ };
} else {
- setObjectViewDistance GVAR(fovBasedPFHminimalViewDistance);
+ if ((vehicle ACE_player) isKindOf "Air") then {
+ setObjectViewDistance (GVAR(fovBasedPFHminimalViewDistance) + viewDistance / 10);
+ } else {
+ setObjectViewDistance GVAR(fovBasedPFHminimalViewDistance);
+ };
};
TRACE_2("FoV Based",getObjectViewDistance select 0,_zoom);
diff --git a/addons/viewdistance/script_component.hpp b/addons/viewdistance/script_component.hpp
index dfd04bbf9d..f5cd31f8ce 100644
--- a/addons/viewdistance/script_component.hpp
+++ b/addons/viewdistance/script_component.hpp
@@ -15,3 +15,8 @@
#endif
#include "\z\ace\addons\main\script_macros.hpp"
+
+
+#define VD_ZOOM_NORMAL 1.00041
+#define VD_ZOOM_DIVISION 35
+#define VD_ZOOM_DIVISION_AIR 10
diff --git a/addons/weaponselect/ACE_Settings.hpp b/addons/weaponselect/ACE_Settings.hpp
index 2214451247..5b58659f6e 100644
--- a/addons/weaponselect/ACE_Settings.hpp
+++ b/addons/weaponselect/ACE_Settings.hpp
@@ -1,6 +1,6 @@
class ACE_Settings {
- class GVAR(DisplayText) {
+ class GVAR(displayText) {
typeName = "BOOL";
isClientSettable = 1;
value = 1;
diff --git a/addons/weaponselect/XEH_preInit.sqf b/addons/weaponselect/XEH_preInit.sqf
index b457e10cad..4166247505 100644
--- a/addons/weaponselect/XEH_preInit.sqf
+++ b/addons/weaponselect/XEH_preInit.sqf
@@ -5,8 +5,8 @@ ADDON = false;
#include "XEH_PREP.hpp"
// collect frag and other grenades separately
-GVAR(GrenadesAll) = [];
-GVAR(GrenadesFrag) = [];
+GVAR(GrenadesAll) = [];
+GVAR(GrenadesFrag) = [];
GVAR(GrenadesNonFrag) = [];
{
diff --git a/addons/weaponselect/stringtable.xml b/addons/weaponselect/stringtable.xml
index 4a273a6cf3..c9a8e43f60 100644
--- a/addons/weaponselect/stringtable.xml
+++ b/addons/weaponselect/stringtable.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/addons/weather/XEH_postInit.sqf b/addons/weather/XEH_postInit.sqf
index d971dc49f2..f085217c56 100644
--- a/addons/weather/XEH_postInit.sqf
+++ b/addons/weather/XEH_postInit.sqf
@@ -39,6 +39,19 @@ GVAR(WindInfo) = false;
},
{false},
[37, [true, false, false]], false, 0] call CBA_fnc_addKeybind; // (SHIFT + K)
+["ACE3 Common", QGVAR(WindInfoKey_hold), localize LSTRING(WindInfoKey_hold),
+{
+ // Conditions: canInteract
+ if !([ACE_player, ACE_player, []] call EFUNC(common,canInteractWith)) exitWith {false};
+
+ // Statement
+ [] call FUNC(displayWindInfo);
+},
+{
+ GVAR(WindInfo) = false;
+ (["RscWindIntuitive"] call BIS_fnc_rscLayer) cutText ["", "PLAIN", 2];
+},
+[0, [false, false, false]], false, 0] call CBA_fnc_addKeybind; // (empty default key)
simulWeatherSync;
diff --git a/addons/weather/functions/fnc_getMapData.sqf b/addons/weather/functions/fnc_getMapData.sqf
index b344ad2bdf..e1b56f2ed2 100644
--- a/addons/weather/functions/fnc_getMapData.sqf
+++ b/addons/weather/functions/fnc_getMapData.sqf
@@ -17,24 +17,26 @@
// Assume default wind values
// Source: https://weatherspark.com/averages/32194/Lemnos-Limnos-North-Aegean-Islands-Greece
-GVAR(WindSpeedMax) = [[8.8, 5.5], [8.8, 5], [8.6, 4.8], [7.6, 3.4], [7.0, 3.0], [7.1, 3.0], [7.5, 3.1], [8.0, 3.2], [7.6, 3.5], [7.8, 4.6], [7.9, 5.0], [8.2, 5.5]];
+GVAR(WindSpeedMax) = [[8.8, 5.5], [8.8, 5], [8.6, 4.8], [7.6, 3.4], [7.0, 3.0], [7.1, 3.0], [7.5, 3.1], [8.0, 3.2], [7.6, 3.5], [7.8, 4.6], [7.9, 5.0], [8.2, 5.5]];
GVAR(WindSpeedMean) = [4.8, 4.9, 4.6, 4.1, 3.5, 3.5, 4.3, 4.4, 4.1, 4.5, 4.5, 5.0];
-GVAR(WindSpeedMin) = [[0.2, 5.0], [0.1, 5.0], [0.2, 4.3], [0.0, 3.0], [0.0, 2.1], [0.0, 2.0], [0.1, 3.1], [0.3, 3.1], [0.0, 3.6], [0.0, 4.2], [0.1, 5.0], [0.2, 5.5]];
-GVAR(WindDirectionProbabilities) = [[0.06, 0.32, 0.05, 0.04, 0.15, 0.06, 0.02, 0.02], // January
- [0.08, 0.32, 0.04, 0.04, 0.18, 0.06, 0.02, 0.02], // February
- [0.09, 0.30, 0.04, 0.04, 0.20, 0.06, 0.02, 0.03], // March
- [0.10, 0.25, 0.03, 0.04, 0.22, 0.06, 0.02, 0.04], // April
- [0.18, 0.25, 0.03, 0.04, 0.18, 0.04, 0.01, 0.05], // May
- [0.25, 0.25, 0.03, 0.03, 0.15, 0.03, 0.00, 0.08], // June
- [0.32, 0.30, 0.02, 0.02, 0.10, 0.01, 0.00, 0.09], // July
- [0.28, 0.35, 0.02, 0.01, 0.08, 0.01, 0.00, 0.08], // August
- [0.20, 0.37, 0.03, 0.01, 0.11, 0.01, 0.01, 0.05], // September
- [0.10, 0.39, 0.04, 0.02, 0.15, 0.02, 0.01, 0.03], // October
- [0.08, 0.38, 0.06, 0.04, 0.19, 0.03, 0.02, 0.02], // November
- [0.06, 0.37, 0.05, 0.03, 0.18, 0.04, 0.02, 0.02]];// December
-
+GVAR(WindSpeedMin) = [[0.2, 5.0], [0.1, 5.0], [0.2, 4.3], [0.0, 3.0], [0.0, 2.1], [0.0, 2.0], [0.1, 3.1], [0.3, 3.1], [0.0, 3.6], [0.0, 4.2], [0.1, 5.0], [0.2, 5.5]];
+GVAR(WindDirectionProbabilities) = [
+ [0.06, 0.32, 0.05, 0.04, 0.15, 0.06, 0.02, 0.02], // January
+ [0.08, 0.32, 0.04, 0.04, 0.18, 0.06, 0.02, 0.02], // February
+ [0.09, 0.30, 0.04, 0.04, 0.20, 0.06, 0.02, 0.03], // March
+ [0.10, 0.25, 0.03, 0.04, 0.22, 0.06, 0.02, 0.04], // April
+ [0.18, 0.25, 0.03, 0.04, 0.18, 0.04, 0.01, 0.05], // May
+ [0.25, 0.25, 0.03, 0.03, 0.15, 0.03, 0.00, 0.08], // June
+ [0.32, 0.30, 0.02, 0.02, 0.10, 0.01, 0.00, 0.09], // July
+ [0.28, 0.35, 0.02, 0.01, 0.08, 0.01, 0.00, 0.08], // August
+ [0.20, 0.37, 0.03, 0.01, 0.11, 0.01, 0.01, 0.05], // September
+ [0.10, 0.39, 0.04, 0.02, 0.15, 0.02, 0.01, 0.03], // October
+ [0.08, 0.38, 0.06, 0.04, 0.19, 0.03, 0.02, 0.02], // November
+ [0.06, 0.37, 0.05, 0.03, 0.18, 0.04, 0.02, 0.02] // December
+];
+
// Check if the wind data is defined in the map config
-if (isArray (configFile >> "CfgWorlds" >> worldName >> "ACE_WindSpeedMean")) then {
+if (isArray (configFile >> "CfgWorlds" >> worldName >> "ACE_WindSpeedMean")) then {
GVAR(WindSpeedMin) = getArray (configFile >> "CfgWorlds" >> worldName >> "ACE_WindSpeedMin");
GVAR(WindSpeedMean) = getArray (configFile >> "CfgWorlds" >> worldName >> "ACE_WindSpeedMean");
GVAR(WindSpeedMax) = getArray (configFile >> "CfgWorlds" >> worldName >> "ACE_WindSpeedMax");
@@ -55,23 +57,25 @@ if (toLower worldName in ["chernarus", "bootcamp_acr", "woodland_acr", "utes"])
GVAR(TempNight) = [-4, -3, 0, 4, 9, 12, 14, 14, 10, 6, 2, -2];
// Source: http://www.weather-and-climate.com/average-monthly-Humidity-perc,Prague,Czech-Republic
GVAR(Humidity) = [82, 80, 78, 70, 71, 72, 70, 73, 78, 80, 83, 82];
-
+
// Source: https://weatherspark.com/averages/32335/Prague-Central-Bohemia-Czech-Republic
GVAR(WindSpeedMax) = [[6.7, 2.4], [6.8, 2.2], [7.1, 2.0], [6.7, 1.9], [6.5, 1.8], [6.4, 1.8], [6.4, 1.8], [5.9, 1.9], [5.8, 2.1], [5.9, 2.3], [6.4, 2.8], [7.0, 3.0]];
GVAR(WindSpeedMean) = [4.5, 4.3, 4.4, 4.1, 3.6, 3.6, 3.6, 3.4, 3.6, 0, 4.1, 4.6];
GVAR(WindSpeedMin) = [[1.5, 1.1], [1.5, 1.1], [1.5, 1.0], [1.2, 0.9], [1.1, 0.8], [1.0, 0.8], [1.0, 1.0], [1.0, 0.9], [1.1, 1.0], [1.0, 1.0], [1.3, 1.1], [1.8, 1.2]];
- GVAR(WindDirectionProbabilities) = [[0.06, 0.02, 0.06, 0.06, 0.10, 0.23, 0.15, 0.06], // January
- [0.08, 0.03, 0.08, 0.06, 0.08, 0.18, 0.15, 0.08], // February
- [0.08, 0.02, 0.10, 0.06, 0.07, 0.17, 0.15, 0.08], // March
- [0.12, 0.04, 0.10, 0.05, 0.06, 0.12, 0.13, 0.10], // April
- [0.12, 0.05, 0.09, 0.05, 0.05, 0.10, 0.13, 0.10], // May
- [0.12, 0.04, 0.06, 0.03, 0.05, 0.13, 0.16, 0.10], // June
- [0.09, 0.03, 0.07, 0.04, 0.06, 0.16, 0.18, 0.10], // July
- [0.09, 0.03, 0.08, 0.04, 0.06, 0.15, 0.16, 0.09], // August
- [0.07, 0.03, 0.08, 0.06, 0.08, 0.18, 0.15, 0.08], // September
- [0.06, 0.03, 0.10, 0.07, 0.10, 0.19, 0.13, 0.05], // October
- [0.06, 0.02, 0.08, 0.07, 0.10, 0.15, 0.13, 0.05], // November
- [0.06, 0.02, 0.06, 0.06, 0.10, 0.24, 0.15, 0.05]];// December
+ GVAR(WindDirectionProbabilities) = [
+ [0.06, 0.02, 0.06, 0.06, 0.10, 0.23, 0.15, 0.06], // January
+ [0.08, 0.03, 0.08, 0.06, 0.08, 0.18, 0.15, 0.08], // February
+ [0.08, 0.02, 0.10, 0.06, 0.07, 0.17, 0.15, 0.08], // March
+ [0.12, 0.04, 0.10, 0.05, 0.06, 0.12, 0.13, 0.10], // April
+ [0.12, 0.05, 0.09, 0.05, 0.05, 0.10, 0.13, 0.10], // May
+ [0.12, 0.04, 0.06, 0.03, 0.05, 0.13, 0.16, 0.10], // June
+ [0.09, 0.03, 0.07, 0.04, 0.06, 0.16, 0.18, 0.10], // July
+ [0.09, 0.03, 0.08, 0.04, 0.06, 0.15, 0.16, 0.09], // August
+ [0.07, 0.03, 0.08, 0.06, 0.08, 0.18, 0.15, 0.08], // September
+ [0.06, 0.03, 0.10, 0.07, 0.10, 0.19, 0.13, 0.05], // October
+ [0.06, 0.02, 0.08, 0.07, 0.10, 0.15, 0.13, 0.05], // November
+ [0.06, 0.02, 0.06, 0.06, 0.10, 0.24, 0.15, 0.05] // December
+ ];
};
if (toLower worldName in ["takistan", "zargabad", "mountains_acr", "shapur_baf", "provinggrounds_pmc"]) exitWith {
@@ -80,23 +84,25 @@ if (toLower worldName in ["takistan", "zargabad", "mountains_acr", "shapur_baf",
GVAR(TempNight) = [-7.1, -5.7, 0.7, 6, 8.8, 12.4, 15.3, 14.3, 9.4, 3.9, -1.2, -4.7];
// Source: http://www.weather-and-climate.com/average-monthly-Humidity-perc,Kabul,Afghanistan
GVAR(Humidity) = [68, 69, 62, 60, 49, 37, 38, 39, 40, 41, 56, 61];
-
+
// Source: https://weatherspark.com/averages/32750/Kabul-Afghanistan
GVAR(WindSpeedMax) = [[4.0, 1.0], [4.1, 1.0], [5.1, 1.1], [6.9, 1.2], [8.9, 1.2], [10.0, 1.1], [9.1,1.0], [8.2, 1.0], [6.9, 1.0], [5.2, 1.0], [3.8, 0.9], [3.7, 0.9]];
GVAR(WindSpeedMean) = [2.2, 2.2, 2.5, 2.8, 3.8, 4.4, 0, 3.3, 2.7, 2.4, 1.8, 1.9];
GVAR(WindSpeedMin) = [[0.2, 0.4], [0.2, 0.4], [0.2, 0.4], [0.3, 0.4], [0.6, 0.4], [0.9, 0.4], [0.7, 0.4], [0.5, 0.4], [0.2, 0.5], [0.1, 0.1], [0, 0.1], [0, 0.1]];
- GVAR(WindDirectionProbabilities) = [[0.04, 0.02, 0.05, 0.04, 0.05, 0.04, 0.11, 0.29], // January
- [0.08, 0.04, 0.06, 0.04, 0.06, 0.04, 0.10, 0.20], // February
- [0.12, 0.06, 0.08, 0.04, 0.05, 0.04, 0.09, 0.19], // March
- [0.18, 0.07, 0.09, 0.05, 0.05, 0.04, 0.08, 0.16], // April
- [0.27, 0.05, 0.05, 0.03, 0.04, 0.03, 0.08, 0.16], // May
- [0.35, 0.04, 0.04, 0.02, 0.02, 0.02, 0.07, 0.13], // June
- [0.30, 0.07, 0.09, 0.04, 0.02, 0.02, 0.05, 0.10], // July
- [0.23, 0.07, 0.08, 0.06, 0.03, 0.02, 0.05, 0.10], // August
- [0.15, 0.06, 0.10, 0.06, 0.04, 0.02, 0.07, 0.13], // September
- [0.12, 0.04, 0.07, 0.06, 0.04, 0.03, 0.10, 0.17], // October
- [0.07, 0.03, 0.06, 0.05, 0.06, 0.02, 0.10, 0.20], // November
- [0.05, 0.03, 0.06, 0.05, 0.06, 0.04, 0.11, 0.26]];// December
+ GVAR(WindDirectionProbabilities) = [
+ [0.04, 0.02, 0.05, 0.04, 0.05, 0.04, 0.11, 0.29], // January
+ [0.08, 0.04, 0.06, 0.04, 0.06, 0.04, 0.10, 0.20], // February
+ [0.12, 0.06, 0.08, 0.04, 0.05, 0.04, 0.09, 0.19], // March
+ [0.18, 0.07, 0.09, 0.05, 0.05, 0.04, 0.08, 0.16], // April
+ [0.27, 0.05, 0.05, 0.03, 0.04, 0.03, 0.08, 0.16], // May
+ [0.35, 0.04, 0.04, 0.02, 0.02, 0.02, 0.07, 0.13], // June
+ [0.30, 0.07, 0.09, 0.04, 0.02, 0.02, 0.05, 0.10], // July
+ [0.23, 0.07, 0.08, 0.06, 0.03, 0.02, 0.05, 0.10], // August
+ [0.15, 0.06, 0.10, 0.06, 0.04, 0.02, 0.07, 0.13], // September
+ [0.12, 0.04, 0.07, 0.06, 0.04, 0.03, 0.10, 0.17], // October
+ [0.07, 0.03, 0.06, 0.05, 0.06, 0.02, 0.10, 0.20], // November
+ [0.05, 0.03, 0.06, 0.05, 0.06, 0.04, 0.11, 0.26] // December
+ ];
};
if (toLower worldName in ["fallujah"]) exitWith {
@@ -113,24 +119,25 @@ if (toLower worldName in ["fata", "Abbottabad"]) exitWith {
GVAR(TempNight) = [-0.6, 2.4, 7.4, 13.1, 18.2, 22.8, 23.8, 22.9, 19.2, 12, 5.6, 1.2];
// Source: http://www.weather-and-climate.com/average-monthly-Humidity-perc,Zhob,Pakistan
GVAR(Humidity) = [50, 40, 42, 40, 30, 30, 50, 49, 40, 32, 38, 41];
-
+
// Source: https://weatherspark.com/averages/31382/Shkin-Paktika-Afghanistan
GVAR(WindSpeedMax) = [[3.0, 1.0], [3.3, 1.0], [4.0, 1.0], [4.3, 1.4], [4.3, 1.5], [4.6, 1.4], [4.5, 1.3], [4.0, 0.9], [4.0, 1.0], [3.5, 1.0], [3.4, 1.0], [3.1, 1.0]];
GVAR(WindSpeedMean) = [1.3, 1.5, 1.6, 1.7, 1.7, 1.7, 1.6, 1.5, 1.5, 1.4, 1.4, 1.2];
GVAR(WindSpeedMin) = [[0.2, 0.1], [0.2, 0.1], [0.2, 0.1], [0.2, 0.1], [0.1, 0.1], [0.1, 0.1], [0.3, 0.1], [0.2, 0.1], [0.1, 0.1], [0.1, 0.1], [0.1, 0.1], [0.1, 0.1]];
- GVAR(WindDirectionProbabilities) = [[0.09, 0.03, 0.02, 0.03, 0.05, 0.07, 0.07, 0.18], // January
- [0.07, 0.02, 0.01, 0.05, 0.10, 0.10, 0.06, 0.12], // February
- [0.07, 0.02, 0.01, 0.07, 0.14, 0.11, 0.08, 0.12], // March
- [0.07, 0.04, 0.03, 0.05, 0.12, 0.08, 0.06, 0.13], // April
- [0.10, 0.03, 0.02, 0.04, 0.10, 0.09, 0.08, 0.18], // May
- [0.12, 0.05, 0.04, 0.05, 0.08, 0.06, 0.06, 0.16], // June
- [0.06, 0.04, 0.02, 0.06, 0.05, 0.01, 0.02, 0.06], // July
- [0.08, 0.03, 0.04, 0.05, 0.09, 0.04, 0.02, 0.06], // August
- [0.10, 0.04, 0.02, 0.06, 0.11, 0.09, 0.06, 0.13], // September
- [0.07, 0.02, 0.01, 0.04, 0.11, 0.08, 0.08, 0.19], // October
- [0.06, 0.01, 0.00, 0.05, 0.11, 0.09, 0.08, 0.13], // November
- [0.07, 0.01, 0.01, 0.03, 0.08, 0.09, 0.09, 0.18]];// December
-
+ GVAR(WindDirectionProbabilities) = [
+ [0.09, 0.03, 0.02, 0.03, 0.05, 0.07, 0.07, 0.18], // January
+ [0.07, 0.02, 0.01, 0.05, 0.10, 0.10, 0.06, 0.12], // February
+ [0.07, 0.02, 0.01, 0.07, 0.14, 0.11, 0.08, 0.12], // March
+ [0.07, 0.04, 0.03, 0.05, 0.12, 0.08, 0.06, 0.13], // April
+ [0.10, 0.03, 0.02, 0.04, 0.10, 0.09, 0.08, 0.18], // May
+ [0.12, 0.05, 0.04, 0.05, 0.08, 0.06, 0.06, 0.16], // June
+ [0.06, 0.04, 0.02, 0.06, 0.05, 0.01, 0.02, 0.06], // July
+ [0.08, 0.03, 0.04, 0.05, 0.09, 0.04, 0.02, 0.06], // August
+ [0.10, 0.04, 0.02, 0.06, 0.11, 0.09, 0.06, 0.13], // September
+ [0.07, 0.02, 0.01, 0.04, 0.11, 0.08, 0.08, 0.19], // October
+ [0.06, 0.01, 0.00, 0.05, 0.11, 0.09, 0.08, 0.13], // November
+ [0.07, 0.01, 0.01, 0.03, 0.08, 0.09, 0.09, 0.18] // December
+ ];
};
if (worldName in ["sfp_wamako"]) exitWith {
@@ -155,23 +162,25 @@ if (worldName in ["Bornholm"]) exitWith {
GVAR(TempNight) = [-1.6, -2.1, -0.7, 1.7, 6.2, 10.7, 13, 13.1, 10.6, 7.2, 3.5, 0.1];
// Source: http://www.weather-and-climate.com/average-monthly-Humidity-perc,allinge,Denmark
GVAR(Humidity) = [85, 84, 80, 76, 69, 69, 76, 77, 79, 81, 86, 86];
-
+
// Source: https://weatherspark.com/averages/28830/R-nne-Capital-Region-of-Denmark
GVAR(WindSpeedMax) = [[9.3, 2.2], [8.4, 2.2], [7.9, 2.2], [7.1, 2.1], [7.2, 2.1], [6.8, 2.0], [6.8, 2.0], [7.1, 2.1], [7.7, 2.2], [8.6, 2.2], [8.8, 2.2], [9.3, 2.2]];
GVAR(WindSpeedMean) = [6.9, 6.0, 5.7, 4.9, 4.8, 4.6, 4.7, 4.9, 5.5, 6.2, 6.5, 6.7];
GVAR(WindSpeedMin) = [[3.9, 2.0], [3.0, 2.0], [2.3, 2.0], [1.8, 1.8], [1.7, 1.8], [1.7, 1.7], [1.7, 1.8], [1.9, 1.9], [2.6, 2.0], [2.9, 2.0], [3.3, 2.1], [3.5, 2.0]];
- GVAR(WindDirectionProbabilities) = [[0.07, 0.04, 0.07, 0.05, 0.09, 0.12, 0.20, 0.07], // January
- [0.08, 0.06, 0.10, 0.06, 0.06, 0.08, 0.20, 0.08], // February
- [0.05, 0.06, 0.13, 0.08, 0.07, 0.08, 0.19, 0.06], // March
- [0.05, 0.11, 0.16, 0.09, 0.05, 0.06, 0.17, 0.06], // April
- [0.04, 0.10, 0.15, 0.08, 0.05, 0.06, 0.20, 0.05], // May
- [0.03, 0.07, 0.10, 0.07, 0.05, 0.07, 0.28, 0.06], // June
- [0.04, 0.06, 0.11, 0.07, 0.04, 0.07, 0.28, 0.06], // July
- [0.05, 0.06, 0.11, 0.07, 0.06, 0.08, 0.26, 0.06], // August
- [0.06, 0.06, 0.11, 0.07, 0.06, 0.09, 0.21, 0.06], // September
- [0.07, 0.05, 0.09, 0.08, 0.08, 0.12, 0.18, 0.07], // October
- [0.08, 0.06, 0.08, 0.07, 0.10, 0.12, 0.16, 0.07], // November
- [0.08, 0.05, 0.06, 0.04, 0.10, 0.14, 0.19, 0.07]];// December
+ GVAR(WindDirectionProbabilities) = [
+ [0.07, 0.04, 0.07, 0.05, 0.09, 0.12, 0.20, 0.07], // January
+ [0.08, 0.06, 0.10, 0.06, 0.06, 0.08, 0.20, 0.08], // February
+ [0.05, 0.06, 0.13, 0.08, 0.07, 0.08, 0.19, 0.06], // March
+ [0.05, 0.11, 0.16, 0.09, 0.05, 0.06, 0.17, 0.06], // April
+ [0.04, 0.10, 0.15, 0.08, 0.05, 0.06, 0.20, 0.05], // May
+ [0.03, 0.07, 0.10, 0.07, 0.05, 0.07, 0.28, 0.06], // June
+ [0.04, 0.06, 0.11, 0.07, 0.04, 0.07, 0.28, 0.06], // July
+ [0.05, 0.06, 0.11, 0.07, 0.06, 0.08, 0.26, 0.06], // August
+ [0.06, 0.06, 0.11, 0.07, 0.06, 0.09, 0.21, 0.06], // September
+ [0.07, 0.05, 0.09, 0.08, 0.08, 0.12, 0.18, 0.07], // October
+ [0.08, 0.06, 0.08, 0.07, 0.10, 0.12, 0.16, 0.07], // November
+ [0.08, 0.05, 0.06, 0.04, 0.10, 0.14, 0.19, 0.07] // December
+ ];
};
if (worldName in ["Imrali"]) exitWith {
// Source: http://www.iten-online.ch/klima/europa/tuerkei/bursa.htm
@@ -186,23 +195,25 @@ if (worldName in ["Kunduz"]) exitWith {
GVAR(TempNight) = [-2.4, 0, 5.7, 11.6, 15.7, 20.9, 21.5, 21.5, 16.3, 10.6, 4.1, 0];
// Source: http://www.weather-and-climate.com/average-monthly-Humidity-perc,Kabul,Afghanistan
GVAR(Humidity) = [70, 72, 64, 61, 49, 34, 36, 38, 39, 52, 51, 63];
-
+
// Source: https://weatherspark.com/averages/32753/Kunduz-Afghanistan
GVAR(WindSpeedMax) = [[3.5, 0.8], [4.0, 0.6], [4.3, 2.0], [4.6, 1.1], [5.1, 1.2], [5.7, 1.0], [4.9, 0.8], [4.5, 0.3], [4.3, 0.3], [3.8, 0.5], [3.0, 1.3], [3.1, 0.8]];
GVAR(WindSpeedMean) = [1.5, 1.8, 2.1, 2.4, 2.5, 2.8, 2.7, 2.5, 2.3, 2.1, 1.7, 1.6];
GVAR(WindSpeedMin) = [[0.2, 0.1], [0.3, 0.3], [0.4, 0.1], [0.8, 0.2], [0.8, 0.1], [1.0, 0.3], [0.9, 0.5], [0.8, 0.2], [0.8, 0.1], [0.7, 0.1], [0.5, 0.1], [0.2, 0.2]];
- GVAR(WindDirectionProbabilities) = [[0.04, 0.02, 0.05, 0.11, 0.12, 0.06, 0.09, 0.06], // January
- [0.04, 0.02, 0.05, 0.11, 0.12, 0.06, 0.08, 0.07], // February
- [0.05, 0.04, 0.06, 0.14, 0.12, 0.06, 0.10, 0.08], // March
- [0.09, 0.05, 0.08, 0.13, 0.07, 0.05, 0.07, 0.07], // April
- [0.14, 0.07, 0.13, 0.13, 0.06, 0.05, 0.05, 0.08], // May
- [0.16, 0.06, 0.12, 0.12, 0.05, 0.04, 0.05, 0.10], // June
- [0.17, 0.06, 0.08, 0.12, 0.06, 0.04, 0.05, 0.12], // July
- [0.15, 0.05, 0.06, 0.16, 0.08, 0.05, 0.07, 0.13], // August
- [0.15, 0.04, 0.08, 0.20, 0.13, 0.05, 0.10, 0.14], // September
- [0.08, 0.02, 0.08, 0.22, 0.15, 0.06, 0.13, 0.13], // October
- [0.06, 0.02, 0.05, 0.20, 0.17, 0.06, 0.12, 0.10], // November
- [0.04, 0.02, 0.05, 0.14, 0.19, 0.07, 0.10, 0.07]];// December
+ GVAR(WindDirectionProbabilities) = [
+ [0.04, 0.02, 0.05, 0.11, 0.12, 0.06, 0.09, 0.06], // January
+ [0.04, 0.02, 0.05, 0.11, 0.12, 0.06, 0.08, 0.07], // February
+ [0.05, 0.04, 0.06, 0.14, 0.12, 0.06, 0.10, 0.08], // March
+ [0.09, 0.05, 0.08, 0.13, 0.07, 0.05, 0.07, 0.07], // April
+ [0.14, 0.07, 0.13, 0.13, 0.06, 0.05, 0.05, 0.08], // May
+ [0.16, 0.06, 0.12, 0.12, 0.05, 0.04, 0.05, 0.10], // June
+ [0.17, 0.06, 0.08, 0.12, 0.06, 0.04, 0.05, 0.12], // July
+ [0.15, 0.05, 0.06, 0.16, 0.08, 0.05, 0.07, 0.13], // August
+ [0.15, 0.04, 0.08, 0.20, 0.13, 0.05, 0.10, 0.14], // September
+ [0.08, 0.02, 0.08, 0.22, 0.15, 0.06, 0.13, 0.13], // October
+ [0.06, 0.02, 0.05, 0.20, 0.17, 0.06, 0.12, 0.10], // November
+ [0.04, 0.02, 0.05, 0.14, 0.19, 0.07, 0.10, 0.07] // December
+ ];
};
// Assume default values
diff --git a/addons/weather/functions/fnc_initWind.sqf b/addons/weather/functions/fnc_initWind.sqf
index 4c88f59f95..ddd314c0c6 100644
--- a/addons/weather/functions/fnc_initWind.sqf
+++ b/addons/weather/functions/fnc_initWind.sqf
@@ -19,7 +19,7 @@ private _month = date select 1;
private _windDirectionProbabilities = GVAR(WindDirectionProbabilities) select (_month - 1);
ACE_wind = [0, 0, 0];
-
+
GVAR(wind_direction_reference) = random 360;
private _sum = 0;
for "_i" from 0 to 7 do {
diff --git a/addons/weather/functions/fnc_updateHumidity.sqf b/addons/weather/functions/fnc_updateHumidity.sqf
index 3ea28d6a44..66a351096c 100644
--- a/addons/weather/functions/fnc_updateHumidity.sqf
+++ b/addons/weather/functions/fnc_updateHumidity.sqf
@@ -27,7 +27,7 @@ if ((rain > 0) && {overcast > 0.7}) then {
private _PS2 = 6.112 * exp((17.62 * GVAR(currentTemperature)) / (243.12 + GVAR(currentTemperature)));
GVAR(currentHumidity) = GVAR(currentHumidity) * _PS1 / _PS2;
GVAR(currentHumidity) = GVAR(currentHumidity) + GVAR(humidityShift);
-
+
TRACE_1("humidityShift",GVAR(humidityShift));
};
diff --git a/addons/weather/functions/fnc_updateRain.sqf b/addons/weather/functions/fnc_updateRain.sqf
index aaf7cff82c..ccacb09955 100644
--- a/addons/weather/functions/fnc_updateRain.sqf
+++ b/addons/weather/functions/fnc_updateRain.sqf
@@ -22,6 +22,6 @@ if (!isNil "ACE_RAIN_PARAMS") then {
private _periodPercent = (_periodPosition / _period) min 1;
GVAR(ACE_Rain) = linearConversion [GVAR(rain_period_start_time), (GVAR(rain_period_start_time) + _period), CBA_missionTime, _oldRain, _newRain];
-
+
TRACE_3("Update Rain",rain,ACE_RAIN_PARAMS,GVAR(ACE_Rain));
};
diff --git a/addons/weather/stringtable.xml b/addons/weather/stringtable.xml
index f2e9027e68..571fa9c25a 100644
--- a/addons/weather/stringtable.xml
+++ b/addons/weather/stringtable.xml
@@ -1,4 +1,4 @@
-
+
@@ -13,6 +13,18 @@
Zobrazit údaje o větru
Mostrar informação do vento
+
+ Show Wind Info (Toggle)
+ Pokaż inf. o wietrze (przełącz)
+ Показать информацию о ветре (перекл.)
+ Afficher information sur le vent (bascule)
+ Mostrar información del viento (cambiar)
+ Mostra informazioni sul vento (camb.)
+ Zeige Windinformationen (umsch.)
+ Széladatok mutatása (pecek)
+ Zobrazit údaje o větru (přep.)
+ Mostrar informação do vento (alternar)
+
Weather
Pogoda
diff --git a/addons/winddeflection/stringtable.xml b/addons/winddeflection/stringtable.xml
index 8e8ad27e7a..6cb4858d21 100644
--- a/addons/winddeflection/stringtable.xml
+++ b/addons/winddeflection/stringtable.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/addons/yardage450/functions/fnc_acquireTarget.sqf b/addons/yardage450/functions/fnc_acquireTarget.sqf
index 1d89bf5971..a7e56e815d 100644
--- a/addons/yardage450/functions/fnc_acquireTarget.sqf
+++ b/addons/yardage450/functions/fnc_acquireTarget.sqf
@@ -32,15 +32,15 @@ GVAR(distanceIndex) = -1;
GVAR(lasing) = false;
[_this select 1] call CBA_fnc_removePerFrameHandler;
};
-
+
_result = [eyePos ACE_player, ACE_player weaponDirection (currentWeapon ACE_player)] call EFUNC(laser,shootRay);
_distance = _result select 1;
-
+
_distance = _distance - 1 + (random 2);
-
+
GVAR(distanceIndex) = (GVAR(distanceIndex) + 1) % METERING_POINT_NUMBER;
GVAR(distances) set [GVAR(distanceIndex), _distance];
-
+
if (count GVAR(distances) == METERING_POINT_NUMBER) then {
_min = MAX_DISTANCE;
_max = MIN_DISTANCE;
@@ -48,7 +48,7 @@ GVAR(distanceIndex) = -1;
_min = _x min _min;
_max = _max max _x;
} forEach GVAR(distances);
-
+
if (abs(_max - _min) < 5) then {
_range = (_min + _max) / 2;
if (_range >= MIN_DISTANCE && _range <= MAX_DISTANCE) then {
diff --git a/addons/yardage450/functions/fnc_turnOn.sqf b/addons/yardage450/functions/fnc_turnOn.sqf
index 901e6ce563..a56bddb016 100644
--- a/addons/yardage450/functions/fnc_turnOn.sqf
+++ b/addons/yardage450/functions/fnc_turnOn.sqf
@@ -35,10 +35,10 @@ GVAR(active) = true;
74210 cutText ["", "PLAIN"];
[_this select 1] call CBA_fnc_removePerFrameHandler;
};
-
+
if (currentWeapon ACE_player == "ACE_Yardage450" && cameraView == "GUNNER") then {
74210 cutRsc ["ACE_RscYardage450", "PLAIN", 1, false];
-
+
__ctrlLaser ctrlShow GVAR(lasing);
if (GVAR(targetAcquired)) then {
__ctrlTarget ctrlSetText "Target Acquired";
@@ -52,5 +52,5 @@ GVAR(active) = true;
} else {
74210 cutText ["", "PLAIN"];
};
-
+
}, 0, []] call CBA_fnc_addPerFrameHandler;
diff --git a/addons/yardage450/initKeybinds.sqf b/addons/yardage450/initKeybinds.sqf
index 578f55ee40..9ad3005d28 100644
--- a/addons/yardage450/initKeybinds.sqf
+++ b/addons/yardage450/initKeybinds.sqf
@@ -6,7 +6,7 @@
// Conditions: specific
if !(GVAR(active)) exitWith {false};
if (currentWeapon ACE_player != "ACE_Yardage450" || cameraView != "GUNNER") exitWith {false};
-
+
// Statement
if !(GVAR(powerButtonPressed)) then {
GVAR(powerButtonPressed) = true;
@@ -19,7 +19,7 @@
if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
if (currentWeapon ACE_player != "ACE_Yardage450" || cameraView != "GUNNER") exitWith {false};
-
+
// Statement
GVAR(powerButtonPressed) = false;
call FUNC(turnOn);
diff --git a/addons/zeus/ACE_Settings.hpp b/addons/zeus/ACE_Settings.hpp
index 6488a23e4e..b520b7a31a 100644
--- a/addons/zeus/ACE_Settings.hpp
+++ b/addons/zeus/ACE_Settings.hpp
@@ -1,29 +1,39 @@
class ACE_Settings {
class GVAR(zeusAscension) {
+ displayName = CSTRING(ascension_DisplayName);
+ description = CSTRING(ascension_Description);
typeName = "BOOL";
value = 0;
};
class GVAR(zeusBird) {
+ displayName = CSTRING(bird_DisplayName);
+ description = CSTRING(bird_Description);
typeName = "BOOL";
value = 0;
};
class GVAR(remoteWind) {
+ displayName = CSTRING(remoteWind_DisplayName);
+ description = CSTRING(remoteWind_Description);
typeName = "BOOL";
value = 0;
};
class GVAR(radioOrdnance) {
+ displayName = CSTRING(radioOrdnance_DisplayName);
+ description = CSTRING(radioOrdnance_Description);
typeName = "BOOL";
value = 0;
};
class GVAR(revealMines) {
+ displayName = CSTRING(revealMines_DisplayName);
+ description = CSTRING(revealMines_Description);
typeName = "SCALAR";
value = 0;
values[] = {"$STR_A3_OPTIONS_DISABLED", CSTRING(revealMines_partial), CSTRING(revealMines_full)};
};
class GVAR(autoAddObjects) {
+ typeName = "BOOL";
+ value = 0;
displayName = CSTRING(AddObjectsToCurator);
description = CSTRING(AddObjectsToCurator_desc);
- value = 0;
- typeName = "BOOL";
};
};
diff --git a/addons/zeus/CfgVehicles.hpp b/addons/zeus/CfgVehicles.hpp
index 0013355370..fbf63930c4 100644
--- a/addons/zeus/CfgVehicles.hpp
+++ b/addons/zeus/CfgVehicles.hpp
@@ -71,6 +71,12 @@ class CfgVehicles {
};
};
};
+ class autoAddObjects {
+ displayName = CSTRING(AddObjectsToCurator);
+ description = CSTRING(AddObjectsToCurator_desc);
+ typeName = "BOOL";
+ defaultValue = 0;
+ };
};
class ModuleDescription {
description = CSTRING(Settings_Description);
@@ -167,7 +173,7 @@ class CfgVehicles {
sync[] = {};
};
};
-
+
// class GVAR(moduleSetSuppression): GVAR(moduleBase) {
// curatorCanAttach = 1;
// displayName = CSTRING(ModuleSetSupp_DisplayName);
diff --git a/addons/zeus/config.cpp b/addons/zeus/config.cpp
index 853edaf2e9..f41769e727 100644
--- a/addons/zeus/config.cpp
+++ b/addons/zeus/config.cpp
@@ -36,7 +36,7 @@ class CfgPatches {
class ACE_Curator {
GVAR(captives) = "ace_captives";
GVAR(medical) = "ace_medical";
- GVAR(cargoAndRepair[]) = {"ace_cargo", "ace_repair"};
+ GVAR(cargoAndRepair)[] = {"ace_cargo", "ace_repair"};
};
#include "CfgEventHandlers.hpp"
diff --git a/addons/zeus/functions/fnc_addObjectToCurator.sqf b/addons/zeus/functions/fnc_addObjectToCurator.sqf
index 897f51532d..176b55dfdc 100644
--- a/addons/zeus/functions/fnc_addObjectToCurator.sqf
+++ b/addons/zeus/functions/fnc_addObjectToCurator.sqf
@@ -13,12 +13,18 @@
#include "script_component.hpp"
-if (!isServer) exitWith {};
-
params ["_object"];
+if !(EGVAR(common,settingsInitFinished)) exitWith {
+ TRACE_1("pushing to runAtSettingsInitialized", _this);
+ EGVAR(common,runAtSettingsInitialized) pushBack [FUNC(addObjectToCurator), _this];
+};
+
if (!(_object getVariable [QGVAR(addObject), GVAR(autoAddObjects)])) exitWith {};
-{
- _x addCuratorEditableObjects [[_object], true];
-}forEach allCurators;
+[{
+ TRACE_1("Delayed addCuratorEditableObjects",_this);
+ {
+ _x addCuratorEditableObjects [[_this], true];
+ } forEach allCurators;
+}, _object] call EFUNC(common,execNextFrame);
diff --git a/addons/zeus/functions/fnc_moduleZeusSettings.sqf b/addons/zeus/functions/fnc_moduleZeusSettings.sqf
index 0b9c0f8dd8..0f3d720599 100644
--- a/addons/zeus/functions/fnc_moduleZeusSettings.sqf
+++ b/addons/zeus/functions/fnc_moduleZeusSettings.sqf
@@ -24,3 +24,4 @@ if !(_activated) exitWith {};
[_logic, QGVAR(radioOrdnance), "radioOrdnance"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(revealMines), "revealMines"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(remoteWind), "remoteWind"] call EFUNC(common,readSettingFromModule);
+[_logic, QGVAR(autoAddObjects), "autoAddObjects"] call EFUNC(common,readSettingFromModule);
diff --git a/docs/README_DE.md b/docs/README_DE.md
index c30d260611..95a7b3c406 100644
--- a/docs/README_DE.md
+++ b/docs/README_DE.md
@@ -4,10 +4,7 @@
-
-
-
-
+
diff --git a/docs/README_PL.md b/docs/README_PL.md
index 1fd43eaa4d..87884e3a68 100644
--- a/docs/README_PL.md
+++ b/docs/README_PL.md
@@ -3,10 +3,7 @@
-
-
-
-
+
diff --git a/extensions/parse_imagepath/ace_parse_imagepath.cpp b/extensions/parse_imagepath/ace_parse_imagepath.cpp
index fa1a8643e7..dc27d60c72 100644
--- a/extensions/parse_imagepath/ace_parse_imagepath.cpp
+++ b/extensions/parse_imagepath/ace_parse_imagepath.cpp
@@ -36,18 +36,17 @@ std::string getImagePathFromStructuredText(const std::string & input) {
return returnValue;
}
-// i like to live dangerously. jk, fix strncpy sometime pls.
#pragma warning( push )
#pragma warning( disable : 4996 )
void __stdcall RVExtension(char *output, int outputSize, const char *function) {
ZERO_OUTPUT();
- if (!strcmp(function, "version")) {
- strncpy(output, ACE_FULL_VERSION_STR, outputSize);
- } else {
- strncpy(output, getImagePathFromStructuredText(function).c_str(), outputSize);
- output[outputSize - 1] = '\0';
- }
+ if (!strcmp(function, "version")) {
+ strncpy_s(output, outputSize, ACE_FULL_VERSION_STR, _TRUNCATE);
+ } else {
+ strncpy_s(output, outputSize, getImagePathFromStructuredText(function).c_str(), _TRUNCATE);
+ output[outputSize - 1] = '\0';
+ }
EXTENSION_RETURN();
}
diff --git a/extras/assets/icons/Icon_Module_png/Icon_Module_UI_ca.png b/extras/assets/icons/Icon_Module_png/Icon_Module_UI_ca.png
new file mode 100644
index 0000000000..e69102a216
Binary files /dev/null and b/extras/assets/icons/Icon_Module_png/Icon_Module_UI_ca.png differ
diff --git a/extras/assets/icons/Icons_Modules.psd b/extras/assets/icons/Icons_Modules.psd
index 553449898a..0da44ea681 100644
Binary files a/extras/assets/icons/Icons_Modules.psd and b/extras/assets/icons/Icons_Modules.psd differ
diff --git a/extras/blank/CfgEventHandlers.hpp b/extras/blank/CfgEventHandlers.hpp
index be284a9d70..93e3311cf2 100644
--- a/extras/blank/CfgEventHandlers.hpp
+++ b/extras/blank/CfgEventHandlers.hpp
@@ -1,4 +1,3 @@
-
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
diff --git a/extras/blank/XEH_PREP.hpp b/extras/blank/XEH_PREP.hpp
index d089cdc8e4..c3a795e293 100644
--- a/extras/blank/XEH_PREP.hpp
+++ b/extras/blank/XEH_PREP.hpp
@@ -1,2 +1 @@
-
PREP(empty);
diff --git a/extras/blank/script_component.hpp b/extras/blank/script_component.hpp
index efce15f539..770711ec9c 100644
--- a/extras/blank/script_component.hpp
+++ b/extras/blank/script_component.hpp
@@ -1,6 +1,11 @@
#define COMPONENT blank
#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_BLANK
#define DEBUG_MODE_FULL
#endif
@@ -9,4 +14,4 @@
#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"
diff --git a/mod.cpp b/mod.cpp
index b146f500b0..a0ee3b211e 100644
--- a/mod.cpp
+++ b/mod.cpp
@@ -1,8 +1,8 @@
-name = "Advanced Combat Environment 3.5.0";
+name = "Advanced Combat Environment 3.5.1";
picture = "logo_ace3_ca.paa";
actionName = "GitHub";
action = "https://github.com/acemod/ACE3";
-description = "ACE3 - Version 3.5.0";
+description = "ACE3 - Version 3.5.1";
logo = "logo_ace3_ca.paa";
logoOver = "logo_ace3_ca.paa";
tooltip = "ACE3";
diff --git a/optionals/compat_rhs_afrf3/CfgAmmo.hpp b/optionals/compat_rhs_afrf3/CfgAmmo.hpp
index ead78866c1..3a00fdea68 100644
--- a/optionals/compat_rhs_afrf3/CfgAmmo.hpp
+++ b/optionals/compat_rhs_afrf3/CfgAmmo.hpp
@@ -202,4 +202,20 @@ class CfgAmmo {
ace_frag_skip = 1;
ace_frag_force = 0;
};
+
+ class G_40mm_HE;
+ class rhs_g_vog25: G_40mm_HE {};
+ class rhs_g_vg40tb: rhs_g_vog25 { //Thermobaric
+ ace_frag_force = 0;
+ };
+ class rhs_g_vg40sz: rhs_g_vog25 { //Flashbang
+ ace_frag_force = 0;
+ };
+ class rhs_GDM40: rhs_g_vog25 { //Smoke
+ ace_frag_force = 0;
+ };
+ class rhs_g_vg40md_white: rhs_g_vog25 { //Smoke
+ ace_frag_force = 0;
+ };
+
};
diff --git a/optionals/compat_rhs_afrf3/CfgEventHandlers.hpp b/optionals/compat_rhs_afrf3/CfgEventHandlers.hpp
new file mode 100644
index 0000000000..93e3311cf2
--- /dev/null
+++ b/optionals/compat_rhs_afrf3/CfgEventHandlers.hpp
@@ -0,0 +1,11 @@
+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/optionals/compat_rhs_afrf3/CfgVehicles.hpp b/optionals/compat_rhs_afrf3/CfgVehicles.hpp
index d0486ecd0e..87d8673cd8 100644
--- a/optionals/compat_rhs_afrf3/CfgVehicles.hpp
+++ b/optionals/compat_rhs_afrf3/CfgVehicles.hpp
@@ -1,4 +1,4 @@
-class cfgVehicles {
+class CfgVehicles {
class LandVehicle;
class Tank: LandVehicle {
class NewTurret;
@@ -201,18 +201,70 @@ class cfgVehicles {
EGVAR(refuel,fuelCapacity) = 3600;
};
- class Heli_Light_02_base_F;
+ class Helicopter_Base_F;
+ class Helicopter_Base_H: Helicopter_Base_F {
+ class EventHandlers;
+ };
+ class Heli_Light_02_base_F: Helicopter_Base_H {};
class RHS_Mi8_base : Heli_Light_02_base_F {
EGVAR(refuel,fuelCapacity) = 3700;
+ EGVAR(fastroping,enabled) = 0;
+ class EventHandlers: EventHandlers {
+ class RHS_EventHandlers;
+ };
+ };
+
+ class RHS_Mi8amt_base: RHS_Mi8_base {
+ EGVAR(fastroping,enabled) = 1;
+ EGVAR(fastroping,ropeOrigins)[] = {{-1.13, 4.67, -0.89}};
+ EGVAR(fastroping,onCut) = QFUNC(onCut);
+ EGVAR(fastroping,onPrepare) = QFUNC(onPrepare);
+
+ class UserActions {
+ class openDoor;
+ class closeDoor_L: openDoor {
+ condition = QUOTE((this doorPhase 'LeftDoor' > 0.5) && {alive this} && {!(this getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)])});
+ };
+ };
+
+ class EventHandlers: EventHandlers {
+ class RHS_EventHandlers: RHS_EventHandlers {
+ getOut = QUOTE(if !((_this select 0) getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)]) then {_this call rhs_fnc_mi8_doors});
+ };
+ };
+ };
+
+ class RHS_Mi8_VVS_Base: RHS_Mi8_base {};
+ class RHS_Mi8mt_vvs: RHS_Mi8_VVS_Base {};
+ class RHS_Mi8mt_Cargo_vvs: RHS_Mi8mt_vvs {
+ EGVAR(fastroping,enabled) = 1;
+ EGVAR(fastroping,ropeOrigins)[] = {{-1.13, 4.67, -0.89}};
+ EGVAR(fastroping,onCut) = QFUNC(onCut);
+ EGVAR(fastroping,onPrepare) = QFUNC(onPrepare);
+
+ class UserActions {
+ class openDoor;
+ class closeDoor_L: openDoor {
+ condition = QUOTE((this doorPhase 'LeftDoor' > 0.5) && {alive this} && {!(this getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)])});
+ };
+ };
+
+ class EventHandlers: EventHandlers {
+ class RHS_EventHandlers: RHS_EventHandlers {
+ getOut = QUOTE(if !((_this select 0) getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)]) then {_this call rhs_fnc_mi8_doors});
+ };
+ };
};
class Heli_Attack_02_base_F;
class RHS_Ka52_base : Heli_Attack_02_base_F {
EGVAR(refuel,fuelCapacity) = 1870;
+ EGVAR(fastroping,enabled) = 0;
};
class RHS_Mi24_base : Heli_Attack_02_base_F {
EGVAR(refuel,fuelCapacity) = 1851;
+ EGVAR(fastroping,enabled) = 0;
};
class rhs_t80b : rhs_tank_base {
diff --git a/optionals/compat_rhs_afrf3/XEH_PREP.hpp b/optionals/compat_rhs_afrf3/XEH_PREP.hpp
new file mode 100644
index 0000000000..cb5a1268d9
--- /dev/null
+++ b/optionals/compat_rhs_afrf3/XEH_PREP.hpp
@@ -0,0 +1,2 @@
+PREP(onCut);
+PREP(onPrepare);
diff --git a/optionals/compat_rhs_afrf3/XEH_preInit.sqf b/optionals/compat_rhs_afrf3/XEH_preInit.sqf
new file mode 100644
index 0000000000..a7feade1c3
--- /dev/null
+++ b/optionals/compat_rhs_afrf3/XEH_preInit.sqf
@@ -0,0 +1,7 @@
+#include "script_component.hpp"
+
+ADDON = false;
+
+#include "XEH_PREP.hpp"
+
+ADDON = true;
diff --git a/optionals/compat_rhs_afrf3/XEH_preStart.sqf b/optionals/compat_rhs_afrf3/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/optionals/compat_rhs_afrf3/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/optionals/compat_rhs_afrf3/config.cpp b/optionals/compat_rhs_afrf3/config.cpp
index 4840f8da82..82873b01e2 100644
--- a/optionals/compat_rhs_afrf3/config.cpp
+++ b/optionals/compat_rhs_afrf3/config.cpp
@@ -6,12 +6,13 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"rhs_c_weapons", "rhs_c_troops", "rhs_c_bmd", "rhs_c_bmp", "rhs_c_bmp3", "rhs_c_a2port_armor", "rhs_c_btr", "rhs_c_sprut", "rhs_c_t72", "rhs_c_tanks", "rhs_c_a2port_air", "rhs_c_a2port_car", "rhs_c_cars", "rhs_c_2s3", "rhs_c_rva"};
- author[]={"Ruthberg", "GitHawk"};
+ author[]={"Ruthberg", "GitHawk", "BaerMitUmlaut"};
VERSION_CONFIG;
};
};
#include "CfgAmmo.hpp"
+#include "CfgEventHandlers.hpp"
#include "CfgMagazines.hpp"
#include "CfgWeapons.hpp"
#include "CfgVehicles.hpp"
diff --git a/optionals/compat_rhs_afrf3/functions/fnc_onCut.sqf b/optionals/compat_rhs_afrf3/functions/fnc_onCut.sqf
new file mode 100644
index 0000000000..6a249a55c4
--- /dev/null
+++ b/optionals/compat_rhs_afrf3/functions/fnc_onCut.sqf
@@ -0,0 +1,23 @@
+/*
+ * Author: BaerMitUmlaut
+ * Function for closing doors and retracting the hooks for RHS USF helos.
+ *
+ * Arguments:
+ * 0: Helicopter
+ *
+ * Return Value:
+ * Amount of time to wait before cutting ropes
+ *
+ * Example:
+ * [_vehicle] call ace_compat_rhs_afrf3_fnc_onCut
+ *
+ * Public: No
+ */
+
+#include "script_component.hpp"
+params ["_vehicle"];
+
+_vehicle setVariable [QEGVAR(fastroping,doorsLocked), false, true];
+_vehicle animateDoor ["LeftDoor", 0];
+
+2
diff --git a/optionals/compat_rhs_afrf3/functions/fnc_onPrepare.sqf b/optionals/compat_rhs_afrf3/functions/fnc_onPrepare.sqf
new file mode 100644
index 0000000000..8a9dc9471e
--- /dev/null
+++ b/optionals/compat_rhs_afrf3/functions/fnc_onPrepare.sqf
@@ -0,0 +1,23 @@
+/*
+ * 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 deploying ropes
+ *
+ * Example:
+ * [_vehicle] call ace_compat_rhs_afrf3_fnc_onPrepare
+ *
+ * Public: No
+ */
+
+#include "script_component.hpp"
+params ["_vehicle"];
+
+_vehicle setVariable [QEGVAR(fastroping,doorsLocked), true, true];
+_vehicle animateDoor ["LeftDoor", 1];
+
+2
diff --git a/optionals/compat_rhs_afrf3/functions/script_component.hpp b/optionals/compat_rhs_afrf3/functions/script_component.hpp
new file mode 100644
index 0000000000..afabd202be
--- /dev/null
+++ b/optionals/compat_rhs_afrf3/functions/script_component.hpp
@@ -0,0 +1 @@
+#include "\z\ace\addons\compat_rhs_afrf3\script_component.hpp"
diff --git a/optionals/compat_rhs_afrf3/script_component.hpp b/optionals/compat_rhs_afrf3/script_component.hpp
index edf3963b1f..307b1f8de6 100644
--- a/optionals/compat_rhs_afrf3/script_component.hpp
+++ b/optionals/compat_rhs_afrf3/script_component.hpp
@@ -1,4 +1,4 @@
-#define COMPONENT rhs_c_weapons_comp
+#define COMPONENT compat_rhs_afrf3
#include "\z\ace\addons\main\script_mod.hpp"
diff --git a/optionals/compat_rhs_usf3/CfgEventHandlers.hpp b/optionals/compat_rhs_usf3/CfgEventHandlers.hpp
new file mode 100644
index 0000000000..93e3311cf2
--- /dev/null
+++ b/optionals/compat_rhs_usf3/CfgEventHandlers.hpp
@@ -0,0 +1,11 @@
+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/optionals/compat_rhs_usf3/CfgVehicles.hpp b/optionals/compat_rhs_usf3/CfgVehicles.hpp
index 87c66f7212..2d3b28fbae 100644
--- a/optionals/compat_rhs_usf3/CfgVehicles.hpp
+++ b/optionals/compat_rhs_usf3/CfgVehicles.hpp
@@ -1,4 +1,17 @@
-class cfgVehicles {
+#define EQUIP_FRIES_ATTRIBUTE class Attributes { \
+ class EGVAR(fastroping,equipFRIES) { \
+ property = QEGVAR(fastroping,equipFRIES); \
+ control = "Checkbox"; \
+ displayName = ECSTRING(fastroping,Eden_equipFRIES); \
+ tooltip = ECSTRING(fastroping,Eden_equipFRIES_Tooltip); \
+ expression = QUOTE([_this] call EFUNC(fastroping,equipFRIES)); \
+ typeName = "BOOL"; \
+ condition = "objectVehicle"; \
+ defaultValue = false; \
+ }; \
+}
+
+class CfgVehicles {
class LandVehicle;
class Tank: LandVehicle {
class NewTurret;
@@ -44,21 +57,117 @@ class cfgVehicles {
ace_repair_hitpointGroups[] = {{"era_1_hitpoint", {"era_2_hitpoint", "era_3_hitpoint", "era_4_hitpoint", "era_5_hitpoint", "era_6_hitpoint", "era_7_hitpoint", "era_8_hitpoint", "era_9_hitpoint", "era_10_hitpoint", "era_11_hitpoint", "era_12_hitpoint", "era_13_hitpoint", "era_14_hitpoint", "era_15_hitpoint", "era_16_hitpoint", "era_17_hitpoint", "era_18_hitpoint", "era_19_hitpoint", "era_20_hitpoint", "era_21_hitpoint", "era_22_hitpoint", "era_23_hitpoint", "era_24_hitpoint", "era_25_hitpoint", "era_26_hitpoint", "era_27_hitpoint", "era_28_hitpoint", "era_29_hitpoint", "era_30_hitpoint", "era_31_hitpoint", "era_32_hitpoint", "era_33_hitpoint", "era_34_hitpoint", "era_35_hitpoint", "era_36_hitpoint", "era_37_hitpoint", "era_38_hitpoint", "era_39_hitpoint", "era_40_hitpoint", "era_41_hitpoint", "era_42_hitpoint", "era_43_hitpoint", "era_44_hitpoint", "era_45_hitpoint", "era_46_hitpoint"}}};
};
- class Heli_light_03_base_F;
+ class Helicopter;
+ class Helicopter_Base_F: Helicopter {
+ class Eventhandlers;
+ };
+ class Heli_Light_03_base_F: Helicopter_Base_F {};
class RHS_UH1_Base: Heli_light_03_base_F {
EGVAR(refuel,fuelCapacity) = 1447;
};
- class Heli_Transport_01_base_F;
+ class RHS_UH1Y_base: RHS_UH1_Base {};
+ class RHS_UH1Y_US_base: RHS_UH1Y_base {};
+ class RHS_UH1Y: RHS_UH1Y_US_base {
+ EGVAR(fastroping,enabled) = 2;
+ EGVAR(fastroping,friesType) = "ACE_friesAnchorBar";
+ EGVAR(fastroping,friesAttachmentPoint)[] = {0, 2.38, -0.135};
+ EGVAR(fastroping,onCut) = QFUNC(onCut);
+ EGVAR(fastroping,onPrepare) = QFUNC(onPrepare);
+ EGVAR(fastroping,ropeOrigins)[] = {"ropeOriginLeft", "ropeOriginRight"};
+
+ class UserActions;
+ class EventHandlers: EventHandlers {
+ class RHSUSF_EventHandlers;
+ };
+
+ EQUIP_FRIES_ATTRIBUTE;
+ };
+ class RHS_UH1Y_FFAR: RHS_UH1Y {
+ class UserActions: UserActions {
+ class OpenCargoDoor;
+ class CloseCargoDoor: OpenCargoDoor {
+ condition = QUOTE([ARR_2(this,'doorRB')] call FUNC(canCloseDoor));
+ };
+ class CloseCargoLDoor: OpenCargoDoor {
+ condition = QUOTE([ARR_2(this,'doorLB')] call FUNC(canCloseDoor));
+ };
+ };
+
+ class EventHandlers: EventHandlers {
+ class RHSUSF_EventHandlers: RHSUSF_EventHandlers {
+ getOut = QUOTE(if !((_this select 0) getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)]) then {_this call rhs_fnc_uh60_doors});
+ };
+ };
+ };
+
+ class Helicopter_Base_H: Helicopter_Base_F {
+ class Eventhandlers;
+ };
+ class Heli_Transport_01_base_F: Helicopter_Base_H {};
class RHS_UH60_Base: Heli_Transport_01_base_F {
EGVAR(refuel,fuelCapacity) = 1360;
};
+ class RHS_UH60M_base: RHS_UH60_Base {};
+ class RHS_UH60M_US_base: RHS_UH60M_base {};
+ class RHS_UH60M: RHS_UH60M_US_base {
+ EGVAR(fastroping,enabled) = 2;
+ EGVAR(fastroping,friesType) = "ACE_friesAnchorBar";
+ EGVAR(fastroping,friesAttachmentPoint)[] = {0, 1.25, -0.65};
+ EGVAR(fastroping,onCut) = QFUNC(onCut);
+ EGVAR(fastroping,onPrepare) = QFUNC(onPrepare);
+ EGVAR(fastroping,ropeOrigins)[] = {"ropeOriginLeft", "ropeOriginRight"};
+
+ class UserActions {
+ class OpenCargoDoor;
+ class CloseCargoDoor: OpenCargoDoor {
+ condition = QUOTE([ARR_2(this,'doorRB')] call FUNC(canCloseDoor));
+ };
+ class CloseCargoLDoor: OpenCargoDoor {
+ condition = QUOTE([ARR_2(this,'doorLB')] call FUNC(canCloseDoor));
+ };
+ };
+ class EventHandlers: EventHandlers {
+ class RHSUSF_EventHandlers {
+ getOut = QUOTE(if !((_this select 0) getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)]) then {_this call rhs_fnc_uh60_doors});
+ };
+ };
+
+ EQUIP_FRIES_ATTRIBUTE;
+ };
+
+ class RHS_UH60M_MEV: RHS_UH60M {
+ EGVAR(fastroping,enabled) = 0;
+ class Attributes {
+ delete EGVAR(fastroping,equipFRIES);
+ };
+ };
+
+ class RHS_UH60M_MEV2: RHS_UH60M_MEV {
+ EGVAR(fastroping,enabled) = 2;
+ EQUIP_FRIES_ATTRIBUTE;
+ };
+
class Heli_Transport_02_base_F;
class RHS_CH_47F_base: Heli_Transport_02_base_F {
EGVAR(refuel,fuelCapacity) = 3914;
};
+ class RHS_CH_47F: RHS_CH_47F_base {
+ EGVAR(fastroping,enabled) = 1;
+ EGVAR(fastroping,ropeOrigins)[] = {{0.5, -7.15, -0.95}, {-0.5, -7.15, -0.95}};
+ EGVAR(fastroping,onCut) = QFUNC(onCut);
+ EGVAR(fastroping,onPrepare) = QFUNC(onPrepare);
+
+ class UserActions {
+ class OpenCargoDoor;
+ class CloseCargoDoor: OpenCargoDoor {
+ condition = QUOTE([ARR_2(this,'ramp_anim')] call FUNC(canCloseDoor));
+ };
+ };
+ };
+
class Heli_Attack_01_base_F;
class RHS_AH1Z_base: Heli_Attack_01_base_F {
EGVAR(refuel,fuelCapacity) = 1600;
diff --git a/optionals/compat_rhs_usf3/XEH_PREP.hpp b/optionals/compat_rhs_usf3/XEH_PREP.hpp
new file mode 100644
index 0000000000..821ee657be
--- /dev/null
+++ b/optionals/compat_rhs_usf3/XEH_PREP.hpp
@@ -0,0 +1,3 @@
+PREP(canCloseDoor);
+PREP(onCut);
+PREP(onPrepare);
diff --git a/optionals/compat_rhs_usf3/XEH_preInit.sqf b/optionals/compat_rhs_usf3/XEH_preInit.sqf
new file mode 100644
index 0000000000..a7feade1c3
--- /dev/null
+++ b/optionals/compat_rhs_usf3/XEH_preInit.sqf
@@ -0,0 +1,7 @@
+#include "script_component.hpp"
+
+ADDON = false;
+
+#include "XEH_PREP.hpp"
+
+ADDON = true;
diff --git a/optionals/compat_rhs_usf3/XEH_preStart.sqf b/optionals/compat_rhs_usf3/XEH_preStart.sqf
new file mode 100644
index 0000000000..022888575e
--- /dev/null
+++ b/optionals/compat_rhs_usf3/XEH_preStart.sqf
@@ -0,0 +1,3 @@
+#include "script_component.hpp"
+
+#include "XEH_PREP.hpp"
diff --git a/optionals/compat_rhs_usf3/config.cpp b/optionals/compat_rhs_usf3/config.cpp
index ce847e969e..ef173ad1c6 100644
--- a/optionals/compat_rhs_usf3/config.cpp
+++ b/optionals/compat_rhs_usf3/config.cpp
@@ -6,12 +6,13 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"rhsusf_c_weapons", "rhsusf_c_troops", "rhsusf_c_m1a1", "rhsusf_c_m1a2", "RHS_US_A2_AirImport", "rhsusf_c_m109", "rhsusf_c_hmmwv", "rhsusf_c_rg33", "rhsusf_c_fmtv", "rhsusf_c_m113", "RHS_US_A2Port_Armor"};
- author[]={"Ruthberg", "GitHawk"};
+ author[]={"Ruthberg", "GitHawk", "BaerMitUmlaut"};
VERSION_CONFIG;
};
};
#include "CfgAmmo.hpp"
+#include "CfgEventHandlers.hpp"
#include "CfgMagazines.hpp"
#include "CfgWeapons.hpp"
#include "CfgVehicles.hpp"
diff --git a/optionals/compat_rhs_usf3/functions/fnc_canCloseDoor.sqf b/optionals/compat_rhs_usf3/functions/fnc_canCloseDoor.sqf
new file mode 100644
index 0000000000..61269519ed
--- /dev/null
+++ b/optionals/compat_rhs_usf3/functions/fnc_canCloseDoor.sqf
@@ -0,0 +1,30 @@
+/*
+ * Author: BaerMitUmlaut
+ * Checks if the door can be closed.
+ *
+ * Arguments:
+ * 0: Helicopter
+ * 1: Door
+ *
+ * Return Value:
+ * Door can be closed
+ *
+ * Example:
+ * [_vehicle, "DoorLB"] call ace_compat_rhs_usf3_fnc_canCloseDoor
+ *
+ * Public: No
+ */
+
+#include "script_component.hpp"
+params ["_vehicle", "_door"];
+
+(_vehicle doorPhase _door > 0) &&
+{alive _vehicle} &&
+{!(_vehicle getVariable [QEGVAR(fastroping,doorsLocked),false])} &&
+{
+ if (_vehicle isKindOf "RHS_CH_47F") then {
+ ACE_player in [driver _vehicle, _vehicle turretUnit [3], _vehicle turretUnit [4]]
+ } else {
+ ACE_player in _vehicle
+ }
+}
diff --git a/optionals/compat_rhs_usf3/functions/fnc_onCut.sqf b/optionals/compat_rhs_usf3/functions/fnc_onCut.sqf
new file mode 100644
index 0000000000..3663a10bd5
--- /dev/null
+++ b/optionals/compat_rhs_usf3/functions/fnc_onCut.sqf
@@ -0,0 +1,36 @@
+/*
+ * Author: BaerMitUmlaut
+ * Function for closing doors and retracting the hooks for RHS USF helos.
+ *
+ * Arguments:
+ * 0: Helicopter
+ *
+ * Return Value:
+ * Amount of time to wait before cutting ropes
+ *
+ * Example:
+ * [_vehicle] call ace_compat_rhs_usf3_fnc_onCut
+ *
+ * Public: No
+ */
+
+#include "script_component.hpp"
+params ["_vehicle"];
+
+_vehicle setVariable [QEGVAR(fastroping,doorsLocked), false, true];
+
+private _fries = _vehicle getVariable [QEGVAR(fastroping,FRIES), objNull];
+if !(isNull _fries) then {
+ _fries animate ["extendHookRight", 0];
+ _fries animate ["extendHookLeft", 0];
+ [{
+ _this animateDoor ["doorRB", 0];
+ _this animateDoor ["doorLB", 0];
+ }, _vehicle, 2] call EFUNC(common,waitAndExecute);
+
+ 4
+} else {
+ _vehicle animateDoor ["ramp_anim", 0];
+
+ 2
+};
diff --git a/optionals/compat_rhs_usf3/functions/fnc_onPrepare.sqf b/optionals/compat_rhs_usf3/functions/fnc_onPrepare.sqf
new file mode 100644
index 0000000000..3e655a0aca
--- /dev/null
+++ b/optionals/compat_rhs_usf3/functions/fnc_onPrepare.sqf
@@ -0,0 +1,38 @@
+/*
+ * 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 deploying ropes
+ *
+ * Example:
+ * [_vehicle] call ace_compat_rhs_usf3_fnc_onPrepare
+ *
+ * Public: No
+ */
+
+#include "script_component.hpp"
+params ["_vehicle"];
+private ["_fries", "_waitTime"];
+
+_vehicle setVariable [QEGVAR(fastroping,doorsLocked), true, true];
+
+_waitTime = 2;
+
+_vehicle animateDoor ["doorRB", 1];
+_vehicle animateDoor ["doorLB", 1];
+_vehicle animateDoor ["ramp_anim", 1];
+
+_fries = _vehicle getVariable [QEGVAR(fastroping,FRIES), objNull];
+if !(isNull _fries) then {
+ [{
+ _this animate ["extendHookRight", 1];
+ _this animate ["extendHookLeft", 1];
+ }, _fries, 2] call EFUNC(common,waitAndExecute);
+ _waitTime = 4;
+};
+
+_waitTime
diff --git a/optionals/compat_rhs_usf3/functions/script_component.hpp b/optionals/compat_rhs_usf3/functions/script_component.hpp
new file mode 100644
index 0000000000..c2cdf03c81
--- /dev/null
+++ b/optionals/compat_rhs_usf3/functions/script_component.hpp
@@ -0,0 +1 @@
+#include "\z\ace\addons\compat_rhs_usf3\script_component.hpp"
diff --git a/optionals/compat_rhs_usf3/script_component.hpp b/optionals/compat_rhs_usf3/script_component.hpp
index c0a5bbf1f4..32aecef74e 100644
--- a/optionals/compat_rhs_usf3/script_component.hpp
+++ b/optionals/compat_rhs_usf3/script_component.hpp
@@ -1,4 +1,4 @@
-#define COMPONENT rhsusf_c_weapons_comp
+#define COMPONENT compat_rhs_usf3
#include "\z\ace\addons\main\script_mod.hpp"
diff --git a/tools/config_style_checker.py b/tools/config_style_checker.py
new file mode 100644
index 0000000000..03d8f222fe
--- /dev/null
+++ b/tools/config_style_checker.py
@@ -0,0 +1,157 @@
+#!/usr/bin/env python3
+
+import fnmatch
+import os
+import re
+import ntpath
+import sys
+import argparse
+
+def check_config_style(filepath):
+ bad_count_file = 0
+ def pushClosing(t):
+ closingStack.append(closing.expr)
+ closing << Literal( closingFor[t[0]] )
+
+ def popClosing():
+ closing << closingStack.pop()
+
+ with open(filepath, 'r', encoding='utf-8', errors='ignore') as file:
+ content = file.read()
+
+ # Store all brackets we find in this file, so we can validate everything on the end
+ brackets_list = []
+
+ # To check if we are in a comment block
+ isInCommentBlock = False
+ checkIfInComment = False
+ # Used in case we are in a line comment (//)
+ ignoreTillEndOfLine = False
+ # Used in case we are in a comment block (/* */). This is true if we detect a * inside a comment block.
+ # If the next character is a /, it means we end our comment block.
+ checkIfNextIsClosingBlock = False
+
+ # We ignore everything inside a string
+ isInString = False
+ # Used to store the starting type of a string, so we can match that to the end of a string
+ inStringType = '';
+
+ lastIsCurlyBrace = False
+ checkForSemiColumn = False
+
+ # Extra information so we know what line we find errors at
+ lineNumber = 1
+
+ indexOfCharacter = 0
+ # Parse all characters in the content of this file to search for potential errors
+ for c in content:
+ if (lastIsCurlyBrace):
+ lastIsCurlyBrace = False
+ if c == '\n': # Keeping track of our line numbers
+ lineNumber += 1 # so we can print accurate line number information when we detect a possible error
+ if (isInString): # while we are in a string, we can ignore everything else, except the end of the string
+ if (c == inStringType):
+ isInString = False
+ # if we are not in a comment block, we will check if we are at the start of one or count the () {} and []
+ elif (isInCommentBlock == False):
+
+ # This means we have encountered a /, so we are now checking if this is an inline comment or a comment block
+ if (checkIfInComment):
+ checkIfInComment = False
+ if c == '*': # if the next character after / is a *, we are at the start of a comment block
+ isInCommentBlock = True
+ elif (c == '/'): # Otherwise, will check if we are in an line comment
+ ignoreTillEndOfLine = True # and an line comment is a / followed by another / (//) We won't care about anything that comes after it
+
+ if (isInCommentBlock == False):
+ if (ignoreTillEndOfLine): # we are in a line comment, just continue going through the characters until we find an end of line
+ if (c == '\n'):
+ ignoreTillEndOfLine = False
+ else: # validate brackets
+ if (c == '"' or c == "'"):
+ isInString = True
+ inStringType = c
+ elif (c == '/'):
+ checkIfInComment = True
+ elif (c == '('):
+ brackets_list.append('(')
+ elif (c == ')'):
+ if (len(brackets_list) > 0 and brackets_list[-1] in ['{', '[']):
+ print("ERROR: Possible missing round bracket ')' detected at {0} Line number: {1}".format(filepath,lineNumber))
+ bad_count_file += 1
+ brackets_list.append(')')
+ elif (c == '['):
+ brackets_list.append('[')
+ elif (c == ']'):
+ if (len(brackets_list) > 0 and brackets_list[-1] in ['{', '(']):
+ print("ERROR: Possible missing square bracket ']' detected at {0} Line number: {1}".format(filepath,lineNumber))
+ bad_count_file += 1
+ brackets_list.append(']')
+ elif (c == '{'):
+ brackets_list.append('{')
+ elif (c == '}'):
+ lastIsCurlyBrace = True
+ if (len(brackets_list) > 0 and brackets_list[-1] in ['(', '[']):
+ print("ERROR: Possible missing curly brace '}}' detected at {0} Line number: {1}".format(filepath,lineNumber))
+ bad_count_file += 1
+ brackets_list.append('}')
+ elif (c== '\t'):
+ print("ERROR: Tab detected at {0} Line number: {1}".format(filepath,lineNumber))
+ bad_count_file += 1
+
+ else: # Look for the end of our comment block
+ if (c == '*'):
+ checkIfNextIsClosingBlock = True;
+ elif (checkIfNextIsClosingBlock):
+ if (c == '/'):
+ isInCommentBlock = False
+ elif (c != '*'):
+ checkIfNextIsClosingBlock = False
+ indexOfCharacter += 1
+
+ if brackets_list.count('[') != brackets_list.count(']'):
+ print("ERROR: A possible missing square bracket [ or ] in file {0} [ = {1} ] = {2}".format(filepath,brackets_list.count('['),brackets_list.count(']')))
+ bad_count_file += 1
+ if brackets_list.count('(') != brackets_list.count(')'):
+ print("ERROR: A possible missing round bracket ( or ) in file {0} ( = {1} ) = {2}".format(filepath,brackets_list.count('('),brackets_list.count(')')))
+ bad_count_file += 1
+ if brackets_list.count('{') != brackets_list.count('}'):
+ print("ERROR: A possible missing curly brace {{ or }} in file {0} {{ = {1} }} = {2}".format(filepath,brackets_list.count('{'),brackets_list.count('}')))
+ bad_count_file += 1
+ return bad_count_file
+
+def main():
+
+ print("Validating Config Style")
+
+ sqf_list = []
+ bad_count = 0
+
+ parser = argparse.ArgumentParser()
+ parser.add_argument('-m','--module', help='only search specified module addon folder', required=False, default="")
+ args = parser.parse_args()
+
+ # Allow running from root directory as well as from inside the tools directory
+ rootDir = "../addons"
+ if (os.path.exists("addons")):
+ rootDir = "addons"
+
+ for root, dirnames, filenames in os.walk(rootDir + '/' + args.module):
+ for filename in fnmatch.filter(filenames, '*.cpp'):
+ sqf_list.append(os.path.join(root, filename))
+ for filename in fnmatch.filter(filenames, '*.hpp'):
+ sqf_list.append(os.path.join(root, filename))
+
+ for filename in sqf_list:
+ bad_count = bad_count + check_config_style(filename)
+
+ print("------\nChecked {0} files\nErrors detected: {1}".format(len(sqf_list), bad_count))
+ if (bad_count == 0):
+ print("Config validation PASSED")
+ else:
+ print("Config validation FAILED")
+
+ return bad_count
+
+if __name__ == "__main__":
+ sys.exit(main())
diff --git a/tools/setup.py b/tools/setup.py
index 62925a6066..af1b224cbb 100644
--- a/tools/setup.py
+++ b/tools/setup.py
@@ -25,19 +25,19 @@ def main():
######################################
This script will create your ACE3 dev environment for you.
-
+
Before you run this, you should already have:
- The Arma 3 Tools installed properly via Steam
- A properly set up P-drive
-
+
If you have not done those things yet, please abort this script in the next step and do so first.
-
+
This script will create two hard links on your system, both pointing to your ACE3 project folder:
[Arma 3 installation directory]\\{} => ACE3 project folder
P:\\{} => ACE3 project folder
-
+
It will also copy the required CBA includes to {}, if you do not have the CBA source code already.""".format(FULLDIR,FULLDIR,CBA))
- print("\n")
+ print("\n")
try:
reg = winreg.ConnectRegistry(None, winreg.HKEY_LOCAL_MACHINE)
@@ -79,12 +79,8 @@ def main():
if not os.path.exists(os.path.join(armapath, MAINDIR)):
os.mkdir(os.path.join(armapath, MAINDIR))
- if platform.win32_ver()[0] == "7":
- subprocess.call(["cmd", "/c", "mklink", "/D", "P:\\{}\\{}".format(MAINDIR,PROJECTDIR), projectpath])
- subprocess.call(["cmd", "/c", "mklink", "/D", os.path.join(armapath, MAINDIR, PROJECTDIR), projectpath])
- else:
- subprocess.call(["cmd", "/c", "mklink", "/D", "/J", "P:\\{}\\{}".format(MAINDIR,PROJECTDIR), projectpath])
- subprocess.call(["cmd", "/c", "mklink", "/D", "/J", os.path.join(armapath, MAINDIR, PROJECTDIR), projectpath])
+ subprocess.call(["cmd", "/c", "mklink", "/J", "P:\\{}\\{}".format(MAINDIR,PROJECTDIR), projectpath])
+ subprocess.call(["cmd", "/c", "mklink", "/J", os.path.join(armapath, MAINDIR, PROJECTDIR), projectpath])
except:
raise
print("Something went wrong during the link creation. Please finish the setup manually.")
diff --git a/tools/sqf_validator.py b/tools/sqf_validator.py
index 7414d7d715..7a905a3315 100644
--- a/tools/sqf_validator.py
+++ b/tools/sqf_validator.py
@@ -50,7 +50,7 @@ def check_sqf_syntax(filepath):
checkForSemiColumn = False
# Extra information so we know what line we find errors at
- lineNumber = 0
+ lineNumber = 1
indexOfCharacter = 0
# Parse all characters in the content of this file to search for potential errors