diff --git a/addons/frag/XEH_postInit.sqf b/addons/frag/XEH_postInit.sqf index 6209f17e0e6..5e2ac8aac02 100644 --- a/addons/frag/XEH_postInit.sqf +++ b/addons/frag/XEH_postInit.sqf @@ -6,6 +6,12 @@ if (isServer) then { call FUNC(initBlackList); call FUNC(initMaterialCache); + [ + QEGVAR(common,setShotParents), + { + (_this#0) setVariable [QGVAR(shotParent), [_this#1, _this#2]]; + } + ] call CBA_fnc_addEventHandler; }; #ifdef DEBUG_MODE_DRAW diff --git a/addons/frag/functions/fnc_initRound.sqf b/addons/frag/functions/fnc_initRound.sqf index 51c4920533d..b37333cd64d 100644 --- a/addons/frag/functions/fnc_initRound.sqf +++ b/addons/frag/functions/fnc_initRound.sqf @@ -31,7 +31,7 @@ if (GVAR(enabled) && {_ammo call FUNC(shouldFrag)}) then { "Explode", { params ["_projectile", "_posASL", "_velocity"]; - private _shotParents = getShotParents _projectile; + private _shotParents = _projectile getVariable [QGVAR(shotParent), getShotParents _projectile]; private _ammo = typeOf _projectile; // wait for frag damage to kill units before spawning fragments [