2015-01-11 18:24:19 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
if(GVAR(autoTrace)) then {
|
2015-04-06 16:22:43 +00:00
|
|
|
[] call FUNC(startTracing);
|
2015-01-11 18:24:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// setAccTime 0.05;
|
|
|
|
_index = (count GVAR(traces));
|
|
|
|
_obj = _this select 1;
|
|
|
|
_origin = _this select 0;
|
|
|
|
_color = [1,0,0,1];
|
|
|
|
if((count _this) > 2) then {
|
2015-04-06 16:22:43 +00:00
|
|
|
_color = _this select 2;
|
2015-01-11 18:24:19 +00:00
|
|
|
};
|
|
|
|
_positions = [];
|
|
|
|
_objVel = velocity _obj;
|
|
|
|
_objTVel = sqrt((_objVel select 0)^2 + (_objVel select 1)^2 + (_objVel select 2)^2);
|
|
|
|
_positions set[(count _positions), [(getPos _obj), _objTVel]];
|
|
|
|
_data = [_origin, typeOf _origin, typeOf _obj, _objTVel, _positions, _color];
|
|
|
|
GVAR(traces) set[_index, _data];
|
2015-03-22 04:22:16 +00:00
|
|
|
[DFUNC(trackTrace), 0, [_obj, _index, time]] call cba_fnc_addPerFrameHandler;
|