From a9a5a4a9bab8bb8d73e66164d940b56e83cb5ae7 Mon Sep 17 00:00:00 2001 From: lambdatiger Date: Tue, 9 Jan 2024 17:25:38 -0600 Subject: [PATCH] dealt with cases were projectile is deleted before fragmentation --- addons/frag/functions/fnc_doFrag.sqf | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/frag/functions/fnc_doFrag.sqf b/addons/frag/functions/fnc_doFrag.sqf index 074b0cd2e1..412678377e 100644 --- a/addons/frag/functions/fnc_doFrag.sqf +++ b/addons/frag/functions/fnc_doFrag.sqf @@ -23,20 +23,20 @@ params ["_args", ["_isSubMunit", false, [false]]]; _args params [ ["_proj", objNull, [objNull]], ["_posASL", [0,0,0], [[]], [3]], - ["_vel", [0,0,0] , [[]], [3]] + ["_vel", [0,0,0] , [[]], [3]], + ["_ammo", "", [""]], + ["_shotParents", [objNull, objNull], [[]]] ]; TRACE_3("",_proj,_posASL,_vel); -private _shotParents = getShotParents _proj; -private _ammo = typeOf _proj; private _shotParentVic = _shotParents#0; if (_shotParentVic getVariable [QGVAR(nextFragTime), -1] > CBA_missionTime) exitWith { TRACE_1("vehicleTimeExit",_shotParentVic); }; -_shotParentVic setVariable [QGVAR(nextFragTime), CBA_missionTime + ACE_FRAG_HOLDOFF]; +_shotParentVic setVariable [QGVAR(nextFragTime), CBA_missionTime + ACE_FRAG_HOLDOFF_VEHICLE]; private _timeSince = CBA_missionTime - GVAR(lastFragTime); -if (_ammo isEqualTo "" || {_posASL isEqualTo [0,0,0] || _timeSince < 0.2}) exitWith { +if (_ammo isEqualTo "" || {_posASL isEqualTo [0,0,0] || _timeSince < ACE_FRAG_HOLDOFF}) exitWith { TRACE_3("timeExit",_timeSince,CBA_missionTime,GVAR(lastFragTime)); }; GVAR(lastFragTime) = CBA_missionTime;