diff --git a/addons/explosives/XEH_postInit.sqf b/addons/explosives/XEH_postInit.sqf index 18f9a9ef0d..bee84c5b0f 100644 --- a/addons/explosives/XEH_postInit.sqf +++ b/addons/explosives/XEH_postInit.sqf @@ -22,7 +22,9 @@ _this call FUNC(setPosition); if (isServer) then { - _explosive setShotParents [_unit, _unit]; + if (missionNamespace getVariable [QGVAR(setShotParents), true]) then { + _explosive setShotParents [_unit, _unit]; + }; }; }] call CBA_fnc_addEventHandler; [QGVAR(startDefuse), FUNC(startDefuse)] call CBA_fnc_addEventHandler; @@ -33,7 +35,9 @@ if (isServer) then { [QGVAR(detonate), { params ["_unit", "_explosive", "_delay"]; TRACE_3("server detonate EH",_unit,_explosive,_delay); - _explosive setShotParents [_unit, _unit]; + if (missionNamespace getVariable [QGVAR(setShotParents), true]) then { + _explosive setShotParents [_unit, _unit]; + }; [{ params ["_explosive"]; TRACE_1("exploding",_explosive); diff --git a/docs/wiki/framework/explosives-framework.md b/docs/wiki/framework/explosives-framework.md index af635fe508..9d943e3eee 100644 --- a/docs/wiki/framework/explosives-framework.md +++ b/docs/wiki/framework/explosives-framework.md @@ -204,3 +204,12 @@ Jammer that blocks RF triggers: true }] call ace_explosives_fnc_addDetonateHandler; ``` + +#### 5.4 Disabling `setShotParents`. + +ACE will set the owner/instigator of the explosive to the unit placeing/detonating it. +This can be disabled by executing + +```sqf +ace_explosives_setShotParents = false; +```