From 8b3826a78cd55d2bb06e6854394c6d2a67a2fe02 Mon Sep 17 00:00:00 2001 From: lambdatiger Date: Thu, 18 Jan 2024 15:10:31 -0600 Subject: [PATCH 1/2] white space for clarity Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> --- addons/frag/functions/fnc_dev_clearTraces.sqf | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/frag/functions/fnc_dev_clearTraces.sqf b/addons/frag/functions/fnc_dev_clearTraces.sqf index 07cec693d5..d057949331 100644 --- a/addons/frag/functions/fnc_dev_clearTraces.sqf +++ b/addons/frag/functions/fnc_dev_clearTraces.sqf @@ -18,6 +18,7 @@ { deleteVehicle _x; } forEach GVAR(dev_eventSpheres); + GVAR(dev_eventSpheres) = []; GVAR(dev_trackLines) = createHashMap; From 78a15b1d5c02ae3297db71777aa0ee1c48da14d7 Mon Sep 17 00:00:00 2001 From: lambdatiger Date: Thu, 18 Jan 2024 15:13:36 -0600 Subject: [PATCH 2/2] Optimize dev_hitbox deleting Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> --- addons/frag/functions/fnc_dev_drawTrace.sqf | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/addons/frag/functions/fnc_dev_drawTrace.sqf b/addons/frag/functions/fnc_dev_drawTrace.sqf index 7c4cb40189..b8de5d6790 100644 --- a/addons/frag/functions/fnc_dev_drawTrace.sqf +++ b/addons/frag/functions/fnc_dev_drawTrace.sqf @@ -27,11 +27,10 @@ if (!GVAR(debugOptions)) exitWith {}; } forEach GVAR(dev_trackLines); if (GVAR(drawHitBox)) then { - private _deleteArr = []; { _y params ["_object", "_boxPoints", "_color"]; if (!alive _object) then { - _deleteArr pushBack _x; + GVAR(dev_hitBoxes) deleteAt _x; continue; }; @@ -40,10 +39,5 @@ if (GVAR(drawHitBox)) then { drawLine3D [_object modelToWorld (_boxPoints#(_x#_i)), _object modelToWorld (_boxPoints#(_x#(_i-1))), _color]; }; } forEach HITBOX_DRAW_PATH; - } forEach GVAR(dev_hitBoxes); - - { - GVAR(dev_hitBoxes) deleteAt _x; - } forEach _deleteArr; };