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

Events - Make player muzzle event args consistent for retro #1502

Closed
wants to merge 1 commit into from

Conversation

PabstMirror
Copy link
Contributor

Fix #1363

playerEvent.sqf does (just the 2 muzzles, no unit)

    if (_newMuzzle isNotEqualTo GVAR(oldMuzzle)) then {
        [QGVAR(muzzleEvent), [_newMuzzle select 2, GVAR(oldMuzzle) select 2]] call CBA_fnc_localEvent;

We need to make the two args arrays the same, and I think it's much safer to modify the retro one

@PabstMirror PabstMirror added this to the 3.15.6 milestone Sep 18, 2021
@commy2
Copy link
Contributor

commy2 commented Sep 22, 2021

I don't like this. It should pass unit-newMuzzle-oldMuzzle.

@PabstMirror
Copy link
Contributor Author

PabstMirror commented Sep 22, 2021

I agree it probably should have, but I think changing it now can break a lot more than this
This just changes the "retro" args which are called at most 0 to 1 times.
The playerEvent loop would be called much more often.

IE, code written for the muzzle EH is going to be expecting [newMuzzle, oldMuzzle]

@PabstMirror PabstMirror removed this from the 3.15.6 milestone Oct 3, 2021
@PabstMirror PabstMirror closed this Oct 3, 2021
@PabstMirror PabstMirror deleted the muzzleRetroConsistancy branch October 3, 2021 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Muzzle player event handler not returning documented returns
2 participants