-
Notifications
You must be signed in to change notification settings - Fork 557
feat: other players loading progress: replacing owner-net-variables with server rpcs #630
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
feat: other players loading progress: replacing owner-net-variables with server rpcs #630
Conversation
Co-authored-by: Fernando Cortez <[email protected]>
* Renamed class and file to reflect naming conventions * Added namespace * Replaced magic string and const with serialized fields
This validation doesn't make sense anymore since in-scene imps are now in a different scene than the NavigationSystem
Replaced cooldown coroutine with one that unloads the scene after a delay. The coroutine is stopped in OnTriggerEnter, and before starting a new one if it wasn't stopped before.
…loading Reverted to polling to decide when to load/unload scenes instead of doing it in events to handle those intermediary states better
* Added support for non-networked game and for before the client connects
…ress bars from loading screen
* this is to handle cases where the SceneLoaderWrapper has not spawned yet (i.e. in the case of client synchronization)
…nt finishes sync before stopping loading screen Co-authored-by: Sam Bellomo <[email protected]>
else | ||
{ | ||
m_LocalProgress = value; | ||
UpdateClientProgressServerRpc(NetworkManager.LocalClientId, value); |
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.
should extract this, shouldn't put heavy operations in properties
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.
need to keep track if value changed or not
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.
need to keep track if value changed or not
else | ||
{ | ||
m_LocalProgress = value; | ||
UpdateClientProgressServerRpc(NetworkManager.LocalClientId, value); |
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.
should extract this, shouldn't put heavy operations in properties
Closing this because we decided the first solution was better |
Description
This draft PR shows an alternative solution to MTT-2239, using server-authoritative network variables instead of owner-writable ones. We can decide if we prefer this solution over the other one (#580 )
Issue Number(s)
Contribution checklist