Skip to content

fix: authority changing ownership via rpc can result in the same previous and current clientid values [BackPort] #3434

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

This fixes an issue with the synchronization of NetworkVariables when changing ownership where it was possible to have the previous owner be equal to the current owner when a client used an RPC to change ownership.

This includes an additional check for dirty states of any collections base NetworkVariables.

Changelog

  • Fixed: Issue where when a client changes ownership via RPC the NetworkBehaviour.OnOwnershipChanged can result in identical previous and current owner identifiers.

Testing and Documentation

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

Backport

This is a backport of #3347.

These changes are the backport fix of #3347.
This is the backport of the TestAuthorityChangingOwnership test from #3347.
adding changelog entry.
Adding inheritdoc for the addition of OnOwnershipChanged.
Making ChangeOwnershipRpc internal to avoid required XML API PVP check.
Adding "returns" for TestAuthorityChangingOwnership
@NoelStephensUnity NoelStephensUnity marked this pull request as ready for review May 1, 2025 18:13
@NoelStephensUnity NoelStephensUnity requested a review from a team as a code owner May 1, 2025 18:13
@NoelStephensUnity NoelStephensUnity enabled auto-merge (squash) May 1, 2025 18:27
Backporting a fix for DeferredMessagingTest that was already applied to the v2.x branch awhile back.
@NoelStephensUnity NoelStephensUnity merged commit d3545c8 into develop May 1, 2025
39 of 40 checks passed
@NoelStephensUnity NoelStephensUnity deleted the fix/authority-change-ownership-via-rpc-results-in-invalid-previous-and-current-clientids branch May 1, 2025 22:10
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.

2 participants