From 1565f8a050227d426880de57c16209a56c9fa44c Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Mon, 21 Oct 2024 13:49:28 -0500 Subject: [PATCH] Frag - Fix holdoff --- addons/frag/XEH_postInit.sqf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/frag/XEH_postInit.sqf b/addons/frag/XEH_postInit.sqf index b4c307749b8..0ea9c57eeb7 100644 --- a/addons/frag/XEH_postInit.sqf +++ b/addons/frag/XEH_postInit.sqf @@ -12,9 +12,9 @@ }; if (GVAR(enabled) && _ammo call FUNC(shouldFrag)) then { // only let a unit make a frag event once per second - - private _instigator = _shotParents select !isNull ((getShotParents _projectile)#1); - if (CBA_missionTime < (_instigator getVariable [QGVAR(nextFragEvent), -1])) exitWith {}; + private _shotParents = getShotParents _projectile; + private _instigator = _shotParents select !isNull (_shotParents#1); + if (CBA_missionTime < (_instigator getVariable [QGVAR(nextFragEvent), -1])) exitWith { TRACE_1("skip",typeOf _instigator) }; _instigator setVariable [QGVAR(nextFragEvent), CBA_missionTime + ACE_FRAG_FRAG_UNIT_HOLDOFF]; // Wait a frame to make sure it doesn't target the dead