private void CheckSendRate() { if ((this.GetNetworkSendInterval() != 0f) && (this.m_SendTimer < Time.time)) { this.m_SendTimer = Time.time + this.GetNetworkSendInterval(); AnimationParametersMessage msg = new AnimationParametersMessage { netId = base.netId }; this.m_ParameterWriter.SeekZero(); this.WriteParameters(this.m_ParameterWriter, true); msg.parameters = this.m_ParameterWriter.ToArray(); if (base.hasAuthority && (ClientScene.readyConnection != null)) { ClientScene.readyConnection.Send(0x29, msg); } else if (base.isServer && !base.localPlayerAuthority) { NetworkServer.SendToReady(base.gameObject, 0x29, msg); } } }
internal void HandleAnimParamsMsg(AnimationParametersMessage msg, NetworkReader reader) { if (!base.hasAuthority) { this.ReadParameters(reader, true); } }
private void CheckSendRate() { if ((double) this.GetNetworkSendInterval() == 0.0 || (double) this.m_SendTimer >= (double) Time.time) return; this.m_SendTimer = Time.time + this.GetNetworkSendInterval(); AnimationParametersMessage parametersMessage = new AnimationParametersMessage(); parametersMessage.netId = this.netId; this.m_ParameterWriter.SeekZero(); this.WriteParameters(this.m_ParameterWriter, true); parametersMessage.parameters = this.m_ParameterWriter.ToArray(); if (this.hasAuthority && ClientScene.readyConnection != null) { ClientScene.readyConnection.Send((short) 41, (MessageBase) parametersMessage); } else { if (!this.isServer || this.localPlayerAuthority) return; NetworkServer.SendToReady(this.gameObject, (short) 41, (MessageBase) parametersMessage); } }