diff --git a/Assets/Scripts/Networking/TransformSyncer.cs b/Assets/Scripts/Networking/TransformSyncer.cs index 6f789e17..fd9b39eb 100644 --- a/Assets/Scripts/Networking/TransformSyncer.cs +++ b/Assets/Scripts/Networking/TransformSyncer.cs @@ -419,11 +419,6 @@ namespace SanAndreasUnity.Net this.SetRotation(syncData.Rotation); } - private void SetPosition() - { - this.SetPosition(m_currentSyncData.Position); - } - private void SetPosition(Vector3 pos) { if (m_parameters.useRigidBody && m_hasRigidBody) @@ -432,11 +427,6 @@ namespace SanAndreasUnity.Net m_transform.localPosition = pos; } - private void SetRotation() - { - this.SetRotation(m_currentSyncData.Rotation); - } - private void SetRotation(Quaternion rot) { if (m_parameters.useRigidBody && m_hasRigidBody) @@ -476,8 +466,7 @@ namespace SanAndreasUnity.Net if (m_nextSyncData.HasValue && this.ArrivedToCurrentSyncData()) { - this.SetPosition(); - this.SetRotation(); + this.Apply(m_currentSyncData); m_currentSyncData = m_nextSyncData.Value; m_nextSyncData = null;