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; 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; };