Explosives - Fix incorrect shotParents (#9171)

* Update fnc_setupExplosive.sqf

- Added `setShotParents` to the resulting explosive, enabling support for kill tracking

* Add setShotParents to fnc_placeExplosive

* Remove setShotParents from fnc_setupExplosive

* Move setShotParents into place event

* fix tabs

---------

Co-authored-by: PabstMirror <pabstmirror@gmail.com>
This commit is contained in:
Cre8or 2023-05-01 00:06:44 +02:00 committed by GitHub
parent 52842b6f14
commit 19e72d7b71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,7 +16,15 @@
*/
//Event for setting explosive placement angle/pitch:
[QGVAR(place), {_this call FUNC(setPosition)}] call CBA_fnc_addEventHandler;
[QGVAR(place), {
params ["_explosive", "", "", "_unit"];
_this call FUNC(setPosition);
if (isServer) then {
_explosive setShotParents [_unit, _unit];
};
}] call CBA_fnc_addEventHandler;
[QGVAR(startDefuse), FUNC(startDefuse)] call CBA_fnc_addEventHandler;
//When getting knocked out in medical, trigger deadman explosives: