mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-25 05:20:17 +00:00
...
This commit is contained in:
parent
866f88936f
commit
ff896ab512
1 changed files with 1 additions and 12 deletions
|
@ -419,11 +419,6 @@ namespace SanAndreasUnity.Net
|
||||||
this.SetRotation(syncData.Rotation);
|
this.SetRotation(syncData.Rotation);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetPosition()
|
|
||||||
{
|
|
||||||
this.SetPosition(m_currentSyncData.Position);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SetPosition(Vector3 pos)
|
private void SetPosition(Vector3 pos)
|
||||||
{
|
{
|
||||||
if (m_parameters.useRigidBody && m_hasRigidBody)
|
if (m_parameters.useRigidBody && m_hasRigidBody)
|
||||||
|
@ -432,11 +427,6 @@ namespace SanAndreasUnity.Net
|
||||||
m_transform.localPosition = pos;
|
m_transform.localPosition = pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetRotation()
|
|
||||||
{
|
|
||||||
this.SetRotation(m_currentSyncData.Rotation);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SetRotation(Quaternion rot)
|
private void SetRotation(Quaternion rot)
|
||||||
{
|
{
|
||||||
if (m_parameters.useRigidBody && m_hasRigidBody)
|
if (m_parameters.useRigidBody && m_hasRigidBody)
|
||||||
|
@ -476,8 +466,7 @@ namespace SanAndreasUnity.Net
|
||||||
|
|
||||||
if (m_nextSyncData.HasValue && this.ArrivedToCurrentSyncData())
|
if (m_nextSyncData.HasValue && this.ArrivedToCurrentSyncData())
|
||||||
{
|
{
|
||||||
this.SetPosition();
|
this.Apply(m_currentSyncData);
|
||||||
this.SetRotation();
|
|
||||||
|
|
||||||
m_currentSyncData = m_nextSyncData.Value;
|
m_currentSyncData = m_nextSyncData.Value;
|
||||||
m_nextSyncData = null;
|
m_nextSyncData = null;
|
||||||
|
|
Loading…
Reference in a new issue