Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .hemtt/launch.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,11 @@ parameters = [
"-setThreadCharacteristics",
"-limitFPS=144",
]
executable = "arma3serverprofiling_x64"
executable = "arma3serverprofiling_x64"

[zen]
extends = "dev"

workshop = [
"1779063631" # Zeus Enhanced
]
20 changes: 8 additions & 12 deletions .hemtt/missions/0000_IEDD_NOTEBOOK_TEST.Stratis/mission.sqm
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ class EditorData
scaleGridStep=1;
autoGroupingDist=10;
toggles=5;
mods[]=
{
"3denEnhanced"
};
class ItemIDProvider
{
nextID=4;
Expand All @@ -15,22 +19,21 @@ class EditorData
pos[]={1913.8051,53.913181,5762.4653};
dir[]={-0.63605744,-0.74849755,-0.18761359};
up[]={-0.71791911,0.66313916,-0.21175961};
aside[]={-0.28291476,6.9077942e-008,0.95915174};
aside[]={-0.28291476,6.9077942e-08,0.95915174};
};
};
binarizationWanted=0;
sourceName="0000_iedd_notebook_test";
addons[]=
{
"A3_Characters_F",
"ace_explosives",
"A3_Modules_F_Curator_Curator"
};
class AddonsMetaData
{
class List
{
items=3;
items=2;
class Item0
{
className="A3_Characters_F";
Expand All @@ -39,13 +42,6 @@ class AddonsMetaData
url="https://www.arma3.com";
};
class Item1
{
className="ace_explosives";
name="ACE3 - Explosives";
author="ACE-Team";
url="https://ace3.acemod.org/";
};
class Item2
{
className="A3_Modules_F_Curator";
name="Arma 3 Zeus Update - Scripted Modules";
Expand Down Expand Up @@ -144,14 +140,14 @@ class Mission
};
id=1;
type="B_soldier_exp_F";
atlOffset=4.7683716e-007;
atlOffset=4.7683716e-07;
};
};
class Attributes
{
};
id=0;
atlOffset=4.7683716e-007;
atlOffset=4.7683716e-07;
};
class Item1
{
Expand Down
2 changes: 2 additions & 0 deletions addons/ied/XEH_PREP.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ PREP(disarmAction);
PREP(dud);
PREP(dudWires);
PREP(explosion);
PREP(forceDefuse);
PREP(getDigActions);
PREP(getTrainingActions);
PREP(handleEntityCreated);
Expand All @@ -45,6 +46,7 @@ PREP(openCloseBucket);
PREP(removeEvents);
PREP(resetAction);
PREP(setAttributes);
PREP(setBury);
PREP(sides_onAttributeLoad);
PREP(suicide);
PREP(suicideAct);
Expand Down
9 changes: 9 additions & 0 deletions addons/ied/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,14 @@
TRACE_2("Defused: ",_unit,_object);
}] call CBA_fnc_addEventHandler;

[QGVAR(forceDefuse), {
_this call FUNC(forceDefuse);
}] call CBA_fnc_addEventHandler;

[QGVAR(setBury), {
_this call FUNC(setBury);
}] call CBA_fnc_addEventHandler;

[QGVAR(addLocal), {
params ["_unit"];
private _killedEhId = _unit getVariable [QGVAR(KilledEhId), -1];
Expand Down Expand Up @@ -144,6 +152,7 @@
_bombObj setDir _dir;
_bombObj setVectorDirAndUp _vectorDirAndUp;
_bombObj setPosATL _pos;
{_x addCuratorEditableObjects [[_bombObj], true]} forEach allCurators;
}] call CBA_fnc_addEventHandler;

if (isServer) then {
Expand Down
55 changes: 55 additions & 0 deletions addons/ied/functions/fnc_forceDefuse.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#include "..\script_component.hpp"
/*
* Author: IEDD
* Marks the given IED(s) as defused, skipping the wire-cutting sequence entirely.
* Mirrors the "all wires cut correctly" branch of fnc_cutWire.sqf.
*
* Arguments:
* 0: IED objects <ARRAY of OBJECTS>
* 1: Player to attribute the defuse to (optional) <OBJECT>
*
* Return Value:
* None
*
* Public: Server only
*/

params ["_objects", ["_player", objNull, [objNull]]];

{
private _bombObj = _x;

if !(_bombObj getVariable [QGVAR(bomb), false]) exitWith {};

_bombObj setVariable [QGVAR(bomb), false, true];

// Wires are normally deleted one by one as they're cut (fnc_cutWire.sqf); do that in one go here
{
if !(isNull _x) then {
deleteVehicle _x;
};
} forEach (_bombObj getVariable [QGVAR(wires), []]);
_bombObj setVariable [QGVAR(wires), [], true];

private _attachedObjects = attachedObjects _bombObj;
private _index = _attachedObjects findIf {typeOf _x == QGVAR(Charge_Ammo)};
if (_index > -1) then {
deleteVehicle (_attachedObjects select _index);
};

private _typeOf = typeOf _bombObj;
if (_typeOf == QGVAR(Charge)) then {
private _unit = attachedTo _bombObj;
private _jipId = [QGVAR(detachAction), [_bombObj]] call CBA_fnc_globalEventJIP;
[_jipId, _bombObj] call CBA_fnc_removeGlobalEventJIP;
[QGVAR(events), [_unit]] call CBA_fnc_serverEvent;
};
if (_typeOf == QEGVAR(vbied,box)) then {
private _vehicle = attachedTo _bombObj;
[QEGVAR(vbied,events), [_vehicle]] call CBA_fnc_serverEvent;
private _jipId = [QEGVAR(vbied,detachAction), [_bombObj, _vehicle]] call CBA_fnc_globalEventJIP;
[_jipId, _bombObj] call CBA_fnc_removeGlobalEventJIP;
};

[QGVAR(defused), [_player, _bombObj]] call CBA_fnc_globalEvent;
} forEach _objects;
40 changes: 40 additions & 0 deletions addons/ied/functions/fnc_setBury.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#include "..\script_component.hpp"
/*
* Author: IEDD
* Buries or unburies the given IED(s) directly, without the interactive Zeus "Bury IED"
* module dialog. Reuses fnc_buryIED.sqf for the actual position/rotation math.
*
* Arguments:
* 0: IED objects <ARRAY of OBJECTS>
* 1: Depth in steps, 0-20; 0 unburies and restores the original position <NUMBER>
* 2: [Vector Dir, Vector Up] to bury at, defaults to each object's current orientation (optional) <ARRAY>
*
* Return Value:
* None
*
* Public: Server only
*/

params ["_objects", ["_depth", 10, [0]], ["_vectorDirUp", [], [[]]]];

{
private _ied = _x;
private _isBury = _ied getVariable [QGVAR(isBury), false];

if (_depth > 0 && {_isBury}) exitWith {}; // already buried
if (_depth <= 0 && {!_isBury}) exitWith {}; // already unburied

if (_depth > 0) then {
private _vectorDir = if (_vectorDirUp isEqualTo []) then {vectorDir _ied} else {_vectorDirUp select 0};
private _vectorUp = if (_vectorDirUp isEqualTo []) then {vectorUp _ied} else {_vectorDirUp select 1};
_ied setVariable [QGVAR(bury), [_depth, _vectorDir, _vectorUp]];
_ied setVariable [QGVAR(isBury), true, true];
} else {
// Keep the stored pre-bury vectorDir/vectorUp so fnc_buryIED.sqf restores the original orientation
private _bury = _ied getVariable [QGVAR(bury), [0, vectorDir _ied, vectorUp _ied]];
_bury set [0, 0];
_ied setVariable [QGVAR(bury), _bury];
};

[_ied] call FUNC(buryIED);
} forEach _objects;
12 changes: 12 additions & 0 deletions addons/main/script_classes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,18 @@
"iedd_ied_Bucket"\
]

#define IEDD_TRAINING_CLASSES [\
"iedd_ied_Training_CanisterPlastic",\
"iedd_ied_Training_CanisterFuel",\
"iedd_ied_Training_Cardboard",\
"iedd_ied_Training_Cinder",\
"iedd_ied_Training_Metal",\
"iedd_ied_Training_Metal_English",\
"iedd_ied_Training_Barrel",\
"iedd_ied_Training_Barrel_Grey",\
"iedd_ied_Training_Bucket"\
]

#define IEDD_FAKE_CLASSES [\
"iedd_ied_CanisterPlastic_Fake",\
"iedd_ied_CanisterFuel_Fake",\
Expand Down
17 changes: 17 additions & 0 deletions addons/modules/XEH_PREP.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
PREP(attributes);
PREP(activateVbied);
PREP(explodeVbied);
PREP(makeSuicideBomber);
PREP(moduleActivate);
PREP(moduleExplode);
PREP(multi);
Expand All @@ -14,3 +15,19 @@ PREP(setSuicide);
PREP(setVbied);
PREP(sliderMove);
PREP(vbiedSelected);
PREP(zenActivateIed);
PREP(zenConfirmBury);
PREP(zenConfirmPlaceIed);
PREP(zenConfirmSuicide);
PREP(zenConfirmTraining);
PREP(zenDigUpIed);
PREP(zenExplodeIed);
PREP(zenForceDefuseIed);
PREP(zenIedTypes);
PREP(zenOpenBuryDialog);
PREP(zenOpenPlaceDialog);
PREP(zenOpenSuicideDialog);
PREP(zenOpenTrainingDialog);
PREP(zenRegisterActions);
PREP(zenResetTrainingIed);
PREP(zenTrainingIedTypes);
1 change: 1 addition & 0 deletions addons/modules/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
_bombObj setVariable ["iedd_ied_openCloseEOD",_oce];
_bombObj setVariable ["iedd_ied_openClose",_oc];
};
{_x addCuratorEditableObjects [[_bombObj], true]} forEach allCurators;
}] call CBA_fnc_addEventHandler;

[QGVAR(explode), {
Expand Down
3 changes: 2 additions & 1 deletion addons/modules/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ ADDON = false;
PREP_RECOMPILE_START;
#include "XEH_PREP.hpp"
PREP_RECOMPILE_END;


#include "initSettings.inc.sqf"

ADDON = true;
46 changes: 46 additions & 0 deletions addons/modules/functions/fnc_makeSuicideBomber.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#include "..\script_component.hpp"
/*
* Author: IEDD
* Turns the given unit into a suicide bomber. Same effect as the interactive Zeus
* "Set Suicide" module's confirm action (fnc_setSuicide.sqf), callable directly.
*
* Arguments:
* 0: Unit <OBJECT>
* 1: Variation, 0-4 real or 5+ for random <NUMBER>
* 2: Dud chance, 0-1 <NUMBER>
* 3: Size, 0-3 real or 4+ for random <NUMBER>
* 4: Activation distance <NUMBER>
* 5: Explosion distance <NUMBER>
* 6: Sides, 4 elements each either -1 (excluded) or its own index (included) <ARRAY>
* 7: Dead man switch <BOOL>
*
* Return Value:
* None
*
* Public: No
*/

params ["_unit", "_variation", "_dud", "_size", "_actDist", "_expDist", "_sides", "_isDms"];

if !(_unit isKindOf "CAManBase") exitWith {};
if !(alive _unit) exitWith {};
if (_unit getVariable [QEGVAR(ied,isCharge), false]) exitWith {};

if (_size > 3) then {
_size = selectRandom [0, 1, 2, 3];
};

// These variables belong to the "ied" component's namespace (read by EFUNC(ied,charge) and friends),
// even though this helper - like the original Zeus module it replaces - lives in "modules"
_unit setVariable [QEGVAR(ied,isSuicide), true, true];
_unit setVariable [QEGVAR(ied,c_variation), _variation, true];
_unit setVariable [QEGVAR(ied,c_dud), _dud, true];
_unit setVariable [QEGVAR(ied,c_size), _size, true];
_unit setVariable [QEGVAR(ied,actDist), _actDist, true];
_unit setVariable [QEGVAR(ied,expDist), _expDist, true];
_unit setVariable [QEGVAR(ied,sides), _sides, true];
_unit setVariable [QEGVAR(ied,isDeadManSwitch), _isDms, true];

[QGVAR(addBombVest), [_unit, true]] call CBA_fnc_serverEvent;
_unit setVariable [QEGVAR(ied,isCharge), true, true];
[QGVAR(remove), [_unit], _unit] call CBA_fnc_targetEvent;
20 changes: 20 additions & 0 deletions addons/modules/functions/fnc_zenActivateIed.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#include "..\script_component.hpp"
/*
* Author: IEDD
* ZEN context menu statement: activates the selected/hovered IED(s), respecting their dud chance.
* Mirrors fnc_moduleActivate.sqf, retargeted at the ZEN selection instead of an attached logic.
*
* Arguments:
* 0: Objects <ARRAY>
*
* Return Value:
* None
*
* Public: No
*/

params ["_objects"];

{
[QEGVAR(ied,explosion), [_x]] call CBA_fnc_serverEvent;
} forEach (_objects select {typeOf _x in IEDD_CLASSES});
33 changes: 33 additions & 0 deletions addons/modules/functions/fnc_zenConfirmBury.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#include "..\script_component.hpp"
/*
* Author: IEDD
* Confirm handler for the ZEN "Bury IED" dialog.
* Applies the chosen pitch/roll/yaw/depth to all matched objects, reusing fnc_buryIED.sqf
* for the actual positioning - the same math the interactive Zeus module uses, applied at once.
*
* Arguments:
* 0: Dialog return values <ARRAY>
* 1: Objects <ARRAY> (passed through from fnc_zenOpenBuryDialog.sqf)
*
* Return Value:
* None
*
* Public: No
*/

params ["_values", "_objects"];
_values params ["_pitch", "_roll", "_yaw", "_depth"];

// Same pitch/roll/yaw -> vectorDir/vectorUp conversion as the Zeus module's slider handler
private _vectorDir = [
sin(_yaw) * cos(_pitch),
cos(_yaw) * cos(_pitch),
sin(_pitch)
];
private _vectorUp = [
(-sin(_roll) * cos(_yaw)) - (cos(_roll) * sin(_pitch) * sin(_yaw)),
( sin(_roll) * sin(_yaw)) - (cos(_roll) * sin(_pitch) * cos(_yaw)),
cos(_roll) * cos(_pitch)
];

[QEGVAR(ied,setBury), [_objects, _depth, [_vectorDir, _vectorUp]]] call CBA_fnc_serverEvent;
Loading