Skip to content

Commit

Permalink
Shot parent possible fix #1
Browse files Browse the repository at this point in the history
  • Loading branch information
lambdatiger committed Jan 18, 2024
1 parent a4f2ad4 commit 59bf6e3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions addons/frag/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion addons/frag/functions/fnc_initRound.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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
[
Expand Down

0 comments on commit 59bf6e3

Please sign in to comment.