public override void Deserialize(QNetworkReader reader)
        {
            base.Deserialize(reader);
            ObjectId = reader.ReadInt32();
            Position = reader.ReadVector3();
            Normal   = reader.ReadVector3();
            var sectorId = reader.ReadInt32();

            Sector = QSBWorldSync.GetWorldFromId <QSBSector>(sectorId).AttachedObject;
        }
예제 #2
0
 public override void Deserialize(QNetworkReader reader)
 {
     NetId    = reader.ReadNetworkId();
     SceneId  = reader.ReadSceneId();
     Position = reader.ReadVector3();
     Payload  = reader.ReadBytesAndSize();
 }
예제 #3
0
 public override void Deserialize(QNetworkReader reader)
 {
     base.Deserialize(reader);
     StateIndex   = reader.ReadInt32();
     OnUnitSphere = reader.ReadVector3();
     OrbitAngle   = reader.ReadInt32();
 }
 public override void Deserialize(QNetworkReader reader)
 {
     base.Deserialize(reader);
     PlayerPosition = reader.ReadVector3();
     PlayerRotation = reader.ReadQuaternion();
     CameraDegrees  = reader.ReadSingle();
 }
예제 #5
0
 public override void Deserialize(QNetworkReader reader)
 {
     NetId    = reader.ReadNetworkId();
     assetId  = reader.ReadNetworkHash128();
     Position = reader.ReadVector3();
     Payload  = reader.ReadBytesAndSize();
     if (reader.Length - reader.Position >= 16U)
     {
         Rotation = reader.ReadQuaternion();
     }
 }
 private void UnserializeModeTransform(QNetworkReader reader, bool initialState)
 {
     if (HasAuthority)
     {
         reader.ReadVector3();
         if (SyncRotationAxis != AxisSyncMode.None)
         {
             UnserializeRotation3D(reader, SyncRotationAxis, RotationSyncCompression);
         }
     }
     else if (IsServer && clientMoveCallback3D != null)
     {
         var position = reader.ReadVector3();
         var zero     = Vector3.zero;
         var rotation = Quaternion.identity;
         if (SyncRotationAxis != AxisSyncMode.None)
         {
             rotation = UnserializeRotation3D(reader, SyncRotationAxis, RotationSyncCompression);
         }
         if (clientMoveCallback3D(ref position, ref zero, ref rotation))
         {
             transform.position = position;
             if (SyncRotationAxis != AxisSyncMode.None)
             {
                 transform.rotation = rotation;
             }
         }
     }
     else
     {
         transform.position = reader.ReadVector3();
         if (SyncRotationAxis != AxisSyncMode.None)
         {
             transform.rotation = UnserializeRotation3D(reader, SyncRotationAxis, RotationSyncCompression);
         }
     }
 }
 public static Vector3 UnserializeVelocity3D(QNetworkReader reader, CompressionSyncMode compression) => reader.ReadVector3();