private void UnserializeModeTransform(NetworkReader reader, bool initialState)
{
if (base.hasAuthority)
{
reader.ReadVector3();
if (this.syncRotationAxis != NetworkTransform.AxisSyncMode.None)
{
NetworkTransform.UnserializeRotation3D(reader, this.syncRotationAxis, this.rotationSyncCompression);
}
}
else if (base.isServer && (this.m_ClientMoveCallback3D != null))
{
Vector3 position = reader.ReadVector3();
Vector3 zero = Vector3.zero;
Quaternion identity = Quaternion.identity;
if (this.syncRotationAxis != NetworkTransform.AxisSyncMode.None)
{
identity = NetworkTransform.UnserializeRotation3D(reader, this.syncRotationAxis, this.rotationSyncCompression);
}
if (this.m_ClientMoveCallback3D(ref position, ref zero, ref identity))
{
this.m_TargetSyncPosition = position;
if (this.syncRotationAxis != NetworkTransform.AxisSyncMode.None)
{
this.m_TargetSyncRotation3D = identity;
}
}
}
else
{
this.m_TargetSyncPosition = reader.ReadVector3();
if (this.syncRotationAxis != NetworkTransform.AxisSyncMode.None)
{
this.m_TargetSyncRotation3D = NetworkTransform.UnserializeRotation3D(reader, this.syncRotationAxis, this.rotationSyncCompression);
}
}
}