Shot parent possible fix #1

This commit is contained in:
lambdatiger 2024-01-17 23:13:31 -06:00
parent a4f2ad45d8
commit 59bf6e3b91
2 changed files with 7 additions and 1 deletions

View File

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

View File

@ -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
[