fix: Added missing [Command] attribute to NetworkAnimator.CmdSetAnimatorSpeed

This commit is contained in:
MrGadget1024 2021-07-29 08:49:59 -04:00
parent 7e425d3106
commit 015c4d3f35

View File

@ -134,13 +134,6 @@ void CheckSpeed()
}
}
void CmdSetAnimatorSpeed(float newSpeed)
{
// set animator
animator.speed = newSpeed;
animatorSpeed = newSpeed;
}
void OnAnimatorSpeedChanged(float _, float value)
{
// skip if host or client with authority
@ -593,6 +586,14 @@ void CmdOnAnimationResetTriggerServerMessage(int hash)
RpcOnAnimationResetTriggerClientMessage(hash);
}
[Command]
void CmdSetAnimatorSpeed(float newSpeed)
{
// set animator
animator.speed = newSpeed;
animatorSpeed = newSpeed;
}
#endregion
#region client message handlers