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

Laser Locality Issue #1959

Closed
PabstMirror opened this issue Jul 31, 2015 · 0 comments
Closed

Laser Locality Issue #1959

PabstMirror opened this issue Jul 31, 2015 · 0 comments
Assignees
Labels
Milestone

Comments

@PabstMirror
Copy link
Contributor

https://github.com/acemod/ACE3/blob/master/addons/laser/functions/fnc_laser_init.sqf#L21

if(!(local _laserTarget)) exitWith { };

But when a vanilla laser comes on it seems to be local to everyone
so everyone runs FUNC(laserOn) and does the global event

In my mp testing count (ace_laser_laserEmitters select 1) with a single laser on was equal to the number of players.

Client 1 (shooter):

New Laser - 4c126400# 164378: empty.p3d [true] - LaserTargetW
laserOn globalEvent: ["23224469787",[B Alpha 1-2:1 (Pabst Mirror (2)),B Alpha 1-2:1 (Pabst Mirror (2)),"ace_laser_fnc_vanillaLaserSeekerHandler",1550,1001,1]]

Client 2:

New Laser - 49ee8800# 164039: empty.p3d [true] - LaserTargetW
laserOn globalEvent: ["23261625052",[B Alpha 1-1:1,B Alpha 1-1:2 (Pabst Mirror),"ace_laser_fnc_vanillaLaserSeekerHandler",1550,1001,1]]

Edit:
Playing with using

    _isLocal = false;
    {
        if ((laserTarget _x) == _laserTarget) exitWith {
            if (local _x) then {_isLocal = true};
        };
    } forEach allUnits;
    if(!_isLocal) exitWith { };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants