mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
ab989d4c34
* simplify map gestures transmit process * Update addons/map_gestures/functions/fnc_transmit.sqf Co-Authored-By: mharis001 <34453221+mharis001@users.noreply.github.com> * Update addons/map_gestures/functions/fnc_transmit.sqf Co-Authored-By: mharis001 <34453221+mharis001@users.noreply.github.com> * Update addons/map_gestures/functions/fnc_transmit.sqf Co-Authored-By: mharis001 <34453221+mharis001@users.noreply.github.com> * remove setPlayerOwner call Co-authored-by: mharis001 <34453221+mharis001@users.noreply.github.com>
37 lines
770 B
Plaintext
37 lines
770 B
Plaintext
#include "script_component.hpp"
|
|
/*
|
|
* Author: Dslyecxi, MikeMatrix
|
|
* 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
|
|
*/
|
|
|
|
BEGIN_COUNTER(transmit);
|
|
|
|
params ["", "_pfhId"];
|
|
|
|
if (!visibleMap) then {
|
|
call FUNC(endTransmit);
|
|
};
|
|
|
|
if (!GVAR(EnableTransmit) || !visibleMap) exitWith {
|
|
[_pfhId] call CBA_fnc_removePerFrameHandler;
|
|
};
|
|
|
|
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];
|
|
};
|
|
|
|
END_COUNTER(transmit);
|