Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map Gestures - Improve transmit process #7646

Merged
merged 5 commits into from
Apr 19, 2020

Conversation

jokoho48
Copy link
Member

When merged this pull request will:

  • simplify map gestures transmit process
  • Reduces network traffic
  • increases performance
  • and opens doors for Zeus and Spectator implementations

@jonpas jonpas added kind/enhancement Release Notes: **IMPROVED:** target/next-milestone? labels Apr 18, 2020
@jonpas
Copy link
Member

jonpas commented Apr 18, 2020

Please rename PR title to match the guidelines as seen in the PR template.

@jokoho48 jokoho48 changed the title simplify map gestures transmit process Map_Gestures - Improve transmit process Apr 18, 2020
@jokoho48 jokoho48 changed the title Map_Gestures - Improve transmit process Map Gestures - Improve transmit process Apr 18, 2020
@jonpas jonpas added this to the 3.13.2 milestone Apr 18, 2020
@PabstMirror
Copy link
Contributor

remove [] call EFUNC(common,setPlayerOwner); in postInit, I think nothing else uses it now so it won't have to run

@PabstMirror
Copy link
Contributor

Just leaving note here in-case we see any issues with network traffic:
alternate fix would be to use setVar with client array

private _clientsToSendTo = [];
{
    private _owner = _x getVariable [QEGVAR(common,playerOwner), -1];
    if (_owner > -1) then {
        private _remotePos = _x getVariable [QGVAR(remotePos), [0,0,0]];
        if ((_remotePos distance2d GVAR(pointPosition)) > 1) then { // Only transmit when actually moving
            _clientsToSendTo pushBack _owner;
            _x setVariable [QGVAR(remotePos), GVAR(pointPosition)];
        };
    };
} count ([ACE_player, GVAR(maxRange)] call FUNC(getProximityPlayers));

ACE_player setVariable [QGVAR(pointPosition), GVAR(pointPosition), _clientsToSendTo];

@jonpas
Copy link
Member

jonpas commented Apr 18, 2020

alternate fix would be to use setVar with client array

Another note: that wouldn't allow Spectators and Zeus to see it on the map, which is @jokoho48's plan.

@PabstMirror PabstMirror merged commit ab989d4 into master Apr 19, 2020
@PabstMirror PabstMirror deleted the simplify_map_gestures_transmit branch April 19, 2020 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Release Notes: **IMPROVED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants