Skip to content

fix: ClientNetworkTransform ownership change with half precision synchronization issues [MTT-7271] #2712

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

Conversation

NoelStephensUnity
Copy link
Collaborator

@NoelStephensUnity NoelStephensUnity commented Sep 25, 2023

This PR resolves an issue with owner to host-server ownership transfer where the synchronization could get corrupted by noise due to:

  • The ownership message would proceed the NetworkTransform initialization message when transferring ownership from a client to a host when the ownership message should precede the NetworkTransform initialization message.
  • In transit NetworkTransform states from the client owner could get forwarded back to the client owner after ownership had already been transferred (on the host-server side) back to the host which would introduce echo "noise" of previous state updates by the original client owner.
  • Some client owner generated state updates could be skipped/ignored due to an edge case scenario where the client side network tick was the same even though the next tick event had been triggered.

fix: #2628

Changelog

  • Fixed: Issue where an owner authoritative NetworkTransform would proceed the NetworkTransform initialization when it should precede it.
  • Fixed: Issue where in transit NetworkTransform state update messages from a client owner to a host could get forwarded back to the client owner if ownership was transferred from the client to the host.
  • Fixed: Issue where client owner generated state updates could be skipped/ignored due to a timing related edge case scenario where the client side network tick could be the same even though the next tick event had been triggered.

Testing and Documentation

  • Includes integration test updates.
  • No documentation changes or additions were necessary.

Adding OnOwnershipChanged(ulong previous, ulong current)
This resolves the issue with client authoritative network transforms and the random "noise" that would occur when transitioning ownership from a remote client back to the host-server.
- Latent messages from the client would still be received and processed after ownership changed.
- Ownership changed messages would proceed the NetworkTransform initialization state update message. Now ownership changed messages precede the NetworkTransform initialization state update message.
- Clients could sometimes have the same network tick value even when the tick event had triggered, which for NetworkDeltaPosition would cause dropped state updates.
minor adjustment to a test that would fail from time to time due to precision.
This is another bug in the validation test suite where removing an override of a virtual method that can still be overridden will throw an API validation error.
@NoelStephensUnity NoelStephensUnity marked this pull request as ready for review October 2, 2023 20:41
@NoelStephensUnity NoelStephensUnity requested a review from a team as a code owner October 2, 2023 20:41
@NoelStephensUnity NoelStephensUnity merged commit aa7ecbf into develop Oct 3, 2023
@NoelStephensUnity NoelStephensUnity deleted the fix/networktransform-halffloat-ownership-sync-mtt-7271 branch October 3, 2023 16:25
NoelStephensUnity added a commit that referenced this pull request Oct 5, 2023
…hronization issues [MTT-7271] (#2712)

* update

Adding OnOwnershipChanged(ulong previous, ulong current)

* fix

This resolves the issue with client authoritative network transforms and the random "noise" that would occur when transitioning ownership from a remote client back to the host-server.
- Latent messages from the client would still be received and processed after ownership changed.
- Ownership changed messages would proceed the NetworkTransform initialization state update message. Now ownership changed messages precede the NetworkTransform initialization state update message.
- Clients could sometimes have the same network tick value even when the tick event had triggered, which for NetworkDeltaPosition would cause dropped state updates.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Short desync of ClientNetworkTransform after ownership change with half precision enabled
2 participants