From ff896ab512623ce45157e7e7f82ba8b5e9f1cd14 Mon Sep 17 00:00:00 2001 From: in0finite Date: Wed, 4 May 2022 02:55:45 +0200 Subject: [PATCH] ... --- Assets/Scripts/Networking/TransformSyncer.cs | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) 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;