2015-01-11 18:24:19 +00:00
|
|
|
#include "script_component.hpp"
|
2015-04-27 20:04:35 +00:00
|
|
|
|
2015-04-30 08:50:49 +00:00
|
|
|
private ["_params", "_tracerObj", "_index", "_positions", "_data"];
|
2015-01-11 18:24:19 +00:00
|
|
|
_params = _this select 0;
|
|
|
|
_tracerObj = _params select 0;
|
|
|
|
_index = _params select 1;
|
|
|
|
|
2015-04-27 20:04:35 +00:00
|
|
|
if (alive _tracerObj && (count GVAR(traces)) > 0) then {
|
2015-04-06 16:22:43 +00:00
|
|
|
_data = GVAR(traces) select _index;
|
|
|
|
_positions = _data select 4;
|
2015-06-19 03:04:48 +00:00
|
|
|
_positions set [(count _positions), [(getPos _tracerObj), vectorMagnitude (velocity _tracerObj)]];
|
2015-01-11 18:24:19 +00:00
|
|
|
} else {
|
2015-11-30 15:45:20 +00:00
|
|
|
[(_this select 1)] call CBA_fnc_removePerFrameHandler;
|
2015-04-27 20:04:35 +00:00
|
|
|
};
|