-
Notifications
You must be signed in to change notification settings - Fork 740
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
Weather - Properly sync overcast value #5688
Conversation
* Makes sure that all clients share the same (numeric) overcast value * Only affects the barometric pressure calculation * Does not affect the actual weather on the clients
@@ -11,13 +11,14 @@ GVAR(wind_period_start_time) = CBA_missionTime; | |||
if (!isServer) then { | |||
"ACE_MISC_PARAMS" addPublicVariableEventHandler { | |||
TRACE_1("MISC PARAMS PVEH",ACE_MISC_PARAMS); | |||
GVAR(currentOvercast) = (ACE_MISC_PARAMS select 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know why there are ()
on the right side in the rest of the params, but they are really pointless.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can fix it in the following cleanup PR. This part of the code is going to be removed anyways.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This only runs on non servers
So GVAR(currentOvercast) is always 0 on server?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The server never uses:
GVAR(currentTemperature), GVAR(currentHumidity) and GVAR(currentOvercast)
imho, instead of syncing with a pub variable "event" in ACE_MISC_PARAMS |
Yes, I'm going to remove those public variable event handlers entirely in the following cleanup pull request. |
Avoids barometric pressure synchronization issues between clients due to overcast drift.
Reference: https://cuel.github.io/