2015-01-11 18:24:19 +00:00
|
|
|
#include "script_component.hpp"
|
2015-04-27 20:04:35 +00:00
|
|
|
|
2015-04-27 20:14:08 +00:00
|
|
|
private ["_color", "_data", "_index", "_obj", "_objSpd", "_origin", "_positions"];
|
2015-04-27 20:04:35 +00:00
|
|
|
|
|
|
|
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 = [];
|
2015-04-27 20:14:08 +00:00
|
|
|
_objSpd = vectorMagnitude (velocity _obj);
|
|
|
|
_positions set[(count _positions), [(getPos _obj), _objSpd]];
|
|
|
|
_data = [_origin, typeOf _origin, typeOf _obj, _objSpd, _positions, _color];
|
2015-04-27 20:04:35 +00:00
|
|
|
|
2015-01-11 18:24:19 +00:00
|
|
|
GVAR(traces) set[_index, _data];
|
2015-05-21 16:42:44 +00:00
|
|
|
[DFUNC(trackTrace), 0, [_obj, _index, ACE_time]] call cba_fnc_addPerFrameHandler;
|