public Header(BitStream bitStream) { this.FileType = bitStream.ReadString(); this.DemoProtocol = bitStream.ReadInt32(); this.NetworkProtocol = bitStream.ReadInt32(); this.ServerName = bitStream.ReadString(260); this.ClientName = bitStream.ReadString(260); this.MapName = bitStream.ReadString(260); this.GameDirectory = bitStream.ReadString(260); this.PlaybackTime = bitStream.ReadFloat(); this.PlaybackTicks = bitStream.ReadInt32(); this.PlaybackFrames = bitStream.ReadInt32(); this.SignOnLength = bitStream.ReadInt32(); }
public PlayerInfo(byte[] playerInfoData) { BitStream bitStream = new BitStream(playerInfoData); this.Version = bitStream.ReadBigEndianInt64(); this.XUID = bitStream.ReadBigEndianInt64(); this.Name = bitStream.ReadString(128); this.UserID = bitStream.ReadBigEndianInt32(); this.GUID = bitStream.ReadString(33); this.FriendsID = bitStream.ReadBigEndianInt32(); this.FriendsName = bitStream.ReadString(128); this.IsFakePlayer = bitStream.ReadBool(); this.IsHLTV = bitStream.ReadBool(); this.CustomFileCRCs = new int[4]; for (int i = 0; i < CustomFileCRCs.Length; i++) { this.CustomFileCRCs[i] = bitStream.ReadInt32(); } this.FilesDownloaded = bitStream.ReadChar(); }