Explosives - Add getVar to disable setShotParents (#9190)

* Explosives - Add getVar to disable setShotParents

* Update docs/wiki/framework/explosives-framework.md
This commit is contained in:
PabstMirror 2023-05-03 11:55:02 -05:00 committed by GitHub
parent fedefd5799
commit 2e54ee7bee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 2 deletions

View File

@ -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);

View File

@ -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;
```