2018-09-17 19:19:29 +00:00
|
|
|
#include "script_component.hpp"
|
2015-08-08 06:26:15 +00:00
|
|
|
/*
|
2015-08-10 06:45:43 +00:00
|
|
|
* Author: Dslyecxi, MikeMatrix
|
2015-08-08 06:26:15 +00:00
|
|
|
* Transmit PFH
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Arguments <ARRAY>
|
|
|
|
* 1: PFH ID <NUMBER>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* Return description <TYPE>
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [[], 2] call ace_map_gestures_fnc_transmit
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
2016-10-27 17:54:58 +00:00
|
|
|
BEGIN_COUNTER(transmit);
|
2015-08-08 06:26:15 +00:00
|
|
|
|
|
|
|
params ["", "_pfhId"];
|
|
|
|
|
2015-08-24 15:03:47 +00:00
|
|
|
if (!visibleMap) then {
|
2015-08-08 06:26:15 +00:00
|
|
|
call FUNC(endTransmit);
|
2015-08-24 15:28:08 +00:00
|
|
|
};
|
2015-08-24 15:03:47 +00:00
|
|
|
|
|
|
|
if (!GVAR(EnableTransmit) || !visibleMap) exitWith {
|
2015-08-08 06:26:15 +00:00
|
|
|
[_pfhId] call CBA_fnc_removePerFrameHandler;
|
|
|
|
};
|
|
|
|
|
2020-04-19 00:15:12 +00:00
|
|
|
private _remotePos = ACE_player getVariable [QGVAR(pointPosition), [0, 0, 0]];
|
|
|
|
if (_remotePos distance2D GVAR(pointPosition) > 1) then { // Only transmit when actually moving
|
|
|
|
ACE_player setVariable [QGVAR(pointPosition), GVAR(pointPosition), true];
|
|
|
|
};
|
2016-10-27 17:54:58 +00:00
|
|
|
|
|
|
|
END_COUNTER(transmit);
|