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

Fix null ace_player from early call to addPlayerEH #4289

Merged
merged 2 commits into from
Aug 27, 2016

Conversation

PabstMirror
Copy link
Contributor

It is possible that CBA_fnc_addPlayerEventHandler has already been called and run,
We will NOT get any events for the initial state, so manually set ACE_player

e.g. in preInit or SP mission init.sqf do

["loadout", {
    diag_log text format ["%1 - Loadout change - %2", time, _this];
}] call CBA_fnc_addPlayerEventHandler;

and ace_player will never bet set because the event has already happened.

Skimmed our use of the function and fixed noradio as well, everything else seemed ok.

@PabstMirror PabstMirror added the kind/bug-fix Release Notes: **FIXED:** label Aug 24, 2016
@PabstMirror PabstMirror added this to the 3.7.0 milestone Aug 24, 2016
@PabstMirror
Copy link
Contributor Author

@commy2 - I've been also thinking we could tweaks this on CBA's end.
Maybe delay adding state checker until after postInit.
Or trigger event on add if the player is already defined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug-fix Release Notes: **FIXED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants