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 ace_settings #1432

Merged
merged 3 commits into from
May 30, 2015
Merged

Fix ace_settings #1432

merged 3 commits into from
May 30, 2015

Conversation

PabstMirror
Copy link
Contributor

Problem with #1214
this should also solve issue #1273

Clients don't localize and they don't load settings from profile.

I think the problem is we never raise the ServerSettingsReceived on clients and GVAR(SettingsInitialized) never changes to true, so that PFEH at bottom of postInit runs forever.

Server language english
Client screenshot in spanish:

untitled

@PabstMirror PabstMirror added the kind/bug-fix Release Notes: **FIXED:** label May 30, 2015
@ViperMaul ViperMaul added this to the 3.1.0 milestone May 30, 2015
@nicolasbadano
Copy link
Contributor

I think the problem is we never raise the ServerSettingsReceived

That's because this line is wrong:

https://github.com/acemod/ACE3/blob/master/addons/common/XEH_preInit.sqf#L313

should be a globalEvent

@PabstMirror
Copy link
Contributor Author

What about JIPs or if the server triggers the event before clients load.

@nicolasbadano
Copy link
Contributor

What about JIPs or if the server triggers the event before clients load.

That's a good point. TBH the localEvent thing is a typo, but your implementation covers those topics better. Let me think it a minute

@nicolasbadano nicolasbadano reopened this May 30, 2015
@nicolasbadano
Copy link
Contributor

Right, I like you solution (which is actually THE solution). Hold on a minute more while I fix my bloody mess

…. As per @PabstMirror solution, the GVAR(Settings) variable is monitored to determine when the server info has arrived. Fix #1273
@nicolasbadano
Copy link
Contributor

@PabstMirror, please check that last commit in case I'm derping again. But I think I now see it: the "ServerSettingsReceived" event was redundant, as it's much better to check isNil QGVAR(settings) as you proposed, which is JIP compatible.

nicolasbadano added a commit that referenced this pull request May 30, 2015
@nicolasbadano nicolasbadano merged commit d46074a into master May 30, 2015
@nicolasbadano nicolasbadano deleted the fixSettings branch May 30, 2015 03:59
// If settings are not initialized then wait
if !(GVAR(SettingsInitialized)) exitWith {};
if (isNil QGVAR(settings)) exitWith {
diag_log text format["[ACE] Waiting on settings from server"];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to print this to the rtp? What if the settings arrive late? Then we have spammed the rtp with quite a few messages. There is no need to print this multiple times I think.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I noticed that, but I decided leaving that spam on the first version should be good, to be able to easily check how long the settings are delaying. I propose to remove it on the next update.

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.

4 participants