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; }
public override void Deserialize(QNetworkReader reader) { NetId = reader.ReadNetworkId(); SceneId = reader.ReadSceneId(); Position = reader.ReadVector3(); Payload = reader.ReadBytesAndSize(); }
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(); }
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();