diff --git a/README.md b/README.md
index 755eaceb30..5630ea8819 100644
--- a/README.md
+++ b/README.md
@@ -17,6 +17,9 @@
+
+
+
Requires the latest version of CBA A3. Visit us on Facebook | YouTube | Twitter | Reddit
diff --git a/addons/backpacks/XEH_preInit.sqf b/addons/backpacks/XEH_preInit.sqf
index a47825d0b0..f4c6a1a5d8 100644
--- a/addons/backpacks/XEH_preInit.sqf
+++ b/addons/backpacks/XEH_preInit.sqf
@@ -3,7 +3,6 @@
ADDON = false;
PREP(backpackOpened);
-PREP(getBackpackAssignedUnit);
PREP(isBackpack);
PREP(onOpenInventory);
diff --git a/addons/backpacks/functions/fnc_getBackpackAssignedUnit.sqf b/addons/backpacks/functions/fnc_getBackpackAssignedUnit.sqf
deleted file mode 100644
index 85f5966aa9..0000000000
--- a/addons/backpacks/functions/fnc_getBackpackAssignedUnit.sqf
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Author: commy2
- *
- * Returns the unit that has the given backpack object equipped.
- *
- * Argument:
- * 0: Executing Unit (Object)
- * 1: A backpack object (Object)
- *
- * Return value:
- * Unit that has the backpack equipped. (Object)
- */
-#include "script_component.hpp"
-scopeName "main";
-
-params ["_unit","_backpack"];
-_target = objNull;
-{
- if (backpackContainer _x == _backpack) then {_target = _x; breakTo "main"};
-} count nearestObjects [_unit, ["Man"], 5];
-if (isNull _target) exitWith {ACE_Player};
-_target
diff --git a/addons/backpacks/functions/fnc_onOpenInventory.sqf b/addons/backpacks/functions/fnc_onOpenInventory.sqf
index d79f8aed9b..afeeb21313 100644
--- a/addons/backpacks/functions/fnc_onOpenInventory.sqf
+++ b/addons/backpacks/functions/fnc_onOpenInventory.sqf
@@ -1,7 +1,7 @@
/*
* Author: commy2
*
- * Handle the open inventory event. Display message on traget client.
+ * Handle the open inventory event. Display message on target client.
*
* Argument:
* Input from "InventoryOpened" eventhandler
@@ -11,16 +11,17 @@
*/
#include "script_component.hpp"
-private "_target";
-params ["","_backpack"];
+params ["_unit","_backpack"];
-// exit if the target is not a backpack
-if !([_backpack] call FUNC(isBackpack)) exitWith {};
+// exit if the target is not a real backpack, i.e. parachute, static weapon bag etc.
+if !([_backpack] call FUNC(isBackpack)) exitWith {false};
// get the unit that wears the backpack object
-_target = _this call FUNC(getBackpackAssignedUnit);
+private "_target";
+_target = objectParent _backpack;
if (isNull _target) exitWith {false};
+
// raise event on target unit
["backpackOpened", _target, [_target, _backpack]] call EFUNC(common,targetEvent);
diff --git a/addons/ballistics/CfgAmmo.hpp b/addons/ballistics/CfgAmmo.hpp
index 5ffe94ac45..eeb64fec47 100644
--- a/addons/ballistics/CfgAmmo.hpp
+++ b/addons/ballistics/CfgAmmo.hpp
@@ -6,23 +6,11 @@ class CfgAmmo {
timeToLive=6;
};
- class B_20mm : BulletBase {
- timeToLive=30;
- };
- class B_25mm : BulletBase {
- timeToLive=30;
- };
- class B_35mm_AA : BulletBase {
- timeToLive=30;
- };
- class B_30mm_AP : BulletBase {
- timeToLive=30;
- };
-
class B_556x45_Ball : BulletBase {
airFriction=-0.00126466;
hit=8;
typicalSpeed=750;
+ tracerScale = 1;
tracerStartTime=0.073; // M856 tracer burns out to 800m
tracerEndTime=1.57123; // Time in seconds calculated with ballistics calculator
ACE_caliber=5.69;
@@ -128,9 +116,13 @@ class CfgAmmo {
ACE_muzzleVelocities[]={785, 883, 925};
ACE_barrelLengths[]={254.0, 414.02, 508.0};
};
+ class B_56x15_dual: BulletBase {
+ tracerScale = 0.5;
+ };
class B_65x39_Caseless : BulletBase {
airFriction=-0.00075308;
typicalSpeed=800;
+ tracerScale = 1.1; //1.0;
ACE_caliber=6.706;
ACE_bulletLength=32.893;
ACE_bulletMass=7.9704;
@@ -180,10 +172,15 @@ class CfgAmmo {
ACE_muzzleVelocities[]={750, 820, 840, 852, 860};
ACE_barrelLengths[]={254.0, 406.4, 508.0, 609.6, 660.4};
};
+ class SubmunitionBullet;
+ class B_65x39_Minigun_Caseless: SubmunitionBullet {
+ tracerScale = 1.1; //1.0;
+ };
class B_762x51_Ball : BulletBase {
airFriction=-0.00100957;
typicalSpeed=833;
hit=9;
+ tracerScale = 1.2; //0.6;
tracerStartTime=0.073; // Based on the British L5A1 which burns out to 1000m
tracerEndTime=2.15957; // Time in seconds calculated with ballistics calculator
ACE_caliber=7.823;
@@ -479,6 +476,7 @@ class CfgAmmo {
class B_9x21_Ball : BulletBase {
airFriction=-0.00226847;
typicalSpeed=390;
+ tracerScale = 0.5;
hit=6;
ACE_caliber=9.042;
ACE_bulletLength=15.494;
@@ -491,6 +489,9 @@ class CfgAmmo {
ACE_muzzleVelocities[]={440, 460, 480};
ACE_barrelLengths[]={101.6, 127.0, 228.6};
};
+ class B_9x21_Ball_Tracer_Green: B_9x21_Ball {
+ tracerScale = 0.5;
+ };
class ACE_9x18_Ball_57N181S : B_9x21_Ball {
hit=5;
airFriction=-0.00190333;
@@ -584,6 +585,7 @@ class CfgAmmo {
timeToLive=10;
airFriction=-0.00038944;
typicalSpeed=910;
+ tracerScale = 1.3; //1.2;
ACE_caliber=10.363;
ACE_bulletLength=54.0;
ACE_bulletMass=26.568;
@@ -670,9 +672,13 @@ class CfgAmmo {
ACE_muzzleVelocities[]={880, 915, 925};
ACE_barrelLengths[]={508.0, 660.4, 711.2};
};
+ class B_127x33_Ball: BulletBase {
+ tracerScale = 1.3; //1.2;
+ };
class B_127x54_Ball : BulletBase {
airFriction=-0.00019268;
typicalSpeed=300;
+ tracerScale = 1.3;//
ACE_caliber=12.954;
ACE_bulletLength=64.516;
ACE_bulletMass=48.6;
@@ -688,6 +694,7 @@ class CfgAmmo {
timeToLive=10;
airFriction=-0.00057503;
typicalSpeed=900;
+ tracerScale = 1.3; //1.2;
ACE_caliber=12.954;
ACE_bulletLength=58.674;
ACE_bulletMass=41.9256;
@@ -703,6 +710,7 @@ class CfgAmmo {
timeToLive=10;
airFriction=-0.00057503;
typicalSpeed=900;
+ tracerScale = 1.3;//
hit=25;
caliber=4.0;
ACE_caliber=12.954;
@@ -736,6 +744,7 @@ class CfgAmmo {
timeToLive=10;
airFriction=-0.00063800;
typicalSpeed=820;
+ tracerScale = 1.3; //1.5;
ACE_caliber=12.979;
ACE_bulletLength=64.008;
ACE_bulletMass=48.276;
@@ -750,6 +759,7 @@ class CfgAmmo {
class B_45ACP_Ball : BulletBase {
airFriction=-0.00081221;
typicalSpeed=250;
+ tracerScale = 0.6;
ACE_caliber=11.481;
ACE_bulletLength=17.272;
ACE_bulletMass=14.904;
@@ -761,4 +771,36 @@ class CfgAmmo {
ACE_muzzleVelocities[]={230, 250, 285};
ACE_barrelLengths[]={101.6, 127.0, 228.6};
};
+ class B_19mm_HE: BulletBase {
+ tracerScale = 1;
+ };
+ class B_30mm_HE: B_19mm_HE {
+ tracerScale = 2.5;
+ };
+ class B_20mm: BulletBase {
+ timeToLive=30;
+ tracerScale = 1.5; //1;
+ };
+ class B_25mm: BulletBase {
+ timeToLive=30;
+ tracerScale = 2.0; //1;
+ };
+ class B_30mm_AP: BulletBase {
+ timeToLive=30;
+ tracerScale = 2.5;
+ };
+ class B_35mm_AA: BulletBase {
+ timeToLive=30;
+ tracerScale = 2.75; //1.85;
+ };
+ class ShellBase;
+ class Sh_120mm_HE: ShellBase {
+ tracerScale = 3;
+ };
+ class Sh_120mm_APFSDS: ShellBase {
+ tracerScale = 3;
+ };
+ class Gatling_30mm_HE_Plane_CAS_01_F: BulletBase {
+ tracerScale = 2.5;
+ };
};
diff --git a/addons/captives/CfgMoves.hpp b/addons/captives/CfgMoves.hpp
index 161fcce9a4..8fa3440706 100644
--- a/addons/captives/CfgMoves.hpp
+++ b/addons/captives/CfgMoves.hpp
@@ -35,6 +35,12 @@ class CfgMovesMaleSdr: CfgMovesBasic {
class CutSceneAnimationBase;
+ #define MACRO_ANIMATION \
+ head = "headDefault"; \
+ aimingBody = "aimingNo"; \
+ forceAim = 1; \
+ static = 1;
+
//Handcuffed Anims:
class ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpScapWnonDnon: CutSceneAnimationBase {
actions = "ACE_CivilStandHandcuffedActions";
@@ -45,6 +51,7 @@ class CfgMovesMaleSdr: CfgMovesBasic {
ConnectTo[] = {"ACE_AmovPercMstpScapWnonDnon",0.1};
InterpolateTo[] = {"Unconscious",0.01,"ACE_AmovPercMstpScapWnonDnon_AmovPercMstpSnonWnonDnon",0.1};
canReload = 0;
+ MACRO_ANIMATION
};
class ACE_AmovPercMstpScapWnonDnon: ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpScapWnonDnon {
file = "\A3\anims_f\Data\Anim\Sdr\mov\erc\stp\non\non\AmovPercMstpSnonWnonDnon_Ease";
@@ -52,12 +59,14 @@ class CfgMovesMaleSdr: CfgMovesBasic {
ConnectTo[] = {"ACE_AmovPercMstpScapWnonDnon_AmovPercMstpSnonWnonDnon",0.1};
InterpolateTo[] = {"Unconscious",0.01};
looped = 1;
+ MACRO_ANIMATION
};
class ACE_AmovPercMstpScapWnonDnon_AmovPercMstpSnonWnonDnon: ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpScapWnonDnon {
actions = "CivilStandActions";
file = "\A3\anims_f\Data\Anim\Sdr\mov\erc\stp\non\non\amovpercmstpsnonwnondnon_easeout";
ConnectTo[] = {"AmovPercMstpSnonWnonDnon",0.1};
InterpolateTo[] = {"Unconscious",0.01,"ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpScapWnonDnon",0.1};
+ MACRO_ANIMATION
};
//Handcuffed-FFV:
@@ -65,6 +74,7 @@ class CfgMovesMaleSdr: CfgMovesBasic {
file = "\A3\cargoposes_F_heli\anim\passenger_flatground_3idleunarmed.rtm";
actions = "ACE_CivilHandCuffedFFVActions";
ConnectTo[] = {};
+ MACRO_ANIMATION
};
@@ -78,6 +88,7 @@ class CfgMovesMaleSdr: CfgMovesBasic {
ConnectTo[] = {"ACE_AmovPercMstpSsurWnonDnon",0.1};
InterpolateTo[] = {"Unconscious",0.01,"ACE_AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon",0.1};
canReload = 0;
+ MACRO_ANIMATION
};
class ACE_AmovPercMstpSsurWnonDnon: ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon {
file = "\A3\anims_f\Data\Anim\Sdr\mov\erc\stp\sur\non\AmovPercMstpSsurWnonDnon";
@@ -85,6 +96,7 @@ class CfgMovesMaleSdr: CfgMovesBasic {
looped = 1;
ConnectTo[] = {"ACE_AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon",0.1};
InterpolateTo[] = {"Unconscious",0.01};
+ MACRO_ANIMATION
};
class ACE_AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon: ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon {
speed = 0.5; //for gameplay reasons, slow this down
@@ -92,6 +104,7 @@ class CfgMovesMaleSdr: CfgMovesBasic {
file = "\A3\anims_f\Data\Anim\Sdr\mov\erc\stp\sur\non\AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon";
ConnectTo[] = {"AmovPercMstpSnonWnonDnon",0.1};
InterpolateTo[] = {"Unconscious",0.01,"ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon",0.1};
+ MACRO_ANIMATION
};
};
};
diff --git a/addons/cargo/functions/fnc_initVehicle.sqf b/addons/cargo/functions/fnc_initVehicle.sqf
index b817688336..efb3b9a5cf 100644
--- a/addons/cargo/functions/fnc_initVehicle.sqf
+++ b/addons/cargo/functions/fnc_initVehicle.sqf
@@ -41,7 +41,7 @@ if (getNumber (configFile >> "CfgVehicles" >> _type >> QGVAR(hasCargo)) != 1) ex
private ["_text", "_condition", "_statement", "_icon", "_action"];
_condition = {
params ["_target", "_player"];
- GVAR(enable) && {[_player, _target, []] call EFUNC(common,canInteractWith)}
+ GVAR(enable) && {locked _target < 2} && {[_player, _target, []] call EFUNC(common,canInteractWith)}
};
_text = localize LSTRING(openMenu);
_statement = {GVAR(interactionVehicle) = _target; createDialog QGVAR(menu);};
diff --git a/addons/common/XEH_postInit.sqf b/addons/common/XEH_postInit.sqf
index 1f060c8900..4a194e0fe9 100644
--- a/addons/common/XEH_postInit.sqf
+++ b/addons/common/XEH_postInit.sqf
@@ -1,4 +1,6 @@
// ACE - Common
+
+// #define ENABLE_PERFORMANCE_COUNTERS
#include "script_component.hpp"
//IGNORE_PRIVATE_WARNING("_handleNetEvent", "_handleRequestAllSyncedEvents", "_handleRequestSyncedEvent", "_handleSyncedEvent");
@@ -148,6 +150,15 @@ call FUNC(checkFiles);
//Event that settings are safe to use:
["SettingsInitialized", []] call FUNC(localEvent);
+ //Set init finished and run all delayed functions:
+ GVAR(settingsInitFinished) = true;
+ diag_log text format ["[ACE] %1 delayed functions running", (count GVAR(runAtSettingsInitialized))];
+ {
+ _x params ["_func", "_params"];
+ _params call _func;
+ } forEach GVAR(runAtSettingsInitialized);
+ GVAR(runAtSettingsInitialized) = nil; //cleanup
+
}, 0, [false]] call CBA_fnc_addPerFrameHandler;
@@ -208,6 +219,7 @@ GVAR(OldVisibleMap) = false;
// PFH to raise varios events
[{
+ BEGIN_COUNTER(stateChecker);
private ["_newCameraView", "_newInventoryDisplayIsOpen", "_newPlayerInventory", "_newPlayerTurret", "_newPlayerVehicle", "_newPlayerVisionMode", "_newPlayerWeapon", "_newZeusDisplayIsOpen", "_newVisibleMap"];
// "playerInventoryChanged" event
_newPlayerInventory = [ACE_player] call FUNC(getAllGear);
@@ -281,25 +293,18 @@ GVAR(OldVisibleMap) = false;
["visibleMapChanged", [ACE_player, _newVisibleMap]] call FUNC(localEvent);
};
+ END_COUNTER(stateChecker);
+
}, 0, []] call CBA_fnc_addPerFrameHandler;
-// PFH to raise camera created event. Only works on these cams by BI.
-#define ALL_CAMERAS [ \
- missionNamespace getVariable ["BIS_DEBUG_CAM", objNull], \
- missionNamespace getVariable ["BIS_fnc_camera_cam", objNull], \
- uiNamespace getVariable ["BIS_fnc_arsenal_cam", objNull], \
- uiNamespace getVariable ["BIS_fnc_animViewer_cam", objNull], \
- missionNamespace getVariable ["BIS_fnc_establishingShot_fakeUAV", objNull] \
-]
-
GVAR(OldIsCamera) = false;
[{
// "activeCameraChanged" event
private ["_isCamera"];
- _isCamera = {!isNull _x} count ALL_CAMERAS > 0;
+ _isCamera = call FUNC(isfeatureCameraActive);
if !(_isCamera isEqualTo GVAR(OldIsCamera)) then {
// Raise ACE event locally
GVAR(OldIsCamera) = _isCamera;
@@ -330,7 +335,7 @@ GVAR(OldIsCamera) = false;
if (didJip) then {
// We are jipping! Get ready and wait, and throw the event
[{
- if(!(isNull player)) then {
+ if((!(isNull player)) && GVAR(settingsInitFinished)) then {
["PlayerJip", [player] ] call FUNC(localEvent);
[(_this select 1)] call cba_fnc_removePerFrameHandler;
};
@@ -381,5 +386,4 @@ GVAR(deviceKeyCurrentIndex) = -1;
{false},
[0xC7, [true, false, false]], false] call cba_fnc_addKeybind; //SHIFT + Home Key
-
GVAR(commonPostInited) = true;
diff --git a/addons/common/XEH_preInit.sqf b/addons/common/XEH_preInit.sqf
index 6fdf99113c..56e3062cd2 100644
--- a/addons/common/XEH_preInit.sqf
+++ b/addons/common/XEH_preInit.sqf
@@ -157,6 +157,7 @@ PREP(requestCallback);
PREP(resetAllDefaults);
PREP(restoreVariablesJIP);
PREP(revertKeyCodeLocalized);
+PREP(runAfterSettingsInit);
PREP(sanitizeString);
PREP(sendRequest);
PREP(serverLog);
@@ -303,6 +304,9 @@ GVAR(nextFrameNo) = diag_frameno;
GVAR(nextFrameBufferA) = [];
GVAR(nextFrameBufferB) = [];
+GVAR(settingsInitFinished) = false;
+GVAR(runAtSettingsInitialized) = [];
+
// @TODO: Generic local-managed global-synced objects (createVehicleLocal)
//Debug
diff --git a/addons/common/functions/fnc_checkFiles.sqf b/addons/common/functions/fnc_checkFiles.sqf
index 647a1b00a6..c1a0b1cb89 100644
--- a/addons/common/functions/fnc_checkFiles.sqf
+++ b/addons/common/functions/fnc_checkFiles.sqf
@@ -20,7 +20,9 @@ _version = getText (configFile >> "CfgPatches" >> "ace_main" >> "versionStr");
diag_log text format ["[ACE]: ACE is version %1.", _version];
private "_addons";
-_addons = activatedAddons;
+//_addons = activatedAddons; // broken with High-Command module, see #2134
+_addons = "true" configClasses (configFile >> "CfgPatches");//
+_addons = [_addons, {toLower configName _this}] call FUNC(map);//
_addons = [_addons, {_this find "ace_" == 0}] call FUNC(filter);
{
@@ -80,7 +82,7 @@ if (isMultiplayer) then {
diag_log text format ["[ACE] ERROR: %1", _errorMsg];
- if (hasInterface) then {diag_log str "1";
+ if (hasInterface) then {
["[ACE] ERROR", _errorMsg, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage);
};
};
@@ -91,7 +93,7 @@ if (isMultiplayer) then {
diag_log text format ["[ACE] ERROR: %1", _errorMsg];
- if (hasInterface) then {diag_log str "1";
+ if (hasInterface) then {
["[ACE] ERROR", _errorMsg, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage);
};
};
diff --git a/addons/common/functions/fnc_runAfterSettingsInit.sqf b/addons/common/functions/fnc_runAfterSettingsInit.sqf
new file mode 100644
index 0000000000..cf3faa1d7e
--- /dev/null
+++ b/addons/common/functions/fnc_runAfterSettingsInit.sqf
@@ -0,0 +1,27 @@
+/*
+ * Author: PabstMirror
+ * Executes code after setting are initilized.
+ *
+ * Argument:
+ * 0: Code to execute
+ * 1: Parameters to run the code with
+ *
+ * Return value:
+ * None
+ *
+ * Example:
+ * [{if (GVAR(setting) then {x} else {y};}, []] call ace_common_fnc_runAfterSettingsInit
+ *
+ * Public: No
+ */
+#include "script_component.hpp"
+
+params ["_func", "_params"];
+
+if (GVAR(settingsInitFinished)) then {
+ //Setting Already Finished, Direct Run the code
+ _params call _func;
+} else {
+ //Waiting on settings, throw it on the delayed run array
+ GVAR(runAtSettingsInitialized) pushBack [_func, _params];
+};
diff --git a/addons/finger/functions/fnc_perFrameEH.sqf b/addons/finger/functions/fnc_perFrameEH.sqf
index d6297a4095..7f0150c492 100644
--- a/addons/finger/functions/fnc_perFrameEH.sqf
+++ b/addons/finger/functions/fnc_perFrameEH.sqf
@@ -41,7 +41,7 @@ _iconSize = BASE_SIZE * _fovCorrection;
_drawColor set [3, ((_drawColor select 3) * (_timeLeftToShow / 0.5))];
};
- drawIcon3D [QUOTE(PATHTOF(UI\fp_icon.paa)), _drawColor, _pos, _iconSize, _iconSize, 0, _name, 1, 0.03, "PuristaMedium"];
+ drawIcon3D [QUOTE(PATHTOF(UI\fp_icon2.paa)), _drawColor, _pos, _iconSize, _iconSize, 0, _name, 1, 0.03, "PuristaMedium"];
};
} count (GVAR(fingersHash) select 0);
diff --git a/addons/finger/ui/fp_icon2.paa b/addons/finger/ui/fp_icon2.paa
new file mode 100644
index 0000000000..4f7fde9f10
Binary files /dev/null and b/addons/finger/ui/fp_icon2.paa differ
diff --git a/addons/goggles/functions/fnc_checkGoggles.sqf b/addons/goggles/functions/fnc_checkGoggles.sqf
index f222ea9881..84b86c3da4 100644
--- a/addons/goggles/functions/fnc_checkGoggles.sqf
+++ b/addons/goggles/functions/fnc_checkGoggles.sqf
@@ -18,7 +18,7 @@
if (!alive ace_player) exitWith {};
if (true) then {
// Detect if curator interface is open and disable effects
- if (!isNull(findDisplay 312)) exitWith {
+ if !(isNull curatorCamera) exitWith {
if (GVAR(EffectsActive)) then {
call FUNC(removeGlassesEffect);
};
diff --git a/addons/goggles/functions/fnc_isGogglesVisible.sqf b/addons/goggles/functions/fnc_isGogglesVisible.sqf
index 253a82f0a3..80f9de4830 100644
--- a/addons/goggles/functions/fnc_isGogglesVisible.sqf
+++ b/addons/goggles/functions/fnc_isGogglesVisible.sqf
@@ -15,17 +15,14 @@
*/
#include "script_component.hpp"
-PARAMS_1(_unit);
-
+params ["_unit"];
private ["_currentGlasses", "_result", "_position", "_visible"];
_currentGlasses = goggles _unit;
_result = false;
-if ((vehicle _unit) != _unit) exitWith {(cameraView != "GUNNER")};
-
if (_currentGlasses != "") then {
- _position =(getPosASLW _unit);
+ _position = getPosASLW _unit;
if (surfaceIsWater _position && {((_position select 2) < 0.25)}) exitWith {
_result = ([_currentGlasses] call FUNC(isDivingGoggles));
};
diff --git a/addons/grenades/CfgAmmo.hpp b/addons/grenades/CfgAmmo.hpp
index 61f20eb935..6cb16b0328 100644
--- a/addons/grenades/CfgAmmo.hpp
+++ b/addons/grenades/CfgAmmo.hpp
@@ -5,87 +5,95 @@ class CfgAmmo {
flareSize = 12;
timeToLive = 60;
};
+
class F_40mm_White: FlareBase {
intensity = 40000;
flareSize = 12;
};
+
class F_20mm_White: FlareBase {
intensity = 20000;
flareSize = 6;
};
+
class F_Signal_Green: FlareBase {
intensity = 20000;
flareSize = 12;
};
+
class Flare_82mm_AMOS_White: FlareCore {
intensity = 80000;
flareSize = 12;
timeToLive = 60;
};
- class F_20mm_Red: F_20mm_White {};
- class F_20mm_Green: F_20mm_White {};
- class F_20mm_Yellow: F_20mm_White {};
-
class ACE_F_Hand_White: F_20mm_White {
- grenadeBurningSound[] = {"SmokeShellSoundLoop1",0.5,"SmokeShellSoundLoop2",0.5};
- grenadeFireSound[] = {"SmokeShellSoundHit1",0.25,"SmokeShellSoundHit2",0.25,"SmokeShellSoundHit3",0.5};
- soundTrigger[] = {"SmokeShellSoundLoop1",0.5,"SmokeShellSoundLoop2",0.5};
- SmokeShellSoundHit1[] = {"A3\Sounds_F\weapons\smokeshell\smoke_1",1.25893,1,100};
- SmokeShellSoundHit2[] = {"A3\Sounds_F\weapons\smokeshell\smoke_2",1.25893,1,100};
- SmokeShellSoundHit3[] = {"A3\Sounds_F\weapons\smokeshell\smoke_3",1.25893,1,100};
- SmokeShellSoundLoop1[] = {"A3\Sounds_F\weapons\smokeshell\smoke_loop1",0.125893,1,70};
- SmokeShellSoundLoop2[] = {"A3\Sounds_F\weapons\smokeshell\smoke_loop2",0.125893,1,70};
- timeToLive = 60;
- };
- class ACE_F_Hand_Red: F_20mm_Red {
- grenadeBurningSound[] = {"SmokeShellSoundLoop1",0.5,"SmokeShellSoundLoop2",0.5};
- grenadeFireSound[] = {"SmokeShellSoundHit1",0.25,"SmokeShellSoundHit2",0.25,"SmokeShellSoundHit3",0.5};
- soundTrigger[] = {"SmokeShellSoundLoop1",0.5,"SmokeShellSoundLoop2",0.5};
- SmokeShellSoundHit1[] = {"A3\Sounds_F\weapons\smokeshell\smoke_1",1.25893,1,100};
- SmokeShellSoundHit2[] = {"A3\Sounds_F\weapons\smokeshell\smoke_2",1.25893,1,100};
- SmokeShellSoundHit3[] = {"A3\Sounds_F\weapons\smokeshell\smoke_3",1.25893,1,100};
- SmokeShellSoundLoop1[] = {"A3\Sounds_F\weapons\smokeshell\smoke_loop1",0.125893,1,70};
- SmokeShellSoundLoop2[] = {"A3\Sounds_F\weapons\smokeshell\smoke_loop2",0.125893,1,70};
- timeToLive = 60;
- };
- class ACE_F_Hand_Green: F_20mm_Green {
- grenadeBurningSound[] = {"SmokeShellSoundLoop1",0.5,"SmokeShellSoundLoop2",0.5};
- grenadeFireSound[] = {"SmokeShellSoundHit1",0.25,"SmokeShellSoundHit2",0.25,"SmokeShellSoundHit3",0.5};
- soundTrigger[] = {"SmokeShellSoundLoop1",0.5,"SmokeShellSoundLoop2",0.5};
- SmokeShellSoundHit1[] = {"A3\Sounds_F\weapons\smokeshell\smoke_1",1.25893,1,100};
- SmokeShellSoundHit2[] = {"A3\Sounds_F\weapons\smokeshell\smoke_2",1.25893,1,100};
- SmokeShellSoundHit3[] = {"A3\Sounds_F\weapons\smokeshell\smoke_3",1.25893,1,100};
- SmokeShellSoundLoop1[] = {"A3\Sounds_F\weapons\smokeshell\smoke_loop1",0.125893,1,70};
- SmokeShellSoundLoop2[] = {"A3\Sounds_F\weapons\smokeshell\smoke_loop2",0.125893,1,70};
- timeToLive = 60;
- };
- class ACE_F_Hand_Yellow: F_20mm_Yellow {
- grenadeBurningSound[] = {"SmokeShellSoundLoop1",0.5,"SmokeShellSoundLoop2",0.5};
- grenadeFireSound[] = {"SmokeShellSoundHit1",0.25,"SmokeShellSoundHit2",0.25,"SmokeShellSoundHit3",0.5};
- soundTrigger[] = {"SmokeShellSoundLoop1",0.5,"SmokeShellSoundLoop2",0.5};
- SmokeShellSoundHit1[] = {"A3\Sounds_F\weapons\smokeshell\smoke_1",1.25893,1,100};
- SmokeShellSoundHit2[] = {"A3\Sounds_F\weapons\smokeshell\smoke_2",1.25893,1,100};
- SmokeShellSoundHit3[] = {"A3\Sounds_F\weapons\smokeshell\smoke_3",1.25893,1,100};
- SmokeShellSoundLoop1[] = {"A3\Sounds_F\weapons\smokeshell\smoke_loop1",0.125893,1,70};
- SmokeShellSoundLoop2[] = {"A3\Sounds_F\weapons\smokeshell\smoke_loop2",0.125893,1,70};
timeToLive = 60;
};
- class ACE_G_M84: F_20mm_Yellow {
- useFlare = 0;
- flareSize = 0;
- intensity = 0;
- grenadeBurningSound[] = {"SmokeShellSoundLoop1",0.5,"SmokeShellSoundLoop2",0.5};
- grenadeFireSound[] = {"SmokeShellSoundHit1",0.25,"SmokeShellSoundHit2",0.25,"SmokeShellSoundHit3",0.5};
- soundTrigger[] = {"SmokeShellSoundLoop1",0.5,"SmokeShellSoundLoop2",0.5};
- SmokeShellSoundHit1[] = {"A3\Sounds_F\weapons\smokeshell\smoke_1",1.25893,1,100};
- SmokeShellSoundHit2[] = {"A3\Sounds_F\weapons\smokeshell\smoke_2",1.25893,1,100};
- SmokeShellSoundHit3[] = {"A3\Sounds_F\weapons\smokeshell\smoke_3",1.25893,1,100};
- SmokeShellSoundLoop1[] = {"A3\Sounds_F\weapons\smokeshell\smoke_loop1",0.125893,1,70};
- SmokeShellSoundLoop2[] = {"A3\Sounds_F\weapons\smokeshell\smoke_loop2",0.125893,1,70};
- timeToLive = 6;
- fuseDistance = 2.3;
+ class F_20mm_Red;
+ class ACE_F_Hand_Red: F_20mm_Red {
+ timeToLive = 60;
+ };
+
+ class F_20mm_Green;
+ class ACE_F_Hand_Green: F_20mm_Green {
+ timeToLive = 60;
+ };
+
+ class F_20mm_Yellow;
+ class ACE_F_Hand_Yellow: F_20mm_Yellow {
+ timeToLive = 60;
+ };
+
+ class SmokeShell;
+ class ACE_G_Handflare_White: SmokeShell {
+ GVAR(flare) = 1;
+ GVAR(color)[] = {0.5,0.5,0.5,0.5};
+ model = "\A3\weapons_f\ammo\flare_white";
+ dangerRadiusHit = -1;
+ suppressionRadiusHit = -1;
+ typicalSpeed = 22;
+ cost = 100;
+ deflecting = 30;
+ explosionTime = 3;
+ timeToLive = 60;
+ grenadeFireSound[] = {};
+ grenadeBurningSound[] = {};
+ aiAmmoUsageFlags = "4 + 2";
+ smokeColor[] = {0,0,0,0};
+ effectsSmoke = "ACE_HandFlareEffect";
+ whistleDist = 0;
+ };
+ class ACE_G_Handflare_Red: ACE_G_Handflare_White {
+ GVAR(color)[] = {0.5,0.25,0.25,0.5};
+ model = "\A3\weapons_f\ammo\flare_red";
+ };
+ class ACE_G_Handflare_Green: ACE_G_Handflare_White {
+ GVAR(color)[] = {0.25,0.5,0.25,0.5};
+ model = "\A3\weapons_f\ammo\flare_green";
+ };
+ class ACE_G_Handflare_Yellow: ACE_G_Handflare_White {
+ GVAR(color)[] = {0.5,0.5,0.25,0.5};
+ model = "\A3\weapons_f\ammo\flare_yellow";
+ };
+
+ class ACE_G_M84: SmokeShell {
+ GVAR(flashbang) = 1;
model = PATHTOF(models\ACE_m84_thrown.p3d);
+ dangerRadiusHit = -1;
+ suppressionRadiusHit = 20;
+ typicalSpeed = 22;
+ cost = 40;
+ explosive = 1E-7;
+ deflecting = 15;
+ explosionTime = 2.3;
+ timeToLive = 6;
+ grenadeFireSound[] = {};
+ grenadeBurningSound[] = {};
+ aiAmmoUsageFlags = "0";
+ smokeColor[] = {0,0,0,0};
+ effectsSmoke = "ACE_M84FlashbangEffect";
+ whistleDist = 0;
};
};
diff --git a/addons/grenades/CfgMagazines.hpp b/addons/grenades/CfgMagazines.hpp
index 31e80dc545..16dd9929ff 100644
--- a/addons/grenades/CfgMagazines.hpp
+++ b/addons/grenades/CfgMagazines.hpp
@@ -1,3 +1,4 @@
+
class CfgMagazines {
class HandGrenade;
class ACE_HandFlare_Base: HandGrenade {
@@ -8,55 +9,60 @@ class CfgMagazines {
mass = 4;
initSpeed = 22;
};
+
class ACE_HandFlare_White: ACE_HandFlare_Base {
author = ECSTRING(common,ACETeam);
scope = 2;
- ammo = "ACE_F_Hand_White";
displayname = CSTRING(M127A1_White_Name);
descriptionshort = CSTRING(M127A1_White_Description);
displayNameShort = CSTRING(M127A1_White_NameShort);
model = "\A3\weapons_f\ammo\flare_white";
picture = "\A3\Weapons_F\Data\UI\gear_flare_white_ca.paa";
+ ammo = "ACE_G_Handflare_White";
};
+
class ACE_HandFlare_Red: ACE_HandFlare_Base {
author = ECSTRING(common,ACETeam);
scope = 2;
- ammo = "ACE_F_Hand_Red";
displayname = CSTRING(M127A1_Red_Name);
descriptionshort = CSTRING(M127A1_Red_Description);
displayNameShort = CSTRING(M127A1_Red_NameShort);
model = "\A3\weapons_f\ammo\flare_red";
picture = "\A3\Weapons_F\Data\UI\gear_flare_red_ca.paa";
+ ammo = "ACE_G_Handflare_Red";
};
+
class ACE_HandFlare_Green: ACE_HandFlare_Base {
author = ECSTRING(common,ACETeam);
scope = 2;
- ammo = "ACE_F_Hand_Green";
displayname = CSTRING(M127A1_Green_Name);
descriptionshort = CSTRING(M127A1_Green_Description);
displayNameShort = CSTRING(M127A1_Green_NameShort);
model = "\A3\weapons_f\ammo\flare_green";
picture = "\A3\Weapons_F\Data\UI\gear_flare_green_ca.paa";
+ ammo = "ACE_G_Handflare_Green";
};
+
class ACE_HandFlare_Yellow: ACE_HandFlare_Base {
author = ECSTRING(common,ACETeam);
scope = 2;
- ammo = "ACE_F_Hand_Yellow";
displayname = CSTRING(M127A1_Yellow_Name);
descriptionshort = CSTRING(M127A1_Yellow_Description);
displayNameShort = CSTRING(M127A1_Yellow_NameShort);
model = "\A3\weapons_f\ammo\flare_yellow";
picture = "\A3\Weapons_F\Data\UI\gear_flare_yellow_ca.paa";
+ ammo = "ACE_G_Handflare_Yellow";
};
+
class ACE_M84: HandGrenade {
author = ECSTRING(common,ACETeam);
- ammo = "ACE_G_M84";
displayname = CSTRING(M84_Name);
descriptionshort = CSTRING(M84_Description);
displayNameShort = "M84";
- mass = 4;
model = PATHTOF(models\ACE_m84.p3d);
picture = PATHTOF(UI\ACE_m84_x_ca.paa);
+ ammo = "ACE_G_M84";
+ mass = 4;
};
class 3Rnd_UGL_FlareGreen_F;
@@ -65,6 +71,7 @@ class CfgMagazines {
ammo = "F_40mm_Green";
initSpeed = 120;
};
+
class 6Rnd_RedSignal_F: 6Rnd_GreenSignal_F {
author = ECSTRING(common,ACETeam);
ammo = "F_40mm_Red";
diff --git a/addons/grenades/Effects.hpp b/addons/grenades/Effects.hpp
new file mode 100644
index 0000000000..3cbcef9a38
--- /dev/null
+++ b/addons/grenades/Effects.hpp
@@ -0,0 +1,8 @@
+
+class ACE_M84FlashbangEffect {
+ // empty
+};
+
+class ACE_HandFlareEffect {
+ // empty
+};
diff --git a/addons/grenades/XEH_preInit.sqf b/addons/grenades/XEH_preInit.sqf
index 0df2e235fd..631cecca85 100644
--- a/addons/grenades/XEH_preInit.sqf
+++ b/addons/grenades/XEH_preInit.sqf
@@ -2,6 +2,7 @@
ADDON = false;
+PREP(flare);
PREP(flashbangExplosionEH);
PREP(flashbangThrownFuze);
PREP(nextMode);
diff --git a/addons/grenades/config.cpp b/addons/grenades/config.cpp
index c2a899d66c..2f9e631fe1 100644
--- a/addons/grenades/config.cpp
+++ b/addons/grenades/config.cpp
@@ -17,3 +17,5 @@ class CfgPatches {
#include "CfgWeapons.hpp"
#include "CfgMagazines.hpp"
#include "CfgVehicles.hpp"
+
+#include "Effects.hpp"
diff --git a/addons/grenades/functions/fnc_flare.sqf b/addons/grenades/functions/fnc_flare.sqf
new file mode 100644
index 0000000000..bf1d571640
--- /dev/null
+++ b/addons/grenades/functions/fnc_flare.sqf
@@ -0,0 +1,40 @@
+/*
+ * Author: commy2
+ * Makes flare shine.
+ *
+ * Arguments:
+ * 0: The flare