Fix client authoritive NetworkAnimator#2115
Fix client authoritive NetworkAnimator#2115florius0 wants to merge 4 commits intoUnity-Technologies:developfrom
NetworkAnimator#2115Conversation
сo-authored: Andrei Soprachev <SoprachevAK@users.noreply.github.com>
| } | ||
| UpdateParameters(parametersUpdate); | ||
| if (NetworkManager.ConnectedClientsIds.Count - 2 > 0) | ||
| if (IsHost && NetworkManager.ConnectedClientsIds.Count > 2 || NetworkManager.ConnectedClientsIds.Count > 1) |
There was a problem hiding this comment.
I see...yes that is a good catch indeed!
How about we condense that to something like:
if (NetworkManager.ConnectedClientsIds.Count > (IsHost ? 2 : 1) )
{
Thank you for your contribution and taking the time to troubleshoot that! 👍
There was a problem hiding this comment.
Can do, but isn't it more clear as it is?
There was a problem hiding this comment.
Well...with your current suggested fix you could still have a Host with one connected client and it would pass the conditional "If" check. My update to your suggestion assures that if it is a Host it requires more than 2 connected clients, otherwise if it is server it only requires one.
Does that make sense?
|
This PR was brought into the build pipeline via PR-2127. Closing this PR now that it has been processed internally. |
|
@florius0 |
|
Thank you. We are currently using our fork cherry-picked on v1.0.0 and we'll watch for it in our project |
When synchronising
AnimatorwithNetworkAnimatorcomponent the second client (if number of clients is greater than 2) was not synchronised whenIsServerAuthoritive()is false.Changelog
NetworkAnimatorwas not synced correctly for second client when not server-authoritive.Testing and Documentation