ACE3/addons/frag/functions/fnc_dev_drawTrace.sqf

46 lines
1.1 KiB
Plaintext
Raw Normal View History

2024-01-11 20:01:50 +00:00
#include "..\script_component.hpp"
/*
* Author: Lambda.Tiger
* This function draws all development traces and is intended to be called on each frame.
*
* Arguments:
* None
*
* Return Value:
* None
*
* Example:
2024-03-29 01:01:29 +00:00
* call ace_frag_fnc_dev_drawTrace
*
* Public: No
*/
#define HITBOX_DRAW_PATH [[3, 2, 1, 5, 6, 7, 3, 0, 4, 5], [0, 1], [2, 6], [7, 4]]
2024-03-13 19:38:32 +00:00
2024-01-16 21:41:10 +00:00
if (!GVAR(debugOptions)) exitWith {};
{
2024-01-15 20:08:27 +00:00
_y params ["_posArray", "_color"];
if (count _posArray > 1) then {
for "_j" from 1 to count _posArray - 1 do {
drawLine3D [_posArray#(_j-1), _posArray#_j, _color];
};
2024-01-11 00:51:38 +00:00
};
} forEach GVAR(dev_trackLines);
if (GVAR(drawHitBox)) then {
{
_y params ["_object", "_boxPoints", "_color"];
if (!alive _object) then {
GVAR(dev_hitBoxes) deleteAt _x;
continue;
};
{
for "_i" from 1 to count _x -1 do {
drawLine3D [_object modelToWorld (_boxPoints#(_x#_i)), _object modelToWorld (_boxPoints#(_x#(_i-1))), _color];
};
} forEach HITBOX_DRAW_PATH;
} forEach GVAR(dev_hitBoxes);
};