From 388b6bab71eaab6869b5e442ba22c8a67b370e20 Mon Sep 17 00:00:00 2001 From: vis2k Date: Wed, 10 Mar 2021 20:55:21 +0800 Subject: [PATCH] NetworkAnimator: replace UNET's magic readyConnection check with isClient. this was from UNET and there was no comment, so nobody knew why it was used instead of isClient. --- Assets/Mirror/Components/NetworkAnimator.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Assets/Mirror/Components/NetworkAnimator.cs b/Assets/Mirror/Components/NetworkAnimator.cs index 897ba2b4d..21874f8bc 100644 --- a/Assets/Mirror/Components/NetworkAnimator.cs +++ b/Assets/Mirror/Components/NetworkAnimator.cs @@ -215,7 +215,7 @@ void SendAnimationMessage(int stateHash, float normalizedTime, int layerId, floa { RpcOnAnimationClientMessage(stateHash, normalizedTime, layerId, weight, parameters); } - else if (NetworkClient.readyConnection != null) + else if (isClient) { CmdOnAnimationServerMessage(stateHash, normalizedTime, layerId, weight, parameters); } @@ -227,7 +227,7 @@ void SendAnimationParametersMessage(byte[] parameters) { RpcOnAnimationParametersClientMessage(parameters); } - else if (NetworkClient.readyConnection != null) + else if (isClient) { CmdOnAnimationParametersServerMessage(parameters); } @@ -455,7 +455,7 @@ public void SetTrigger(int hash) return; } - if (NetworkClient.readyConnection != null) + if (isClient) CmdOnAnimationTriggerServerMessage(hash); // call on client right away @@ -504,7 +504,7 @@ public void ResetTrigger(int hash) return; } - if (NetworkClient.readyConnection != null) + if (isClient) CmdOnAnimationResetTriggerServerMessage(hash); // call on client right away