From 1496ddf13bb360f594440e2f69475704129ebe40 Mon Sep 17 00:00:00 2001 From: lambdatiger Date: Sun, 13 Oct 2024 16:36:11 -0500 Subject: [PATCH] Frag - Remove setShotParents (#10418) --- addons/frag/XEH_postInit.sqf | 6 +++--- addons/frag/functions/fnc_frago.sqf | 7 ++----- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/addons/frag/XEH_postInit.sqf b/addons/frag/XEH_postInit.sqf index 7b0e32e04c9..b4c307749b8 100644 --- a/addons/frag/XEH_postInit.sqf +++ b/addons/frag/XEH_postInit.sqf @@ -12,15 +12,15 @@ }; if (GVAR(enabled) && _ammo call FUNC(shouldFrag)) then { // only let a unit make a frag event once per second - private _shotParents = getShotParents _projectile; - private _instigator = _shotParents select !isNull (_shotParents#1); + + private _instigator = _shotParents select !isNull ((getShotParents _projectile)#1); if (CBA_missionTime < (_instigator getVariable [QGVAR(nextFragEvent), -1])) exitWith {}; _instigator setVariable [QGVAR(nextFragEvent), CBA_missionTime + ACE_FRAG_FRAG_UNIT_HOLDOFF]; // Wait a frame to make sure it doesn't target the dead [{ [QGVAR(frag_eh), _this] call CBA_fnc_serverEvent - }, [_posASL, _ammo, [objNull, _instigator]]] call CBA_fnc_execNextFrame; + }, [_posASL, _ammo]] call CBA_fnc_execNextFrame; }; }] call EFUNC(common,addExplosionEventHandler); diff --git a/addons/frag/functions/fnc_frago.sqf b/addons/frag/functions/fnc_frago.sqf index bda1aa58f6d..b6d20883d2d 100644 --- a/addons/frag/functions/fnc_frago.sqf +++ b/addons/frag/functions/fnc_frago.sqf @@ -6,7 +6,6 @@ * Arguments: * 0: ASL position projetile is fragmenting at * 1: Projectile ammo classname - * 2: Projectile shot parents * * Return Value: * The number of fragments created @@ -21,8 +20,8 @@ BEGIN_COUNTER(frago); -params ["_fragPosASL", "_shellType", "_shotParents"]; -TRACE_3("frago",_fragPosASL,_shellType,_shotParents); +params ["_fragPosASL", "_shellType"]; +TRACE_2("frago",_fragPosASL,_shellType); // Limit max frag count if there was a recent frag private _maxFrags = round linearConversion [ @@ -114,7 +113,6 @@ if (_targets isNotEqualTo []) then { private _fragObj = createVehicleLocal [selectRandom _fragTypes, _fragPosAGL, [], 0, "CAN_COLLIDE"]; _fragObj setVectorDir _vectorDir; _fragObj setVelocity _fragObjVelocity; - _fragObj setShotParents _shotParents; #ifdef DEBUG_MODE_DRAW [_fragObj, "green", true] call FUNC(dev_trackObj); if (GVAR(dbgSphere)) then { @@ -147,7 +145,6 @@ if (_targets isNotEqualTo []) then { private _fragObj = createVehicleLocal [selectRandom _fragTypes, _fragPosAGL, [], 0, "CAN_COLLIDE"]; _fragObj setVectorDir _vectorDir; _fragObj setVelocity _fragObjVelocity; - _fragObj setShotParents _shotParents; #ifdef DEBUG_MODE_DRAW [_fragObj, "blue", true] call FUNC(dev_trackObj);