This commit is contained in:
in0finite 2022-05-04 02:55:45 +02:00
parent 866f88936f
commit ff896ab512

View file

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