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.

This commit is contained in:
vis2k 2021-03-10 20:55:21 +08:00
parent 97615b9491
commit 388b6bab71

View File

@ -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