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